:root {
    --primary: #001d39;
    --primary-light: #003366;
    --accent: #985e23;
    --accent-light: #c4843a;
    --gold: #d4a44c;
    --bg: #0a0e17;
    --bg-page: #ffffff;
    --bg-page-alt: #fafbfc;
    --text: #1e293b;
    --text-light: #64748b;
    --text-white: #ffffff;
    --border: #e2e8f0;
    --shadow-book: 0 30px 60px rgba(0,0,0,0.4), 0 0 80px rgba(0,29,57,0.15);
    --page-radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ====== BACKGROUND PATTERN ====== */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(0,51,102,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(152,94,35,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(0,29,57,0.1) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

#catalogApp {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ====== TOP NAV ====== */
.top-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px 10px;
    background: rgba(0, 29, 57, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.nav-brand h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: white;
    letter-spacing: -0.5px;
}

.nav-brand h1 span {
    color: var(--gold);
}

.nav-tagline {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-wrap {
    position: relative;
}

.search-wrap input {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 8px 16px 8px 36px;
    color: white;
    font-size: 0.85rem;
    width: 220px;
    outline: none;
    transition: all 0.3s;
}

.search-wrap input::placeholder { color: rgba(255,255,255,0.35); }
.search-wrap input:focus {
    background: rgba(255,255,255,0.95);
    color: var(--text);
    width: 280px;
    border-color: var(--gold);
}
.search-wrap input:focus::placeholder { color: var(--text-light); }

.search-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.4);
    font-size: 1rem;
}

.page-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    font-weight: 500;
}

.nav-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--gold);
    border-color: var(--gold);
}

/* ====== BOOK CONTAINER ====== */
.book-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 5px;
    perspective: 2000px;
}

.book {
    width: 900px;
    max-width: 98vw;
    min-height: 580px;
    position: relative;
    transform-style: preserve-3d;
}

/* ====== PAGES ====== */
.page {
    width: 100%;
    min-height: 580px;
    background: var(--bg-page);
    border-radius: var(--page-radius);
    box-shadow: var(--shadow-book);
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1),
                opacity 0.5s ease;
    transform-origin: left center;
    overflow: hidden;
}

.page.active {
    position: relative;
    transform: rotateY(0deg);
    opacity: 1;
    z-index: 10;
}

.page.prev {
    transform: rotateY(-15deg) scale(0.92);
    opacity: 0;
    z-index: 5;
    pointer-events: none;
}

.page.next {
    transform: rotateY(15deg) scale(0.92);
    opacity: 0;
    z-index: 5;
    pointer-events: none;
}

.page.hidden {
    display: none;
}

/* ====== COVER PAGE ====== */
.cover-page {
    background: linear-gradient(135deg, var(--primary) 0%, #003d75 50%, var(--primary-light) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.cover-page::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMiIgY3k9IjIiIHI9IjEuNSIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjAzKSIvPjwvc3ZnPg==');
    z-index: 0;
}

.cover-page > * { position: relative; z-index: 1; }

/* Background illustration */
.cover-bg-illustration {
    position: absolute !important;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    z-index: 0 !important;
    filter: grayscale(30%);
}

/* Logo image */
.cover-logo-img {
    width: 220px;
    max-width: 60%;
    height: auto;
    margin-bottom: 10px;
    filter: brightness(0) invert(1) drop-shadow(0 4px 20px rgba(0,0,0,0.2));
}

/* Company name */
.cover-company-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}

.cover-logo {
    font-family: 'Playfair Display', serif;
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 8px;
}

.cover-logo span { color: var(--gold); }

.cover-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 20px auto;
    border-radius: 2px;
}

.cover-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.cover-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    max-width: 400px;
    line-height: 1.6;
    margin-bottom: 40px;
}

.cover-badges {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.cover-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cover-badge i {
    font-size: 2rem;
    color: var(--gold);
}

.cover-badge span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
}

.cover-start-btn {
    margin-top: 40px;
    background: linear-gradient(135deg, var(--gold), var(--accent));
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.cover-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 164, 76, 0.3);
}
/* ====== CATEGORY INTRO PAGE LAYOUT ====== */
.cat-intro-page {
    display: flex;
    flex-direction: column;
}

/* ====== CATEGORY PAGE HEADER (Logo + Slogan) ====== */
.cat-page-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 28px;
    background: var(--primary);
    border-bottom: 2px solid var(--gold);
}

.cat-header-logo {
    width: 100px;
    height: auto;
    flex-shrink: 0;
}

.cat-header-slogan {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
    font-style: italic;
    max-width: 600px;
}

/* ====== CATEGORY PAGE FOOTER (Contact) ====== */
.cat-page-footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px 20px;
    background: var(--primary);
    border-top: 1px solid rgba(255,255,255,0.08);
}

.cat-footer-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
}

.cat-footer-item i {
    color: var(--gold);
    font-size: 0.9rem;
}

/* ====== CATEGORY INTRO PAGE ====== */
.category-intro {
    display: flex;
    flex: 1;
    min-height: 0;
}

.cat-intro-left {
    flex: 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.cat-intro-left::after {
    content: '';
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(212, 164, 76, 0.1);
}

.cat-number {
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    font-weight: 900;
    color: rgba(255,255,255,0.08);
    line-height: 1;
    margin-bottom: 10px;
}

.cat-intro-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.cat-intro-desc {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.cat-subcats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-subcat-tag {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 0.2s;
}

.cat-subcat-tag:hover {
    background: var(--gold);
    color: white;
    border-color: var(--gold);
}

.cat-intro-right {
    flex: 1;
    background: transparent;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.cat-illustration-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
}

.cat-illustration-img {
    flex: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.8s ease;
}

.cat-intro-right:hover .cat-illustration-img {
    transform: scale(1.05); /* Slight dynamic hover */
}

/* ====== CATEGORY DETAIL PAGE (Optional HTML) ====== */
.cat-detail-page {
    display: flex;
    flex-direction: column;
}

.cat-detail-content {
    display: flex;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

.cat-detail-img-wrapper {
    flex: 1;
    overflow: hidden;
}

.cat-detail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-detail-text {
    flex: 1.2;
    padding: 40px;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text);
}

.cat-detail-text h1, .cat-detail-text h2, .cat-detail-text h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
}

.cat-detail-text p {
    margin-bottom: 16px;
}

.cat-detail-text ul {
    margin-bottom: 16px;
    padding-left: 20px;
}

.cat-detail-text li {
    margin-bottom: 8px;
}

/* ====== PRODUCT GRID PAGE ====== */
.products-page {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.products-page-content {
    flex: 1;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.page-header-left h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 800;
}

.page-header-left .breadcrumb {
    font-size: 0.72rem;
    color: var(--text-light);
    margin-top: 3px;
}

.page-header-right {
    font-size: 0.78rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-grid-page {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    flex: 1;
}

/* ====== PRODUCT CARD ====== */
.p-card {
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.p-card:hover {
    box-shadow: none;
    transform: translateY(-3px);
}

.p-card-img {
    height: 110px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: none;
    overflow: hidden;
}

.p-card-img img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.3s;
}

.p-card:hover .p-card-img img {
    transform: scale(1.08);
}

.p-card-body {
    padding: 10px 4px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.p-card-cat {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 4px;
}

.p-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: 2px;
}

.p-card-ref {
    font-size: 0.65rem;
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 6px;
}

.p-card-desc {
    font-size: 0.72rem;
    color: var(--text-light);
    line-height: 1.5;
    flex: 1;
}

/* ====== PAGE FLIP CONTROLS ====== */
.page-flip-area {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.page-flip-area:hover {
    opacity: 1;
}

.page-flip-area.left { left: 0; }
.page-flip-area.right { right: 0; }

.page-flip-area i {
    font-size: 1.5rem;
    color: var(--primary);
    background: rgba(255,255,255,0.9);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ====== BOTTOM NAV ====== */
.bottom-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 16px 20px 24px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--gold);
    width: 24px;
    border-radius: 4px;
}

.dot:hover {
    background: rgba(255,255,255,0.4);
}

/* ====== SEARCH RESULTS PAGE ====== */
.search-results-page {
    padding: 36px 40px;
}

.search-results-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 6px;
}

.search-results-count {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 24px;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ====== FOOTER PAGE ====== */
.footer-page {
    background: linear-gradient(135deg, var(--primary), #003d75);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    min-height: 580px;
}

.footer-logo-img {
    width: 180px;
    max-width: 50%;
    height: auto;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.footer-logo span { color: var(--gold); }

.footer-text {
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    max-width: 400px;
    line-height: 1.7;
    margin-bottom: 30px;
}

.footer-contact {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

.footer-contact-item i {
    color: var(--gold);
    font-size: 1.2rem;
}

.footer-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.footer-link:hover { opacity: 0.8; }

/* ====== SUMMARY PAGE ====== */
.summary-page {
    padding: 50px 60px;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.summary-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 40px;
    text-align: center;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 10px;
}

.toc-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toc-item {
    display: flex;
    align-items: baseline;
    transition: color 0.2s;
}

.toc-item:hover {
    color: var(--gold);
}

.toc-cat {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    margin-top: 10px;
}

.toc-sub {
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--text);
    padding-left: 20px;
}

.toc-line {
    flex: 1;
    border-bottom: 1px dotted #ccc;
    margin: 0 10px;
    position: relative;
    top: -4px;
}

.toc-page {
    font-weight: 600;
    color: var(--accent);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .book { max-width: 98vw; }
    .product-grid-page { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .search-grid { grid-template-columns: repeat(2, 1fr); }
    .cat-page-header { display: none; } /* Hide redundant header on mobile to save vertical space */
    .category-intro { flex-direction: column; }
    .cat-intro-left { flex: unset; padding: 20px; justify-content: flex-start; }
    .cat-intro-right { flex: 1; min-height: 250px; height: auto; padding: 0; }
    .cat-illustration-img { object-fit: contain; object-position: center bottom; }
    .cat-number { font-size: 3rem; margin-bottom: 0px; }
    .cat-intro-title { font-size: 1.5rem; margin-bottom: 0px; }
    .cat-intro-desc { margin-top: 10px; margin-bottom: 16px; font-size: 0.85rem; }
    .cover-logo { font-size: 3rem; }
    .cover-title { font-size: 1.3rem; }
    .top-nav { padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
    .nav-tagline { display: none; }
    .search-wrap input { width: 150px; }
    .products-page { padding: 20px; }
    .page-header-left h2 { font-size: 1.1rem; }
}

/* ====== PRINTABLE VERSION STYLES ====== */
.print-only {
    display: none;
}

/* When generating PDF, make print area visible but positioned off-screen */
.print-only.generating {
    display: block !important;
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: -1;
}

/* ====== PRINT PAGE (Always styled, not just @media print) ====== */
.print-page {
    page-break-after: always;
    padding: 0;
    background: white;
    color: black;
    position: relative;
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    max-height: 297mm;
    overflow: hidden;
    box-sizing: border-box;
}

/* Print Cover */
.print-cover {
    width: 210mm;
    height: 297mm;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 60px;
    position: relative;
    box-sizing: border-box;
}

.print-cover-img {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
}

.print-cover > * {
    position: relative;
    z-index: 1;
}

/* Print Header */
.print-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: #001d39;
    color: white;
    border-bottom: 3px solid #d4a44c;
}

.print-logo { height: 40px; }
.print-cat-name { font-weight: 800; font-size: 14pt; text-transform: uppercase; letter-spacing: 1px; }

/* Print Grid */
.print-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 25px 30px;
    flex: 1;
}

.print-card {
    border: 1px solid #e2e8f0;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    page-break-inside: avoid;
    background: #f8fafc;
    border-radius: 6px;
}

.print-card-img {
    width: 100%;
    height: 130px;
    object-fit: contain;
    background: white;
    border-radius: 4px;
    padding: 8px;
}

.print-card-title {
    font-weight: 800;
    font-size: 11pt;
    color: #001d39;
    margin-bottom: 2px;
    line-height: 1.3;
}

.print-card-ref {
    font-size: 9pt;
    color: #d4a44c;
    font-weight: bold;
    margin-bottom: 4px;
}

.print-card-desc {
    font-size: 8.5pt;
    line-height: 1.4;
    color: #475569;
}

/* Print Footer (absolute for simple pages) */
.print-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 12px;
    background: #001d39;
    color: rgba(255,255,255,0.8);
    font-size: 7.5pt;
}

/* Print Footer (flex variant for pages using flex layout) */
.print-footer-flex {
    position: static;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 12px;
    background: #001d39;
    color: rgba(255,255,255,0.8);
    font-size: 7.5pt;
    flex-shrink: 0;
}

.print-footer-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.print-footer-item i { color: #d4a44c; }

/* TOC Print */
.print-toc-page { padding: 50px 60px; }
.print-toc-title { font-size: 30pt; font-weight: 900; margin-bottom: 35px; border-bottom: 4px solid #d4a44c; padding-bottom: 12px; color: #001d39; text-align: center; }
.print-toc-list { display: flex; flex-direction: column; gap: 12px; }
.print-toc-item { display: flex; align-items: baseline; font-size: 12pt; }
.print-toc-cat { font-weight: 900; color: #001d39; }
.print-toc-sub { padding-left: 25px; font-weight: 400; color: #475569; }
.print-toc-line { flex: 1; border-bottom: 1px dotted #cbd5e1; margin: 0 12px; }
.print-toc-page-num { font-weight: 700; color: #d4a44c; }

/* Print Specifics for Tags and Slogan */
.print-slogan { font-size: 7pt; color: #64748b; font-style: italic; max-width: 400px; text-align: right; line-height: 1.4; }
.print-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.print-tag { background: #e2e8f0; color: #475569; padding: 3px 8px; border-radius: 4px; font-size: 8pt; font-weight: 600; }
.print-page-number { position: absolute; top: 15px; right: 30px; font-size: 9pt; color: #94a3b8; font-weight: bold; }

/* ====== @MEDIA PRINT — only for browser print dialog ====== */
@media print {
    body { 
        background: white !important; 
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    #catalogApp { display: none !important; }
    .pdf-overlay { display: none !important; }
    .print-only { display: block !important; }

    @page {
        size: A4 portrait;
        margin: 0;
    }
}

/* ====== PDF GENERATION OVERLAY ====== */
.pdf-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 10, 20, 0.92);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.pdf-overlay.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.pdf-overlay-content {
    text-align: center;
    color: white;
    max-width: 400px;
}

.pdf-overlay-content h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
}

.pdf-overlay-content p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 24px;
}

.pdf-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #d4a44c;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: pdfSpin 0.8s linear infinite;
}

@keyframes pdfSpin {
    to { transform: rotate(360deg); }
}

.pdf-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.pdf-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #d4a44c, #c4843a);
    border-radius: 4px;
    transition: width 0.5s ease;
}

