/* ============================================
   PRODUCT LIST PAGE - San Luis Riduttori
   ============================================ */

.product-list-page-body {
    background: #f5f6f5;
}

.product-list-page-body .header:not(.scrolled) {
    background: #fff;
    box-shadow: 0 2px 24px rgba(35, 31, 32, 0.08);
}

/* ===== WUMA-STYLE CATALOG ===== */
.catalog-page {
    padding: 128px 0 72px;
}

.catalog-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    color: #8a918c;
    font-size: 0.82rem;
}

.catalog-crumb a {
    color: #5f6b64;
    text-decoration: none;
}

.catalog-crumb a:hover {
    color: var(--secondary);
}

.catalog-intro h1 {
    margin: 0 0 12px;
    font-family: "Barlow Condensed", "Inter", sans-serif;
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1c1c1c;
}

.catalog-intro p {
    max-width: 760px;
    margin: 0 0 34px;
    color: #5c6560;
    font-size: 0.98rem;
    line-height: 1.7;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 36px;
    align-items: start;
}

.catalog-aside {
    position: sticky;
    top: calc(var(--header-h, 110px) + 16px);
    max-height: calc(100vh - var(--header-h, 110px) - 32px);
    overflow: auto;
    padding: 22px 18px 18px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
}

.catalog-aside h2,
.catalog-main > h2 {
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #1c1c1c;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1c1c1c;
}

.catalog-tree {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.catalog-cat,
.catalog-sub {
    display: block;
    text-decoration: none;
    color: #3d4540;
}

.catalog-cat {
    padding: 9px 8px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 6px;
}

.catalog-cat:hover,
.catalog-sub:hover {
    color: var(--secondary);
}

.catalog-cat.active,
.catalog-cat.current {
    color: var(--secondary);
}

.catalog-subs {
    display: none;
    padding: 0 0 8px 14px;
}

.catalog-group.open .catalog-subs {
    display: block;
}

.catalog-sub {
    padding: 6px 8px;
    font-size: 0.84rem;
    color: #667069;
}

.catalog-sub.active {
    color: var(--secondary);
    font-weight: 700;
}

.catalog-quote {
    display: block;
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--secondary);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}

.catalog-quote:hover {
    background: #3d8c36;
}

.catalog-lead {
    margin: -4px 0 22px;
    color: #667069;
    line-height: 1.6;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.catalog-card {
    height: 100%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 4px;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(22, 32, 24, 0.08);
}

.catalog-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px 16px 18px;
    color: inherit;
    text-decoration: none;
}

.catalog-card-pic {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 210px;
    margin-bottom: 14px;
    background: #f7f8f7;
}

.catalog-card-pic img,
.catalog-card-pic svg {
    max-width: 86%;
    max-height: 86%;
    object-fit: contain;
}

.catalog-card-series {
    margin: 0 0 4px;
    color: var(--secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.catalog-card h3 {
    margin: 0 0 12px;
    color: #1c1c1c;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}

.catalog-more {
    margin-top: auto;
    color: var(--secondary);
    font-size: 0.82rem;
    font-weight: 600;
}

.catalog-card:hover .catalog-more i {
    transform: translateX(3px);
}

.catalog-more i {
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.catalog-empty {
    grid-column: 1 / -1;
    padding: 40px 0;
    color: #667069;
}

.catalog-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 32px;
}

.catalog-page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #d7ddd8;
    background: #fff;
    color: #1c1c1c;
    font-size: 0.9rem;
    text-decoration: none;
}

.catalog-page-num.active,
.catalog-page-num:hover {
    border-color: var(--secondary);
    background: var(--secondary);
    color: #fff;
}

@media (max-width: 980px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .catalog-aside {
        position: static;
        max-height: none;
    }

    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .catalog-page {
        padding-top: 108px;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .catalog-card-pic {
        height: 180px;
    }
}

/* Category page header now inherits the same transparent/scrolled styling as the home page header (see san-luis.css .header) */
/* Full-width parallax banner */
.product-focus-banner {
    position: relative;
    height: 100vh;
    /* min-height: 480px;
    max-height: 760px; */
    overflow: hidden;
    margin-top: 0;
    background: var(--dark, #161a17);
}

.banner-parallax-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.banner-parallax-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    will-change: transform;
    transition: transform 0.05s linear;
}

.banner-parallax-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(22, 26, 23, 0.85) 0%,
            rgba(35, 31, 32, 0.65) 45%,
            rgba(35, 31, 32, 0.40) 100%);
    z-index: 1;
}

.banner-bottom-controls {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.page-down-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.page-down-btn:hover {
    color: var(--secondary);
}

.page-down-btn i {
    animation: bounceHint 2s ease-in-out infinite;
}

@keyframes bounceHint {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    50% {
        transform: translateY(8px);
        opacity: 1;
    }
}

/* Sub nav */
.page-sub-nav {
    background: var(--primary);
    border-bottom: 1px solid rgba(79, 163, 69, 0.15);
    position: sticky;
    top: 80px;
    z-index: 100;
}

.sub-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
}

.sub-nav-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
}

.sub-nav-breadcrumb a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
    text-decoration: none;
    transition: var(--transition);
}

.sub-nav-breadcrumb a:hover,
.sub-nav-breadcrumb a.home-link {
    color: var(--secondary);
}

.category-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
}

.category-tab {
    padding: 16px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}

.category-tab:hover {
    color: var(--white);
}

.category-tab.active {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

/* Product list sections */
.product-list-box {
    padding: 48px 0 80px;
}

.product-list-section {
    margin-bottom: 80px;
    /* Fallback offset for native anchor scrolling (e.g. before JS runs).
       The actual scroll used on tab/menu clicks is computed dynamically
       in JS (see scrollToProductSection) to match the real, current
       height of the sticky header + sub-nav, so titles never get
       cropped underneath them. */
    scroll-margin-top: 180px;
}

.product-list-section:last-child {
    margin-bottom: 0;
}

.product-list-section .section-title {
    font-family: 'Barlow Condensed', 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 28px;
    padding-bottom: 14px;
    border-bottom: 2px solid rgba(79, 163, 69, 0.35);
}

.supror-product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.supror-product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    color: inherit;
    display: block;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.supror-product-card .card-link-area {
    display: block;
    text-decoration: none;
    color: inherit;
}

.supror-product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(79, 163, 69, 0.35);
}

.supror-product-card .series-label {
    display: block;
    padding: 14px 16px 0;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--secondary);
}

.supror-product-card .card-pic {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #eef4ec;
    margin: 10px 12px 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.supror-product-card .card-pic-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.supror-product-card .card-pic img,
.supror-product-card .card-pic svg {
    max-width: calc(100% - 24px);
    max-height: calc(100% - 24px);
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.supror-product-card .card-title {
    padding: 14px 16px 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.4;
    min-height: 64px;
}

.supror-product-card .card-bot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px 16px;
}

.supror-product-card .card-more {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.supror-product-card .card-config {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(79, 163, 69, 0.12);
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

.supror-product-card .card-config:hover {
    background: var(--secondary);
    color: var(--white);
}

.supror-product-card:hover .card-more i {
    transform: translateX(4px);
}

.supror-product-card .card-more i {
    transition: transform 0.3s;
    font-size: 0.65rem;
}

.supror-product-card .card-oem {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--gray);
    font-style: normal;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    color: var(--gray-light);
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .product-focus-banner {
        height: 52vh;
        min-height: 320px;
        margin-top: 64px;
    }

    .page-sub-nav {
        top: 64px;
    }

    .product-list-section {
        /* Mobile sub-nav stacks breadcrumb + tabs vertically and is taller */
        scroll-margin-top: 220px;
    }

    .sub-nav-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .category-tabs {
        width: 100%;
    }

    .supror-product-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .supror-product-card .card-pic {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .supror-product-list {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   CATEGORY PAGE - MOBILE FIXES
   ============================================ */

@media (max-width: 768px) {

    /* Banner - full viewport height */
    .product-list-page-body .product-focus-banner {
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        margin-top: 0 !important;
        position: relative;
        overflow: hidden;
    }

    .product-list-page-body .banner-parallax-wrap {
        position: absolute;
        inset: 0;
        height: 100%;
        width: 100%;
    }

    .product-list-page-body .banner-parallax-image {
        height: 100%;
        width: 100%;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        position: absolute;
        inset: 0;
    }

    .product-list-page-body .banner-parallax-overlay {
        height: 100%;
        width: 100%;
        position: absolute;
        inset: 0;
        z-index: 1;
    }

    .product-list-page-body .banner-bottom-controls {
        bottom: 24px;
        z-index: 2;
    }

    /* Sub-nav - directly below banner with no gap */
    .product-list-page-body .page-sub-nav {
        top: 0 !important;
        position: sticky;
        z-index: 100;
        margin-top: -1px;
        border-bottom: 1px solid rgba(79, 163, 69, 0.15);
    }

    .product-list-page-body .sub-nav-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 0 16px;
    }

    .product-list-page-body .sub-nav-breadcrumb {
        padding: 8px 0;
        font-size: 0.7rem;
    }

    .product-list-page-body .category-tabs {
        display: flex;
        gap: 0;
        overflow-x: auto;
        padding: 4px 0 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .product-list-page-body .category-tabs::-webkit-scrollbar {
        display: none;
    }

    .product-list-page-body .category-tab {
        padding: 10px 16px;
        font-size: 0.7rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.55);
        text-decoration: none;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
        flex-shrink: 0;
        transition: var(--transition);
    }

    .product-list-page-body .category-tab.active {
        color: var(--secondary);
        border-bottom-color: var(--secondary);
    }

    /* Product list */
    .product-list-page-body .product-list-box {
        padding: 24px 0 40px;
    }

    .product-list-page-body .product-list-section {
        margin-bottom: 40px;
        scroll-margin-top: 140px;
    }

    .product-list-page-body .product-list-section .section-title {
        font-size: 1.3rem;
        margin-bottom: 16px;
        padding-bottom: 10px;
        border-bottom: 2px solid rgba(79, 163, 69, 0.25);
    }

    .product-list-page-body .supror-product-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .product-list-page-body .supror-product-card {
        border-radius: 10px;
        overflow: hidden;
        border: 1px solid rgba(0, 0, 0, 0.06);
        transition: var(--transition);
        background: var(--white);
    }

    .product-list-page-body .supror-product-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
        border-color: rgba(79, 163, 69, 0.3);
    }

    .product-list-page-body .supror-product-card .series-label {
        display: block;
        padding: 10px 12px 0;
        font-size: 0.55rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        color: var(--secondary);
    }

    .product-list-page-body .supror-product-card .card-pic {
        height: 120px;
        margin: 6px 10px 0;
        border-radius: 6px;
        overflow: hidden;
        background: #eef4ec;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-list-page-body .supror-product-card .card-pic-inner {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-list-page-body .supror-product-card .card-pic img,
    .product-list-page-body .supror-product-card .card-pic svg {
        max-width: calc(100% - 16px);
        max-height: calc(100% - 16px);
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .product-list-page-body .supror-product-card .card-title {
        padding: 10px 12px 4px;
        font-size: 0.82rem;
        font-weight: 600;
        color: var(--primary);
        line-height: 1.3;
        min-height: 44px;
    }

    .product-list-page-body .supror-product-card .card-bot {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 12px 12px;
    }

    .product-list-page-body .supror-product-card .card-more {
        font-size: 0.65rem;
        font-weight: 600;
        color: var(--secondary);
        display: inline-flex;
        align-items: center;
        gap: 4px;
        text-decoration: none;
    }

    .product-list-page-body .supror-product-card .card-config {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background: rgba(79, 163, 69, 0.1);
        color: var(--secondary);
        text-decoration: none;
        font-size: 0.6rem;
        transition: var(--transition);
    }

    .product-list-page-body .supror-product-card .card-oem {
        font-size: 0.5rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        color: var(--gray);
        font-style: normal;
    }
}

/* ===== EXTRA SMALL PHONES - CATEGORY ===== */
@media (max-width: 480px) {
    .product-list-page-body .product-focus-banner {
        height: 100vh !important;
        min-height: 100vh !important;
    }

    .product-list-page-body .supror-product-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .product-list-page-body .supror-product-card .card-pic {
        height: 160px;
    }

    .product-list-page-body .supror-product-card .card-title {
        font-size: 0.85rem;
        min-height: 40px;
    }

    .product-list-page-body .category-tab {
        padding: 8px 12px;
        font-size: 0.65rem;
    }

    .product-list-page-body .sub-nav-breadcrumb a {
        font-size: 0.6rem;
    }

    .product-list-page-body .page-down-btn {
        font-size: 0.6rem;
    }

    .product-list-page-body .page-down-btn i {
        font-size: 0.8rem;
    }
}