.catalog-page { padding-top: 140px; min-height: 70vh; overflow-x: clip; }
.filter-list, .filter-list .submenu { list-style: none; margin: 0; padding: 0; }
.filter-list .filter-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; text-decoration: none; }
.filter-list .submenu {
    display: block;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transform: translateY(-8px);
    transform-origin: top;
    transition: max-height .42s cubic-bezier(.22, 1, .36, 1), opacity .24s ease, transform .36s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .42s;
}
.filter-list li.open > .submenu,
.filter-list li.expanded > .submenu {
    max-height: var(--catalog-submenu-height, 1200px);
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}
.filter-list li.open > .filter-btn::before,
.filter-list li.expanded > .filter-btn::before { transform: rotate(45deg); }
.filter-list .submenu > li {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity .24s ease, transform .3s cubic-bezier(.22, 1, .36, 1);
}
.filter-list li.open > .submenu > li,
.filter-list li.expanded > .submenu > li { opacity: 1; transform: translateX(0); }
.filter-list li.open > .submenu > li:nth-child(2),
.filter-list li.expanded > .submenu > li:nth-child(2) { transition-delay: .035s; }
.filter-list li.open > .submenu > li:nth-child(3),
.filter-list li.expanded > .submenu > li:nth-child(3) { transition-delay: .07s; }
.filter-list li.open > .submenu > li:nth-child(n+4),
.filter-list li.expanded > .submenu > li:nth-child(n+4) { transition-delay: .1s; }
.filter-list .submenu .filter-btn { padding-left: 42px; font-size: 12px; }
@media (prefers-reduced-motion: reduce) {
    .filter-list .submenu,
    .filter-list .submenu > li { transition: none !important; transform: none !important; }
}
.product-card a { color: inherit; text-decoration: none; }
.product-card .product-action { color: #fff; text-align: center; }
.product-img-container { display: flex; align-items: center; justify-content: center; }
.product-icon-fallback { display: flex; align-items: center; justify-content: center; min-height: 80px; font-size: 54px; opacity: .25; }
.catalog-results-heading { display: flex; justify-content: space-between; align-items: center; margin: 0 0 18px; gap: 16px; }
.catalog-results-heading p { margin: 0; font-weight: 700; }
.catalog-results-heading a { color: #d50000; font-weight: 700; }
.catalog-empty-state { grid-column: 1 / -1; padding: 60px 24px; text-align: center; border: 1px solid rgba(15,23,42,.12); border-radius: 8px; }
.catalog-empty-state h2 { margin: 0 0 8px; }
.catalog-empty-state p { margin: 0 0 24px; }
.pagination a { text-decoration: none; }
.pagination [aria-disabled="true"] { opacity: .45; }
.catalog-content .pagination { gap: 8px; margin-top: 46px; }
.catalog-content .pagination .page-btn {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    color: #64748b;
    font-size: 15px;
    font-weight: 800;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
}
.catalog-content .pagination .page-btn:not(.active):not([aria-disabled="true"]):hover {
    color: #e30613;
    background: #fff;
    border-color: rgba(227, 6, 19, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.09);
}
.catalog-content .pagination .page-btn.active {
    color: #fff;
    background: #e30613;
    border-color: #e30613;
    box-shadow: 0 6px 15px rgba(227, 6, 19, 0.24);
}
.catalog-content .pagination .page-ellipsis {
    display: grid;
    width: 24px;
    height: 34px;
    padding: 0;
    place-items: center;
    color: #94a3b8;
    font-size: 16px;
    font-weight: 800;
}
.catalog-content .pagination-summary {
    margin: 13px 0 20px;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.5;
    text-align: center;
}
.catalog-content.is-searching {
    opacity: .58;
    pointer-events: none;
    transition: opacity .16s ease;
}
[data-theme="dark"] .catalog-content .pagination .page-btn-arrow {
    color: #cbd5e1;
    background: #111827;
    border-color: #334155;
}
[data-theme="dark"] .catalog-content .pagination .page-btn:not(.active) {
    color: #cbd5e1;
    background: #111827;
    border-color: #334155;
}
[data-theme="dark"] .catalog-content .pagination-summary { color: #94a3b8; }

@media (max-width: 520px) {
    .catalog-content .pagination { gap: 5px; }
    .catalog-content .pagination .page-btn { width: 31px; min-width: 31px; height: 31px; font-size: 13px; }
    .catalog-content .pagination .page-ellipsis { width: 16px; height: 31px; }
}
.product-preview-banner { margin: 16px 0; padding: 10px 14px; border: 1px solid #d99b00; background: #fff5cf; color: #4a3500; border-radius: 6px; font-weight: 700; }
[data-theme="dark"] .product-preview-banner { background: #2b2208; color: #ffe28a; }
.product-share-option-icon img { display: block; }
.product-share-menu[hidden] { display: none !important; }
.tg-back-button {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #334155;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.tg-back-button:hover { color: #e30613; background: rgba(227, 6, 19, 0.06); border-color: rgba(227, 6, 19, 0.18); }
.tg-back-button:active { transform: scale(.96); }
.tg-back-button-icon { display: block; width: 19px; height: 19px; }
[data-theme="dark"] .tg-back-button { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .tg-back-button:hover { color: #fff; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.16); }

/* Keep the media gallery compact even when the product information is long. */
.product-detail-page .product-gallery {
    min-width: 0 !important;
    align-self: stretch !important;
    justify-content: center !important;
}
.product-detail-page .product-main-grid.has-long-specs .product-gallery {
    align-self: start !important;
    justify-content: flex-start !important;
}
.product-detail-page .main-image-container {
    width: 100% !important;
    height: min(420px, 42vw) !important;
    min-height: 340px;
}
.product-detail-page .thumbnails-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 390px;
    min-width: 0;
    margin: 8px auto 0;
}
.product-detail-page .thumbnails-container {
    flex: 1 1 auto;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 82px !important;
    margin: 0 !important;
    padding: 4px 8px 8px !important;
    gap: 6px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 8px;
    overscroll-behavior-inline: contain;
}
.product-detail-page .thumbnails-wrapper.is-contained .thumbnails-container { justify-content: center !important; }
.product-detail-page .thumbnails-container > :first-child,
.product-detail-page .thumbnails-container > :last-child { margin-inline: 0 !important; }
.product-detail-page .thumbnail {
    width: 72px !important;
    height: 72px !important;
    flex: 0 0 72px !important;
    scroll-snap-align: start;
}
.product-detail-page .thumbnails-wrapper.has-overflow {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 32px;
}
.product-detail-page .gallery-nav-btn {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #334155;
    background: rgba(255, 255, 255, .96);
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .1);
    cursor: pointer;
    opacity: 1;
    visibility: visible;
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease, opacity .2s ease;
}
.product-detail-page .thumbnails-wrapper:not(.has-overflow) .gallery-nav-btn { display: none !important; }
.product-detail-page .thumbnails-wrapper.has-overflow .gallery-nav-btn[hidden] {
    display: inline-flex !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.product-detail-page .gallery-nav-btn:hover { color: #fff; background: #e30613; border-color: #e30613; transform: scale(1.06); }
.product-detail-page .gallery-nav-btn:active { transform: scale(.96); }
.product-detail-page .gallery-nav-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .product-detail-page .gallery-nav-btn { color: #fff; background: rgba(30, 41, 59, .94); border-color: rgba(255,255,255,.12); }
[data-theme="dark"] .product-detail-page .gallery-nav-btn:hover { background: #e30613; border-color: #e30613; }

/* Total2-style 3D loading indicator: a thin red line at the viewer's bottom edge. */
.product-detail-page .progress-bar {
    display: block !important;
    position: absolute !important;
    inset: auto 0 0 !important;
    width: 100% !important;
    height: 3px !important;
    z-index: 20 !important;
    overflow: hidden !important;
    background: rgba(0, 0, 0, .05) !important;
    border: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity .3s ease !important;
}
.product-detail-page .progress-bar.show { opacity: 1 !important; visibility: visible !important; }
.product-detail-page .loading-label-container { display: none !important; }
.product-detail-page .bar-track { width: 100% !important; height: 100% !important; overflow: hidden !important; background: transparent !important; }
.product-detail-page .update-bar { width: 0; height: 100% !important; background: #e30613 !important; transition: width .3s ease !important; }
.product-detail-page .model-viewer-native-progress { display: none !important; }

/* Product header: preserve readable spacing instead of shrinking menu labels. */
@media (min-width: 1025px) {
    body.product-page .header {
        width: min(98vw, 1380px) !important;
        max-width: 1380px !important;
        padding: 0 clamp(14px, 1.25vw, 20px) !important;
    }
    body.product-page .header .nav-container {
        display: grid !important;
        grid-template-columns: 36px minmax(145px, 175px) minmax(0, 1fr) 58px minmax(118px, 132px) !important;
        column-gap: clamp(7px, .65vw, 12px) !important;
        align-items: center !important;
    }
    body.product-page .header .tg-back-button {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }
    body.product-page .header .logo {
        width: auto !important;
        min-width: 0 !important;
        max-width: 175px !important;
    }
    body.product-page .header .logo img {
        width: 100% !important;
        height: 42px !important;
        max-width: 175px !important;
        object-fit: contain !important;
    }
    body.product-page .header .main-nav {
        width: 100% !important;
        min-width: 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        gap: clamp(4px, .45vw, 8px) !important;
        padding: 0 !important;
    }
    body.product-page .header .main-nav > .nav-link,
    body.product-page .header .main-nav > .nav-item-has-dropdown {
        flex: 0 0 auto !important;
    }
    body.product-page .header .nav-link {
        padding-inline: 1px !important;
        font-size: clamp(.61rem, .56vw, .72rem) !important;
        line-height: 1.15 !important;
        letter-spacing: .08px !important;
        white-space: nowrap !important;
    }
    body.product-page .header .language-switcher,
    body.product-page .header .language-toggle {
        width: 58px !important;
        min-width: 58px !important;
    }
    body.product-page .header > .nav-container > .cta-btn {
        min-width: 118px !important;
        margin-left: 0 !important;
        padding: 10px 12px !important;
        font-size: clamp(.72rem, .66vw, .82rem) !important;
    }
}

@media (min-width: 1280px) {
    body.product-page .header .nav-container {
        grid-template-columns: 38px minmax(170px, 195px) minmax(0, 1fr) 64px minmax(128px, 140px) !important;
        column-gap: clamp(10px, .8vw, 16px) !important;
    }
    body.product-page .header .tg-back-button { width: 38px; height: 38px; }
    body.product-page .header .logo { max-width: 195px !important; }
    body.product-page .header .logo img { max-width: 195px !important; height: 44px !important; }
    body.product-page .header .main-nav { gap: clamp(6px, .55vw, 11px) !important; }
    body.product-page .header .nav-link { font-size: clamp(.67rem, .57vw, .76rem) !important; }
    body.product-page .header .language-switcher,
    body.product-page .header .language-toggle { width: 64px !important; min-width: 64px !important; }
    body.product-page .header > .nav-container > .cta-btn { min-width: 128px !important; padding-inline: 14px !important; }
}

@media (max-width: 768px) {
    .catalog-page { padding-top: 92px; }
    .catalog-content { min-width: 0; }
    .catalog-results-heading { padding: 0 4px; font-size: 13px; }
    .catalog-container, .catalog-content { width: 100%; max-width: 100%; }
    .product-grid { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
    .product-card { width: auto; min-width: 0; max-width: 100%; }
    .product-name { overflow-wrap: anywhere; }
    .mobile-search-container, .mobile-search-container .search-box { width: 100%; }
    .mobile-search-container .search-box { display: block; width: 100%; overflow: visible; }
    .mobile-search-container .search-box input { width: 100%; min-width: 0; }
    .product-detail-page .product-gallery { min-height: 0 !important; justify-content: flex-start !important; }
    .product-detail-page .product-share-widget { top: 12px; right: 12px; }
}

@media (max-width: 520px) {
    .catalog-container { padding-inline: 16px; }
    .product-card { min-height: 0; }
    .product-card .product-info { padding: 14px 12px; }
    .product-card .product-name { font-size: 14px; line-height: 1.3; }
    .product-card .product-category-tag { font-size: 9px; }
    .product-card .product-action { min-height: 46px; font-size: 11px; }
    .product-detail-page .container { padding-inline: 12px; }
    .product-detail-page .main-image-container { height: auto !important; min-height: 0; }
    .product-detail-page .thumbnail { width: 64px !important; height: 64px !important; flex-basis: 64px !important; }
    .product-detail-page .thumbnails-wrapper { gap: 6px; }
    .product-detail-page .gallery-nav-btn { flex-basis: 30px; width: 30px; height: 30px; }
}
