/* Vertical mega menu panels built by Galaxy_MegaMenuTaxonomy (interim styling - design pass comes later) */
@media only screen and (min-width: 768px) {
    .desk-vertcial-menu-container .cdz-vertical-menu.dropdown-fullheight .item.level0:not(.cat-tree) > ul.groupmenu-drop {
        /* Left list is as wide as the ALL CATEGORIES button (col-sm-4); the panel then spans the
           horizontal menu (col-sm-20 minus its 10px gutter): 5 x (100% + 10px) - 10px */
        width: calc(500% + 40px);
        padding: 25px 35px;
        box-sizing: border-box;
        display: block;
    }
    .desk-vertcial-menu-container .main-content-top-left .menu-container {
        min-width: 0;
    }
    /* The list is stretched to the open panel's height (desktop-menu.phtml); fill the space under the items */
    .desk-vertcial-menu-container .cdz-vertical-menu .groupmenu {
        background: #f3f3f3;
    }
    /* Stay open while .gmm-open is set (close delay, keyboard focus) as well as on hover */
    .desk-vertcial-menu-container.gmm-open .menu-container,
    .desk-vertcial-menu-container.one-ver.gmm-open .menu-container {
        display: block;
    }
    .desk-vertcial-menu-container [data-role="menu-title"]:focus-visible,
    .desk-vertcial-menu-container .cdz-vertical-menu a:focus-visible {
        outline: 2px solid #e31e24;
        outline-offset: -2px;
    }
    /* Left-hand list: roomier rows, and the open item reads as a tab joined to its panel (white, red marker,
       dark text) instead of the theme's light-blue text on white */
    .desk-vertcial-menu-container .cdz-vertical-menu .groupmenu > li.level0 > a.menu-link {
        padding-top: 7px;
        padding-bottom: 7px;
    }
    @media (min-width: 1366px) {
        .desk-vertcial-menu-container .cdz-vertical-menu .groupmenu > li.level0 > a.menu-link {
            white-space: nowrap;
        }
    }
    .desk-vertcial-menu-container .cdz-vertical-menu .groupmenu > li.level0:hover > a.menu-link,
    .desk-vertcial-menu-container .cdz-vertical-menu .groupmenu > li.level0 > a.menu-link:hover {
        color: #222;
        background: #e8e8e8;
        border-color: transparent;
    }
    .desk-vertcial-menu-container .cdz-vertical-menu .groupmenu > li.level0.gmm-current > a.menu-link,
    .desk-vertcial-menu-container .cdz-vertical-menu:not(.gmm-intent) .groupmenu:not(:hover) > li.level0:first-child > a.menu-link {
        color: #222;
        background: #fff;
        box-shadow: inset 3px 0 0 #e31e24;
        font-weight: 600;
    }
    /* Panels follow .gmm-current (set with hover intent by desktop-menu.phtml) rather than raw :hover */
    .desk-vertcial-menu-container .cdz-vertical-menu.dropdown-fullheight.gmm-intent .groupmenu > li.level0:not(.cat-tree) > ul.groupmenu-drop {
        display: none;
        visibility: hidden;
    }
    .desk-vertcial-menu-container .cdz-vertical-menu.dropdown-fullheight.gmm-intent .groupmenu > li.level0.gmm-current:not(.cat-tree) > ul.groupmenu-drop,
    .desk-vertcial-menu-container .cdz-vertical-menu:not(.gmm-intent) .groupmenu:not(:hover) > li.level0:first-child > ul.groupmenu-drop {
        display: block;
        top: 0;
        visibility: inherit;
        opacity: 1;
        transform: none;
    }
    /* The theme greys out any hovered element inside a dropdown, which turned the whole panel grey */
    .desk-vertcial-menu-container .cdz-vertical-menu .groupmenu .groupmenu-drop li:hover {
        background: transparent;
    }
    .galaxy-mm-panel ul.groupdrop-link a:hover {
        text-decoration: underline;
    }
    .galaxy-mm-panel .row > [class*="col-sm-"] {
        padding: 0 20px 0 0;
        box-sizing: border-box;
    }
    .galaxy-mm-panel .galaxy-mm-group {
        margin-bottom: 26px;
    }
    .cdz-menu .groupmenu-drop .galaxy-mm-panel p.groupdrop-title {
        display: inline-block;
        margin: 0 0 16px;
        padding: 0 0 4px;
        border-bottom: 2px solid #e31e24;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.3;
        letter-spacing: .3px;
        text-transform: uppercase;
        color: #222;
    }
    .galaxy-mm-panel ul.groupdrop-link {
        margin: 0;
        padding: 0;
        list-style: none;
    }
    .galaxy-mm-panel ul.groupdrop-link li {
        margin: 0;
        padding: 0;
        list-style: none;
    }
    .galaxy-mm-panel ul.groupdrop-link a {
        display: block;
        padding: 3px 0;
        font-size: 14px;
        line-height: 1.5;
        letter-spacing: .3px;
        color: #555;
    }
    .galaxy-mm-panel ul.groupdrop-link a:hover {
        color: #e31e24;
    }

    /* Top Brands: a row under the columns (default) or a rail on the right (top_brands_position = right).
       Brand images are square with the logo in the middle, so object-fit crops them to the wordmark band. */
    .galaxy-mm-panel-brands {
        margin-top: 4px;
        padding-top: 18px;
        border-top: 1px solid #eee;
    }
    .galaxy-mm-has-rail .row {
        display: flex;
    }
    .galaxy-mm-has-rail .row > [class*="col-sm-"] {
        flex: 1 1 0;
        width: auto;
        float: none;
    }
    .galaxy-mm-has-rail .row > [class*="col-sm-"]:last-child {
        flex: 0 0 268px;
        padding: 0 0 0 24px;
        border-left: 1px solid #eee;
    }
    .galaxy-mm-has-rail .galaxy-mm-brands-row {
        display: grid;
        grid-template-columns: repeat(2, 120px);
    }
    .galaxy-mm-brands-row {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 12px;
    }
    .galaxy-mm-brand {
        display: block;
        width: 120px;
        height: 64px;
        border: 1px solid #e3e3e3;
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
        transition: border-color .2s;
    }
    .galaxy-mm-brand:hover {
        border-color: #e31e24;
    }
    .galaxy-mm-brand img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    /* Promo tile (CMS block megamenu-promo-<department>) under the logos */
    .galaxy-mm-promo {
        margin-top: 16px;
    }
    .galaxy-mm-promo:empty {
        display: none;
    }
    .galaxy-mm-promo img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 8px;
    }
    .galaxy-mm-promo a:hover img {
        opacity: .92;
    }
    .galaxy-mm-viewall {
        font-size: 14px;
        font-weight: 600;
        color: #222;
        text-decoration: underline;
    }
}

/* Top menu bar: overflowing items go under "More" (top-nav-more.phtml) instead of Codazon's "•••" second page
   or sideways scrolling */
@media only screen and (min-width: 768px) {
    nav.cdz-navigation .static-wrap.gmm-more-ready .switchpage-control,
    nav.cdz-navigation .static-wrap.gmm-more-ready .overflow-items-container {
        display: none !important;
    }
    nav.cdz-navigation .static-wrap.gmm-more-ready .cdz-horizontal-menu {
        overflow: visible !important;
    }
    nav.cdz-navigation .groupmenu > li.level0.gmm-nav-hidden {
        display: none !important;
    }
    .gmm-more {
        position: relative;
        flex: none;
        align-self: stretch;
        display: flex;
        align-items: center;
        margin-left: auto;
    }
    .gmm-more-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        height: 100%;
        padding: 0 16px;
        border: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
        text-transform: uppercase;
        white-space: nowrap;
        cursor: pointer;
    }
    .gmm-more-btn::after {
        content: "";
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 6px solid currentColor;
        transition: transform .15s;
    }
    .gmm-more.is-open .gmm-more-btn::after {
        transform: rotate(180deg);
    }
    .gmm-more-btn:hover,
    .gmm-more-btn:focus,
    .gmm-more-btn:active {
        border: 0;
        background: none;
        box-shadow: none;
        outline: none;
    }
    .gmm-more-btn:focus-visible {
        outline: 2px solid #e31e24;
        outline-offset: -4px;
    }
    .gmm-more-list {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        z-index: 1000;
        min-width: 230px;
        margin: 0;
        padding: 6px 0;
        list-style: none;
        border-radius: 0 0 10px 10px;
        background: #fff;
        box-shadow: 0 10px 24px rgba(0, 0, 0, .15);
    }
    .gmm-more.is-open .gmm-more-list {
        display: block;
    }
    .gmm-more-list li {
        margin: 0;
    }
    .gmm-more-list a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0 20px;
        font-size: 14px;
        font-weight: 600;
        letter-spacing: .3px;
        text-transform: uppercase;
        color: #1f2328;
        white-space: nowrap;
    }
    .gmm-more-list a:hover,
    .gmm-more-list a:focus {
        background: #f3f3f3;
        color: #e31e24;
        text-decoration: none;
    }
}

/* Tablet (768-1199px): the theme collapses the left list to 39px icons there, which squeezed the panel to
   ~235px. Give the list its labels back and let the panel fill the rest of the screen; Top Brands go under
   the columns instead of in a rail. */
@media only screen and (min-width: 768px) and (max-width: 1199px) {
    .desk-vertcial-menu-container .main-content-top-left .menu-container {
        width: 250px;
    }
    .desk-vertcial-menu-container .cdz-vertical-menu .groupmenu > li.level0 > a.menu-link {
        background: #f3f3f3;
    }
    .desk-vertcial-menu-container .cdz-vertical-menu.dropdown-fullheight .item.level0:not(.cat-tree) > ul.groupmenu-drop {
        width: calc(100vw - 280px);
        padding: 22px 24px;
    }
    .galaxy-mm-panel .row,
    .galaxy-mm-has-rail .row {
        display: flex;
        flex-wrap: wrap;
    }
    .galaxy-mm-panel .row > [class*="col-sm-"],
    .galaxy-mm-has-rail .row > [class*="col-sm-"] {
        flex: 1 1 170px;
        width: auto;
        float: none;
    }
    .galaxy-mm-has-rail .row > [class*="col-sm-"]:last-child {
        flex: 1 1 100%;
        padding: 18px 0 0;
        border-left: 0;
        border-top: 1px solid #eee;
    }
    .galaxy-mm-has-rail .galaxy-mm-brands-row {
        display: flex;
        flex-wrap: wrap;
    }
    .galaxy-mm-brand {
        width: 104px;
        height: 56px;
    }
}

/* Mobile: department list that drills down into each department's panel (template mobile-menu.phtml).
   It's moved into the drawer's Menu tab and replaces the old "All Categories" tree. */
.gmm,
.gmm-head,
.gmm-acct {
    display: none;
}
@media only screen and (max-width: 767px) {
    /* Hamburger redrawn as three equal rounded lines with the SHOP caption (CSS ::after, so it's there on
       first paint) under it, centred as one 42px tap target. The theme's bars (pseudo-elements) are hidden. */
    body .header-panel-left .action.nav-toggle {
        top: 50%;
        left: 6px;
        width: 42px;
        height: 42px;
        margin: 0;
        transform: translateY(-50%);
        overflow: visible;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'%3E%3Cpath d='M2 2h20M2 9h20M2 16h20' stroke='%23d12f2f' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 50% 4px / 24px 18px;
    }
    body .header-panel-left .action.nav-toggle::before,
    body .header-panel-left .action.nav-toggle > span::before,
    body .header-panel-left .action.nav-toggle > span::after {
        display: none;
    }
    body .header-panel-left .action.nav-toggle > span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }
    body .header-panel-left .action.nav-toggle::after {
        content: "Shop";
        display: block;
        position: absolute;
        left: 50%;
        top: 27px;
        transform: translateX(-50%);
        width: auto;
        height: auto;
        margin: 0;
        clip: auto;
        overflow: visible;
        font: 800 10.5px/1 Urbanist, Helvetica, Arial, sans-serif;
        letter-spacing: 1.2px;
        text-transform: uppercase;
        color: #d12f2f;
        white-space: nowrap;
    }
    /* Logo sized to clear the hamburger on the left and the account + cart pair on the right */
    body .page-header .header-panel-left a.logo {
        width: min(156px, 100vw - 210px); /* leaves room for the account + cart pair on the right */
        max-width: none;
        margin-right: 0; /* theme's 30px right margin pushed it 15px left of centre */
    }
    body .page-header .header-panel-left a.logo img.small-logo {
        width: 100%;
        height: auto;
    }
    /* Drawer: header, scrolling list, account block pinned to the bottom. The MENU / ACCOUNT tabs are gone. */
    .nav-sections.gmm-active {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .gmm-active .nav-sections-items {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .gmm-active .nav-sections-item-title,
    .gmm-active [id="store.links"] {
        display: none !important;
    }
    .gmm-active [id="store.menu"] {
        display: block !important;
        width: 100%;
        float: none;
        margin: 0;
        padding: 0;
    }
    .gmm-head {
        flex: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 60px;
        padding: 0 6px 0 20px;
        border-bottom: 1px solid #eceef1;
        background: #fff;
    }
    .gmm-head b {
        font: 800 18px/1 Urbanist, Helvetica, Arial, sans-serif;
        letter-spacing: .3px;
        color: #1f2328;
    }
    .gmm-close {
        width: 48px;
        height: 48px;
        padding: 0;
        border: 0;
        background: none;
        box-shadow: none;
        font-size: 30px;
        line-height: 1;
        color: #6b7280;
    }
    .gmm-active .gmm {
        display: block;
        position: relative;
        overflow: hidden;
        background: #fff;
        font-family: Urbanist, Helvetica, Arial, sans-serif;
    }
    .gmm-active #mobi_menu-container .small-home-cat {
        display: none !important;
    }
    .gmm.is-drilled .gmm-root {
        display: none;
    }
    .gmm-chev {
        flex: none;
        width: 9px;
        height: 9px;
        margin-right: 4px;
        border-top: 2px solid #9ca3af;
        border-right: 2px solid #9ca3af;
        transform: rotate(45deg);
    }
    /* Department list: 60px full-width rows */
    .gmm-list {
        margin: 0;
        padding: 0;
        list-style: none;
    }
    .gmm-list li {
        margin: 0;
        border-bottom: 1px solid #eceef1;
    }
    .gmm-row {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        min-height: 60px;
        margin: 0;
        padding: 0 16px 0 18px;
        border: 0;
        border-radius: 0;
        background: #fff;
        box-shadow: none;
        font: 600 16px/1.25 Urbanist, Helvetica, Arial, sans-serif;
        color: #1f2328;
        text-align: left;
        text-transform: none;
        text-decoration: none;
    }
    /* The theme paints focused/hovered buttons red with a red border; keep rows neutral, ring for keyboard only */
    .gmm-row:hover,
    .gmm-row:focus,
    .gmm-row:active,
    .gmm-back:hover,
    .gmm-back:focus,
    .gmm-back:active {
        border-color: transparent;
        border-bottom-color: #eceef1;
        background: #fff;
        color: #1f2328;
        box-shadow: none;
        outline: none;
        text-decoration: none;
    }
    .gmm-row:focus-visible,
    .gmm-back:focus-visible,
    .gmm-close:focus-visible {
        outline: 2px solid #e31e24;
        outline-offset: -2px;
    }
    .gmm-row:active {
        background: #f5f6f8;
    }
    .gmm-ico {
        flex: none;
        width: 32px;
        height: 32px;
    }
    .gmm-ico img {
        width: 32px;
        height: 32px;
        object-fit: contain;
    }
    .gmm-label {
        flex: 1;
    }
    /* Department panel */
    .gmm-panel {
        display: none;
    }
    .gmm-panel.is-open {
        display: block;
        animation: gmm-slide-in .22s ease-out;
    }
    @keyframes gmm-slide-in {
        from { transform: translateX(100%); }
        to { transform: translateX(0); }
    }
    .gmm-back {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        min-height: 60px;
        padding: 0 16px;
        border: 0;
        border-bottom: 1px solid #eceef1;
        border-radius: 0;
        background: #fff;
        box-shadow: none;
        font: 800 17px/1.25 Urbanist, Helvetica, Arial, sans-serif;
        color: #1f2328;
        text-align: left;
        text-transform: none;
    }
    .gmm-back .gmm-chev {
        margin: 0 4px 0 6px;
        transform: rotate(-135deg);
    }
    .gmm-viewall {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 56px;
        padding: 0 18px;
        border-bottom: 1px solid #eceef1;
        font-size: 15px;
        font-weight: 700;
        color: #e31e24;
    }
    .gmm-viewall:hover,
    .gmm-viewall:focus {
        color: #e31e24;
        text-decoration: none;
    }
    .gmm-viewall .gmm-chev {
        border-color: #e31e24;
    }
    .gmm-groups .galaxy-mm-group {
        margin: 0;
        border-bottom: 1px solid #eceef1;
    }
    .gmm-groups .groupdrop-title {
        position: relative;
        display: flex;
        align-items: center;
        min-height: 56px;
        margin: 0;
        padding: 8px 48px 8px 18px;
        border: 0;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: .3px;
        text-transform: uppercase;
        color: #1f2328;
        cursor: pointer;
    }
    .gmm-groups .groupdrop-title::after {
        content: '+';
        position: absolute;
        right: 18px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 22px;
        font-weight: 400;
        color: #9ca3af;
    }
    .gmm-groups .open .groupdrop-title::after {
        content: '\2212';
    }
    .gmm-groups ul.groupdrop-link {
        display: none;
        margin: 0;
        padding: 0 0 8px;
        list-style: none;
    }
    .gmm-groups .open ul.groupdrop-link {
        display: block;
    }
    .gmm-groups ul.groupdrop-link li {
        margin: 0;
        list-style: none;
    }
    .gmm-groups ul.groupdrop-link a {
        display: flex;
        align-items: center;
        min-height: 48px;
        padding: 0 18px 0 30px;
        font-size: 15px;
        color: #374151;
    }
    .gmm-brands {
        padding: 14px 0 16px 18px;
    }
    .gmm-brands .groupdrop-title {
        margin: 0 0 10px;
        padding: 0;
        border: 0;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .6px;
        text-transform: uppercase;
        color: #6b7280;
    }
    .gmm-brands .galaxy-mm-brands-row {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-right: 18px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .gmm-brands .galaxy-mm-brands-row::-webkit-scrollbar {
        display: none;
    }
    .gmm-brands .galaxy-mm-brand {
        flex: 0 0 96px;
        height: 52px;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        overflow: hidden;
        background: #fff;
    }
    .gmm-brands .galaxy-mm-brand img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .gmm-brands .galaxy-mm-viewall,
    .gmm-brands .galaxy-mm-promo {
        display: none;
    }
    /* Account block, pinned under the list */
    .gmm-acct {
        display: block;
        flex: none;
        padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
        border-top: 1px solid #e5e7eb;
        background: #f5f6f8;
        font-family: Urbanist, Helvetica, Arial, sans-serif;
    }
    .gmm-acct[hidden] {
        display: none;
    }
    .gmm-who {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 10px;
    }
    .gmm-who small {
        display: block;
        font-size: 12.5px;
        color: #6b7280;
    }
    .gmm-who strong {
        font-size: 16px;
        color: #1f2328;
    }
    .gmm-avatar {
        flex: none;
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        object-fit: cover;
        background: #e3262d;
        color: #fff;
        font-size: 17px;
        font-weight: 800;
    }
    .gmm-avatar.gmm-guest {
        background: #e5e7eb;
    }
    .gmm-acct svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .gmm-avatar.gmm-guest svg {
        width: 24px;
        height: 24px;
        color: #6b7280;
    }
    .gmm-acct-links {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .gmm-acct-links a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        height: 58px;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        background: #fff;
        font-size: 13px;
        font-weight: 600;
        color: #1f2328;
        text-decoration: none;
    }
    .gmm-acct-links a.gmm-out {
        color: #6b7280;
    }
    .gmm-guest-btns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .gmm-btn {
        display: grid;
        place-items: center;
        height: 48px;
        border: 1px solid #d1d5db;
        border-radius: 12px;
        background: #fff;
        font-size: 15px;
        font-weight: 700;
        color: #1f2328;
        text-decoration: none;
    }
    .gmm-btn.gmm-pri {
        border-color: #e3262d;
        background: #e3262d;
        color: #fff;
    }
    .gmm-acct a:hover,
    .gmm-acct a:focus {
        text-decoration: none;
    }
    /* LiveChat's bubble would sit on top of the account buttons while the drawer is open */
    html.nav-open #chat-widget-container {
        display: none !important;
    }
}


/* Mobile header: no shadow under the search bar; rounded search field with a round button inside it */
@media only screen and (max-width: 767px) {
    body .search-form {
        box-shadow: none !important;
    }
    #search_mini_form {
        position: relative;
    }
    #search_mini_form .field.search .control {
        width: 100%;
        padding-top: 10px;
        padding-bottom: 4px;
    }
    #search_mini_form .amsearch-wrapper-input,
    #search_mini_form input#search {
        width: 100%;
    }
    #search_mini_form input#search {
        height: 40px;
        padding: 0 50px 0 18px;
        border: 1px solid #e5e7eb;
        border-radius: 20px;
        background: #f5f6f8;
        font-size: 15px;
        color: #1f2328;
        box-shadow: none;
        z-index: auto;
    }
    #search_mini_form input#search::placeholder {
        color: #8b8f97;
    }
    #search_mini_form input#search:focus {
        border-color: #e3262d;
        background: #fff;
        outline: none;
        box-shadow: 0 0 0 3px rgba(227, 38, 45, .12);
    }
    /* The search button becomes a round button inside the right end of the field */
    /* Inset 3px inside the field on every side (header-styles.css sets right: 10px !important = flush) */
    #search_mini_form .actions {
        top: 13px;
        right: 13px !important;
        width: 34px;
        height: 34px;
        z-index: 100;
    }
    #search_mini_form .actions .action.search {
        width: 34px;
        height: 34px;
        padding: 0;
        border-radius: 50% !important;
        background: #e3262d;
        opacity: 1;
        overflow: hidden;
    }
}

/* Desktop search: same look as mobile - rounded grey field, round red button inside its right end */
@media only screen and (min-width: 768px) {
    body .header-search-wrap .header-search {
        padding: 5px 5px 5px 14px !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 28px !important;
        background: #f5f6f8 !important;
    }
    body .header-search-wrap .header-search:focus-within {
        border-color: #e3262d !important;
        background: #fff !important;
        box-shadow: 0 0 0 3px rgba(227, 38, 45, .12);
    }
    body .header-search-wrap .block-search,
    body .header-search-wrap #search_mini_form input#search {
        background: transparent !important;
    }
    .header-search-wrap #search_mini_form input#search {
        height: 34px;
        padding-right: 48px;
        border: 0;
        font-size: 15px;
        color: #1f2328;
        box-shadow: none;
    }
    .header-search-wrap #search_mini_form input#search::placeholder {
        color: #8b8f97;
    }
    .header-search-wrap #search_mini_form .action.search {
        width: 36px;
        height: 36px;
        border-radius: 50% !important;
        background: #e3262d;
        opacity: 1;
    }
}

/* Sticky (scrolled) desktop header, "search first": white bar with logo, a dark "Shop" button that opens the
   mega menu, the full search field, then wish list / Cart / account. The theme's sticky state hides the logo,
   collapses search to an icon and shows the horizontal menu row instead; this shows header-middle (logo,
   search, links) as one 68px row, hides the horizontal menu, and moves the vertical menu's button into the
   gap between logo and search. Sticky is switched on by JS on scroll, so there is no first-paint flash. */
@media only screen and (min-width: 768px) {
    body .page-header .sticky-menu.active {
        background: #fff !important;
        border-bottom: 1px solid #eceef1;
        box-shadow: 0 6px 18px -8px rgba(15, 23, 42, .22);
    }
    body .page-header .sticky-menu.active .header-middle {
        height: 68px;
    }
    body .page-header .sticky-menu.active .header.panel {
        padding: 0 !important;
        background: transparent;
    }
    body .page-header .sticky-menu.active .header-panel-row {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        height: 68px;
    }
    /* Logo */
    body .page-header .sticky-menu.active .header-panel-left {
        display: flex !important;
        flex: 0 0 auto;
        align-items: center;
        width: auto;
        float: none;
    }
    body .page-header .sticky-menu.active .logo {
        display: block !important;
        margin: 0;
    }
    body .page-header .sticky-menu.active .logo img.main-logo {
        width: auto;
        height: 34px;
    }
    /* Search: same rounded field as the full header; the left margin leaves room for the Shop button */
    body .page-header .sticky-menu.active .header-panel-row > .header-search-wrap {
        display: block !important;
        position: relative !important;
        top: 0 !important;
        right: auto !important;
        left: auto !important;
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0;
        max-width: none !important;
        margin-left: 139px;
        padding: 0 18px 0 0;
        float: none;
    }
    body .page-header .sticky-menu.active .header-search-wrap .header-search {
        display: block !important;
        height: auto !important;
    }
    body .page-header .sticky-menu.active .header-search div.search-form,
    body .page-header .sticky-menu.active .header-search .block-search {
        display: block !important;
        width: 100% !important;
        float: none !important;
        overflow: visible !important;
    }
    body .page-header .sticky-menu.active .header-search .block-content,
    body .page-header .sticky-menu.active #search_mini_form,
    body .page-header .sticky-menu.active #search_mini_form .field.search {
        width: 100% !important;
    }
    body .page-header .sticky-menu.active #search_mini_form .field.search .control,
    body .page-header .sticky-menu.active .amsearch-wrapper-input {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    body .page-header .sticky-menu.active .header-search input.input-text {
        visibility: visible !important;
        height: 34px !important;
        border: 0 !important;
        color: #1f2328 !important;
        font: 500 15px/34px Urbanist, Helvetica, Arial, sans-serif !important;
    }
    body .page-header .sticky-menu.active .header-search input.input-text::placeholder {
        color: #8b8f97 !important;
        opacity: 1;
    }
    body .page-header .sticky-menu.active .header-search .actions .search {
        position: absolute !important;
        top: 50% !important;
        right: 5px !important;
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        background: #e3262d !important;
        transform: translateY(-50%);
    }
    body .page-header .sticky-menu.active .header-search .actions .search:before {
        content: '\e615' !important;
        width: 29px;
        height: 29px;
        color: #fff !important;
        font: normal normal normal 29px/29px 'icons-blank-theme' !important;
    }
    /* Wish list / Cart / account: in the row, Cart keeps its label */
    body .page-header .sticky-menu.active .header-panel-row > .header-panel-right {
        position: static !important;
        flex: 0 0 auto;
        width: auto !important;
        padding-left: 0;
        float: none;
    }
    body .page-header .sticky-menu.active ul.features-links .minicart-wrapper .action.showcart > span.text {
        display: inline !important;
    }
    /* Horizontal menu row: hidden; its vertical-menu button becomes "Shop" */
    body .page-header .sticky-menu.active .header-bottom {
        height: 0;
        padding: 0;
    }
    body .page-header .sticky-menu.active .header-menu-wrap {
        display: none !important;
    }
    body .page-header .sticky-menu.active .header-bottom > .container {
        position: relative;
    }
    body .page-header .sticky-menu.active .header-vertical-menu-wrap {
        position: absolute !important;
        top: -50px;
        left: 160px;
        z-index: 5;
        width: auto !important;
        height: 44px;
        padding: 0 !important;
    }
    body .page-header .sticky-menu.active .desk-vertcial-menu-container {
        top: 0 !important;
        width: auto !important;
        height: 44px;
    }
    body .page-header .sticky-menu.active .desk-vertcial-menu-container .menu-title {
        display: flex !important;
        align-items: center;
        gap: 10px;
        width: auto !important;
        height: 44px !important;
        padding: 0 20px 0 16px !important;
        border-radius: 22px;
        background: #1f2328 !important;
        color: #fff !important;
        font-size: 0 !important;
        cursor: pointer;
    }
    body .page-header .sticky-menu.active .desk-vertcial-menu-container .menu-title:hover {
        background: #000 !important;
    }
    body .page-header .sticky-menu.active .desk-vertcial-menu-container .menu-title:before {
        position: static !important;
        margin: 0 !important;
        color: #fff !important;
        font-size: 18px !important;
    }
    body .page-header .sticky-menu.active .desk-vertcial-menu-container .menu-title:after {
        content: "Shop";
        display: block;
        position: static;
        width: auto;
        height: auto;
        border: 0;
        background: none;
        color: #fff;
        font: 700 15px/1 Urbanist, Helvetica, Arial, sans-serif;
        letter-spacing: 0;
        text-transform: none;
        transform: none;
    }
    /* The menu drops from under the bar, with a fixed-width list and a panel that fits the screen */
    body .page-header .sticky-menu.active .desk-vertcial-menu-container .main-content-top-left .menu-container {
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        width: 240px;
    }
    body .page-header .sticky-menu.active .desk-vertcial-menu-container .cdz-vertical-menu.dropdown-fullheight .item.level0:not(.cat-tree) > ul.groupmenu-drop {
        width: min(920px, calc(100vw - 460px));
    }
}

/* Amasty's small magnifier appears at the left of the field while typing and sat on top of the text; the red
   search button already does that job */
#search_mini_form .amsearch-loupe {
    display: none !important;
}
@media only screen and (max-width: 767px) {
    /* Suggestions dropdown was pulled up 15px over the (now taller) field */
    #search_mini_form .search-autocomplete {
        margin-top: 0 !important;
    }
}
