/* DiyYarn Storefront 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 dysh-enhanced from the document.
 */
body.dysh-enhanced {
    --dysh-container-gutter: clamp(15px, 2.3vw, 32px);
    /* All quick links, More and Basket use intrinsic label width and one spacing scale. */
    --dysh-icon-left-margin: 16px;
    --dysh-header-gap: clamp(14px, 1.7vw, 28px);
    /* Layout containers already supply a centered max-width; avoid padding twice. */
    --dysh-inset:0px;
}

/* 1 — independent banner, optional custom height. */
.dysh-promotion { background:var(--dysh-promo-bg,#b8eaf0); color:var(--dysh-promo-text,#24566a); width:100%; }
.dysh-promotion-inner { box-sizing:border-box; display:flex; align-items:center; justify-content:center; min-height:44px; height:var(--dysh-promo-height,auto); max-width:1440px; padding:9px var(--dysh-container-gutter); margin:0 auto; font-size:16px; font-weight:700; line-height:1.4; text-align:center; }
.dysh-promotion-inner > * { width:100%; }
.dysh-promo-align-left .dysh-promotion-inner { text-align:left; }
.dysh-promotion a { color:inherit; text-decoration:none; }
.dysh-promotion a:hover { text-decoration:underline; }

/* 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.dysh-enhanced.dysh-topbar-border-enabled .topbar-wrapper.col-full {
    position:relative;
    border-bottom:0 !important;
}
body.dysh-enhanced.dysh-topbar-border-enabled .topbar-wrapper.col-full::after {
    content:"" !important;
    display:block !important;
    pointer-events:none;
    position:absolute;
    z-index:1;
    left:50%; bottom:0;
    width:100vw;
    height:var(--dysh-topbar-border-width,1px);
    background:var(--dysh-topbar-border-color,#e5e7eb);
    transform:translateX(-50%);
}

/* 2 — Shoptimizer's ORIGINAL Top Bar wrapper and Widget layout. */
body.dysh-enhanced .topbar-wrapper.col-full { box-sizing:border-box; width:100%; max-width:100%; padding:0 !important; margin:0 auto !important; }
body.dysh-enhanced .topbar-wrapper .top-bar { padding-block:0 !important; }
/* 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.dysh-enhanced .topbar-wrapper .top-bar { padding:0 !important; margin:0 !important; }
    body.dysh-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(--dysh-topbar-height-desktop,56px); padding:0 !important; margin-inline:auto; }
    body.dysh-enhanced .topbar-wrapper .top-bar > .col-full::before,
    body.dysh-enhanced .topbar-wrapper .top-bar > .col-full::after { content:none !important; }
}
body.dysh-enhanced .top-bar > .col-full > .top-bar-left { flex:1 1 0; min-width:0; margin:0; }
/* Shoptimizer places a .textwidget (or a Shortcode block) inside the flexed
   .top-bar-left widget. Ticker slides are absolutely positioned, so that
   intermediate flex child otherwise has ZERO intrinsic width. On the actual
   Shoptimizer stylesheet this clips the entire ticker to 0px. */
body.dysh-enhanced.dysh-topbar-rotator-enabled .top-bar > .col-full > .top-bar-left > .textwidget,
body.dysh-enhanced.dysh-topbar-rotator-enabled .top-bar > .col-full > .top-bar-left > .wp-block-shortcode,
body.dysh-enhanced.dysh-topbar-rotator-enabled .top-bar > .col-full > .top-bar-left > .widget-content,
body.dysh-enhanced.dysh-topbar-rotator-enabled .top-bar > .col-full > .top-bar-left > .wp-block-group {
    box-sizing:border-box; flex:1 1 auto; width:100%; min-width:0;
}
body.dysh-enhanced.dysh-topbar-rotator-enabled .top-bar .top-bar-left .dysh-topbar-notice,
body.dysh-enhanced.dysh-topbar-rotator-enabled .top-bar .top-bar-left .dysh-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.dysh-enhanced .top-bar > .col-full > .top-bar-center { flex:0 1 auto; max-width:32%; }
body.dysh-enhanced .top-bar > .col-full > .top-bar-right { flex:0 0 auto; width:auto; min-width:0; margin:0; align-items:center; }
body.dysh-enhanced .top-bar > .col-full > .top-bar-right:not(.dysh-account-widget) { margin-left:auto; }
body.dysh-enhanced .top-bar .widget_nav_menu.top-bar-right ul { white-space:nowrap; margin:0; padding:0; }
body.dysh-enhanced .top-bar .widget_nav_menu.top-bar-right ul > li { margin:0 0 0 clamp(8px,1.2vw,22px); }
body.dysh-enhanced .top-bar > .col-full > .dysh-account-widget { flex:0 0 auto; margin-left:0; }
body.dysh-enhanced .dysh-account-links { display:inline-flex; align-items:center; gap:8px; white-space:nowrap; }
body.dysh-enhanced .dysh-account-separator { font-weight:400; color:#8a8a8a; }
body.dysh-enhanced .dysh-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.dysh-enhanced .dysh-account-link .dysh-link-svg { width:19px; height:19px; flex:0 0 19px; stroke-width:2px; margin:0; }
body.dysh-enhanced .dysh-account-link:hover { opacity:1; text-decoration:underline; text-underline-offset:3px; }
/* 自定义的第二层右侧链接与账户为同一行；用户只需在右侧小工具放一个短代码。 */
body.dysh-enhanced .top-bar .dysh-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%; white-space:nowrap; }
body.dysh-enhanced .top-bar .dysh-topbar-link-list { display:flex; align-items:center; justify-content:flex-end; column-gap:clamp(11px,1.3vw,23px); }
body.dysh-enhanced .top-bar .dysh-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.dysh-enhanced .top-bar .dysh-topbar-navlink:hover,
body.dysh-enhanced .top-bar .dysh-topbar-navlink:focus-visible,
body.dysh-enhanced .top-bar .dysh-account-link:focus-visible { color:inherit; text-decoration:underline; text-underline-offset:3px; opacity:1; }
body.dysh-enhanced .top-bar .dysh-topbar-more { position:relative; display:block; }
body.dysh-enhanced .top-bar .dysh-topbar-more > summary { list-style:none; cursor:pointer; font-size:14px; }
body.dysh-enhanced .top-bar .dysh-topbar-more > summary::-webkit-details-marker { display:none; }
body.dysh-enhanced .top-bar .dysh-topbar-more > summary:hover { text-decoration:underline; text-underline-offset:3px; }
body.dysh-enhanced .top-bar .dysh-topbar-more-list { position:absolute; top:100%; right:0; min-width:170px; z-index:110; display:flex; flex-direction:column; gap:8px; padding:14px; border:1px solid #e5e7eb; border-radius:5px; background:#fff; box-shadow:0 8px 20px rgba(0,0,0,.12); }
body.dysh-enhanced .top-bar .dysh-topbar-more:not([open]) .dysh-topbar-more-list { display:none; }
body.dysh-enhanced .top-bar .dysh-right-desktop-hidden { display:none; }


/* Each slide is a complete, independently positioned icon + text unit.
 * First slide is visible before JS loads; CSS owns the overflow clipping. */
.dysh-rotator, .dysh-promo-rotator { position:relative; display:block; height:1.8em; min-width:0; width:100%; overflow:hidden; isolation:isolate; }
.dysh-rotator-message[hidden], .dysh-promo-message[hidden] { display:none !important; }
.dysh-rotator-message, .dysh-promo-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(--dysh-roll-duration,500ms) ease-in-out, opacity var(--dysh-roll-duration,500ms) ease-in-out;
    pointer-events:none;
}
.dysh-promo-message { display:block; }
.dysh-rotator-message.dysh-is-current, .dysh-promo-message.dysh-is-current { opacity:1; transform:translate3d(0,0,0); pointer-events:auto; }
.dysh-rotator-message.dysh-is-leaving, .dysh-promo-message.dysh-is-leaving { opacity:0; transform:translate3d(0,-100%,0); }
.dysh-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; }
.dysh-topbar-rotator { flex:1 1 auto; min-width:0; width:100%; height:32px; }
.dysh-topbar-slide { width:100%; }
.dysh-topbar-slide .dysh-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;
}
.dysh-topbar-slide .dysh-ticker-icon { display:inline-flex; flex:0 0 24px; align-items:center; justify-content:center; width:24px; height:24px; color:#27b6c8; }
.dysh-topbar-slide .dysh-ticker-icon .dysh-link-svg { display:block; width:24px; height:24px; max-width:none; flex:none; color:inherit; margin:0 !important; }
.dysh-topbar-slide .dysh-topbar-message-text { display:inline-block; min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; line-height:1.4; white-space:nowrap; }
.dysh-topbar-slide .dysh-notice-icon-image { display:block; width:24px; height:24px; max-width:100%; flex:none; object-fit:contain; }
.dysh-topbar-slide a { color:inherit; text-decoration:none; }
.dysh-topbar-slide a:hover, .dysh-topbar-slide a:focus-visible { text-decoration:underline; text-underline-offset:3px; }
.dysh-notice-configuration-hint { display:inline-block; color:#876c21; font-size:12px; font-weight:400; line-height:1.5; }
.dysh-effect-fade .dysh-rotator-message { transform:none; }
.dysh-effect-fade .dysh-rotator-message.dysh-is-current, .dysh-effect-fade .dysh-rotator-message.dysh-is-leaving { transform:none; }
.dysh-effect-none .dysh-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.dysh-enhanced #site-navigation ul.menu > li.dysh-mobile-menu-heading,
body.dysh-enhanced #site-navigation ul.menu > li.dysh-mobile-menu-item,
body.dysh-enhanced .col-full-nav .dysh-mobile-links { 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 .dysh-quick-nav { min-width:0; margin:0; padding:0; float:none; }
#masthead .dysh-quick-nav .dysh-quick-menu {
    display:flex; align-items:center; justify-content:flex-end; gap:0;
    padding:0; margin:0; list-style:none;
}
#masthead .dysh-quick-nav .dysh-quick-menu > .dysh-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 .dysh-quick-nav .dysh-quick-menu > .dysh-menu-item + .dysh-menu-item {
    margin-left:var(--dysh-icon-left-margin);
}
#masthead .dysh-quick-nav .dysh-link,
#masthead .dysh-quick-nav .menu li:not(.ri) a.dysh-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 .dysh-quick-nav .dysh-link:hover { opacity:.78; }
#masthead .dysh-quick-nav .dysh-link-label {
    display:block; width:auto; max-width:100%; min-width:0;
    overflow:hidden; text-overflow:ellipsis; text-align:center;
}
.dysh-link-svg, .dysh-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 .dysh-more-entry { position:relative; }
#masthead .dysh-more { width:max-content; max-width:120px; }
#masthead .dysh-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 .dysh-more summary::-webkit-details-marker { display:none; }
.dysh-more-dots { font-size:28px; width:27px; height:27px; text-align:center; line-height:22px; }
#masthead .dysh-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 .dysh-more:not([open]) .dysh-more-menu { display:none; }
#masthead .dysh-quick-nav .dysh-more-menu li:not(.ri) a.dysh-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 .dysh-more-menu .dysh-link-svg, #masthead .dysh-more-menu .dysh-icon-image { width:20px; height:20px; }
#masthead .dysh-more-menu .dysh-link-label { text-align:left; }

/* Header-5 only: entire row measured as a single layout. No negative margins. */
@media (min-width:993px) {
    body.header-5.dysh-layout-active #masthead .main-header.col-full {
        box-sizing:border-box; display:grid; grid-template-columns:max-content minmax(170px,1fr) max-content max-content;
        align-items:center; align-content:center; column-gap:0;
        /* Exact symmetric padding overrides Kirki's two independent header paddings. */
        padding:var(--dysh-header-pad,17px) 0 !important;
        height:auto; min-height:0; margin-inline:auto;
    }
    /* When quick links are all disabled, preserve a native Basket column.
       No empty Quick Links <nav> is inserted just to make Grid work. */
    body.header-5.dysh-layout-active.dysh-cart-only #masthead .main-header.col-full {
        grid-template-columns:max-content minmax(170px,1fr) max-content;
    }
    body.header-5.dysh-layout-active.dysh-native-secondary #masthead .main-header > .secondary-navigation {
        grid-column:3;
        min-width:0;
        margin:0;
    }
    body.header-5.dysh-layout-active.dysh-cart-only #masthead .main-header > .site-header-cart {
        grid-column:3;
        margin-left:0 !important;
        justify-self:end;
    }
    body.header-5.dysh-layout-active #masthead .main-header.col-full::before,
    body.header-5.dysh-layout-active #masthead .main-header.col-full::after { content:none !important; }
    body.header-5.dysh-layout-active #masthead .main-header > .site-branding { grid-column:1; min-width:0; margin:0; }
    body.header-5.dysh-layout-active #masthead .main-header > .site-search { grid-column:2; width:auto; min-width:0; max-width:none; margin:0 var(--dysh-header-gap); }
    body.header-5.dysh-layout-active #masthead .main-header > .dysh-quick-nav { grid-column:3; display:block; align-self:center; width:auto; margin:0; }
    body.header-5.dysh-layout-active #masthead .main-header > .site-header-cart { grid-column:4; width:max-content; min-width:0; margin:0 0 0 var(--dysh-icon-left-margin) !important; padding:0; border:0; align-self:center; justify-self:end; position:relative; display:block; min-height:66px; height:66px; background:transparent; box-shadow:none; }
    body.header-5.dysh-layout-active #masthead .main-header > .s-observer { position:absolute; inset:auto auto 0 0; width:1px; height:1px; pointer-events:none; }
    body.header-5.dysh-layout-active #masthead .site-header-cart .shoptimizer-cart { display:block; position:relative; width:max-content; height:66px; margin:0; padding:0; }
    body.header-5.dysh-layout-active #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.dysh-layout-active #masthead .site-header-cart .cart-contents:hover { opacity:.78; background:transparent; }
    body.header-5.dysh-layout-active #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.dysh-layout-active #masthead .site-header-cart .cart-contents::before { content:""; display:block; width:27px; height:27px; flex:0 0 27px; background:#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.dysh-layout-active #masthead .site-header-cart .cart-contents::after { content:"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.dysh-layout-active #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.dysh-layout-active #masthead .site-header-cart .shoptimizer-cart-icon > svg { display:none !important; }
    body.header-5.dysh-layout-active #masthead .site-header-cart .shoptimizer-cart-icon .mini-count,
    body.header-5.dysh-layout-active #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:#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.dysh-layout-active #masthead .site-header-cart .mini-count:not(.dysh-cart-has-items),
    body.header-5.dysh-layout-active #masthead .site-header-cart .cart-contents > .count:not(.dysh-cart-has-items),
    body.header-5.dysh-layout-active #masthead .site-header-cart .mini-count[hidden],
    body.header-5.dysh-layout-active #masthead .site-header-cart .cart-contents > .count[hidden] { display:none !important; }
    body.header-5.dysh-layout-active #masthead .site-header-cart .cart-contents > .count::after { display:none !important; content:none; }
    body.header-5.dysh-layout-active #masthead .site-header-cart:not(:has(.shoptimizer-cart)) { display:none; }
}


/* 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.dysh-enhanced.dysh-nav-layout-enabled .col-full-nav .shoptimizer-primary-navigation.col-full {
        display:flex;
        align-items:center;
    }
    body.dysh-enhanced.dysh-nav-layout-enabled .col-full-nav .shoptimizer-primary-navigation > .main-navigation {
        flex:1 1 auto;
        min-width:0;
        width:100%;
    }
    body.dysh-enhanced.dysh-nav-layout-enabled .col-full-nav #site-navigation > .primary-navigation {
        display:flex;
        align-items:center;
        min-width:0;
    }
    body.dysh-enhanced.dysh-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.dysh-enhanced.dysh-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(--dysh-nav-justify,center);
        column-gap:var(--dysh-nav-item-gap,24px);
        box-sizing:border-box;
        width:100%;
        margin:0;
        padding-inline:var(--dysh-nav-side-padding,0px);
        list-style:none;
    }
    body.dysh-enhanced.dysh-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.dysh-enhanced.dysh-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.dysh-enhanced.dysh-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;
    }
}

/* 4 — search focus: highlight field only, never a page overlay. */
@media (min-width:993px) {
    body.dysh-search-enhanced #masthead .site-search input[type="search"],
    body.dysh-search-enhanced #masthead .site-search input.search-field,
    body.dysh-search-enhanced #masthead .site-search .dgwt-wcas-search-input { transition:border-color .18s,box-shadow .18s,background-color .18s; }
    body.dysh-search-enhanced #masthead .site-search:focus-within input[type="search"],
    body.dysh-search-enhanced #masthead .site-search:focus-within input.search-field,
    body.dysh-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 a near-full-width desktop the site container has little exterior margin.
 * Use identical safety gutters in Top Bar and the main Header only in that range. */
@media (min-width:993px) and (max-width:1300px) {
    body.dysh-enhanced .topbar-wrapper .top-bar > .col-full { padding-inline:18px !important; }
    body.header-5.dysh-layout-active #masthead .main-header.col-full { padding-inline:18px !important; }
}

@media (min-width:993px) and (max-width:1220px) {
    body.dysh-enhanced { --dysh-header-gap:14px; --dysh-icon-left-margin:10px; }
    #masthead .dysh-quick-nav .dysh-link, #masthead .dysh-quick-nav .menu li:not(.ri) a.dysh-link { font-size:12px; }
    body.dysh-enhanced .top-bar .widget_nav_menu.top-bar-right ul > li { margin-left:9px; }
    body.dysh-enhanced .top-bar .dysh-account-link { font-size:13px; }
    body.dysh-enhanced .top-bar .dysh-topbar-right-links { column-gap:10px; }
    body.dysh-enhanced .top-bar .dysh-topbar-link-list { column-gap:9px; }
    body.dysh-enhanced .top-bar .dysh-topbar-navlink { font-size:12px; }
}
@media (max-width:992px) {
    body.dysh-enhanced { --dysh-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.dysh-enhanced:not(.min-ck) #masthead .main-header > .site-header-cart {
        top:50%;
        transform:translateY(-50%);
    }
    .dysh-promotion-inner { min-height:38px; font-size:13px; padding:8px 12px; }
    .dysh-promo-no-mobile { display:none; }
    #masthead .dysh-quick-nav { display:none !important; }
    body.dysh-enhanced .topbar-wrapper .top-bar > .col-full { display:flex; align-items:center; gap:8px; min-height:var(--dysh-topbar-height-tablet,48px); padding-inline:1em !important; }
    body.dysh-enhanced .top-bar > .col-full > .top-bar-right:not(.dysh-account-widget),
    body.dysh-enhanced .top-bar > .col-full > .dysh-account-widget { display:none; }
    body.dysh-enhanced .dysh-topbar-notice { font-size:12px; height:29px; }
    body.dysh-enhanced .top-bar .dysh-right-desktop-hidden { display:inline-flex; }
    body.dysh-enhanced .top-bar .dysh-right-mobile-hidden { display:none; }
    /* Shoptimizer native slide-out menu (or its dedicated Mobile Menu when assigned). */
    body.dysh-enhanced #site-navigation ul.menu > li.dysh-mobile-menu-heading,
    body.dysh-enhanced #site-navigation ul.menu > li.dysh-mobile-menu-item { display:block !important; float:none !important; clear:both; width:100%; box-sizing:border-box; }
    body.dysh-enhanced #site-navigation ul.menu > li.dysh-mobile-menu-heading { border-top:1px solid #e5e5e5; margin:15px 0 5px; padding:13px 0 0; }
    body.dysh-enhanced #site-navigation ul.menu > li.dysh-mobile-menu-heading > span { display:block; font-size:12px; font-weight:700; letter-spacing:.04em; color:#555; }
    body.dysh-enhanced #site-navigation ul.menu > li.dysh-mobile-menu-item > a.dysh-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.dysh-enhanced #site-navigation ul.menu > li.dysh-mobile-menu-item > a .dysh-link-svg,
    body.dysh-enhanced #site-navigation ul.menu > li.dysh-mobile-menu-item > a .dysh-icon-image { display:none !important; }
    body.dysh-enhanced #site-navigation ul.menu > li.dysh-mobile-menu-item > a .dysh-mobile-menu-label { display:block; line-height:1.3; }
    /* Only used when Shoptimizer has no menu assigned and falls back to wp_list_pages. */
    body.dysh-enhanced .col-full-nav .dysh-mobile-links { display:block !important; padding:16px 4px; border-top:1px solid #e5e5e5; }
    .dysh-mobile-heading { font-weight:700; font-size:13px; margin-bottom:9px; }
    .dysh-mobile-links ul { list-style:none; padding:0; margin:0; }
    .dysh-mobile-links .dysh-mobile-item { list-style:none; padding:0; margin:0; }
    .dysh-mobile-links .dysh-link { display:flex; gap:12px; align-items:center; padding:11px 0; color:inherit; text-decoration:none; font-size:14px; }
    .dysh-mobile-links .dysh-link-svg, .dysh-mobile-links .dysh-icon-image { display:none !important; }
}
@media (max-width:768px) {
    body.dysh-enhanced .topbar-wrapper .top-bar > .col-full { display:flex; align-items:center; justify-content:center; min-height:var(--dysh-topbar-height-mobile,40px); padding-inline:var(--dysh-inset) !important; }
    body.dysh-enhanced .top-bar > .col-full > .top-bar-left { flex:1 1 100%; text-align:left; }
    body.dysh-enhanced .top-bar > .col-full > .top-bar-center { display:none; }
    .dysh-topbar-notice { max-width:100%; }
}
@media (prefers-reduced-motion:reduce) {
    .dysh-rotator-message, .dysh-promo-message { transition:none; }
}
