/*
 * Codex Commerce Platform
 * Responsive public header
 * Supports large desktop, laptop, tablet, mobile and small mobile screens.
 */

.site-header {
    position: relative;
    z-index: 1000;
    width: 100%;
    background: var(--surface, #ffffff);
    isolation: isolate;
}

.site-header *,
.site-header *::before,
.site-header *::after {
    box-sizing: border-box;
}

.site-container.main-header__inner,
.site-container.utility-bar__inner,
.site-container.category-nav__inner {
    width: min(100% - 48px, 1600px);
    max-width: 1600px;
    margin-inline: auto;
}

.site-header a {
    text-decoration: none;
}

.site-header button,
.site-header input,
.site-header select,
.site-header summary {
    font: inherit;
}

.site-header button,
.site-header summary,
.site-header select {
    -webkit-tap-highlight-color: transparent;
}

.site-header :focus-visible {
    outline: 3px solid rgba(179, 39, 43, 0.28);
    outline-offset: 3px;
}

body.mobile-menu-open {
    overflow: hidden;
    touch-action: none;
}

/* Utility bar */
.utility-bar {
    border-top: 1px solid var(--line, #e2e5e9);
    border-bottom: 1px solid var(--line, #e2e5e9);
    background: #ffffff;
}

.utility-bar__inner {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.utility-nav,
.account-nav {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.9375rem;
    line-height: 1.25;
}

.utility-nav a,
.account-nav a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #1c1d20;
    white-space: nowrap;
    transition: color 160ms ease;
}

.utility-nav a:hover,
.utility-nav a:focus-visible,
.account-nav a:hover,
.account-nav a:focus-visible {
    color: #b3272b;
}

.utility-nav__separator,
.account-nav__separator {
    width: 1px;
    height: 22px;
    flex: 0 0 1px;
    background: #cfd4da;
}

.account-nav .ui-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
}

/* Main header */
.main-header {
    background: #ffffff;
}

.main-header__inner {
    min-height: clamp(118px, 9vw, 100px);
    display: grid;
    grid-template-columns: minmax(190px, 270px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(28px, 4vw, 64px);
}

.brand {
    width: clamp(172px, 14vw, 205px);
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

.brand img,
.brand svg {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Search */
.product-search {
    position: relative;
    min-width: 0;
    width: 100%;
    min-height: 40px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(180px, 17vw, 230px) 72px;
    align-items: stretch;
    border: 2px solid var(--brand-cyan, #b3272b);
    border-radius: 999px;
    background: #ffffff;
}

.product-search__field {
    position: relative;
    min-width: 0;
    display: flex;
    align-items: center;
}

.product-search__leading-icon {
    display: none;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: #8a8f96;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.product-search input {
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0 clamp(22px, 2vw, 38px) 0 clamp(28px, 4vw, 58px);
    border: 0;
    border-radius: 999px 0 0 999px;
    outline: 0;
    color: #202124;
    background: transparent;
    font-size: 15px;
    line-height: 1.2;
}

.product-search input::placeholder {
    color: #85888d;
    opacity: 1;
    text-overflow: ellipsis;
}

.product-search__select-wrap {
    position: relative;
    min-width: 0;
    display: flex;
    align-items: center;
    border-left: 1px solid #e5e7eb;
}

.product-search select {
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0 48px 0 20px;
    border: 0;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    color: #777b81;
    background: transparent;
    cursor: pointer;
    font-size: clamp(0.875rem, 1vw, 0.98rem);
    text-overflow: ellipsis;
}

.product-search__select-icon {
    position: absolute;
    right: 18px;
    width: 18px;
    height: 18px;
    pointer-events: none;
    fill: none;
    stroke: #83878d;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.product-search__submit {
    min-width: 72px;
    min-height: 40px;
    display: grid;
    place-items: center;
    margin: -2px -2px -2px 0;
    border: 0;
    border-radius: 0 999px 999px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #b3272b 0%, #e25657 100%);
    cursor: pointer;
    transition: filter 160ms ease, transform 160ms ease;
}

.product-search__submit:hover,
.product-search__submit:focus-visible {
    filter: brightness(0.94);
}

.product-search__submit:active {
    transform: translateY(1px);
}

.product-search__submit .ui-icon {
    width: 30px;
    height: 30px;
    stroke-width: 1.6;
}

.product-search__error {
    position: absolute;
    top: calc(100% + 8px);
    left: 28px;
    z-index: 2;
    max-width: calc(100% - 56px);
    margin: 0;
    color: #c22f3b;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.35;
}

/* Desktop category navigation */
.category-nav {
    position: relative;
    background: linear-gradient(100deg, #000000 0%, #af2327 48%, #e85c5c 100%);
}

.category-nav__inner {
    min-height: 40px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 2px;
}

.category-dropdown {
    position: relative;
    min-width: 0;
    flex: 0 1 auto;
}

.category-dropdown > summary {
    width: 100%;
    height: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 clamp(9px, 1vw, 16px);
    color: #ffffff;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    transition: background-color 160ms ease;
}

.category-dropdown > summary::-webkit-details-marker {
    display: none;
}

.category-dropdown > summary::marker {
    content: "";
}

.category-dropdown > summary:hover,
.category-dropdown > summary:focus-visible,
.category-dropdown[open] > summary {
    background: rgba(0, 0, 0, 0.14);
}

.category-dropdown__chevron {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 160ms ease;
}

.category-dropdown[open] .category-dropdown__chevron {
    transform: rotate(180deg);
}

.category-dropdown__panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    z-index: 20;
    width: max-content;
    min-width: 245px;
    max-width: min(320px, calc(100vw - 32px));
    max-height: min(520px, calc(100vh - 190px));
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-50%);
    padding: 10px;
    border: 1px solid #e5e8ed;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow-lg, 0 24px 70px rgba(23, 24, 26, 0.18));
}

.category-dropdown:first-child .category-dropdown__panel,
.category-dropdown:nth-child(2) .category-dropdown__panel {
    left: 0;
    transform: none;
}

.category-dropdown:last-child .category-dropdown__panel,
.category-dropdown:nth-last-child(2) .category-dropdown__panel {
    right: 0;
    left: auto;
    transform: none;
}

.category-dropdown__panel::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    width: 14px;
    height: 14px;
    transform: translateX(-50%) rotate(45deg);
    border-top: 1px solid #e5e8ed;
    border-left: 1px solid #e5e8ed;
    background: #ffffff;
}

.category-dropdown:first-child .category-dropdown__panel::before,
.category-dropdown:nth-child(2) .category-dropdown__panel::before {
    left: 28px;
    transform: rotate(45deg);
}

.category-dropdown:last-child .category-dropdown__panel::before,
.category-dropdown:nth-last-child(2) .category-dropdown__panel::before {
    right: 28px;
    left: auto;
    transform: rotate(45deg);
}

.category-dropdown__panel a {
    position: relative;
    z-index: 1;
    display: block;
    padding: 11px 13px;
    border-radius: 9px;
    color: #42454a;
    font-size: 0.925rem;
    line-height: 1.35;
    transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.category-dropdown__panel a:hover,
.category-dropdown__panel a:focus-visible {
    color: #9e2024;
    background: #fff1f1;
    transform: translateX(2px);
}

.category-dropdown__panel .category-dropdown__all {
    margin-bottom: 6px;
    color: #15171a;
    background: #f2f4f6;
    font-weight: 800;
}

/* Mobile controls are hidden on desktop */
.mobile-menu-button,
.mobile-account-link,
.mobile-drawer,
.mobile-overlay {
    display: none;
}

/* Large laptops */
@media (max-width: 1399px) {
    .site-container.main-header__inner,
    .site-container.utility-bar__inner,
    .site-container.category-nav__inner {
        width: min(100% - 40px, 1440px);
    }

    .main-header__inner {
        grid-template-columns: minmax(175px, 225px) minmax(0, 1fr);
        gap: 32px;
    }

    .brand {
        width: 185px;
    }

    .product-search {
        grid-template-columns: minmax(0, 1fr) 190px 66px;
    }

    .product-search__submit {
        min-width: 66px;
    }

    .category-dropdown > summary {
        gap: 5px;
        padding-inline: 9px;
        font-size: clamp(0.76rem, 0.9vw, 0.9rem);
    }

    .category-dropdown__chevron {
        width: 15px;
        height: 15px;
    }
}

/* Switch to the compact/tablet header before the desktop nav becomes cramped */
@media (max-width: 1199px) {
    .utility-bar,
    .category-nav {
        display: none;
    }

    .site-container.main-header__inner {
        width: min(100% - 32px, 980px);
    }

    .main-header {
        border-bottom: 1px solid var(--line, #e2e5e9);
    }

    .main-header__inner {
        min-height: auto;
        grid-template-columns: 48px minmax(0, 1fr) 48px;
        grid-template-areas:
            "menu brand account"
            "search search search";
        gap: 14px 20px;
        padding-block: 16px 18px;
    }

    .mobile-menu-button,
    .mobile-account-link {
        width: 46px;
        height: 46px;
        display: grid;
        place-items: center;
        border: 1px solid #dfe4ea;
        border-radius: 12px;
        color: #20242a;
        background: #ffffff;
        transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
    }

    .mobile-menu-button:hover,
    .mobile-menu-button:focus-visible,
    .mobile-account-link:hover,
    .mobile-account-link:focus-visible {
        border-color: #c4c9cf;
        color: #a32327;
        background: #fafafa;
    }

    .mobile-menu-button {
        grid-area: menu;
        justify-self: start;
        cursor: pointer;
    }

    .mobile-account-link {
        grid-area: account;
        justify-self: end;
    }

    .mobile-menu-button .ui-icon,
    .mobile-account-link .ui-icon {
        width: 23px;
        height: 23px;
    }

    .brand {
        grid-area: brand;
        justify-self: center;
        width: clamp(145px, 20vw, 178px);
    }

    .product-search {
        grid-area: search;
        grid-template-columns: minmax(0, 1fr) minmax(165px, 190px) 60px;
        min-height: 42px;
        border-width: 1.5px;
        border-radius: 14px;
    }

    .product-search__field {
        padding-left: 16px;
    }

    .product-search__leading-icon {
        display: block;
    }

    .product-search input {
        padding: 0 14px 0 11px;
        border-radius: 14px 0 0 14px;
        font-size: 0.96rem;
    }

    .product-search select {
        font-size: 0.9rem;
    }

    .product-search__submit {
        min-width: 60px;
        min-height: 42px;
        margin: -1.5px -1.5px -1.5px 0;
        border-radius: 0 14px 14px 0;
    }

    .product-search__submit .ui-icon {
        width: 25px;
        height: 25px;
    }

    .product-search__error {
        top: calc(100% + 6px);
        left: 8px;
        max-width: calc(100% - 16px);
    }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 1090;
        display: block;
        visibility: hidden;
        pointer-events: none;
        background: rgba(13, 17, 23, 0.58);
        -webkit-backdrop-filter: blur(3px);
        backdrop-filter: blur(3px);
        opacity: 0;
        transition: opacity 220ms ease, visibility 0s linear 220ms;
    }

    .mobile-overlay.is-visible {
        visibility: visible;
        pointer-events: auto;
        opacity: 1;
        transition-delay: 0s;
    }

    .mobile-drawer {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 1100;
        width: min(90vw, 430px);
        height: 100vh;
        height: 100dvh;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        visibility: hidden;
        transform: translate3d(-102%, 0, 0);
        background: #ffffff;
        box-shadow: var(--shadow-lg, 0 24px 70px rgba(23, 24, 26, 0.18));
        transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 260ms;
        will-change: transform;
    }

    .mobile-drawer.is-open {
        visibility: visible;
        transform: translate3d(0, 0, 0);
        transition-delay: 0s;
    }

    .mobile-drawer__header {
        min-height: 82px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        padding: max(16px, env(safe-area-inset-top)) 20px 16px;
        border-bottom: 1px solid var(--line, #e2e5e9);
    }

    .brand--drawer {
        width: 148px;
    }

    .mobile-drawer__close {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        display: grid;
        place-items: center;
        border: 1px solid #dde2e8;
        border-radius: 10px;
        color: #20242a;
        background: #ffffff;
        cursor: pointer;
    }

    .mobile-drawer__close .ui-icon {
        width: 22px;
        height: 22px;
    }

    .mobile-drawer__body {
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 12px 20px 28px;
    }

    .mobile-category-nav details {
        border-bottom: 1px solid #e9ecef;
    }

    .mobile-category-nav summary {
        min-height: 58px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        list-style: none;
        cursor: pointer;
        color: #1d2024;
        font-weight: 760;
        line-height: 1.25;
    }

    .mobile-category-nav summary::-webkit-details-marker {
        display: none;
    }

    .mobile-category-nav summary::marker {
        content: "";
    }

    .mobile-category-nav summary .ui-icon {
        width: 18px;
        height: 18px;
        flex: 0 0 auto;
        transition: transform 160ms ease;
    }

    .mobile-category-nav details[open] summary .ui-icon {
        transform: rotate(180deg);
    }

    .mobile-category-nav__submenu {
        display: grid;
        padding: 0 0 14px 12px;
    }

    .mobile-category-nav__submenu a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 9px 12px;
        border-radius: 8px;
        color: #64686f;
        font-size: 0.9375rem;
        line-height: 1.3;
    }

    .mobile-category-nav__submenu a:hover,
    .mobile-category-nav__submenu a:focus-visible {
        color: #9e2024;
        background: #fff1f1;
    }

    .mobile-category-nav__submenu .mobile-category-nav__all {
        color: #17191d;
        font-weight: 800;
    }

    .mobile-utility-nav {
        display: grid;
        gap: 4px;
        padding-top: 24px;
    }

    .mobile-utility-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 8px 0;
        color: #5f646b;
        line-height: 1.3;
    }

    .mobile-drawer__footer {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--line, #e2e5e9);
        background: #ffffff;
    }

    .drawer-account-button {
        min-width: 0;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 0 14px;
        border: 1px solid #d9dfe5;
        border-radius: 10px;
        color: #20242a;
        font-weight: 750;
        line-height: 1.2;
        text-align: center;
    }

    .drawer-account-button--primary {
        border-color: transparent;
        color: #ffffff;
        background: linear-gradient(135deg, #b3272b, #e25657);
    }

    .drawer-account-button .ui-icon {
        width: 19px;
        height: 19px;
        flex: 0 0 auto;
    }
}

/* Tablets and large phones */
@media (max-width: 767px) {
    .site-container.main-header__inner {
        width: min(100% - 24px, 720px);
    }

    .main-header__inner {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 12px 14px;
        padding-block: 13px 15px;
    }

    .mobile-menu-button,
    .mobile-account-link {
        width: 44px;
        height: 44px;
        border-radius: 11px;
    }

    .brand {
        width: clamp(136px, 30vw, 164px);
    }

    .product-search {
        grid-template-columns: minmax(0, 1fr) 58px;
        min-height: 40px;
        border-radius: 13px;
    }

    .product-search__select-wrap {
        display: none;
    }

    .product-search__submit {
        min-width: 58px;
        min-height: 40px;
        border-radius: 0 13px 13px 0;
    }

    .product-search input {
        padding-right: 10px;
        border-radius: 13px 0 0 13px;
        font-size: 0.925rem;
    }

    .product-search__field {
        padding-left: 14px;
    }

    .product-search__leading-icon {
        width: 19px;
        height: 19px;
    }
}

/* Small phones */
@media (max-width: 479px) {
    .site-container.main-header__inner {
        width: calc(100% - 20px);
    }

    .main-header__inner {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 10px;
        padding-block: 11px 13px;
    }

    .mobile-menu-button,
    .mobile-account-link {
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }

    .mobile-menu-button .ui-icon,
    .mobile-account-link .ui-icon {
        width: 21px;
        height: 21px;
    }

    .brand {
        width: clamp(124px, 38vw, 145px);
    }

    .product-search {
        min-height: 38px;
    }

    .product-search__field {
        padding-left: 12px;
    }

    .product-search input {
        padding-left: 9px;
        font-size: 0.875rem;
    }

    .product-search input::placeholder {
        font-size: 0.875rem;
    }

    .product-search__submit {
        min-width: 54px;
        min-height: 48px;
    }

    .product-search__submit .ui-icon {
        width: 23px;
        height: 23px;
    }

    .mobile-drawer {
        width: min(94vw, 400px);
    }

    .mobile-drawer__header {
        min-height: 74px;
        gap: 14px;
        padding-inline: 16px;
    }

    .brand--drawer {
        width: 136px;
    }

    .mobile-drawer__body {
        padding: 8px 16px 22px;
    }

    .mobile-category-nav summary {
        min-height: 54px;
        font-size: 0.95rem;
    }

    .mobile-category-nav__submenu {
        padding-left: 8px;
    }

    .mobile-drawer__footer {
        grid-template-columns: 1fr;
        padding-inline: 16px;
    }
}

/* Extra-small devices such as 320px-wide phones */
@media (max-width: 359px) {
    .site-container.main-header__inner {
        width: calc(100% - 16px);
    }

    .main-header__inner {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        gap: 8px;
    }

    .mobile-menu-button,
    .mobile-account-link {
        width: 40px;
        height: 40px;
    }

    .brand {
        width: 116px;
    }

    .product-search__leading-icon {
        display: none;
    }

    .product-search__field {
        padding-left: 7px;
    }

    .product-search input {
        padding-left: 8px;
        font-size: 0.8125rem;
    }

    .product-search input::placeholder {
        font-size: 0.8125rem;
    }

    .product-search__submit {
        min-width: 50px;
    }
}

/* Compact landscape phones */
@media (max-width: 1199px) and (max-height: 560px) and (orientation: landscape) {
    .main-header__inner {
        padding-block: 9px 10px;
        gap-block: 8px;
    }

    .mobile-menu-button,
    .mobile-account-link {
        width: 40px;
        height: 40px;
    }

    .brand {
        width: 132px;
    }

    .product-search {
        min-height: 44px;
    }

    .product-search__submit {
        min-height: 44px;
    }

    .mobile-drawer__header {
        min-height: 64px;
        padding-block: 10px;
    }

    .mobile-category-nav summary {
        min-height: 48px;
    }

    .mobile-drawer__footer {
        padding-block: 10px calc(10px + env(safe-area-inset-bottom));
    }

    .drawer-account-button {/*
 * Codex Commerce Platform
 * Responsive public header
 * Supports large desktop, laptop, tablet, mobile and small mobile screens.
 */

.site-header {
    position: relative;
    z-index: 1000;
    width: 100%;
    background: var(--surface, #ffffff);
    isolation: isolate;
}

.site-header *,
.site-header *::before,
.site-header *::after {
    box-sizing: border-box;
}

.site-container.main-header__inner,
.site-container.utility-bar__inner,
.site-container.category-nav__inner {
    width: min(100% - 48px, 1600px);
    max-width: 1600px;
    margin-inline: auto;
}

.site-header a {
    text-decoration: none;
}

.site-header button,
.site-header input,
.site-header select,
.site-header summary {
    font: inherit;
}

.site-header button,
.site-header summary,
.site-header select {
    -webkit-tap-highlight-color: transparent;
}

.site-header :focus-visible {
    outline: 3px solid rgba(179, 39, 43, 0.28);
    outline-offset: 3px;
}

body.mobile-menu-open {
    overflow: hidden;
    touch-action: none;
}

/* Utility bar */
.utility-bar {
    border-top: 1px solid var(--line, #e2e5e9);
    border-bottom: 1px solid var(--line, #e2e5e9);
    background: #ffffff;
}

.utility-bar__inner {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.utility-nav,
.account-nav {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.9375rem;
    line-height: 1.25;
}

.utility-nav a,
.account-nav a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #1c1d20;
    white-space: nowrap;
    transition: color 160ms ease;
}

.utility-nav a:hover,
.utility-nav a:focus-visible,
.account-nav a:hover,
.account-nav a:focus-visible {
    color: #b3272b;
}

.utility-nav__separator,
.account-nav__separator {
    width: 1px;
    height: 22px;
    flex: 0 0 1px;
    background: #cfd4da;
}

.account-nav .ui-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
}

/* Main header */
.main-header {
    background: #ffffff;
}

.main-header__inner {
    min-height: clamp(118px, 9vw, 100px);
    display: grid;
    grid-template-columns: minmax(190px, 270px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(28px, 4vw, 64px);
}

.brand {
    width: clamp(172px, 14vw, 205px);
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

.brand img,
.brand svg {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Search */
.product-search {
    position: relative;
    min-width: 0;
    width: 100%;
    min-height: 40px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(180px, 17vw, 230px) 72px;
    align-items: stretch;
    border: 2px solid var(--brand-cyan, #b3272b);
    border-radius: 999px;
    background: #ffffff;
}

.product-search__field {
    position: relative;
    min-width: 0;
    display: flex;
    align-items: center;
}

.product-search__leading-icon {
    display: none;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: #8a8f96;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.product-search input {
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0 clamp(22px, 2vw, 38px) 0 clamp(28px, 4vw, 58px);
    border: 0;
    border-radius: 999px 0 0 999px;
    outline: 0;
    color: #202124;
    background: transparent;
    font-size: clamp(0.9375rem, 1.15vw, 1.125rem);
    line-height: 1.2;
}

.product-search input::placeholder {
    color: #85888d;
    opacity: 1;
    text-overflow: ellipsis;
}

.product-search__select-wrap {
    position: relative;
    min-width: 0;
    display: flex;
    align-items: center;
    border-left: 1px solid #e5e7eb;
}

.product-search select {
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0 48px 0 20px;
    border: 0;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    color: #777b81;
    background: transparent;
    cursor: pointer;
    font-size: clamp(0.875rem, 1vw, 0.98rem);
    text-overflow: ellipsis;
}

.product-search__select-icon {
    position: absolute;
    right: 18px;
    width: 18px;
    height: 18px;
    pointer-events: none;
    fill: none;
    stroke: #83878d;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.product-search__submit {
    min-width: 72px;
    min-height: 40px;
    display: grid;
    place-items: center;
    margin: -2px -2px -2px 0;
    border: 0;
    border-radius: 0 999px 999px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #b3272b 0%, #e25657 100%);
    cursor: pointer;
    transition: filter 160ms ease, transform 160ms ease;
}

.product-search__submit:hover,
.product-search__submit:focus-visible {
    filter: brightness(0.94);
}

.product-search__submit:active {
    transform: translateY(1px);
}

.product-search__submit .ui-icon {
    width: 30px;
    height: 30px;
    stroke-width: 1.6;
}

.product-search__error {
    position: absolute;
    top: calc(100% + 8px);
    left: 28px;
    z-index: 2;
    max-width: calc(100% - 56px);
    margin: 0;
    color: #c22f3b;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.35;
}

/* Desktop category navigation */
.category-nav {
    position: relative;
    background: linear-gradient(100deg, #000000 0%, #af2327 48%, #e85c5c 100%);
}

.category-nav__inner {
    min-height: 45px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 2px;
}

.category-dropdown {
    position: relative;
    min-width: 0;
    flex: 0 1 auto;
}

.category-dropdown > summary {
    width: 100%;
    height: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 clamp(9px, 1vw, 16px);
    color: #ffffff;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    transition: background-color 160ms ease;
}

.category-dropdown > summary::-webkit-details-marker {
    display: none;
}

.category-dropdown > summary::marker {
    content: "";
}

.category-dropdown > summary:hover,
.category-dropdown > summary:focus-visible,
.category-dropdown[open] > summary {
    background: rgba(0, 0, 0, 0.14);
}

.category-dropdown__chevron {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 160ms ease;
}

.category-dropdown[open] .category-dropdown__chevron {
    transform: rotate(180deg);
}

.category-dropdown__panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    z-index: 20;
    width: max-content;
    min-width: 245px;
    max-width: min(320px, calc(100vw - 32px));
    max-height: min(520px, calc(100vh - 190px));
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-50%);
    padding: 10px;
    border: 1px solid #e5e8ed;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow-lg, 0 24px 70px rgba(23, 24, 26, 0.18));
}

.category-dropdown:first-child .category-dropdown__panel,
.category-dropdown:nth-child(2) .category-dropdown__panel {
    left: 0;
    transform: none;
}

.category-dropdown:last-child .category-dropdown__panel,
.category-dropdown:nth-last-child(2) .category-dropdown__panel {
    right: 0;
    left: auto;
    transform: none;
}

.category-dropdown__panel::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    width: 14px;
    height: 14px;
    transform: translateX(-50%) rotate(45deg);
    border-top: 1px solid #e5e8ed;
    border-left: 1px solid #e5e8ed;
    background: #ffffff;
}

.category-dropdown:first-child .category-dropdown__panel::before,
.category-dropdown:nth-child(2) .category-dropdown__panel::before {
    left: 28px;
    transform: rotate(45deg);
}

.category-dropdown:last-child .category-dropdown__panel::before,
.category-dropdown:nth-last-child(2) .category-dropdown__panel::before {
    right: 28px;
    left: auto;
    transform: rotate(45deg);
}

.category-dropdown__panel a {
    position: relative;
    z-index: 1;
    display: block;
    padding: 11px 13px;
    border-radius: 9px;
    color: #42454a;
    font-size: 0.925rem;
    line-height: 1.35;
    transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.category-dropdown__panel a:hover,
.category-dropdown__panel a:focus-visible {
    color: #9e2024;
    background: #fff1f1;
    transform: translateX(2px);
}

.category-dropdown__panel .category-dropdown__all {
    margin-bottom: 6px;
    color: #15171a;
    background: #f2f4f6;
    font-weight: 800;
}

/* Mobile controls are hidden on desktop */
.mobile-menu-button,
.mobile-account-link,
.mobile-drawer,
.mobile-overlay {
    display: none;
}

/* Large laptops */
@media (max-width: 1399px) {
    .site-container.main-header__inner,
    .site-container.utility-bar__inner,
    .site-container.category-nav__inner {
        width: min(100% - 40px, 1440px);
    }

    .main-header__inner {
        grid-template-columns: minmax(175px, 225px) minmax(0, 1fr);
        gap: 32px;
    }

    .brand {
        width: 185px;
    }

    .product-search {
        grid-template-columns: minmax(0, 1fr) 190px 66px;
    }

    .product-search__submit {
        min-width: 66px;
    }

    .category-dropdown > summary {
        gap: 5px;
        padding-inline: 9px;
        font-size: clamp(0.76rem, 0.9vw, 0.9rem);
    }

    .category-dropdown__chevron {
        width: 15px;
        height: 15px;
    }
}

/* Switch to the compact/tablet header before the desktop nav becomes cramped */
@media (max-width: 1199px) {
    .utility-bar,
    .category-nav {
        display: none;
    }

    .site-container.main-header__inner {
        width: min(100% - 32px, 980px);
    }

    .main-header {
        border-bottom: 1px solid var(--line, #e2e5e9);
    }

    .main-header__inner {
        min-height: auto;
        grid-template-columns: 48px minmax(0, 1fr) 48px;
        grid-template-areas:
            "menu brand account"
            "search search search";
        gap: 14px 20px;
        padding-block: 16px 18px;
    }

    .mobile-menu-button,
    .mobile-account-link {
        width: 46px;
        height: 46px;
        display: grid;
        place-items: center;
        border: 1px solid #dfe4ea;
        border-radius: 12px;
        color: #20242a;
        background: #ffffff;
        transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
    }

    .mobile-menu-button:hover,
    .mobile-menu-button:focus-visible,
    .mobile-account-link:hover,
    .mobile-account-link:focus-visible {
        border-color: #c4c9cf;
        color: #a32327;
        background: #fafafa;
    }

    .mobile-menu-button {
        grid-area: menu;
        justify-self: start;
        cursor: pointer;
    }

    .mobile-account-link {
        grid-area: account;
        justify-self: end;
    }

    .mobile-menu-button .ui-icon,
    .mobile-account-link .ui-icon {
        width: 23px;
        height: 23px;
    }

    .brand {
        grid-area: brand;
        justify-self: center;
        width: clamp(145px, 20vw, 178px);
    }

    .product-search {
        grid-area: search;
        grid-template-columns: minmax(0, 1fr) minmax(165px, 190px) 60px;
        min-height: 52px;
        border-width: 1.5px;
        border-radius: 14px;
    }

    .product-search__field {
        padding-left: 16px;
    }

    .product-search__leading-icon {
        display: block;
    }

    .product-search input {
        padding: 0 14px 0 11px;
        border-radius: 14px 0 0 14px;
        font-size: 0.96rem;
    }

    .product-search select {
        font-size: 0.9rem;
    }

    .product-search__submit {
        min-width: 60px;
        min-height: 52px;
        margin: -1.5px -1.5px -1.5px 0;
        border-radius: 0 14px 14px 0;
    }

    .product-search__submit .ui-icon {
        width: 25px;
        height: 25px;
    }

    .product-search__error {
        top: calc(100% + 6px);
        left: 8px;
        max-width: calc(100% - 16px);
    }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 1090;
        display: block;
        visibility: hidden;
        pointer-events: none;
        background: rgba(13, 17, 23, 0.58);
        -webkit-backdrop-filter: blur(3px);
        backdrop-filter: blur(3px);
        opacity: 0;
        transition: opacity 220ms ease, visibility 0s linear 220ms;
    }

    .mobile-overlay.is-visible {
        visibility: visible;
        pointer-events: auto;
        opacity: 1;
        transition-delay: 0s;
    }

    .mobile-drawer {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 1100;
        width: min(90vw, 430px);
        height: 100vh;
        height: 100dvh;
        display: grid;
        grid-template-rows: auto minmax(0, 1fr) auto;
        visibility: hidden;
        transform: translate3d(-102%, 0, 0);
        background: #ffffff;
        box-shadow: var(--shadow-lg, 0 24px 70px rgba(23, 24, 26, 0.18));
        transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 260ms;
        will-change: transform;
    }

    .mobile-drawer.is-open {
        visibility: visible;
        transform: translate3d(0, 0, 0);
        transition-delay: 0s;
    }

    .mobile-drawer__header {
        min-height: 82px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        padding: max(16px, env(safe-area-inset-top)) 20px 16px;
        border-bottom: 1px solid var(--line, #e2e5e9);
    }

    .brand--drawer {
        width: 148px;
    }

    .mobile-drawer__close {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        display: grid;
        place-items: center;
        border: 1px solid #dde2e8;
        border-radius: 10px;
        color: #20242a;
        background: #ffffff;
        cursor: pointer;
    }

    .mobile-drawer__close .ui-icon {
        width: 22px;
        height: 22px;
    }

    .mobile-drawer__body {
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 12px 20px 28px;
    }

    .mobile-category-nav details {
        border-bottom: 1px solid #e9ecef;
    }

    .mobile-category-nav summary {
        min-height: 58px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        list-style: none;
        cursor: pointer;
        color: #1d2024;
        font-weight: 760;
        line-height: 1.25;
    }

    .mobile-category-nav summary::-webkit-details-marker {
        display: none;
    }

    .mobile-category-nav summary::marker {
        content: "";
    }

    .mobile-category-nav summary .ui-icon {
        width: 18px;
        height: 18px;
        flex: 0 0 auto;
        transition: transform 160ms ease;
    }

    .mobile-category-nav details[open] summary .ui-icon {
        transform: rotate(180deg);
    }

    .mobile-category-nav__submenu {
        display: grid;
        padding: 0 0 14px 12px;
    }

    .mobile-category-nav__submenu a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 9px 12px;
        border-radius: 8px;
        color: #64686f;
        font-size: 0.9375rem;
        line-height: 1.3;
    }

    .mobile-category-nav__submenu a:hover,
    .mobile-category-nav__submenu a:focus-visible {
        color: #9e2024;
        background: #fff1f1;
    }

    .mobile-category-nav__submenu .mobile-category-nav__all {
        color: #17191d;
        font-weight: 800;
    }

    .mobile-utility-nav {
        display: grid;
        gap: 4px;
        padding-top: 24px;
    }

    .mobile-utility-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 8px 0;
        color: #5f646b;
        line-height: 1.3;
    }

    .mobile-drawer__footer {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--line, #e2e5e9);
        background: #ffffff;
    }

    .drawer-account-button {
        min-width: 0;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 0 14px;
        border: 1px solid #d9dfe5;
        border-radius: 10px;
        color: #20242a;
        font-weight: 750;
        line-height: 1.2;
        text-align: center;
    }

    .drawer-account-button--primary {
        border-color: transparent;
        color: #ffffff;
        background: linear-gradient(135deg, #b3272b, #e25657);
    }

    .drawer-account-button .ui-icon {
        width: 19px;
        height: 19px;
        flex: 0 0 auto;
    }
}

/* Tablets and large phones */
@media (max-width: 767px) {
    .site-container.main-header__inner {
        width: min(100% - 24px, 720px);
    }

    .main-header__inner {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 12px 14px;
        padding-block: 13px 15px;
    }

    .mobile-menu-button,
    .mobile-account-link {
        width: 44px;
        height: 44px;
        border-radius: 11px;
    }

    .brand {
        width: clamp(136px, 30vw, 164px);
    }

    .product-search {
        grid-template-columns: minmax(0, 1fr) 58px;
        min-height: 50px;
        border-radius: 13px;
    }

    .product-search__select-wrap {
        display: none;
    }

    .product-search__submit {
        min-width: 58px;
        min-height: 50px;
        border-radius: 0 13px 13px 0;
    }

    .product-search input {
        padding-right: 10px;
        border-radius: 13px 0 0 13px;
        font-size: 0.925rem;
    }

    .product-search__field {
        padding-left: 14px;
    }

    .product-search__leading-icon {
        width: 19px;
        height: 19px;
    }
}

/* Small phones */
@media (max-width: 479px) {
    .site-container.main-header__inner {
        width: calc(100% - 20px);
    }

    .main-header__inner {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 10px;
        padding-block: 11px 13px;
    }

    .mobile-menu-button,
    .mobile-account-link {
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }

    .mobile-menu-button .ui-icon,
    .mobile-account-link .ui-icon {
        width: 21px;
        height: 21px;
    }

    .brand {
        width: clamp(124px, 38vw, 145px);
    }

    .product-search {
        min-height: 48px;
    }

    .product-search__field {
        padding-left: 12px;
    }

    .product-search input {
        padding-left: 9px;
        font-size: 0.875rem;
    }

    .product-search input::placeholder {
        font-size: 0.875rem;
    }

    .product-search__submit {
        min-width: 54px;
        min-height: 48px;
    }

    .product-search__submit .ui-icon {
        width: 23px;
        height: 23px;
    }

    .mobile-drawer {
        width: min(94vw, 400px);
    }

    .mobile-drawer__header {
        min-height: 74px;
        gap: 14px;
        padding-inline: 16px;
    }

    .brand--drawer {
        width: 136px;
    }

    .mobile-drawer__body {
        padding: 8px 16px 22px;
    }

    .mobile-category-nav summary {
        min-height: 54px;
        font-size: 0.95rem;
    }

    .mobile-category-nav__submenu {
        padding-left: 8px;
    }

    .mobile-drawer__footer {
        grid-template-columns: 1fr;
        padding-inline: 16px;
    }
}

/* Extra-small devices such as 320px-wide phones */
@media (max-width: 359px) {
    .site-container.main-header__inner {
        width: calc(100% - 16px);
    }

    .main-header__inner {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        gap: 8px;
    }

    .mobile-menu-button,
    .mobile-account-link {
        width: 40px;
        height: 40px;
    }

    .brand {
        width: 116px;
    }

    .product-search__leading-icon {
        display: none;
    }

    .product-search__field {
        padding-left: 7px;
    }

    .product-search input {
        padding-left: 8px;
        font-size: 0.8125rem;
    }

    .product-search input::placeholder {
        font-size: 0.8125rem;
    }

    .product-search__submit {
        min-width: 50px;
    }
}

/* Compact landscape phones */
@media (max-width: 1199px) and (max-height: 560px) and (orientation: landscape) {
    .main-header__inner {
        padding-block: 9px 10px;
        gap-block: 8px;
    }

    .mobile-menu-button,
    .mobile-account-link {
        width: 40px;
        height: 40px;
    }

    .brand {
        width: 132px;
    }

    .product-search {
        min-height: 44px;
    }

    .product-search__submit {
        min-height: 44px;
    }

    .mobile-drawer__header {
        min-height: 64px;
        padding-block: 10px;
    }

    .mobile-category-nav summary {
        min-height: 48px;
    }

    .mobile-drawer__footer {
        padding-block: 10px calc(10px + env(safe-area-inset-bottom));
    }

    .drawer-account-button {
        min-height: 42px;
    }
}

/* Touch devices should not depend on hover movement */
@media (hover: none) {
    .category-dropdown__panel a:hover,
    .category-dropdown__panel a:focus-visible {
        transform: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .site-header *,
    .site-header *::before,
    .site-header *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Print */
@media print {
    .utility-bar,
    .category-nav,
    .product-search,
    .mobile-menu-button,
    .mobile-account-link,
    .mobile-drawer,
    .mobile-overlay {
        display: none !important;
    }

    .main-header__inner {
        min-height: auto;
        display: block;
        padding-block: 12px;
    }

    .brand {
        width: 160px;
    }
}
        min-height: 42px;
    }
}

/* Touch devices should not depend on hover movement */
@media (hover: none) {
    .category-dropdown__panel a:hover,
    .category-dropdown__panel a:focus-visible {
        transform: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .site-header *,
    .site-header *::before,
    .site-header *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Print */
@media print {
    .utility-bar,
    .category-nav,
    .product-search,
    .mobile-menu-button,
    .mobile-account-link,
    .mobile-drawer,
    .mobile-overlay {
        display: none !important;
    }

    .main-header__inner {
        min-height: auto;
        display: block;
        padding-block: 12px;
    }

    .brand {
        width: 160px;
    }
}