/*
 * 30 Header.
 * Load order: content-style.css -> css/05-header.css -> css/10-content-patterns.css -> css/11-tabs-block.css -> css/15-woocommerce.css -> css/20-page-patterns.css -> css/20-support-pages.css -> style.css.
 * Purpose: Global header, navigation, logo, transparent header, and cart visibility rules.
 * Related files: Kadence Customizer handles most header styling; these are child-theme overrides.
 * Scope: moved from style.css — header chrome only.
 */

/* ── Logo ────────────────────────────────────────────────── */
/* Header branding handled by Customizer */
.site-header a.brand img.custom-logo {
    /* max-width: 160px; */
    height: auto;
}

/* Ease transparent/sticky header state changes so the top bar does not snap blue. */
#masthead .site-header-row-container-inner,
#mobile-header .site-header-row-container-inner,
#masthead .site-main-header-wrap,
#mobile-header .site-main-header-wrap,
#masthead .header-navigation .header-menu-container>ul>li.menu-item>a,
#masthead .mobile-toggle-open-container .menu-toggle-open,
#mobile-header .mobile-toggle-open-container .menu-toggle-open,
#masthead .header-cart-wrap .header-cart-button,
#mobile-header .header-mobile-cart-wrap .header-cart-button {
    transition:
        background-color 0.28s ease,
        box-shadow 0.28s ease,
        color 0.2s ease,
        border-color 0.28s ease;
}

@media (prefers-reduced-motion: reduce) {
    #masthead .site-header-row-container-inner,
    #mobile-header .site-header-row-container-inner,
    #masthead .site-main-header-wrap,
    #mobile-header .site-main-header-wrap,
    #masthead .header-navigation .header-menu-container>ul>li.menu-item>a,
    #masthead .mobile-toggle-open-container .menu-toggle-open,
    #mobile-header .mobile-toggle-open-container .menu-toggle-open,
    #masthead .header-cart-wrap .header-cart-button,
    #mobile-header .header-mobile-cart-wrap .header-cart-button {
        transition: none;
    }
}

/* ── Transparent header light variant ───────────────────────
 * Light first-section pages keep Kadence's transparent header, but use dark
 * controls only before the sticky header state takes over. */
.content-title-style-above.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .header-navigation .header-menu-container>ul>li.menu-item>a,
.content-title-style-above.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .mobile-toggle-open-container .menu-toggle-open,
.dmax-transparent-header-light.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .header-menu-container>ul>li.menu-item>a,
.dmax-transparent-header-light.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .header-menu-container>ul>li.menu-item>a:visited,
.dmax-transparent-header-light.transparent-header #masthead #site-header .site-main-header-wrap:not(.item-is-fixed) .main-navigation .primary-menu-container>ul>li.menu-item>a,
.dmax-transparent-header-light.transparent-header #masthead #site-header .site-main-header-wrap:not(.item-is-fixed) .main-navigation .primary-menu-container>ul>li.menu-item.current-menu-item>a,
.dmax-transparent-header-light.transparent-header #masthead #site-header .site-main-header-wrap:not(.item-is-fixed) .header-navigation .header-menu-container ul ul li.menu-item>a,
.dmax-transparent-header-light.transparent-header #masthead #site-header .site-main-header-wrap:not(.item-is-fixed) .mobile-toggle-open-container .menu-toggle-open,
.dmax-transparent-header-light.transparent-header #masthead .site-main-header-wrap:not(.item-is-fixed) .header-cart-wrap .header-cart-button {
    color: var(--dmax-navy);
}

.content-title-style-above.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .header-navigation .header-menu-container>ul ul.sub-menu,
.page-id-17300.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .header-navigation .header-menu-container>ul ul.sub-menu {
    background: var(--dmax-white);
}

.content-title-style-above.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .header-navigation .header-menu-container>ul ul.sub-menu li.menu-item>a,
.page-id-17300.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .header-navigation .header-menu-container>ul ul.sub-menu li.menu-item>a {
    color: var(--dmax-navy);
}

.content-title-style-above.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .header-navigation .header-menu-container>ul ul.sub-menu li.menu-item.current-menu-item>a,
.content-title-style-above.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .header-navigation .header-menu-container ul ul li.menu-item>a:hover,
.page-id-17300.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .header-navigation .header-menu-container>ul ul.sub-menu li.menu-item.current-menu-item>a,
.page-id-17300.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .header-navigation .header-menu-container ul ul li.menu-item>a:hover,
.content-title-style-above.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .header-navigation .header-menu-container ul ul li.menu-item.current-menu-item>a,
.page-id-17300.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .header-navigation .header-menu-container ul ul li.menu-item.current-menu-item>a,
.content-title-style-above.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .header-navigation .header-menu-container ul ul li.menu-item>a:hover,
.page-id-17300.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck) .header-navigation .header-menu-container ul ul li.menu-item>a:hover {
    background: var(--dmax-light-gray);
}

.dmax-transparent-header-light.transparent-header #masthead .site-main-header-wrap:not(.item-is-fixed) .main-navigation .primary-menu-container>ul>li.menu-item>a:hover,
.dmax-transparent-header-light.transparent-header #masthead .site-main-header-wrap:not(.item-is-fixed) .main-navigation .primary-menu-container>ul>li.menu-item.current-menu-item>a:hover,
.dmax-transparent-header-light.transparent-header #masthead .site-main-header-wrap:not(.item-is-fixed) .mobile-toggle-open-container .menu-toggle-open:hover,
.dmax-transparent-header-light.transparent-header #masthead .site-main-header-wrap:not(.item-is-fixed) .header-cart-wrap .header-cart-button:hover {
    color: var(--dmax-sky);
}

/* ── Woo cart in transparent header ──────────────────────── */
.dmax-transparent-header-light.transparent-header #main-header .header-cart-wrap .header-cart-button,
.dmax-transparent-header-light.mobile-transparent-header #mobile-header .header-mobile-cart-wrap .header-cart-button {
    /* color: #ffffff; */
    color: var(--dmax-sky);
}

.dmax-transparent-header-light.transparent-header #main-header .header-cart-wrap .header-cart-button:hover,
.dmax-transparent-header-light.mobile-transparent-header #mobile-header .header-mobile-cart-wrap .header-cart-button:hover {
    color: var(--dmax-ink);
}

.dmax-transparent-header-light.mobile-transparent-header .mobile-toggle-open-container .menu-toggle-open,
.dmax-transparent-header-light.transparent-header .search-toggle-open-container .search-toggle-open {
    color: var(--dmax-sky);
}

.dmax-transparent-header-light.mobile-transparent-header .header-cart-button .header-cart-total {
    background: var(--dmax-sky);
}

/* .header-button {
    border-radius: 30px;
}

*/

/* ── Cart visibility ───────────────────────────────────────
 * Use Kadence's native cart, but surface it only on WooCommerce views. */
body:not(.woocommerce):not(.woocommerce-page) .header-cart-wrap,
body:not(.woocommerce):not(.woocommerce-page) .header-mobile-cart-wrap {
    display: none;
}

/* ── Right-align desktop navigation ────────────────────────
 * Default Kadence grid: 1fr auto 1fr → center column gets equal space on both sides.
 * Override: auto 1fr auto → logo auto-sized, nav fills remaining space, right section
 * collapses to zero when cart is hidden (non-WooCommerce pages).
 * On WooCommerce pages, cart reappears in the auto-sized right column. */
.site-main-header-wrap .site-header-row.site-header-row-center-column {
    grid-template-columns: auto 1fr auto;
}

.site-main-header-wrap .site-header-section-center {
    justify-content: flex-end;
}

/* ── Banner ↔ mobile sticky-header flush ──────────────────
 * When a top promo banner is present (WPFront Notification Bar or the
 * Betheme header-promo plugin), Kadence sets the fixed mobile main header
 * row's `top` to the banner height so it clears the banner at the top of the
 * page. That offset persists once the (static) banner scrolls away, leaving a
 * banner-height strip of empty space above the revealed header.
 *
 * banner-header-flush.js toggles body.dmax-header-flush-top once the user has
 * scrolled past the banner; here we force the row back to top:0 so the
 * revealed header sits flush against the very top of the page. Near the top of
 * the page the class is absent and Kadence's banner-clearing offset applies
 * unchanged. Desktop is unaffected (its sticky header is disabled).
 *
 * Specificity: ID + class matches the Kadence rule authoring the offset;
 * !important covers the inline style the reveal JS writes on scroll. */
body.dmax-header-flush-top #masthead .site-main-header-wrap {
    top: 0 !important;
}

/* ── Header redesign — issue #7 ───────────────────────────── */
:root {
    --dmax-subnav-top: 96px; /* JS replaces this fallback with measured geometry. */
    /* Header container geometry, mirrored from the Kadence Customizer row setting
     * (.site-main-header-wrap .site-header-row-container-inner > .site-container
     * { padding: 15px 67px; } + 1290px container). Kept as vars so the subnav box
     * tracks the logo/SHOP edges; LEFT trigger anchoring is measured at runtime
     * in subnav.js, so a future Customizer gutter change cannot break it. */
    --dmax-header-maxw: 1290px;
    --dmax-header-gutter: 67px;
}

#masthead .site-top-header-wrap,
#masthead .site-top-header-row-container,
#masthead .site-top-header-row-container-inner {
    background: #060e1c !important;
}

.dmax-utility-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
}
.dmax-utility-bar a {
    padding: 0 14px;
    border-right: 1px solid #162133;
    color: #8aaac8 !important;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none !important;
    transition: color .2s ease;
}
.dmax-utility-bar a:last-child {
    padding-right: 0;
    border-right: 0;
}
.dmax-utility-bar a:hover,
.dmax-utility-bar a:focus-visible {
    color: #fff !important;
}

.content-title-style-above.transparent-header #masthead .site-top-header-wrap,
.dmax-transparent-header-light #masthead .site-top-header-wrap {
    background: #f2f6fa !important;
}
.content-title-style-above.transparent-header .dmax-utility-bar a,
.dmax-transparent-header-light .dmax-utility-bar a {
    border-color: #d7e1ea;
    color: #315b7d !important;
}
.content-title-style-above.transparent-header .dmax-utility-bar a:hover,
.content-title-style-above.transparent-header .dmax-utility-bar a:focus-visible,
.dmax-transparent-header-light .dmax-utility-bar a:hover,
.dmax-transparent-header-light .dmax-utility-bar a:focus-visible {
    color: var(--dmax-navy) !important;
}

@media (min-width: 1025px) {
    #masthead .site-header-main-section-center,
    #masthead .site-main-header-wrap .site-header-section-center,
    #masthead .site-header-item-main-navigation,
    #masthead .main-navigation,
    #masthead .primary-menu-container,
    #masthead #primary-menu {
        width: 100%;
    }
    #masthead .site-main-header-wrap .site-header-section-center {
        justify-content: flex-start;
    }
    #masthead #primary-menu {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        padding-left: 1rem;
    }
    #masthead #primary-menu > li.dmax-nav-right-start {
        margin-left: auto;
    }
    #masthead #primary-menu > li.dmax-subnav-trigger-item > .sub-menu,
    #masthead #primary-menu > li.dmax-subnav-trigger-item > a .dropdown-nav-toggle {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    #masthead .dmax-subnav-trigger {
        border-bottom: 3px solid transparent;
    }
    #masthead .dmax-subnav-trigger--active {
        border-bottom-color: #3fa9f5;
        background: rgba(63, 169, 245, .08);
        color: #fff !important;
    }
    #masthead #primary-menu > li > a.dmax-nav-shop {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: 8px;
        padding: 7px 16px !important;
        border: 2px solid #3fa9f5 !important;
        border-radius: 4px;
        color: #3fa9f5 !important;
        font-weight: 700;
        line-height: 1.2;
        text-align: center;
        text-transform: uppercase;
    }
    #masthead #primary-menu > li > a.dmax-nav-shop:hover,
    #masthead #primary-menu > li > a.dmax-nav-shop:focus-visible {
        background: #3fa9f5;
        color: #fff !important;
    }
    body.woocommerce #masthead .site-header-main-section-right,
    body.woocommerce-page #masthead .site-header-main-section-right {
        display: flex;
        align-items: center;
        align-self: center;
        margin-left: 10px;
    }
    body.woocommerce #masthead .site-header-main-section-right .header-cart-wrap,
    body.woocommerce #masthead .site-header-main-section-right .header-cart-inner-wrap,
    body.woocommerce #masthead .site-header-main-section-right .header-cart-button,
    body.woocommerce-page #masthead .site-header-main-section-right .header-cart-wrap,
    body.woocommerce-page #masthead .site-header-main-section-right .header-cart-inner-wrap,
    body.woocommerce-page #masthead .site-header-main-section-right .header-cart-button {
        display: flex;
        align-items: center;
    }
}

@media (min-width: 1025px) and (max-width: 1199px) {
    :root {
        /* Mirrors the header container override below (24px gutters). */
        --dmax-header-gutter: 24px;
    }
    #masthead .site-main-header-wrap > .site-header-row-container-inner > .site-container {
        padding-right: 24px;
        padding-left: 24px;
    }
    #masthead #primary-menu > li > a {
        padding-right: 5px;
        padding-left: 5px;
        font-size: 14px;
    }
    #masthead #primary-menu > li > a.dmax-nav-shop {
        margin-left: 0;
        padding-right: 6px !important;
        padding-left: 6px !important;
    }
    /* 15px subnav text needs the 48px back at narrow widths so the widest
     * (sensors) row still fits its content box on one line. */
    #dmax-subnav .dmax-subnav__link,
    #dmax-subnav .dmax-subnav__res-btn {
        padding-right: 10px;
        padding-left: 10px;
    }
}

.dmax-subnav {
    position: fixed;
    top: var(--dmax-subnav-top, 96px);
    right: 0;
    left: 0;
    z-index: 150;
    background: #1a5cb8;
    border-bottom: 2px solid #1250a0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.dmax-subnav[hidden],
.dmax-subnav__panel {
    display: none;
}
.dmax-subnav__panel--open {
    display: block;
}
.dmax-subnav__inner {
    display: flex;
    align-items: center;
    /* max-width: 1400px; — superseded 2026-09-12 (issue #7 submenu alignment):
     * match the header container so the resting box tracks logo/SHOP edges. */
    max-width: var(--dmax-header-maxw);
    min-height: 46px;
    margin: auto;
    /* padding: 0 40px; — superseded, see above. */
    padding: 0 var(--dmax-header-gutter);
}
.dmax-subnav__links,
.dmax-subnav__ctas {
    display: flex;
    align-items: center;
}
.dmax-subnav__links {
    gap: 4px;
    /* Runtime trigger anchoring: subnav.js writes --dmax-subnav-shift on the open
     * panel so its links center on the hovered/clicked primary trigger, floored
     * at the header content (logo) edge. */
    margin-left: var(--dmax-subnav-shift, 0px);
}
.dmax-subnav__ctas {
    gap: 8px;
    margin-left: auto;
}
.dmax-subnav__link,
.dmax-subnav__res-btn {
    display: flex;
    align-items: center;
    height: 46px;
    padding: 0 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: #d6eaff;
    font-size: 0.9375rem; /* 15px — Video #2 button visibility (was 13px). */
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}
.dmax-subnav__link:hover,
.dmax-subnav__link:focus-visible,
.dmax-subnav__res-btn:hover,
.dmax-subnav__res-btn:focus-visible,
.dmax-subnav__res[data-dmax-res-open] .dmax-subnav__res-btn {
    border-bottom-color: rgba(255, 255, 255, .7);
    background: rgba(0, 0, 0, .12);
    color: #fff;
}
.dmax-subnav__res {
    position: relative;
}
.dmax-subnav__res-btn {
    gap: 7px;
    cursor: pointer;
    font-weight: 600;
}
.dmax-subnav__res-chevron {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
}
.dmax-subnav__res[data-dmax-res-open] .dmax-subnav__res-chevron {
    transform: rotate(225deg);
}
.dmax-subnav__res-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 300;
    min-width: 270px;
    background: #0b1728;
    border-top: 3px solid #3fa9f5;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.dmax-subnav__res[data-dmax-res-open] .dmax-subnav__res-menu {
    display: block;
}
.dmax-subnav__res-link {
    display: block;
    padding: 10px 20px;
    border-left: 3px solid transparent;
    color: #c8dff2;
    font-size: 0.9375rem; /* 15px — match subnav links (was 13px). */
    text-decoration: none;
}
.dmax-subnav__res-link:hover,
.dmax-subnav__res-link:focus-visible {
    border-left-color: #3fa9f5;
    background: rgba(63, 169, 245, .1);
    color: #fff;
}
.dmax-subnav__cta {
    padding: 6px 14px;
    border: 2px solid #fff;
    border-radius: 4px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.dmax-subnav__cta--outline {
    background: transparent;
    color: #fff;
}
.dmax-subnav__cta--outline:hover,
.dmax-subnav__cta--outline:focus-visible {
    background: rgba(255, 255, 255, .15);
}
.dmax-subnav__cta--primary {
    background: #fff;
    color: #1a5cb8;
}
.dmax-subnav__cta--primary:hover,
.dmax-subnav__cta--primary:focus-visible {
    background: #e8f3ff;
}
.dmax-subnav__cta--disabled {
    cursor: not-allowed;
    opacity: .55;
}

body.dmax-subnav-open.transparent-header:not(.dmax-transparent-header-light) #masthead .site-main-header-wrap:not(.item-is-stuck):not(.item-is-fixed),
body.dmax-subnav-open.transparent-header:not(.dmax-transparent-header-light) #masthead .site-top-header-wrap:not(.item-is-stuck):not(.item-is-fixed) {
    background: #0b1728 !important;
}
body.dmax-subnav-open.dmax-transparent-header-light.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck):not(.item-is-fixed) {
    background: transparent !important;
}
body.dmax-subnav-open.dmax-transparent-header-light.transparent-header #masthead .site-main-header-wrap:not(.item-is-stuck):not(.item-is-fixed) .header-menu-container > ul > li.menu-item > a:not(.dmax-nav-shop) {
    color: var(--dmax-navy) !important;
}
/* dmax-promo-strip — removed 2026-07-22, header redesign #7.
 * Collided with the transparent-header absolute masthead and the new utility
 * bar; the WPFront plugin promo is used instead. Rules kept commented for
 * easy restoration if the strip is reintroduced on a non-transparent header.
.dmax-promo-strip { position:relative; z-index:140; background:#fd17db; color:#fff; font-size:14px; }
.dmax-promo-strip[hidden] { display:none; }
.dmax-promo-strip__inner { display:flex; align-items:center; justify-content:center; gap:16px; max-width:1400px; margin:auto; padding:8px 40px; }
.dmax-promo-strip__btn { background:#fbb03a; color:#fff; padding:6px 18px; border-radius:20px; font-weight:600; text-decoration:none; }
.dmax-promo-strip__close { margin-left:auto; background:none; border:0; color:#fff; font-size:22px; cursor:pointer; }
@media (max-width:767px) { .dmax-promo-strip__inner { align-items:flex-start; padding:10px 16px; gap:10px; } }
*/
@media (max-width: 1024px) {
    .dmax-subnav {
        display: none !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    .dmax-subnav *,
    .dmax-subnav-trigger,
    .dmax-utility-bar a {
        transition: none !important;
    }
}
