/* StoreWeave 1.3.8 — Shoptimizer 2.9.9 Header layout layer.
 * Native Top Bar structure, logo, product search, cart fragments, nav and mobile drawer remain untouched.
 * Styles are namespaced; a single master toggle removes sw-checkout-enhanced from the document.
 */
body.sw-checkout-enhanced {
    --sw-checkout-container-gutter: clamp(15px, 2.3vw, 32px);
    /* All quick links, More and Basket use intrinsic label width and one spacing scale. */
    --sw-checkout-icon-left-margin: 16px;
    --sw-checkout-header-gap: clamp(14px, 1.7vw, 28px);
    /* Layout containers already supply a centered max-width; avoid padding twice. */
    --sw-checkout-inset:0px;
}

/* User-controlled divider: the original Top Bar wrapper spans the viewport width.
   Scope by class so disabling the option returns control to the theme Kirki setting. */
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced.sw-checkout-topbar-border-enabled .topbar-wrapper.col-full {
    position:relative;
    border-bottom:0 !important;
}
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced.sw-checkout-topbar-border-enabled .topbar-wrapper.col-full::after {
    content:"" !important;
    display:block !important;
    pointer-events:none;
    position:absolute;
    z-index:1;
    /* The wrapper is already full-width. 100vw includes scrollbar gutters in
       some 360 Browser Chromium builds and creates document-level X overflow. */
    left:0; right:0; bottom:0;
    width:auto;
    height:var(--sw-checkout-topbar-border-width,1px);
    background:var(--sw-checkout-topbar-border-color,#e5e7eb);
    transform:none;
}

/* 2 — Shoptimizer's ORIGINAL Top Bar wrapper and Widget layout. */
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .topbar-wrapper.col-full { box-sizing:border-box; width:100%; max-width:100%; padding:0 !important; margin:0 auto !important; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .topbar-wrapper .top-bar { padding-block:0 !important; }
/* Optional full-width Top Bar: retain a user-controlled safe inset. */
@media (min-width:993px) {
  body.sw-checkout-enhanced.sw-header-width-topbar-full .topbar-wrapper.col-full .top-bar > .col-full {
    box-sizing:border-box; max-width:none !important; width:100%;
    padding-inline:var(--sw-header-full-padding,32px) !important; margin-inline:auto;
  }
}
/* Respect Shoptimizer's centered max-width. The nested .col-full must NOT add another 2.617924em inset.
   Fix the bar's vertical footprint; the account, announcement and header share the same container edges. */
@media (min-width:993px) {
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .topbar-wrapper .top-bar { padding:0 !important; margin:0 !important; }
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .topbar-wrapper .top-bar > .col-full { box-sizing:border-box; display:flex; align-items:center; flex-wrap:nowrap; gap:clamp(12px,1.5vw,28px); min-height:var(--sw-checkout-topbar-height-desktop,56px); padding:0 !important; margin-inline:auto; }
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .topbar-wrapper .top-bar > .col-full::before,
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .topbar-wrapper .top-bar > .col-full::after { content:none !important; }
}
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar > .col-full > .top-bar-left { flex:1 1 0; min-width:0; margin:0; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced.sw-checkout-topbar-rotator-enabled .top-bar .top-bar-left .sw-checkout-topbar-notice,
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced.sw-checkout-topbar-rotator-enabled .top-bar .top-bar-left .sw-checkout-topbar-rotator {
    box-sizing:border-box; width:100%; min-width:0;
}
/* Native mobile basket uses the count element as the bag-shaped ICON.
 * Never hide it via a global badge selector. Only desktop cart has custom
 * badge styling, inside the desktop media query below. */
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar > .col-full > .top-bar-center { flex:0 1 auto; max-width:32%; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar > .col-full > .top-bar-right { flex:0 0 auto; width:auto; min-width:0; margin:0; align-items:center; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar > .col-full > .top-bar-right { margin-left:auto; }
body.sw-checkout-enhanced .sw-checkout-account-links { display:inline-flex; align-items:center; gap:8px; white-space:nowrap; }
body.sw-checkout-enhanced .sw-checkout-account-separator { font-weight:400; color:var(--sw-muted,#8a8a8a); }
body.sw-checkout-enhanced .sw-checkout-account-link { display:inline-flex; align-items:center; gap:9px; white-space:nowrap; font-weight:700; color:inherit; text-decoration:none; line-height:1.3; }
body.sw-checkout-enhanced .sw-checkout-account-link .sw-checkout-link-svg { width:19px; height:19px; flex:0 0 19px; stroke-width:2px; margin:0; }
body.sw-checkout-enhanced .sw-checkout-account-link:hover { opacity:1; text-decoration:underline; text-underline-offset:3px; }
/* Hook-managed right quick links and My Account use a single row. */
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-topbar-right-links { display:flex; align-items:center; justify-content:flex-end; column-gap:clamp(12px,1.5vw,26px); width:max-content; max-width:100%; min-width:0; white-space:nowrap; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-topbar-link-list { display:flex; align-items:center; justify-content:flex-end; column-gap:clamp(11px,1.3vw,23px); }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-topbar-navlink { color:inherit; font-weight:400; text-decoration:none; font-size:14px; line-height:1.4; display:inline-block; max-width:clamp(80px,11vw,165px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-topbar-navlink:hover,
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-topbar-navlink:focus-visible,
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-account-link:focus-visible { color:inherit; text-decoration:underline; text-underline-offset:3px; opacity:1; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-topbar-more { position:relative; display:block; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-topbar-more > summary { list-style:none; cursor:pointer; font-size:14px; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-topbar-more > summary::-webkit-details-marker { display:none; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-topbar-more > summary:hover { text-decoration:underline; text-underline-offset:3px; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-topbar-more-list { position:absolute; top:100%; right:0; min-width:min(170px,calc(100vw - 30px)); max-width:calc(100vw - 30px); box-sizing:border-box; overflow-wrap:anywhere; z-index:110; display:flex; flex-direction:column; gap:8px; padding:14px; border:1px solid var(--sw-border,#e5e7eb); border-radius:5px; background:var(--sw-surface,#fff); box-shadow:0 8px 20px rgba(0,0,0,.12); }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-topbar-more:not([open]) .sw-checkout-topbar-more-list { display:none; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-right-desktop-hidden { display:none; }
/* Language/currency launcher is anchored to its own button, never the whole right row.
 * Keep stacking order above the main header and navigation while <details> is open. */
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .sw-header-localization {
    position:relative; display:inline-flex; align-items:center; flex:0 0 auto;
    white-space:nowrap; line-height:1.35; z-index:auto;
}
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .sw-header-localization > summary {
    display:inline-flex; align-items:center; gap:6px; cursor:pointer; list-style:none !important;
    color:inherit; font-size:13px; min-height:30px; white-space:nowrap; padding:0;
}
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .sw-header-localization > summary::marker { content:""; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .sw-header-localization > summary::-webkit-details-marker { display:none; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .sw-header-localization > summary:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .sw-header-localization-chevron {
    display:inline-block; width:7px; height:7px; flex:0 0 7px;
    border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor;
    transform:translateY(-2px) rotate(45deg); transition:transform .15s ease;
}
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .sw-header-localization[open] .sw-header-localization-chevron {
    transform:translateY(2px) rotate(225deg);
}
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .sw-header-localization-menu {
    position:absolute; top:calc(100% + 9px); left:50%; right:auto;
    transform:translateX(-50%); z-index:2000;
    width:min(var(--sw-localization-width,174px),calc(100vw - 24px)); min-width:0; max-width:calc(100vw - 24px);
    padding:10px; box-sizing:border-box; display:flex; flex-direction:column; gap:3px;
    color:var(--sw-localization-text,inherit); background:var(--sw-localization-bg,#fff);
    border:var(--sw-localization-border-width,1px) solid var(--sw-localization-border,#ddd);
    border-radius:var(--sw-localization-radius,8px);
    box-shadow:0 10px 25px rgba(0,0,0,.12); white-space:normal;
}
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .sw-header-localization:not([open]) > .sw-header-localization-menu { display:none; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .sw-header-localization-menu strong { font-size:12px; padding:7px 9px 3px; color:inherit; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .sw-header-localization-menu a { display:block; padding:7px 9px; text-decoration:none; color:inherit; font-weight:400; line-height:1.4; border-radius:4px; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .sw-header-localization-menu a:hover,
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .sw-header-localization-menu a:focus-visible { background:color-mix(in srgb,currentColor 8%,transparent); text-decoration:underline; }
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .sw-header-localization-unavailable { display:block; padding:7px 9px; color:inherit; opacity:.72; font-size:12px; white-space:normal; }
/* Shoptimizer positions its later header rows above ordinary Top Bar descendants.
 * Raising the actual wrapper (not only the menu) makes the open menu clickable. */
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .topbar-wrapper:has(.sw-header-localization[open]) {
    position:relative; z-index:1000; overflow:visible;
}
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .topbar-wrapper:has(.sw-header-localization[open]) .top-bar,
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .topbar-wrapper:has(.sw-header-localization[open]) .top-bar > .col-full {
    overflow:visible;
}
/* A narrow viewport cannot center a 205px panel under a button near the edge.
 * Anchor to the right on mobile to keep the whole panel on screen. */
@media(max-width:992px) {
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .sw-header-localization-menu {
        left:auto; right:0; transform:none;
    }
}



/* Hook-managed social/brand links in the left Top Bar region. */
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-header-topbar-image-links {
    box-sizing:border-box; display:flex; align-items:center; gap:clamp(7px,1vw,18px);
    max-width:100%; min-width:0; white-space:nowrap; overflow:hidden;
}
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-header-topbar-image-link {
    display:inline-flex; align-items:center; gap:6px; min-width:0; color:inherit;
    font-size:13px; text-decoration:none; white-space:nowrap;
}
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-header-topbar-social-art {
    display:inline-flex; align-items:center; justify-content:center;
    width:23px; height:23px; flex:0 0 23px;
}
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-header-topbar-social-icon {
    display:block; width:20px; height:20px; flex:0 0 auto;
}
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-header-topbar-image-link-icon {
    display:block; width:auto; height:23px; max-width:32px; object-fit:contain; flex:0 0 auto;
}
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-header-topbar-image-link > span {
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar a.sw-header-topbar-image-link:hover,
body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar a.sw-header-topbar-image-link:focus-visible {
    text-decoration:underline; text-underline-offset:3px;
}

/* Center announcements use the native Shoptimizer `top-bar` sidebar.
 * Position the optional center slot against the whole native container, not
 * against the leftover width after the right-hand account/links widgets.
 * Animated slides are absolute, so their viewport MUST have explicit width.
 * This section intentionally follows the existing native Top Bar layout rules. */
body.sw-header-topbar-center-enabled .top-bar > .col-full {
    position:relative;
}
body.sw-checkout-enhanced.sw-header-topbar-center-enabled .top-bar > .col-full > .sw-header-topbar-center {
    position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
    box-sizing:border-box; display:block; flex:none; margin:0;
    width:34%; max-width:34%; min-width:0; text-align:center;
}
body.sw-checkout-enhanced.sw-header-topbar-center-enabled .top-bar > .col-full > .top-bar-left {
    min-width:0; max-width:31%;
}
body.sw-checkout-enhanced.sw-header-topbar-center-enabled .top-bar > .col-full > .top-bar-right {
    max-width:31%;
}
body.sw-header-topbar-center-enabled .sw-header-center-view {
    box-sizing:border-box; position:relative; display:block;
    width:100%; max-width:100%; min-width:0; height:1.8em; line-height:1.8;
    overflow:hidden; isolation:isolate;
}
body.sw-header-topbar-center-enabled .sw-header-center-message {
    box-sizing:border-box; display:flex; align-items:center; justify-content:center;
    width:100%; height:100%; min-width:0; margin:0;
    overflow:hidden; white-space:nowrap; line-height:1.4;
}
body.sw-header-topbar-center-enabled .sw-header-center-message > a,
body.sw-header-topbar-center-enabled .sw-header-center-message > span {
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
    min-width:0; max-width:100%; overflow:hidden;
    white-space:nowrap; text-overflow:ellipsis; color:inherit;
}
body.sw-header-topbar-center-enabled .sw-header-center-image {
    display:block; flex:0 0 auto; height:28px; width:auto; max-width:min(94px,35%);
    object-fit:contain; margin:0;
}
body.sw-header-topbar-center-enabled .sw-header-center-text {
    display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
body.sw-header-topbar-center-enabled .sw-header-center-message > a:hover,
body.sw-header-topbar-center-enabled .sw-header-center-message > a:focus-visible {
    text-decoration:underline; text-underline-offset:3px;
}
/* Same single header.js controller; direction is CSS-only. */
body.sw-header-topbar-center-enabled .sw-header-center-effect-left .sw-checkout-rotator-message {transform:translate3d(100%,0,0)}
body.sw-header-topbar-center-enabled .sw-header-center-effect-left .sw-checkout-rotator-message.sw-checkout-is-leaving {transform:translate3d(-100%,0,0)}
body.sw-header-topbar-center-enabled .sw-header-center-effect-right .sw-checkout-rotator-message {transform:translate3d(-100%,0,0)}
body.sw-header-topbar-center-enabled .sw-header-center-effect-right .sw-checkout-rotator-message.sw-checkout-is-leaving {transform:translate3d(100%,0,0)}
body.sw-header-topbar-center-enabled .sw-header-center-effect-down .sw-checkout-rotator-message {transform:translate3d(0,-100%,0)}
body.sw-header-topbar-center-enabled .sw-header-center-effect-down .sw-checkout-rotator-message.sw-checkout-is-leaving {transform:translate3d(0,100%,0)}
body.sw-header-topbar-center-enabled .sw-header-center-effect-fade .sw-checkout-rotator-message,
body.sw-header-topbar-center-enabled .sw-header-center-effect-fade .sw-checkout-rotator-message.sw-checkout-is-leaving {transform:none}
body.sw-header-topbar-center-enabled .sw-header-center-view .sw-checkout-rotator-message.sw-checkout-is-current {transform:translate3d(0,0,0)}
@media (min-width:769px) and (max-width:1150px) {
    /* Shoptimizer still uses the desktop native Top Bar at these sizes. */
    body.sw-checkout-enhanced.sw-header-topbar-center-enabled .top-bar > .col-full > .sw-header-topbar-center {width:20%; max-width:20%;}
    body.sw-checkout-enhanced.sw-header-topbar-center-enabled .top-bar > .col-full > .top-bar-left {max-width:27%;}
    body.sw-checkout-enhanced.sw-header-topbar-center-enabled .top-bar > .col-full > .top-bar-right {max-width:36%;}
}
@media (max-width:768px) {
    /* Preserve Shoptimizer's stacked mobile widget layout. */
    body.sw-checkout-enhanced.sw-header-topbar-center-enabled .top-bar > .col-full > .sw-header-topbar-center {
        position:relative; inset:auto; transform:none;
        width:100%; max-width:100%; margin-inline:auto;
    }
    body.sw-checkout-enhanced.sw-header-topbar-center-enabled .top-bar > .col-full > .top-bar-left,
    body.sw-checkout-enhanced.sw-header-topbar-center-enabled .top-bar > .col-full > .top-bar-right {max-width:100%;}
    /* The enhanced mobile preset otherwise hides every `.top-bar-center`.
       Restore only our opt-in center notice and stack it below the left widget. */
    body.sw-checkout-enhanced.sw-header-topbar-center-enabled.sw-checkout-layer-topbar-enhanced .topbar-wrapper .top-bar > .col-full {
        flex-wrap:wrap; height:auto;
    }
    body.sw-checkout-enhanced.sw-header-topbar-center-enabled.sw-checkout-layer-topbar-enhanced .top-bar > .col-full > .sw-header-topbar-center {
        display:block; flex:0 0 100%;
    }
}
@media (prefers-reduced-motion:reduce) {
    body.sw-header-topbar-center-enabled .sw-header-center-message {transition:none !important;}
}

/* Each slide is a complete, independently positioned icon + text unit.
 * First slide is visible before JS loads; CSS owns the overflow clipping. */
.sw-checkout-rotator { position:relative; display:block; height:1.8em; min-width:0; width:100%; overflow:hidden; isolation:isolate; }
.sw-checkout-rotator-message[hidden] { display:none !important; }
.sw-checkout-rotator-message {
    box-sizing:border-box; display:flex; align-items:center; position:absolute; inset:0;
    min-width:0; overflow:hidden; white-space:nowrap;
    opacity:0; transform:translate3d(0,100%,0);
    transition:transform var(--sw-checkout-roll-duration,500ms) ease-in-out, opacity var(--sw-checkout-roll-duration,500ms) ease-in-out;
    pointer-events:none;
}
.sw-checkout-rotator-message.sw-checkout-is-current { opacity:1; transform:translate3d(0,0,0); pointer-events:auto; }
.sw-checkout-rotator-message.sw-checkout-is-leaving { opacity:0; transform:translate3d(0,-100%,0); }
.sw-checkout-topbar-notice { box-sizing:border-box; min-width:0; width:100%; height:32px; display:flex; align-items:center; font-size:15px; line-height:1.35; font-weight:400; }
.sw-checkout-topbar-rotator { flex:1 1 auto; min-width:0; width:100%; height:32px; }
.sw-checkout-topbar-slide { width:100%; }
.sw-checkout-topbar-slide .sw-checkout-ticker-inner {
    display:inline-flex; align-items:center; justify-content:flex-start; gap:13px;
    min-width:0; max-width:100%; width:max-content; height:100%; margin:0;
    color:inherit; white-space:nowrap; text-decoration:none;
}
.sw-checkout-topbar-slide .sw-checkout-ticker-icon { display:inline-flex; flex:0 0 24px; align-items:center; justify-content:center; width:24px; height:24px; color:var(--sw-accent,#27b6c8); }
.sw-checkout-topbar-slide .sw-checkout-ticker-icon .sw-checkout-link-svg { display:block; width:24px; height:24px; max-width:none; flex:none; color:inherit; margin:0 !important; }
.sw-checkout-topbar-slide .sw-checkout-topbar-message-text { display:inline-block; min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; line-height:1.4; white-space:nowrap; }
.sw-checkout-topbar-slide .sw-checkout-notice-icon-image { display:block; width:24px; height:24px; max-width:100%; flex:none; object-fit:contain; }
.sw-checkout-topbar-slide a { color:inherit; text-decoration:none; }
.sw-checkout-topbar-slide a:hover, .sw-checkout-topbar-slide a:focus-visible { text-decoration:underline; text-underline-offset:3px; }
.sw-checkout-notice-configuration-hint { display:inline-block; color:#876c21; font-size:12px; font-weight:400; line-height:1.5; }
.sw-checkout-effect-fade .sw-checkout-rotator-message { transform:none; }
.sw-checkout-effect-fade .sw-checkout-rotator-message.sw-checkout-is-current, .sw-checkout-effect-fade .sw-checkout-rotator-message.sw-checkout-is-leaving { transform:none; }
.sw-checkout-effect-none .sw-checkout-rotator-message { transition:none !important; transform:none !important; }


/* Mobile-only quick links must be invisible outside the mobile drawer at ALL desktop widths.
 * Even if the menu is rendered in the shared primary menu, it must not affect its desktop height. */
body.sw-checkout-enhanced #site-navigation ul.menu > li.sw-checkout-mobile-menu-heading,
body.sw-checkout-enhanced #site-navigation ul.menu > li.sw-checkout-mobile-menu-item,
body.sw-checkout-enhanced .col-full-nav .sw-checkout-mobile-links { display:none !important; }
/* Added to shared primary/mobile menu markup, visible only inside the mobile drawer. */
body.sw-checkout-enhanced #site-navigation ul.menu > li.sw-header-mobile-localization,
body.sw-checkout-enhanced .sw-checkout-mobile-links li.sw-header-mobile-localization { display:none!important; }

/* 3 — Quick Links + the native Shoptimizer Basket follow ONE intrinsic-width
 * sizing convention. No fixed-width cells or horizontal padding. Adjacent
 * items are separated by margin-left; each icon sits above its centered text.
 */
#masthead .sw-checkout-quick-nav { min-width:0; margin:0; padding:0; float:none; }
#masthead .sw-checkout-quick-nav .sw-checkout-quick-menu {
    display:flex; align-items:center; justify-content:flex-end;
    gap:var(--sw-checkout-links-gap,16px);
    padding:0; margin:0; list-style:none;
}
#masthead .sw-checkout-quick-nav .sw-checkout-quick-menu > .sw-checkout-menu-item {
    box-sizing:border-box; list-style:none; float:none;
    flex:0 0 auto; width:max-content; min-width:0; max-width:120px;
    border:0; padding:0; margin:0;
}
#masthead .sw-checkout-quick-nav .sw-checkout-quick-menu > .sw-checkout-menu-item + .sw-checkout-menu-item {
    margin-left:0;
}
@media (min-width:993px) {
  #masthead .sw-checkout-quick-nav .sw-checkout-quick-menu > .sw-checkout-divider-before {
    position:relative;
  }
  #masthead .sw-checkout-quick-nav .sw-checkout-quick-menu > .sw-checkout-menu-item + .sw-checkout-divider-before::before {
    content:"";position:absolute;display:block;pointer-events:none;
    left:calc(var(--sw-checkout-links-gap,16px) / -2);top:50%;
    height:36px;width:1px;transform:translateY(-50%);
    background:var(--sw-border,#e1e5e9);
  }
}

#masthead .sw-checkout-quick-nav .sw-checkout-link,
#masthead .sw-checkout-quick-nav .menu li:not(.ri) a.sw-checkout-link {
    box-sizing:border-box; display:flex; flex-direction:column;
    align-items:center; justify-content:center; gap:7px;
    width:max-content; max-width:120px; height:66px; min-height:66px;
    margin:0; padding:5px 0 !important;
    font-size:13px; font-weight:400; line-height:1.2;
    white-space:nowrap; color:#222; text-align:center; text-decoration:none;
}
#masthead .sw-checkout-quick-nav .sw-checkout-link:hover { opacity:.78; }
#masthead .sw-checkout-quick-nav .sw-checkout-link-label {
    display:block; width:auto; max-width:100%; min-width:0;
    overflow:hidden; text-overflow:ellipsis; text-align:center;
}
.sw-checkout-link-svg, .sw-checkout-icon-image { display:block; width:27px; height:27px; object-fit:contain; flex:0 0 auto; }

/* More uses the same icon/label dimensions while closed. Dropdown links are
 * deliberate horizontal rows and are exempt from the top-level item spacing. */
#masthead .sw-checkout-more-entry { position:relative; }
#masthead .sw-checkout-more { width:max-content; max-width:120px; }
#masthead .sw-checkout-more summary {
    cursor:pointer; box-sizing:border-box; list-style:none;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    width:max-content; max-width:120px; min-height:66px; gap:7px;
    margin:0; padding:5px 0; font-size:13px; line-height:1.2; text-align:center;
}
#masthead .sw-checkout-more summary::-webkit-details-marker { display:none; }
.sw-checkout-more-dots { font-size:28px; width:27px; height:27px; text-align:center; line-height:22px; }
#masthead .sw-checkout-more-menu {
    position:absolute; right:0; top:100%; z-index:100;
    width:max-content; min-width:175px; max-width:260px;
    padding:8px; margin:0; border:1px solid #e7e7e7;
    border-radius:7px; background:#fff; box-shadow:0 9px 22px rgba(0,0,0,.12);
}
#masthead .sw-checkout-more:not([open]) .sw-checkout-more-menu { display:none; }
#masthead .sw-checkout-quick-nav .sw-checkout-more-menu li:not(.ri) a.sw-checkout-link {
    display:flex; flex-direction:row; align-items:center; gap:9px;
    justify-content:flex-start; width:100%; max-width:none;
    height:auto; min-height:40px; padding:8px !important; text-align:left;
}
#masthead .sw-checkout-more-menu .sw-checkout-link-svg, #masthead .sw-checkout-more-menu .sw-checkout-icon-image { width:20px; height:20px; }
#masthead .sw-checkout-more-menu .sw-checkout-link-label { text-align:left; }

/* Shared Default / Header-5 alignment. Header-5 is exactly the Default
 * Logo + Search + Secondary flow, with one additional fixed Cart at the end.
 * Never use separate JS DOM movement or an optional Grid mode for alignment. */
@media (min-width:993px) {
  body.sw-checkout-enhanced.sw-header-width-main-full #masthead .main-header.col-full {
    box-sizing:border-box; width:100%; max-width:none !important;
    padding-inline:var(--sw-header-full-padding,32px) !important;
    margin-inline:auto;
  }
  body.sw-checkout-enhanced.sw-header-main-balanced #masthead .main-header.col-full {
    display:flex; align-items:center; flex-wrap:nowrap; min-width:0;
    height:auto; min-height:0; margin-inline:auto;
  }
  body.sw-checkout-enhanced.sw-header-main-balanced #masthead .main-header.col-full::before,
  body.sw-checkout-enhanced.sw-header-main-balanced #masthead .main-header.col-full::after {content:none!important}
  body.sw-checkout-enhanced.sw-header-main-balanced #masthead .main-header > .site-branding {flex:0 0 auto;min-width:0;margin:0}
  body.sw-checkout-enhanced.sw-header-main-balanced #masthead .main-header > .site-search {
    flex:1 1 0;min-width:0;width:auto;max-width:none;
    margin:0 var(--sw-checkout-header-gap);
  }
  body.sw-checkout-enhanced.sw-header-main-balanced #masthead .main-header > .secondary-navigation {
    flex:0 1 auto;min-width:0;max-width:min(42%,420px);
    width:max-content;margin:0;padding:0;float:none;align-self:center;
  }
  body.sw-checkout-enhanced.sw-header-main-balanced #masthead .main-header > .secondary-navigation .menu {
    display:flex;justify-content:flex-end;align-items:center;flex-wrap:nowrap;
  }
  body.sw-checkout-enhanced.sw-header-main-balanced #masthead .main-header > .site-header-cart {
    flex:0 0 auto;width:max-content;min-width:max-content;
    margin:0 0 0 var(--sw-checkout-header-gap) !important;
    padding:0;align-self:center;white-space:nowrap;
  }
  body.sw-checkout-enhanced.sw-header-main-balanced #masthead .main-header > .s-observer {
    position:absolute;inset:auto auto 0 0;width:1px;height:1px;pointer-events:none;
  }
}

/* Header-5: Basket remains Shoptimizer's fixed PHP Hook/cart fragment owner.
 * Visually treat it as the final shortcut without reparenting its markup.
 * With actual custom shortcuts, its left gap MUST use the same links_gap as
 * adjacent shortcuts; header-gap remains for the native Secondary menu.
 * Basket's count is absolutely positioned INSIDE the cart link and must never
 * contribute to the flex item's intrinsic width or height. */
@media (min-width:993px) {
  body.header-5.sw-checkout-enhanced.sw-header-main-balanced.sw-checkout-custom-links #masthead .main-header > .site-header-cart {
    margin-left:var(--sw-checkout-links-gap,16px) !important;
  }
  body.header-5.sw-header-five-cart-custom #masthead .main-header > .site-header-cart {
    display:flex; align-items:center; justify-content:center;
    height:66px; min-height:66px; flex:0 0 auto;
  }
  body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .shoptimizer-cart {
    position:relative; height:66px; min-height:66px; flex:0 0 auto;
  }
  body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .cart-contents {
    gap:7px; align-items:center; justify-content:center;
  }
  body.header-5.sw-checkout-enhanced.sw-header-five-cart-divider #masthead .main-header > .site-header-cart {
    position:relative;
  }
  body.header-5.sw-checkout-enhanced.sw-header-five-cart-divider #masthead .main-header > .site-header-cart::before {
    content:"";position:absolute;pointer-events:none;display:block;
    width:1px;height:36px;top:50%;left:calc(var(--sw-checkout-links-gap,16px) / -2);
    transform:translateY(-50%);background:var(--sw-border,#e1e5e9);
  }
}

/* Header-2/3 have an absolutely centered Shoptimizer logo. The native
 * Secondary Navigation can occupy the opposite side of the row; SW must not
 * reset that margin to zero when rendering custom shortcut links. */
@media (min-width:993px) {
    body.header-2.sw-checkout-enhanced.sw-checkout-layer-main-enhanced #masthead .main-header > .sw-checkout-quick-nav {
        margin-left:auto;
        flex:0 1 auto;
        width:max-content;
        max-width:calc(50% - 105px);
    }
    body.header-3.sw-checkout-enhanced.sw-checkout-layer-main-enhanced #masthead .main-header > .sw-checkout-quick-nav {
        flex:0 1 auto;
        width:max-content;
        max-width:calc(50% - 105px);
    }
    body.header-3.sw-checkout-enhanced.sw-checkout-layer-main-enhanced #masthead .main-header > .site-search {
        margin-left:auto;
        flex:0 0 clamp(180px,23vw,300px);
        max-width:calc(50% - 105px);
        min-width:0;
    }
}

/* Header-5 Cart appearance only; placement is the shared Flex rule above.
 * Native Basket uses Shoptimizer cart link/fragments without extra wrappers. */
@media (min-width:993px) {
    body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .shoptimizer-cart { display:block; position:relative; width:max-content; height:66px; margin:0; padding:0; }
    body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .cart-contents { box-sizing:border-box; display:flex; position:relative; flex-direction:column; align-items:center; justify-content:center; gap:7px; width:max-content; min-width:max-content; height:66px; min-height:66px; padding:5px 0 !important; margin:0; border:0 !important; background:transparent; color:#222 !important; font-size:13px; line-height:1.2 !important; text-align:center; text-decoration:none; }
    body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .cart-contents:hover { opacity:.78; background:transparent; }
    body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .cart-contents .amount { display:none !important; }
    /* Consistent visual cart icon, while preserving the theme's AJAX fragment HTML. */
    body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .cart-contents::before { content:""; display:block; width:27px; height:27px; flex:0 0 27px; background:var(--sw-checkout-cart-color,#292929); -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M3 4h2l2.2 11.5a2 2 0 0 0 2 1.5H19M7 7h14l-2 7H8M10 21h.01M18 21h.01'/%3E%3C/svg%3E") center / contain no-repeat; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M3 4h2l2.2 11.5a2 2 0 0 0 2 1.5H19M7 7h14l-2 7H8M10 21h.01M18 21h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
    body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .cart-contents::after { content:var(--sw-checkout-cart-label,"Basket"); display:block; position:static; width:auto; height:auto; padding:0; margin:0 !important; background:none; font-size:13px; font-weight:400; color:#222; line-height:1.2; white-space:nowrap; }
    /* Remove the built-in icon container from the flex row. Its former zero-
       height flex item inserted an extra gap between our icon and the label. */
    body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .shoptimizer-cart-icon {
        position:absolute !important; display:block; inset:0; width:100%; height:100%;
        pointer-events:none; margin:0; padding:0;
    }
    body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .shoptimizer-cart-icon > svg { display:none !important; }
    body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .shoptimizer-cart-icon .mini-count,
    body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .cart-contents > .count { position:absolute; box-sizing:border-box; display:flex; align-items:center; justify-content:center; top:0; right:calc(50% - 30px); left:auto; bottom:auto; min-width:18px; height:18px; padding:0 4px; margin:0 !important; border:0; border-radius:99px; z-index:1; font-size:10px; font-weight:700; line-height:18px; background:var(--sw-sale,#f32165); color:#fff !important; opacity:1; }
    /* Start hidden. JS enables a badge only when its parsed WooCommerce count
       is > 0, and re-syncs after cart fragments replace the native markup. */
    body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .mini-count:not(.sw-checkout-cart-has-items),
    body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .cart-contents > .count:not(.sw-checkout-cart-has-items),
    body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .mini-count[hidden],
    body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .cart-contents > .count[hidden] { display:none !important; }
    body.header-5.sw-header-five-cart-custom #masthead .site-header-cart .cart-contents > .count::after { display:none !important; content:none; }
    /* 固定购物车的可选图标：只改视觉图案，不替换原生 cart / fragments。 */
    body.header-5.sw-header-five-cart-custom.sw-checkout-cart-icon-bag #masthead .site-header-cart .cart-contents::before {
        -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' d='M4 8h16l-1 13H5L4 8Zm4 0V6a4 4 0 0 1 8 0v2'/%3E%3C/svg%3E");
        mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' d='M4 8h16l-1 13H5L4 8Zm4 0V6a4 4 0 0 1 8 0v2'/%3E%3C/svg%3E");
    }
    body.header-5.sw-header-five-cart-custom.sw-checkout-cart-icon-basket #masthead .site-header-cart .cart-contents::before {
        -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' d='M2 10h20l-2 11H4L2 10Zm5 0 5-7 5 7M8 14v4m4-4v4m4-4v4'/%3E%3C/svg%3E");
        mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' d='M2 10h20l-2 11H4L2 10Zm5 0 5-7 5 7M8 14v4m4-4v4m4-4v4'/%3E%3C/svg%3E");
    }
    body.header-5.sw-header-five-cart-custom.sw-checkout-cart-custom-image #masthead .site-header-cart .cart-contents::before {
        -webkit-mask:none; mask:none;
        background:transparent var(--sw-checkout-cart-image) center / contain no-repeat;
    }
    body.header-5.sw-header-five-cart-custom.sw-checkout-cart-icon-native:not(.sw-checkout-cart-custom-image) #masthead .site-header-cart .cart-contents::before { display:none; }
    body.header-5.sw-header-five-cart-custom.sw-checkout-cart-icon-native:not(.sw-checkout-cart-custom-image) #masthead .site-header-cart .shoptimizer-cart-icon {
        position:relative !important; inset:auto; width:27px; height:27px; flex:0 0 27px;
    }
    body.header-5.sw-header-five-cart-custom.sw-checkout-cart-icon-native:not(.sw-checkout-cart-custom-image) #masthead .site-header-cart .shoptimizer-cart-icon > svg {
        display:block !important; width:27px; height:27px;
    }
}


/* Optional desktop navigation separators. The theme retains ownership of
 * navigation height, sticky positioning and menu/dropdown layout. Draw lines
 * as non-interactive overlays rather than borders that change the row height.
 * In contained mode the line follows the actual theme .col-full, including
 * custom max-width, rather than guessing its pixel width. */
@media (min-width:993px) {
    body.sw-header-nav-lines:not(.sticky-d) .col-full-nav { position:relative; }
    body.sw-header-nav-lines.sw-header-nav-line-theme .col-full-nav .shoptimizer-primary-navigation.col-full:not(.is_stuck) { position:relative; }
    body.sw-header-nav-lines.sw-header-nav-line-full .col-full-nav::before,
    body.sw-header-nav-lines.sw-header-nav-line-full .col-full-nav::after,
    body.sw-header-nav-lines.sw-header-nav-line-theme .col-full-nav .shoptimizer-primary-navigation.col-full::before,
    body.sw-header-nav-lines.sw-header-nav-line-theme .col-full-nav .shoptimizer-primary-navigation.col-full::after {
        content:""; position:absolute; display:block; height:var(--sw-nav-line-size,1px);
        left:0; right:0; background:var(--sw-nav-line-color,#e5e7eb);
        pointer-events:none; z-index:2;
    }
    body.sw-header-nav-lines.sw-header-nav-line-full .col-full-nav::before,
    body.sw-header-nav-lines.sw-header-nav-line-theme .col-full-nav .shoptimizer-primary-navigation.col-full::before {top:0;}
    body.sw-header-nav-lines.sw-header-nav-line-full .col-full-nav::after,
    body.sw-header-nav-lines.sw-header-nav-line-theme .col-full-nav .shoptimizer-primary-navigation.col-full::after {bottom:0;}
    body.sw-header-nav-lines:not(.sw-header-nav-line-top) .col-full-nav::before,
    body.sw-header-nav-lines:not(.sw-header-nav-line-top) .col-full-nav .shoptimizer-primary-navigation.col-full::before,
    body.sw-header-nav-lines:not(.sw-header-nav-line-bottom) .col-full-nav::after,
    body.sw-header-nav-lines:not(.sw-header-nav-line-bottom) .col-full-nav .shoptimizer-primary-navigation.col-full::after {content:none;}
}

/* Independent Primary Navigation content width; only the desktop row is modified.
 * Header-4 merges navigation into Main Header and uses that row's width choice. */
@media (min-width:993px) {
  body.sw-checkout-enhanced.sw-header-width-nav-full:not(.header-4) .col-full-nav .shoptimizer-primary-navigation.col-full {
    box-sizing:border-box; width:100%; max-width:none !important;
    padding-inline:var(--sw-header-full-padding,32px) !important; margin-inline:auto;
  }
}

/* Independent Header Widget Region content width. No widget means no theme
 * markup, so this cannot create an empty row. Mobile keeps native Shoptimizer. */
@media (min-width:993px) {
  body.sw-checkout-enhanced.sw-header-width-widget-full .header-widget-region > .col-full {
    box-sizing:border-box; width:100%; max-width:none !important;
    padding-inline:var(--sw-header-full-padding,32px) !important; margin-inline:auto;
  }
}

/* 5 — Desktop PRIMARY navigation only. Keep Shoptimizer's own menus, sticky
 * observer, dropdown positioning and mobile drawer. Do not apply flex/gap to
 * submenus, Mega Menu internals or any menu within the mobile breakpoint.
 * The module is opt-in and does not touch the theme when disabled. */
@media (min-width:993px) {
    body.sw-checkout-enhanced.sw-checkout-nav-layout-enabled .col-full-nav .shoptimizer-primary-navigation.col-full {
        display:flex;
        align-items:center;
    }
    body.sw-checkout-enhanced.sw-checkout-nav-layout-enabled .col-full-nav .shoptimizer-primary-navigation > .main-navigation {
        flex:1 1 auto;
        min-width:0;
        width:100%;
    }
    /* Three symmetric grid tracks center the MENU against the whole row,
       not against the area remaining after the Basket. No markup reparenting. */
    body.sw-checkout-enhanced.sw-checkout-nav-centered:not(.header-4) .col-full-nav .shoptimizer-primary-navigation.col-full {
        display:grid; grid-template-columns:minmax(0,1fr) minmax(0,max-content) minmax(0,1fr);
        align-items:center;
    }
    body.sw-checkout-enhanced.sw-checkout-nav-centered:not(.header-4) .col-full-nav .shoptimizer-primary-navigation > .main-navigation {
        grid-column:2; justify-self:center; width:max-content; max-width:100%; min-width:0; flex:none;
    }
    body.sw-checkout-enhanced.sw-checkout-nav-centered:not(.header-4) .col-full-nav .shoptimizer-primary-navigation > .site-header-cart {
        grid-column:3; justify-self:end;
    }
    /* RC17: Shoptimizer's third-row basket is a sibling of Primary Navigation.
       Giving the menu remaining flex space previously compressed the native
       cart by ~5px. Shoptimizer renders price + bag/count as inline content;
       the compressed line wrapped the bag BELOW the navigation bar.
       Reserve the cart's intrinsic width and leave its icon, count, fragment
       markup, drawer handlers and native position completely theme-owned. */
    body.sw-checkout-enhanced.sw-checkout-nav-layout-enabled:not(.header-4) .col-full-nav .shoptimizer-primary-navigation > .site-header-cart {
        flex:0 0 auto;
        min-width:max-content;
    }
    body.sw-checkout-enhanced.sw-checkout-nav-layout-enabled:not(.header-4) .col-full-nav .shoptimizer-primary-navigation > .site-header-cart .cart-contents {
        white-space:nowrap;
    }
    body.sw-checkout-enhanced.sw-checkout-nav-layout-enabled .col-full-nav #site-navigation > .primary-navigation {
        display:flex;
        align-items:center;
        min-width:0;
    }
    body.sw-checkout-enhanced.sw-checkout-nav-layout-enabled .col-full-nav #site-navigation > .primary-navigation > .menu-primary-menu-container:not(.shoptimizer-mobile-menu) {
        flex:1 1 auto;
        min-width:0;
    }
    body.sw-checkout-enhanced.sw-checkout-nav-layout-enabled .col-full-nav #site-navigation > .primary-navigation > .menu-primary-menu-container:not(.shoptimizer-mobile-menu) > ul.menu {
        display:flex;
        flex-wrap:nowrap;
        align-items:center;
        justify-content:var(--sw-checkout-nav-justify,center);
        column-gap:var(--sw-checkout-nav-item-gap,24px);
        box-sizing:border-box;
        width:100%;
        margin:0;
        padding-inline:var(--sw-checkout-nav-side-padding,0px);
        list-style:none;
    }
    body.sw-checkout-enhanced.sw-checkout-nav-layout-enabled .col-full-nav #site-navigation > .primary-navigation > .menu-primary-menu-container:not(.shoptimizer-mobile-menu) > ul.menu > li {
        flex:0 0 auto;
        margin-inline:0;
    }
    /* Link horizontal paddings are otherwise added to the explicit gap. */
    body.sw-checkout-enhanced.sw-checkout-nav-layout-enabled .col-full-nav #site-navigation > .primary-navigation > .menu-primary-menu-container:not(.shoptimizer-mobile-menu) > ul.menu > li > a {
        padding-inline:0;
    }
    /* Theme nolink parent items can be top-level headings. */
    body.sw-checkout-enhanced.sw-checkout-nav-layout-enabled .col-full-nav #site-navigation > .primary-navigation > .menu-primary-menu-container:not(.shoptimizer-mobile-menu) > ul.menu > li.nolink > span:not(.caret) {
        padding-inline:0;
    }
}

/* Narrow desktops: preserve the true center while leaving room for the native Basket. */
@media (min-width:993px) and (max-width:1150px) {
    body.sw-checkout-enhanced.sw-checkout-nav-centered:not(.header-4) .col-full-nav #site-navigation > .primary-navigation > .menu-primary-menu-container:not(.shoptimizer-mobile-menu) > ul.menu {
        column-gap:min(var(--sw-checkout-nav-item-gap,24px),12px);
    }
}

/* 4 — search focus: highlight field only, never a page overlay. */
@media (min-width:993px) {
    body.sw-checkout-search-enhanced #masthead .site-search input[type="search"],
    body.sw-checkout-search-enhanced #masthead .site-search input.search-field,
    body.sw-checkout-search-enhanced #masthead .site-search .dgwt-wcas-search-input { transition:border-color .18s,box-shadow .18s,background-color .18s; }
    body.sw-checkout-search-enhanced #masthead .site-search:focus-within input[type="search"],
    body.sw-checkout-search-enhanced #masthead .site-search:focus-within input.search-field,
    body.sw-checkout-search-enhanced #masthead .site-search:focus-within .dgwt-wcas-search-input { outline:none; border-color:#88dce5 !important; box-shadow:0 0 0 4px rgba(80,206,220,.25); background:#fff; }
}

/* On narrower desktops keep Top Bar widgets readable, without touching the
 * Shoptimizer main-header .col-full horizontal padding / centered max-width. */
@media (min-width:993px) and (max-width:1300px) {
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .topbar-wrapper .top-bar > .col-full { padding-inline:18px !important; }
}

@media (min-width:993px) and (max-width:1220px) {
    body.sw-checkout-enhanced { --sw-checkout-header-gap:14px; --sw-checkout-icon-left-margin:10px; }
    #masthead .sw-checkout-quick-nav .sw-checkout-link, #masthead .sw-checkout-quick-nav .menu li:not(.ri) a.sw-checkout-link { font-size:12px; }
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-account-link { font-size:13px; }
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-topbar-right-links { column-gap:10px; }
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-topbar-link-list { column-gap:9px; }
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-topbar-navlink { font-size:12px; }
}
@media (max-width:992px) {
    body.sw-checkout-enhanced { --sw-checkout-inset:1em; }
    /* Mobile cart: keep the ORIGINAL Shoptimizer output and graphic.
       The theme sets position:absolute / right:15px but does not assign a
       vertical top for the header-5 placement, which can leave it under Logo.
       Align the EXISTING cart wrapper to the center of the native header row.
       Checkout distraction-free hiding remains owned by Shoptimizer. */
    body.header-5.sw-checkout-enhanced:not(.min-ck) #masthead .main-header > .site-header-cart {
        top:50%;
        transform:translateY(-50%);
    }
    #masthead .sw-checkout-quick-nav { display:none !important; }
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .topbar-wrapper .top-bar > .col-full { display:flex; align-items:center; gap:8px; min-height:var(--sw-checkout-topbar-height-tablet,48px); padding-inline:1em !important; }
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar > .col-full > .top-bar-right { display:none; }
    body.sw-checkout-enhanced .sw-checkout-topbar-notice { font-size:12px; height:29px; }
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-right-desktop-hidden { display:inline-flex; }
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar .sw-checkout-right-mobile-hidden { display:none; }
    /* Shoptimizer native slide-out menu (or its dedicated Mobile Menu when assigned). */
    body.sw-checkout-enhanced #site-navigation ul.menu > li.sw-checkout-mobile-menu-heading,
    body.sw-checkout-enhanced #site-navigation ul.menu > li.sw-checkout-mobile-menu-item { display:block !important; float:none !important; clear:both; width:100%; box-sizing:border-box; }
    body.sw-checkout-enhanced #site-navigation ul.menu > li.sw-checkout-mobile-menu-heading { border-top:1px solid #e5e5e5; margin:15px 0 5px; padding:13px 0 0; }
    body.sw-checkout-enhanced #site-navigation ul.menu > li.sw-checkout-mobile-menu-heading > span { display:block; font-size:12px; font-weight:700; letter-spacing:.04em; color:#555; }
    body.sw-checkout-enhanced #site-navigation ul.menu > li.sw-checkout-mobile-menu-item > a.sw-checkout-mobile-menu-link { display:flex !important; flex-direction:row; align-items:center; gap:12px; width:100%; min-height:44px; padding:9px 0 !important; font-size:14px; font-weight:500; color:#222; text-decoration:none; }
    body.sw-checkout-enhanced #site-navigation ul.menu > li.sw-checkout-mobile-menu-item > a .sw-checkout-link-svg,
    body.sw-checkout-enhanced #site-navigation ul.menu > li.sw-checkout-mobile-menu-item > a .sw-checkout-icon-image { display:none !important; }
    body.sw-checkout-enhanced #site-navigation ul.menu > li.sw-checkout-mobile-menu-item > a .sw-checkout-mobile-menu-label { display:block; line-height:1.3; }
    /* Only used when Shoptimizer has no menu assigned and falls back to wp_list_pages. */
    /* A touch-friendly localization row lives INSIDE Shoptimizer's left mobile menu.
       Unlike the desktop popover it expands in the document flow, without overlays. */
    body.sw-checkout-enhanced #site-navigation ul.menu > li.sw-header-mobile-localization,
    body.sw-checkout-enhanced .sw-checkout-mobile-links li.sw-header-mobile-localization {
        display:block!important; position:relative; float:none!important; clear:both;
        width:100%; box-sizing:border-box; margin:10px 0 0; padding:6px 0 0;
        border-top:1px solid #e5e7eb;
    }
    body.sw-checkout-enhanced .sw-header-mobile-localization .sw-header-localization {
        display:block; position:static; width:100%; max-width:100%; white-space:normal;
    }
    body.sw-checkout-enhanced .sw-header-mobile-localization .sw-header-localization > summary {
        display:flex; width:100%; box-sizing:border-box; gap:8px; align-items:center;
        min-height:48px; padding:10px 8px; font-size:14px; font-weight:600;
        color:inherit; text-decoration:none;
    }
    body.sw-checkout-enhanced .sw-header-mobile-localization .sw-header-localization-mobile-title {flex:1;min-width:0;}
    body.sw-checkout-enhanced .sw-header-mobile-localization .sw-header-localization-mobile-current {
        display:inline-flex; align-items:center; gap:5px; font-weight:400; opacity:.72; font-size:12px;
    }
    body.sw-checkout-enhanced .sw-header-mobile-localization .sw-header-localization-menu {
        position:static; transform:none; inset:auto; width:100%; min-width:0; max-width:100%;
        padding:8px; margin:0 0 10px; box-shadow:none;
        border-radius:var(--sw-localization-radius,8px); box-sizing:border-box;
    }
    body.sw-checkout-enhanced .sw-header-mobile-localization .sw-header-localization-menu a {min-height:44px; display:flex; align-items:center;}
    body.sw-checkout-enhanced .sw-header-mobile-localization .sw-header-localization-menu strong {padding-top:12px;}
    body.sw-checkout-enhanced .col-full-nav .sw-checkout-mobile-links { display:block !important; padding:16px 4px; border-top:1px solid #e5e5e5; }
    .sw-checkout-mobile-heading { font-weight:700; font-size:13px; margin-bottom:9px; }
    .sw-checkout-mobile-links ul { list-style:none; padding:0; margin:0; }
    .sw-checkout-mobile-links .sw-checkout-mobile-item { list-style:none; padding:0; margin:0; }
    .sw-checkout-mobile-links .sw-checkout-link { display:flex; gap:12px; align-items:center; padding:11px 0; color:inherit; text-decoration:none; font-size:14px; }
    .sw-checkout-mobile-links .sw-checkout-link-svg, .sw-checkout-mobile-links .sw-checkout-icon-image { display:none !important; }
}
@media (max-width:768px) {
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .topbar-wrapper .top-bar > .col-full { display:flex; align-items:center; justify-content:center; min-height:var(--sw-checkout-topbar-height-mobile,40px); padding-inline:var(--sw-checkout-inset) !important; }
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar > .col-full > .top-bar-left { flex:1 1 100%; text-align:left; }
    body.sw-checkout-enhanced.sw-checkout-layer-topbar-enhanced .top-bar > .col-full > .top-bar-center { display:none; }
    .sw-checkout-topbar-notice { max-width:100%; }
}
@media (prefers-reduced-motion:reduce) {
    .sw-checkout-rotator-message { transition:none; }
}

/* RC14: Navigation may be hidden on desktop only. Preserve the native mobile drawer.
   Header-4 shares its HTML wrappers and is explicitly excluded. */
@media(min-width:993px){
  body.sw-checkout-enhanced.sw-header-nav-hidden-desktop:not(.header-4) .col-full-nav {display:none!important}
}

/* Enhanced fourth native layer; no extra WP widget renderer or global theme override. */
body.sw-checkout-enhanced.sw-checkout-layer-widget-enhanced .header-widget-region { background:var(--sw-header-widget-bg,#dc9814); color:var(--sw-header-widget-text,#fff); }
body.sw-checkout-enhanced.sw-checkout-layer-widget-enhanced .header-widget-region .widget { padding-block:var(--sw-header-widget-pad,12px); }

/* RC16: desktop Shoptimizer search fields, including the Header-4 modal.
 * Opt-in, never apply to mobile or to third-party content outside the search shell. */
@media (min-width:993px) {
  body.sw-checkout-enhanced.sw-header-search-custom #masthead .site-search :is(input[type="search"],input.search-field,.dgwt-wcas-search-input,.aws-search-field),
  body.sw-checkout-enhanced.sw-header-search-custom dialog.shoptimizer-modal[data-shoptimizermodal-id="searchToggle"] :is(input[type="search"],input.search-field,.dgwt-wcas-search-input,.aws-search-field),
  body.sw-checkout-enhanced.sw-header-search-custom .shoptimizer-modal[data-shoptimizermodal-id="searchToggle"] :is(input[type="search"],input.search-field,.dgwt-wcas-search-input,.aws-search-field) {
    box-sizing:border-box;
    background:var(--sw-hsearch-bg,#f3f5f6) !important;
    color:var(--sw-hsearch-fg,#252c32) !important;
    border-style:solid !important;
    border-color:var(--sw-hsearch-border,#cbd5db) !important;
    border-width:var(--sw-hsearch-bt,1px) var(--sw-hsearch-br,1px) var(--sw-hsearch-bb,1px) var(--sw-hsearch-bl,1px) !important;
    border-radius:var(--sw-hsearch-radius,5px) !important;
    box-shadow:var(--sw-hsearch-shadow,none) !important;
    outline:none; transition:background-color .15s,border-color .15s,box-shadow .15s;
  }
  body.sw-checkout-enhanced.sw-header-search-custom #masthead .site-search :is(input[type="search"],input.search-field,.dgwt-wcas-search-input,.aws-search-field)::placeholder,
  body.sw-checkout-enhanced.sw-header-search-custom .shoptimizer-modal[data-shoptimizermodal-id="searchToggle"] :is(input[type="search"],input.search-field,.dgwt-wcas-search-input,.aws-search-field)::placeholder {
    color:var(--sw-hsearch-placeholder,#75808a) !important;
  }
  body.sw-checkout-enhanced.sw-header-search-custom #masthead .site-search :is(input[type="search"],input.search-field,.dgwt-wcas-search-input,.aws-search-field):focus,
  body.sw-checkout-enhanced.sw-header-search-custom .shoptimizer-modal[data-shoptimizermodal-id="searchToggle"] :is(input[type="search"],input.search-field,.dgwt-wcas-search-input,.aws-search-field):focus {
    background:var(--sw-hsearch-focus-bg,#fff) !important;
    border-color:var(--sw-hsearch-focus-border,#37aec0) !important;
    box-shadow:0 0 0 var(--sw-hsearch-ring-width,3px) var(--sw-hsearch-focus-ring,#b2e5eb) !important;
  }
  /* Header-4 uses the ORIGINAL Shoptimizer cart in its merged row.
     Shoptimizer's .count is itself the outlined shopping bag (including
     the handle in .count::after); it is not a separate SVG element.
     Render any opted-in custom cart icon IN THAT PLACE, never overlay a
     second icon over the price/whole .cart-contents link. The native
     option has no overrides and remains entirely theme-owned. */
  body.header-4.sw-header-four-cart-custom:not(.sw-checkout-cart-icon-native) .header-4-container .col-full-nav .site-header-cart .cart-contents::after,
  body.header-4.sw-header-four-cart-custom.sw-checkout-cart-custom-image .header-4-container .col-full-nav .site-header-cart .cart-contents::after {
    content:none !important;
  }
  body.header-4.sw-header-four-cart-custom:not(.sw-checkout-cart-icon-native) .header-4-container .col-full-nav .site-header-cart .cart-contents > .count,
  body.header-4.sw-header-four-cart-custom.sw-checkout-cart-custom-image .header-4-container .col-full-nav .site-header-cart .cart-contents > .count {
    position:relative;
    border-color:transparent !important;
    color:var(--sw-checkout-cart-color,#292929) !important;
  }
  body.header-4.sw-header-four-cart-custom:not(.sw-checkout-cart-icon-native) .header-4-container .col-full-nav .site-header-cart .cart-contents > .count::after,
  body.header-4.sw-header-four-cart-custom.sw-checkout-cart-custom-image .header-4-container .col-full-nav .site-header-cart .cart-contents > .count::after {
    content:none !important;
    display:none !important;
  }
  body.header-4.sw-header-four-cart-custom:not(.sw-checkout-cart-icon-native) .header-4-container .col-full-nav .site-header-cart .cart-contents > .count::before,
  body.header-4.sw-header-four-cart-custom.sw-checkout-cart-custom-image .header-4-container .col-full-nav .site-header-cart .cart-contents > .count::before {
    content:"";
    position:absolute;
    inset:0;
    display:block;
    pointer-events:none;
    background-color:var(--sw-checkout-cart-color,#292929);
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M3 4h2l2.2 11.5a2 2 0 0 0 2 1.5H19M7 7h14l-2 7H8M10 21h.01M18 21h.01'/%3E%3C/svg%3E") center/contain no-repeat;
    mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M3 4h2l2.2 11.5a2 2 0 0 0 2 1.5H19M7 7h14l-2 7H8M10 21h.01M18 21h.01'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  body.header-4.sw-header-four-cart-custom.sw-checkout-cart-icon-bag .header-4-container .col-full-nav .site-header-cart .cart-contents > .count::before {
    -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' d='M4 8h16l-1 13H5L4 8Zm4 0V6a4 4 0 0 1 8 0v2'/%3E%3C/svg%3E");
    mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' d='M4 8h16l-1 13H5L4 8Zm4 0V6a4 4 0 0 1 8 0v2'/%3E%3C/svg%3E");
  }
  body.header-4.sw-header-four-cart-custom.sw-checkout-cart-icon-basket .header-4-container .col-full-nav .site-header-cart .cart-contents > .count::before {
    -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' d='M2 10h20l-2 11H4L2 10Zm5 0 5-7 5 7M8 14v4m4-4v4m4-4v4'/%3E%3C/svg%3E");
    mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' d='M2 10h20l-2 11H4L2 10Zm5 0 5-7 5 7M8 14v4m4-4v4m4-4v4'/%3E%3C/svg%3E");
  }
}

/* Header-4 opt-in PHP-hooked quick links in the merged desktop row. */
@media (min-width:993px) {
  body.header-4.sw-checkout-enhanced.sw-checkout-layer-main-enhanced .header-4-container .sw-header-four-actions {
    display:flex;align-items:center;gap:var(--sw-checkout-links-gap,16px);flex:0 1 auto;min-width:0;max-width:280px;overflow:hidden;
  }
  body.header-4.sw-checkout-enhanced.sw-checkout-layer-main-enhanced .header-4-container .sw-header-four-actions a {
    white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:12px;text-decoration:none;color:inherit;
  }
  body.header-4.sw-checkout-enhanced.sw-checkout-layer-main-enhanced .header-4-container .sw-header-four-actions a.sw-header-four-action-divider {position:relative}
  body.header-4.sw-checkout-enhanced.sw-checkout-layer-main-enhanced .header-4-container .sw-header-four-actions a + a.sw-header-four-action-divider::before {
    content:"";position:absolute;left:calc(var(--sw-checkout-links-gap,16px) / -2);top:50%;
    transform:translateY(-50%);height:24px;width:1px;background:var(--sw-border,#e1e5e9);
  }
  body.header-4.sw-checkout-enhanced.sw-checkout-layer-main-enhanced .header-4-container .sw-header-four-actions a:focus-visible {outline:2px solid currentColor;outline-offset:3px;}
}
@media (max-width:992px) {body .sw-header-four-actions{display:none!important}}

@media (min-width:993px) {
  body.header-4.sw-header-four-cart-custom.sw-checkout-cart-custom-image .header-4-container .col-full-nav .site-header-cart .cart-contents > .count::before {
    -webkit-mask:none;
    mask:none;
    background:transparent var(--sw-checkout-cart-image) center / contain no-repeat;
  }
}
