/* ===== VIEWER BASE STYLES ===== */
/* Shared across all catalog display styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.catalog-body {
    font-family: var(--body-font);
    color: var(--section-text);
    background: var(--section-bg);
    overflow-x: hidden;
}

/* Brand watermark */
.catalog-brand {
    position: fixed;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    border-radius: 0 0 14px 0;
    transition: opacity 0.3s;
}

.catalog-brand--top-left {
    top: 0;
    left: 0;
    border-radius: 0 0 14px 0;
}

.catalog-brand--top-center {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 14px 14px;
}

.catalog-brand--top-right {
    top: 0;
    right: 0;
    border-radius: 0 0 0 14px;
}

.brand-logo {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

.brand-name {
    font-family: var(--heading-font);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

/* Cover pages */
.cover-page {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-color: var(--cover-bg);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.cover-logo {
    max-width: 150px;
    max-height: 100px;
    margin-bottom: 30px;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
    animation: fadeInDown 1s ease;
}

.cover-title {
    font-family: var(--heading-font);
    font-size: clamp(32px, 7vw, 72px);
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 16px;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 1s ease 0.2s both;
}

.cover-subtitle {
    font-size: clamp(16px, 3vw, 24px);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    max-width: 600px;
    animation: fadeInUp 1s ease 0.4s both;
}

.cover-company {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 30px;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: fadeInUp 1s ease 0.6s both;
}

/* Article pages */
.article-page {
    min-height: 100%;
    padding: 0;
}

.article-title {
    font-family: var(--heading-font);
    font-size: clamp(22px, 4vw, 36px);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.article-content {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

.article-content h2 {
    font-family: var(--heading-font);
    font-size: 24px;
    margin: 20px 0 10px;
}

.article-content h3 {
    font-family: var(--heading-font);
    font-size: 20px;
    margin: 16px 0 8px;
}

.article-content p {
    margin-bottom: 12px;
}

.article-content ul,
.article-content ol {
    padding-left: 20px;
    margin-bottom: 12px;
}

.article-image-full {
    width: 100%;
    max-height: 50vh;
    overflow: hidden;
}

.article-image-full img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-text-area {
    padding: 30px;
}

.article-bg-image {
    min-height: 100%;
    background-size: cover;
    background-position: center;
}

.article-bg-overlay {
    min-height: 100vh;
    padding: 60px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100%;
}

.article-split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-split-text {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-split-left {
    direction: ltr;
}

.article-split-right .article-split-image {
    order: 2;
}

/* Catalog / Product pages */
.catalog-page {
    padding: var(--section-pad);
    min-height: 100%;
}

.catalog-section-title {
    font-family: var(--heading-font);
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--section-text);
}

.catalog-section-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 30px;
    font-size: 15px;
}

.products-grid {
    display: grid;
    grid-template-columns: var(--product-cols);
    gap: 20px;
}

.product-card {
    background: var(--product-bg);
    border: 1px solid var(--product-border);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.product-image {
    width: 100%;
    height: var(--product-img-h);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-info {
    padding: 16px;
}

.product-category {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-name {
    font-family: var(--heading-font);
    font-size: 18px;
    font-weight: 600;
    margin: 6px 0 8px;
    color: var(--section-text);
}

.product-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    margin-bottom: 10px;
}

.product-details {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--price-color, var(--accent));
}

/* ===== LIST FORMAT ===== */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.products-list .list-category-group {
    margin-bottom: 30px;
}

.products-list .list-category-title {
    font-family: var(--heading-font);
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    padding: 12px 0;
    border-bottom: 2px solid var(--accent);
    margin-bottom: 12px;
}

.products-list .list-product-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--product-border);
    transition: background 0.2s;
}

.products-list .list-product-row:hover {
    background: rgba(255, 255, 255, 0.03);
    padding-left: 8px;
}

.products-list .list-product-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.products-list .list-product-info h4 {
    font-family: var(--heading-font);
    font-size: 16px;
    font-weight: 600;
    color: var(--section-text);
    margin-bottom: 2px;
}

.products-list .list-product-info p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

.products-list .list-product-info .list-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 2px;
}

.products-list .list-product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--price-color, var(--accent));
    white-space: nowrap;
}

/* ===== COMPACT FORMAT ===== */
.products-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.compact-card {
    background: var(--product-bg);
    border: 1px solid var(--product-border);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s;
}

.compact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.compact-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.compact-card .compact-info {
    padding: 10px;
}

.compact-card .compact-info h4 {
    font-family: var(--heading-font);
    font-size: 13px;
    font-weight: 600;
    color: var(--section-text);
    margin-bottom: 4px;
    line-height: 1.3;
}

.compact-card .compact-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--price-color, var(--accent));
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .article-split {
        grid-template-columns: 1fr;
    }

    .article-split-right .article-split-image {
        order: 0;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .product-image {
        height: 130px;
    }

    .catalog-brand {
        padding: 8px 12px;
    }

    .brand-name {
        font-size: 12px;
    }

    .brand-logo {
        max-height: 28px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}