/* ==================== CATALOG BANNER ==================== */
.catalog-banner {
    position: relative;
    width: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 36px 20px 30px;
    background-color: #000;
}

.catalog-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.74) 45%, rgba(0, 0, 0, 0.96) 100%);
    z-index: 0;
}

.catalog-banner-bg {
    position: absolute;
    inset: 0;
    background: url('img/header_bg/photo_11_2026-06-08_11-54-42.jpg') center/cover no-repeat;
    opacity: 0.55;
    z-index: 0;
}

.catalog-banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
}

.catalog-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 22px;
    color: #8a8a8a;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.catalog-breadcrumb a {
    color: #8a8a8a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.catalog-breadcrumb a:hover {
    color: #ffffff;
}

.catalog-banner-content h1 {
    color: #fff;
    font-size: 52px;
    letter-spacing: 10px;
    text-transform: uppercase;
    margin-bottom: 16px;
    text-indent: 10px;
}

.catalog-banner-content > p {
    color: #c4c4c4;
    font-size: 16px;
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto;
}

/* ==================== CATALOG LAYOUT ==================== */
.catalog-section {
    padding: 60px 5% 80px;
    background-color: #000;
}

.catalog-layout {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

/* ==================== DOCUMENT LIST ==================== */
.catalog-list {
    background: #0d0d0d;
    border: 1px solid #1f1f1f;
    border-radius: 8px;
    overflow: hidden;
}

.catalog-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #1f1f1f;
    background: #111;
}

.catalog-list-header h2 {
    color: #fff;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.catalog-list-header span {
    color: #ff0000;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.catalog-list-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.catalog-list-hint {
    display: none;
    color: #8a8a8a !important;
    font-size: 10px;
    letter-spacing: 1.5px;
}

.catalog-document-list {
    display: flex;
    flex-direction: column;
}

.catalog-document {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    border-bottom: 1px solid #171717;
    padding: 14px 18px;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.3s ease;
}

.catalog-document:last-child {
    border-bottom: none;
}

.catalog-document:hover {
    background: #141414;
}

.catalog-document.active {
    background: rgba(255, 0, 0, 0.09);
    box-shadow: inset 3px 0 0 #ff0000;
}

.catalog-document-thumb {
    flex: 0 0 52px;
    height: 68px;
    border: 1px solid #262626;
    border-radius: 3px;
    overflow: hidden;
    background: #fff;
}

.catalog-document-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.catalog-document-body {
    display: block;
    min-width: 0;
}

.catalog-document-family {
    display: inline-block;
    color: #ff0000;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.catalog-document-title {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.catalog-document-description {
    display: block;
    color: #8a8a8a;
    font-size: 12px;
    line-height: 1.5;
}

/* ==================== VIEWER ==================== */
.catalog-viewer {
    background: #0d0d0d;
    border: 1px solid #1f1f1f;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.catalog-viewer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #1f1f1f;
    background: #111;
}

.catalog-viewer-family {
    color: #ff0000;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.catalog-viewer-title h2 {
    color: #fff;
    font-size: 17px;
    margin-top: 4px;
}

.catalog-viewer-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.catalog-viewer-actions a,
.catalog-viewer-actions button {
    padding: 9px 16px;
    border: 1px solid #ff0000;
    border-radius: 50px;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.catalog-viewer-actions a:hover,
.catalog-viewer-actions button:hover {
    background: #ff0000;
}

.catalog-viewer-frame {
    background: #000;
    border-bottom: 1px solid #1f1f1f;
    max-height: 78vh;
    overflow: auto;
    overscroll-behavior: contain;
}

.catalog-viewer-frame a {
    display: block;
    line-height: 0;
}

.catalog-viewer-frame img {
    display: block;
    width: 100%;
    height: auto;
    background: #ffffff;
    transition: opacity 0.3s ease;
}

.catalog-viewer-frame a:hover img {
    opacity: 0.94;
}

.catalog-viewer-note {
    padding: 13px 20px;
    color: #7e7e7e;
    font-size: 12px;
}

.catalog-viewer-note strong {
    color: #ffffff;
    font-weight: 600;
}

.catalog-viewer.expanded .catalog-viewer-frame {
    max-height: calc(100vh - 150px);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .catalog-document-list {
        display: flex;
        flex-direction: row;
        gap: 12px;
        overflow-x: auto;
        padding: 14px;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 14px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .catalog-document-list::-webkit-scrollbar {
        display: none;
    }

    .catalog-document {
        flex: 0 0 240px;
        border: 1px solid #1f1f1f;
        border-radius: 6px;
        background: #111;
        scroll-snap-align: center;
    }

    .catalog-document:last-child {
        border-bottom: 1px solid #1f1f1f;
    }

    .catalog-document.active {
        background: rgba(255, 0, 0, 0.09);
        border-color: #ff0000;
        box-shadow: none;
    }
}

@media (max-width: 768px) {
    .catalog-banner {
        min-height: 190px;
        padding: 28px 20px 24px;
    }

    .catalog-banner-content h1 {
        font-size: 34px;
        letter-spacing: 6px;
        text-indent: 6px;
    }

    .catalog-banner-content > p {
        font-size: 14.5px;
    }

    .catalog-section {
        padding: 40px 5% 60px;
    }

    .catalog-list-hint {
        display: inline-block;
    }

    .catalog-document {
        flex: 0 0 210px;
        gap: 11px;
        padding: 12px;
    }

    .catalog-document-thumb {
        flex-basis: 44px;
        height: 58px;
    }

    .catalog-document-description {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .catalog-viewer-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .catalog-viewer-actions {
        width: 100%;
    }

    .catalog-viewer-actions a,
    .catalog-viewer-actions button {
        flex: 1;
        text-align: center;
    }

    .catalog-viewer-frame {
        max-height: 68vh;
    }
}

/* ==================== LIGHT THEME (catalog page) ==================== */
[data-theme="light"] .catalog-section {
    background: var(--page-bg);
}

[data-theme="light"] .catalog-list {
    background: var(--surface);
    border-color: var(--border-color);
}

[data-theme="light"] .catalog-list-header {
    border-bottom-color: var(--border-color);
}

[data-theme="light"] .catalog-list-header h2 {
    color: var(--text-strong);
}

[data-theme="light"] .catalog-list-hint {
    color: var(--text-faint);
}

[data-theme="light"] .catalog-document {
    background: transparent;
    border-color: var(--border-soft);
    color: var(--text-body);
}

[data-theme="light"] .catalog-document:hover {
    border-color: rgba(255, 0, 0, 0.45);
    background: var(--surface-soft);
}

[data-theme="light"] .catalog-document.active {
    border-color: #ff0000;
    background: rgba(255, 0, 0, 0.05);
}

[data-theme="light"] .catalog-document-family {
    color: #ff0000;
}

[data-theme="light"] .catalog-document-title {
    color: var(--text-strong);
}

[data-theme="light"] .catalog-document-description {
    color: var(--text-muted);
}

[data-theme="light"] .catalog-document-thumb {
    border-color: var(--border-soft);
    background: #ffffff;
}

[data-theme="light"] .catalog-viewer {
    background: var(--surface);
    border-color: var(--border-color);
}

[data-theme="light"] .catalog-viewer-bar {
    border-bottom-color: var(--border-color);
}

[data-theme="light"] .catalog-viewer-title h2 {
    color: var(--text-strong);
}

[data-theme="light"] .catalog-viewer-family {
    color: #ff0000;
}

[data-theme="light"] .catalog-viewer-actions a,
[data-theme="light"] .catalog-viewer-actions button {
    color: #ff0000;
    border-color: #ff0000;
}

[data-theme="light"] .catalog-viewer-actions a:hover,
[data-theme="light"] .catalog-viewer-actions button:hover {
    background: #ff0000;
    color: #ffffff;
}

[data-theme="light"] .catalog-viewer-frame {
    background: #ffffff;
    border-bottom-color: var(--border-soft);
}

[data-theme="light"] .catalog-viewer-note {
    color: var(--text-muted);
}
