/* ==========================================================================
   PneuPro Full-Width Hero Breakout Engine (Dynamic Dark Theme)
   ========================================================================== */

.brand-hero-section {
    position: relative;
    /* Safely breaks out of standard layout wrappers to achieve 100% viewport width */
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);

    background-color: #0F172A;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    padding: 100px 20px 140px 20px;
    text-align: center;
    color: #ffffff;
    box-sizing: border-box;
    transition: background-position 0.3s ease; /* Smooth shifting transition */
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
}

.distributor-badge {
    display: inline-block;
    background: rgba(8, 85, 254, 0.15);
    border: 1px solid #0855FE;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 50px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.brand-hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 20px 0;
    letter-spacing: -1.5px;
    line-height: 1.1;
}

.brand-hero-section h1 span {
    color: #3b82f6; /* High-contrast blue highlight optimized for dark hero image overlays */
}

.brand-bio-seo {
    max-width: 750px;
    margin: 0 auto;
    color: #ffffff;
    font-size: 1.18rem;
    line-height: 1.75;
    font-weight: 500;
}

/* ==========================================================================
   PneuPro Floating Architecture & Container Overlap
   ========================================================================== */

.pneu-brand-container {
    max-width: 1100px;
    margin: 0 auto 40px auto;
    width: 100%;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; /* Forces all elements to center on desktop */
    box-sizing: border-box !important;
    position: relative;
    z-index: 30; /* Ensures the filter floats elegantly above the layout boundary */
}

/* Overlap effect pulling your filter widget up over the boundary line */
.pneu-brand-container .pnpbf-wrap {
    margin-top: -55px !important;
    margin-bottom: 35px !important;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14) !important;
    border: 1px solid #F1F5F9 !important;
}

/* ==========================================================================
   The Blue Dot USPs (Desktop Center Setup)
   ========================================================================== */

.usp-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important; /* Centers items perfectly horizontally */
    align-items: center !important;
    gap: 40px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto !important;
}

.usp-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #0F172A;
    white-space: nowrap !important; /* Protects strings from folding mid-word */
}

/* The Blue Dot USPs with Premium Pulse Effect */
.pneu-dot {
    height: 10px;
    width: 10px;
    background-color: #0855FE;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(8, 85, 254, 0.4);
    flex-shrink: 0 !important;
    position: relative; /* Setup a coordinate frame for our pulsing aura layer */
}

/* Create the smooth expanding wave element using a pseudo-class */
.pneu-dot::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0855FE;
    border-radius: 50%;
    z-index: 1;
    /* Loops our smooth 2-second breathing animation indefinitely */
    animation: pneuproPulseGlow 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

/* Smooth Keyframe Engine for the Glow Effect */
@keyframes pneuproPulseGlow {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.6); /* How far out the glow extends */
        opacity: 0; /* Fades out smoothly at peak expansion */
    }
}

/* ==========================================================================
   Shop Toolbar Containers
   ========================================================================== */

.pneupro-shop-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #F1F5F9;
}

.pneupro-result-count {
    font-weight: 700;
    color: #0F172A;
    font-size: 1.1rem;
}

.pneupro-result-count .count-number {
    color: #0855FE; /* Your Brand Blue */
}

/* ── Shop Toolbar Row ── */
.pneupro-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 24px 0;
    padding: 0;
}

/* ── Catalog Title ── */
h3.catalog-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 6px;
}

h3.catalog-title .catalog-count {
    color: #0057FF;
    font-size: 18px;
    font-weight: 700;
}

/* ==========================================================================
   Brand Filter Widget — [pneupro_brand_filter]
   ========================================================================== */

.pnpbf-wrap {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px;
    background: #fff;
    border-radius: 999px;
    padding: 10px 16px;
    box-shadow: 0 1px 4px rgba(15,23,42,.08);
    margin-bottom: 28px;
    box-sizing: border-box;
    width: 100%;
}

.pnpbf-label {
    font-weight: 700;
    color: #0F172A;
    white-space: nowrap;
    margin-right: 4px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Critical: override Hello Elementor / WC global select { width:100%; display:block } */
.pnpbf-wrap select.pnpbf-select,
.pnpbf-select {
    width: auto !important;
    min-width: 110px !important;
    max-width: 160px !important;
    flex: 0 0 auto;
    display: inline-block !important;
    appearance: none;
    -webkit-appearance: none;
    background: #F1F5F9 url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230F172A' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
    border: none !important;
    border-radius: 999px;
    padding: 10px 32px 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #0F172A;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.pnpbf-select:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.pnpbf-toggle {
    flex: 0 0 auto;
    white-space: nowrap;
    background: #F1F5F9;
    color: #0F172A;
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.pnpbf-toggle[data-on="1"] {
    background: #0855FE;
    color: #fff;
}

.pnpbf-btn {
    margin-left: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    background: #0855FE;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 26px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.pnpbf-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.pnpbf-btn:not(:disabled):hover {
    background: #2B70FF;
}

/* ==========================================================================
   Responsive Architecture & Viewport Adaptations
   ========================================================================== */

@media (max-width: 850px) {
    .brand-hero-section {
        /* 1. Force the background to zoom out fully from edge to edge */
        background-size: contain !important;
        background-position: center top !important;
        background-repeat: no-repeat !important;
        background-color: #0F172A; /* Slate fallback background */

        /* 2. Force container height to scale with the widescreen image aspect ratio */
        aspect-ratio: 12 / 5 !important; /* Adjust if your banner crop differs (e.g., 16 / 9) */
        height: auto !important;

        /* 3. Drop heavy paddings so overlay text fits within the zoomed-out image */
        padding: 30px 20px 15px 20px !important;
    }

    .brand-hero-section h1 {
        font-size: 1.8rem !important;
        letter-spacing: -1px;
        margin-bottom: 8px !important;
    }
    .brand-bio-seo {
        font-size: 1.05rem;
    }
    .pneu-brand-container .pnpbf-wrap {
        margin-top: -45px !important;
    }

    .distributor-badge {
        font-size: 9px !important;
        padding: 4px 12px !important;
        margin-bottom: 12px !important;
    }
    .hero-breadcrumbs-wrapper .pneupro-breadcrumbs,
    .hero-breadcrumbs-wrapper .woocommerce-breadcrumb {
        padding-bottom: 10px !important;
    }


    /* Converts USP array into a premium inline horizontal swipe track */
    .usp-row {
        flex-direction: row !important; /* Blocks native stacking */
        justify-content: flex-start !important; /* Aligns left to prepare track scroll boundaries */
        overflow-x: auto !important; /* Enables smooth finger-swipe gestures */
        scroll-snap-type: x mandatory !important;
        gap: 24px !important;
        padding: 4px 24px 14px 24px !important; /* Gutter buffers for smooth edges */
        width: 100% !important;

        /* Modern App UX: Completely hides messy mobile scroll tracks */
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }

    .usp-row::-webkit-scrollbar {
        display: none !important;
    }

    .usp-item {
        scroll-snap-align: start !important;
        font-size: 0.88rem !important;
    }
}

/* ============================================================
   PNEUPRO: Embedded Hero Breadcrumbs Styling Override
   ============================================================ */

/* 1. Hide the old outside breadcrumbs container ONLY on Brand archive templates */
.tax-product_brand .pneupro-breadcrumbs:not(.hero-breadcrumbs-wrapper .pneupro-breadcrumbs),
.tax-product_brand .woocommerce-breadcrumb:not(.hero-breadcrumbs-wrapper .woocommerce-breadcrumb),
.tax-yith_product_brand .pneupro-breadcrumbs:not(.hero-breadcrumbs-wrapper .pneupro-breadcrumbs),
.tax-yith_product_brand .woocommerce-breadcrumb:not(.hero-breadcrumbs-wrapper .woocommerce-breadcrumb),
.tax-marques .pneupro-breadcrumbs:not(.hero-breadcrumbs-wrapper .pneupro-breadcrumbs),
.tax-marques .woocommerce-breadcrumb:not(.hero-breadcrumbs-wrapper .woocommerce-breadcrumb),
.tax-pwb-brand .pneupro-breadcrumbs:not(.hero-breadcrumbs-wrapper .pneupro-breadcrumbs),
.tax-pwb-brand .woocommerce-breadcrumb:not(.hero-breadcrumbs-wrapper .woocommerce-breadcrumb) {
    display: none !important;
}

/* 2. Format the layout constraints inside the Hero container */
.hero-breadcrumbs-wrapper .pneupro-breadcrumbs,
.hero-breadcrumbs-wrapper .woocommerce-breadcrumb {
    padding: 0 0 25px 0 !important; /* Spacing below the breadcrumbs trail inside the banner */
    margin: 0 !important;
    background: transparent !important;
    color : #ffffff
}

/* 3. High-contrast Text Colors for the dark layout */
.hero-breadcrumbs-wrapper .pneupro-breadcrumbs a,
.hero-breadcrumbs-wrapper .woocommerce-breadcrumb a {
    color: #94A3B8 !important; /* Soft high-contrast light grey */
}

/* Sky/Electric Blue color on link hover */
.hero-breadcrumbs-wrapper .pneupro-breadcrumbs a:hover,
.hero-breadcrumbs-wrapper .woocommerce-breadcrumb a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Active current breadcrumb trailing text leaf */
.hero-breadcrumbs-wrapper .pneupro-breadcrumbs :not(a):last-child,
.hero-breadcrumbs-wrapper .woocommerce-breadcrumb :not(a):last-child {
    color: #FFFFFF !important; /* Pure radiant white for current location */
    font-weight: 700;
}

/* 4. Whiten the SVG Chevron arrow color to blend with the dark mode look */
.hero-breadcrumbs-wrapper .pneupro-breadcrumbs .breadcrumb-separator,
.hero-breadcrumbs-wrapper .woocommerce-breadcrumb .breadcrumb-separator {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23CBD5E1' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'></polyline></svg>") !important;
    opacity: 0.8;
}
/* ============================================================
   PNEUPRO: Permanently Remove Default Theme Catalog Header
   ============================================================ */

/* Targets both class and ID variations across all your brand taxonomies */
.tax-product_brand .catalog-header,
.tax-product_brand #catalog-header,
.tax-yith_product_brand .catalog-header,
.tax-yith_product_brand #catalog-header,
.tax-marques .catalog-header,
.tax-marques #catalog-header,
.tax-pwb-brand .catalog-header,
.tax-pwb-brand #catalog-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ============================================================
   PNEUPRO: Eliminate Horizontal Scrolling / Page Overflow
   ============================================================ */

/* 1. Force the viewport boundaries to lock strictly to 100% width on brand pages */
body.tax-product_brand,
body.tax-yith_product_brand,
body.tax-marques,
body.tax-pwb-brand,
body.tax-product_brand #page,
body.tax-product_brand #wrapper {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* 2. Safety reset for any child wrapper elements trying to break layout containers */
.brand-hero-section {
    box-sizing: border-box;
}

/* 3. Ensure the premium USP icon row wraps fluidly on smaller mobile breakpoints */
.pneu-brand-container .usp-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 100%;
}

@media (max-width: 640px) {
    .brand-hero-section {
        /* UX Refinement: Collapse top/bottom padding to make space for the filter card */
        padding: 50px 20px 90px 20px !important;
        background-position: 82% center !important; /* Re-enforce right-side focus */
    }
    .brand-hero-section h1 {
        font-size: 2.1rem;
    }

    /* UX Refinement: Hide heavy description blocks to pull the vital search engine above the mobile fold */
    .brand-bio-seo {
        display: none !important;
    }

    .pneu-brand-container .pnpbf-wrap {
        margin-top: -40px !important;
        flex-wrap: wrap !important;
        border-radius: 18px;
    }
    .pneupro-shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .pnpbf-wrap select.pnpbf-select,
    .pnpbf-select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: unset !important;
        flex: 1 1 100%;
    }
    .pnpbf-toggle { flex: 0 0 auto; }
    .pnpbf-btn { width: 100%; margin-left: 0; }
}

@media (max-width: 600px) {
    .pneupro-shop-tools {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}
