.site-header .nav {
    gap: 18px;
}

.desktop-navigation {
    align-items: center;
    justify-content: center;
    flex: 1;
}

.desktop-navigation > a,
.desktop-navigation > .header-products-menu > summary {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 30px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.header-products-menu,
.header-product-category {
    position: relative;
}

.header-products-menu summary,
.header-product-category summary,
.mobile-nav-group summary,
.mobile-product-category summary {
    list-style: none;
    cursor: pointer;
}

.header-products-menu summary::-webkit-details-marker,
.header-product-category summary::-webkit-details-marker,
.mobile-nav-group summary::-webkit-details-marker,
.mobile-product-category summary::-webkit-details-marker {
    display: none;
}

.desktop-navigation > .header-products-menu > summary:hover,
.desktop-navigation > .header-products-menu[open] > summary,
.desktop-navigation > .header-products-menu:focus-within > summary {
    background: var(--brand);
    color: #fff;
}

.nav-indicator,
.nav-link-arrow {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease;
}

.header-products-menu[open] > summary .nav-indicator-down,
.mobile-nav-group[open] > summary .nav-indicator-down,
.mobile-product-category[open] > summary .nav-indicator-down {
    transform: rotate(180deg);
}

.header-products-dropdown,
.header-product-flyout {
    position: absolute;
    display: none;
    padding: 9px;
    border: 1px solid #607d9b;
    border-radius: 10px;
    background: #f6f9fd;
    color: #142b45;
    box-shadow: 0 16px 38px rgba(16, 43, 69, .2);
}

.header-products-dropdown {
    top: calc(100% + 6px);
    right: 0;
    width: 255px;
    z-index: 80;
}

.header-products-dropdown::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 100%;
    width: 100%;
    height: 8px;
}

.header-products-menu[open] > .header-products-dropdown,
.header-products-menu:hover > .header-products-dropdown,
.header-products-menu:focus-within > .header-products-dropdown {
    display: block;
}

.header-product-category > summary,
.header-products-dropdown > a,
.header-all-products a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 9px;
    color: #142b45;
    font-size: 13px;
    line-height: 1.55;
}

.header-product-category > summary:hover,
.header-product-category[open] > summary,
.header-products-dropdown > a:hover,
.header-products-dropdown > a.active,
.header-all-products a:hover,
.header-all-products a.active {
    background: #dce8f6;
    color: #174d7a;
}

.header-product-flyout {
    top: -9px;
    right: calc(100% + 7px);
    width: 240px;
    z-index: 81;
}

.header-product-flyout::after {
    content: "";
    position: absolute;
    top: 0;
    right: -9px;
    width: 10px;
    height: 100%;
}

.header-product-category[open] > .header-product-flyout,
.header-product-category:hover > .header-product-flyout,
.header-product-category:focus-within > .header-product-flyout {
    display: block;
}

.header-product-flyout a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 8px 11px;
    border-radius: 8px;
    color: #142b45;
    font-size: 13px;
}

.header-product-flyout a:hover,
.header-product-flyout a.active {
    background: #dce8f6;
    color: #174d7a;
}

.header-product-leaf small {
    display: block;
    color: var(--blue-gray);
    font-size: 10px;
    font-weight: 500;
}

.header-all-products {
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid var(--silver);
}

.header-all-products a {
    color: #174d7a;
    font-weight: 800;
}

.header-all-products .nav-link-arrow {
    transition: transform .18s ease;
}

.header-all-products a:hover .nav-link-arrow {
    transform: translateX(-3px);
}

/* Keep dropdown contents readable on transparent hero headers. */
.site-header .desktop-navigation .header-products-dropdown,
.site-header .desktop-navigation .header-products-dropdown summary,
.site-header .desktop-navigation .header-products-dropdown a,
body:has(.home-hero) .site-header .desktop-navigation .header-products-dropdown summary,
body:has(.home-hero) .site-header .desktop-navigation .header-products-dropdown a,
body:has(.visual-page-hero) .site-header .desktop-navigation .header-products-dropdown summary,
body:has(.visual-page-hero) .site-header .desktop-navigation .header-products-dropdown a,
body:has(.login-shell) .site-header .desktop-navigation .header-products-dropdown summary,
body:has(.login-shell) .site-header .desktop-navigation .header-products-dropdown a {
    color: #142b45;
}

.site-header .desktop-navigation .header-products-dropdown summary:hover,
.site-header .desktop-navigation .header-products-dropdown details[open] > summary,
.site-header .desktop-navigation .header-products-dropdown a:hover,
.site-header .desktop-navigation .header-products-dropdown a.active,
body:has(.home-hero) .site-header .desktop-navigation .header-products-dropdown summary:hover,
body:has(.home-hero) .site-header .desktop-navigation .header-products-dropdown details[open] > summary,
body:has(.home-hero) .site-header .desktop-navigation .header-products-dropdown a:hover,
body:has(.home-hero) .site-header .desktop-navigation .header-products-dropdown a.active,
body:has(.visual-page-hero) .site-header .desktop-navigation .header-products-dropdown summary:hover,
body:has(.visual-page-hero) .site-header .desktop-navigation .header-products-dropdown details[open] > summary,
body:has(.visual-page-hero) .site-header .desktop-navigation .header-products-dropdown a:hover,
body:has(.visual-page-hero) .site-header .desktop-navigation .header-products-dropdown a.active,
body:has(.login-shell) .site-header .desktop-navigation .header-products-dropdown summary:hover,
body:has(.login-shell) .site-header .desktop-navigation .header-products-dropdown details[open] > summary,
body:has(.login-shell) .site-header .desktop-navigation .header-products-dropdown a:hover,
body:has(.login-shell) .site-header .desktop-navigation .header-products-dropdown a.active {
    background: #dce8f6;
    color: #174d7a;
}

.nav-actions {
    flex-shrink: 0;
}

.header-action-button {
    position: relative;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid var(--silver);
    border-radius: 13px;
    background: #fff;
    color: var(--navy);
    box-shadow: 0 7px 20px rgba(10, 61, 145, .08);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    transition: .18s ease;
}

.header-action-button svg {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.header-action-button:hover {
    border-color: var(--brand);
    background: var(--mist);
    color: var(--brand);
    transform: translateY(-1px);
}

.header-action-button.cart-action {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.header-action-button.cart-action:hover {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
}

body:has(.home-hero) .desktop-navigation > a,
body:has(.home-hero) .desktop-navigation > .header-products-menu > summary,
body:has(.visual-page-hero) .desktop-navigation > a,
body:has(.visual-page-hero) .desktop-navigation > .header-products-menu > summary,
body:has(.login-shell) .desktop-navigation > a,
body:has(.login-shell) .desktop-navigation > .header-products-menu > summary {
    color: rgba(255, 255, 255, .86);
    background: transparent;
}

body:has(.home-hero) .desktop-navigation > a:hover,
body:has(.home-hero) .desktop-navigation > a.active,
body:has(.home-hero) .desktop-navigation > .header-products-menu > summary:hover,
body:has(.home-hero) .desktop-navigation > .header-products-menu[open] > summary,
body:has(.visual-page-hero) .desktop-navigation > a:hover,
body:has(.visual-page-hero) .desktop-navigation > a.active,
body:has(.visual-page-hero) .desktop-navigation > .header-products-menu > summary:hover,
body:has(.visual-page-hero) .desktop-navigation > .header-products-menu[open] > summary,
body:has(.login-shell) .desktop-navigation > a:hover,
body:has(.login-shell) .desktop-navigation > a.active,
body:has(.login-shell) .desktop-navigation > .header-products-menu > summary:hover,
body:has(.login-shell) .desktop-navigation > .header-products-menu[open] > summary {
    color: #fff;
    background: rgba(255, 255, 255, .12);
}

body:has(.home-hero) .header-action-button,
body:has(.visual-page-hero) .header-action-button,
body:has(.login-shell) .header-action-button {
    border-color: rgba(255, 255, 255, .3);
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

body:has(.home-hero) .header-action-button.cart-action,
body:has(.visual-page-hero) .header-action-button.cart-action,
body:has(.login-shell) .header-action-button.cart-action {
    border-color: rgba(13, 110, 253, .72);
    background: rgba(13, 110, 253, .92);
}

.mobile-nav-panel details {
    width: 100%;
}

.mobile-nav-panel summary {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.mobile-nav-panel summary:hover,
.mobile-nav-panel details[open] > summary {
    background: var(--mist);
    color: var(--brand);
}

.mobile-products-list {
    display: grid;
    gap: 3px;
    margin: 4px 10px 8px 0;
    padding: 5px 10px 5px 0;
    border-right: 2px solid var(--silver);
}

.mobile-product-category > div {
    display: grid;
    gap: 2px;
    margin-right: 12px;
    padding-right: 9px;
    border-right: 2px solid #e8eef6;
}

.mobile-nav-panel .mobile-products-list a {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 13px;
}

.mobile-nav-panel .mobile-products-list a small {
    display: block;
    margin-right: 6px;
    color: var(--blue-gray);
    font-size: 10px;
}

.mobile-nav-panel .mobile-products-list a:hover small,
.mobile-nav-panel .mobile-products-list a.active small {
    color: inherit;
}

.mobile-nav-panel .mobile-all-products {
    margin-top: 5px;
    border-top: 1px solid var(--silver);
    border-radius: 0 0 10px 10px;
    color: var(--navy);
    font-weight: 800;
}

.mobile-nav-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--silver);
}

.mobile-nav-panel .mobile-nav-actions a {
    justify-content: center;
    border: 1px solid var(--brand);
    color: var(--brand);
    font-weight: 800;
}

.mobile-nav-panel .mobile-nav-actions a:last-child {
    background: var(--brand);
    color: #fff;
}

@media (max-width: 1050px) and (min-width: 851px) {
    .site-header .logo-brand {
        min-width: 118px;
    }

    .site-header .logo-brand img {
        height: 38px;
    }

    .desktop-navigation > a,
    .desktop-navigation > .header-products-menu > summary {
        padding-inline: 9px;
        font-size: 12px;
    }

    .header-action-button {
        width: 44px;
        padding-inline: 0;
    }

    .header-action-button > span:not(.cart-badge) {
        display: none;
    }
}

@media (max-width: 850px) {
    .site-header .nav {
        gap: 10px;
        width: calc(100vw - 36px);
        max-width: calc(100vw - 36px);
        margin-inline: auto;
    }

    .mobile-nav-shell {
        order: 0;
    }

    .header-action-button {
        width: 46px;
        height: 46px;
        min-height: 46px;
        padding: 0;
    }

    .header-action-button > span:not(.cart-badge) {
        display: none;
    }

    .nav-actions .header-action-button {
        display: inline-flex;
    }

    .mobile-nav-panel {
        max-height: calc(100vh - 104px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

@media (max-width: 560px) {
    .site-header .nav {
        height: 68px;
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        padding-inline: 10px;
    }

    .site-header .logo-brand img {
        height: 34px;
    }

    .site-header .logo-brand {
        min-width: 104px;
    }

    .nav-actions .header-action-button {
        width: 42px;
        height: 42px;
        min-height: 42px;
        border-radius: 13px;
    }

    .header-action-button svg {
        width: 21px;
        height: 21px;
    }
}
