/* Approved header extension: ivory surface, sage rules, original B Active mark. */
#header.bactive-header--sage {
    --header-ivory: #f9f7f4;
    --header-ink: #242222;
    --header-sage: #829677;
    --header-focus: #40543c;
    /* Override the incumbent global glass-header rules without touching them. */
    background: var(--header-ivory) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: var(--header-ink);
    border-bottom: 2px solid var(--header-sage) !important;
    position: relative;
    z-index: 50;
}
.bactive-header--sage *, .bactive-header--sage *::before, .bactive-header--sage *::after { box-sizing: border-box; }
.bactive-header--sage ::selection { background: var(--header-focus); color: var(--header-ivory); }
.bactive-header--sage a, .bactive-header--sage summary, .bactive-header--sage button {
    color: var(--header-ink);
    text-decoration: none;
    text-underline-offset: 0.3em;
    -webkit-tap-highlight-color: #82967733;
}
.bactive-header--sage a:focus-visible, .bactive-header--sage summary:focus-visible,
.bactive-header--sage button:focus-visible, .bactive-header--sage input:focus-visible {
    outline: 2px solid var(--header-focus);
    outline-offset: 5px;
    border-radius: 2px;
}
.bactive-header--sage a:hover, .bactive-header--sage summary:hover { color: var(--header-focus); }
.bactive-header--sage summary { cursor: pointer; list-style: none; }
.bactive-header--sage summary::-webkit-details-marker { display: none; }
.bactive-header--sage .bactive-header__icon { flex: none; display: block; width: 24px; height: 24px; }
.bactive-header--sage .bactive-header__icon--chevron { width: 18px; height: 18px; }
.bactive-header--sage details[open] > summary .bactive-header__icon--chevron { transform: rotate(180deg); }
.bactive-header--sage .bactive-header__brand .site-logo-container ~ .site-title-container { display: none; }
#header.bactive-header--sage .bactive-header__brand .site-logo-container { padding: 0; display: flex; min-height: 44px; height: auto; max-height: none; }
#header.bactive-header--sage .bactive-header__brand img { width: 156px; max-width: 100%; height: 88px; max-height: 88px; object-fit: contain; }
.bactive-header--sage .bactive-header__desktop {
    width: min(1464px, 92%);
    min-height: 108px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding-block: 10px;
}
.bactive-header--sage .bactive-header__primary { display: flex; align-items: center; gap: clamp(22px, 2.8vw, 44px); }
.bactive-header--sage .bactive-header__primary > a,
.bactive-header--sage .bactive-header__shop > summary {
    font-family: var(--bactive-font-head, 'Inter', sans-serif);
    font-weight: 600;
    font-size: 19px;
    line-height: 1.2;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.bactive-header--sage .bactive-header__primary > a[aria-current],
.bactive-header--sage .bactive-header__shop > summary {
    box-shadow: inset 0 -2px var(--header-sage);
}
.bactive-header--sage .bactive-header__disclosure { position: relative; }
.bactive-header--sage .bactive-header__dropdown,
.bactive-header--sage .bactive-header__search-panel {
    position: absolute;
    top: calc(100% + 18px);
    background: var(--header-ivory);
    box-shadow: 0 12px 28px #2422221f;
    padding: 18px 22px;
    width: 264px;
    z-index: 2;
}
.bactive-header--sage .bactive-header__dropdown a,
.bactive-header--sage .bactive-header__men > summary {
    font: 400 16px/1.4 'Inter', sans-serif;
    display: flex;
    align-items: center;
    min-height: 44px;
}
.bactive-header--sage .bactive-header__men > summary { justify-content: space-between; }
.bactive-header--sage .bactive-header__men-links { padding-left: 16px; border-left: 2px solid var(--header-sage); }
.bactive-header--sage .bactive-header__men-links a { min-height: 44px; }
.bactive-header--sage .bactive-header__dropdown a:hover,
.bactive-header--sage .bactive-header__men > summary:hover,
.bactive-header--sage .bactive-header__collection-links a:hover { text-decoration: underline; }
.bactive-header--sage .bactive-header__utilities { display: flex; align-items: center; gap: 18px; }
.bactive-header--sage .bactive-header__utility {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 60px;
    gap: 6px;
    font: 400 12px/1.3 'Inter', sans-serif;
}
.bactive-header--sage .bactive-header__search-panel { width: 350px; right: -132px; }
.bactive-header--sage .bactive-header__search-form { margin: 0; font: 400 15px/1.5 'Inter', sans-serif; }
.bactive-header--sage .bactive-header__search-form label { display: block; margin: 0 0 10px; color: var(--header-ink); font-weight: 500; }
.bactive-header--sage .bactive-header__search-fields { display: flex; gap: 8px; }
.bactive-header--sage .bactive-header__search-fields input {
    width: 100%; min-width: 0; height: 48px; padding: 10px 12px; border: 1px solid var(--header-sage);
    border-radius: 3px; background: #fff; color: var(--header-ink); caret-color: var(--header-focus); font: inherit;
}
.bactive-header--sage .bactive-header__search-fields input::placeholder { color: #5c6158; opacity: 1; }
.bactive-header--sage .bactive-header__search-fields button {
    min-width: 48px; min-height: 48px; padding: 12px; border: 0; border-radius: 3px;
    background: var(--header-ink); color: var(--header-ivory); cursor: pointer;
}
.bactive-header--sage .bactive-header__search-fields button:hover { background: var(--header-focus); }
.bactive-header--sage .bactive-header__mobile { position: relative; }
.bactive-header--sage .bactive-header__mobile > .bactive-header__brand {
    position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 1;
}
#header.bactive-header--sage .bactive-header__mobile .bactive-header__brand img { width: 128px; height: 74px; max-height: 74px; }
.bactive-header--sage .bactive-header__mobile-bag {
    position: absolute; top: 24px; right: 16px; z-index: 1; width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
}
.bactive-header--sage .bactive-header__menu-toggle {
    display: flex; align-items: center; justify-content: center; width: 48px; height: 94px; margin-left: 16px;
}
.bactive-header--sage .bactive-header__menu-close { display: none; }
.bactive-header--sage .bactive-header__mobile-menu[open] > summary .bactive-header__menu-open { display: none; }
.bactive-header--sage .bactive-header__mobile-menu[open] > summary .bactive-header__menu-close { display: block; }
.bactive-header--sage .bactive-header__mobile-panel { border-top: 1px solid #dfdcd5; padding: 26px 24px 32px; }
.bactive-header--sage .bactive-header__collections > summary {
    min-height: 44px; display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 10px; border-bottom: 2px solid var(--header-sage); color: var(--header-focus);
    font: 600 22px/1.3 var(--bactive-font-head, 'Inter', sans-serif); text-transform: uppercase; letter-spacing: 0.02em;
}
.bactive-header--sage .bactive-header__collection-links { padding: 10px 0 16px; }
.bactive-header--sage .bactive-header__collection-links a {
    display: flex; align-items: center; min-height: 48px; padding: 9px 12px;
    font: 400 17px/1.5 'Inter', sans-serif;
}
.bactive-header--sage .bactive-header__collection-links .bactive-header__men > summary {
    min-height: 48px; padding: 9px 12px; font-size: 17px;
}
.bactive-header--sage .bactive-header__collection-links .bactive-header__men-links { margin-left: 12px; }
.bactive-header--sage .bactive-header__mobile-primary { padding-top: 14px; border-top: 2px solid var(--header-sage); }
.bactive-header--sage .bactive-header__mobile-primary a {
    display: flex; align-items: center; min-height: 50px; padding-block: 10px;
    font: 600 22px/1.3 var(--bactive-font-head, 'Inter', sans-serif); text-transform: uppercase;
}
.bactive-header--sage .bactive-header__mobile-account {
    display: flex; align-items: center; min-height: 48px; margin-top: 16px;
    font: 500 15px/1.4 'Inter', sans-serif; text-transform: uppercase; color: #555d4f;
}
.bactive-header--sage .bactive-header__mobile-panel .bactive-header__search-form { margin-top: 20px; }
.bactive-header--sage .bactive-header__sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: no-preference) {
    .bactive-header--sage a, .bactive-header--sage summary { transition: color 160ms ease-out; }
}
@media (min-width: 1000px) and (max-width: 1120px) {
    .bactive-header--sage .bactive-header__desktop { gap: 18px; width: 94%; }
    #header.bactive-header--sage .bactive-header__brand img { width: 138px; }
    .bactive-header--sage .bactive-header__primary { gap: 22px; }
    .bactive-header--sage .bactive-header__utilities { gap: 12px; }
}

/* A stable slot keeps the document still while the fixed bar compresses. */
.bactive-header-spacer {
    --header-expanded-height: 110px;
    height: calc(var(--header-expanded-height) + env(safe-area-inset-top, 0px));
    flex: none;
    pointer-events: none;
}
html.bactive-header-sticky { scroll-padding-top: var(--bactive-header-clearance, 122px); }
#header.bactive-header--sage.bactive-header--fixed {
    --header-row-height: 108px;
    --header-logo-height: 88px;
    position: fixed;
    inset: var(--header-admin-offset, 0px) 0 auto;
    width: 100%;
    padding-top: env(safe-area-inset-top, 0px);
}
#header.bactive-header--sage.bactive-header--compact {
    --header-row-height: 76px;
    --header-logo-height: 56px;
    box-shadow: 0 6px 18px #24222214;
}
.bactive-header--fixed .bactive-header__desktop {
    min-height: var(--header-row-height);
    height: var(--header-row-height);
    padding-block: 8px;
}
#header.bactive-header--fixed .bactive-header__brand img {
    height: var(--header-logo-height);
    max-height: var(--header-logo-height);
}
.bactive-header--fixed .bactive-header__mobile > .bactive-header__brand {
    top: calc((var(--header-row-height) - var(--header-logo-height)) / 2);
}
.bactive-header--fixed .bactive-header__menu-toggle { height: var(--header-row-height); }
.bactive-header--fixed .bactive-header__mobile-bag {
    top: calc((var(--header-row-height) - 48px) / 2);
    right: max(16px, env(safe-area-inset-right, 0px));
}
.bactive-header--fixed .bactive-header__menu-toggle { margin-left: max(16px, env(safe-area-inset-left, 0px)); }
.bactive-header--fixed .bactive-header__mobile-panel {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    background: var(--header-ivory);
    padding-bottom: max(32px, env(safe-area-inset-bottom, 0px));
    box-shadow: 0 12px 28px #2422221f;
}
.bactive-header--fixed .bactive-header__mobile-panel,
.bactive-header--fixed .bactive-header__dropdown,
.bactive-header--fixed .bactive-header__search-panel {
    max-height: var(--header-panel-space, calc(100dvh - 122px));
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-padding-block: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--header-sage) var(--header-ivory);
}
@media (max-width: 999.98px) {
    .bactive-header-spacer { --header-expanded-height: 96px; }
    #header.bactive-header--sage.bactive-header--fixed {
        --header-row-height: 94px;
        --header-logo-height: 74px;
    }
    #header.bactive-header--sage.bactive-header--compact {
        --header-row-height: 54px;
        --header-logo-height: 44px;
    }
    #header.bactive-header--fixed .bactive-header__mobile .bactive-header__brand img {
        height: var(--header-logo-height);
        max-height: var(--header-logo-height);
    }
}
@media (prefers-reduced-motion: no-preference) {
    .bactive-header--fixed .bactive-header__desktop,
    .bactive-header--fixed .bactive-header__menu-toggle {
        transition: height 220ms cubic-bezier(0.16, 1, 0.3, 1), min-height 220ms cubic-bezier(0.16, 1, 0.3, 1);
    }
    .bactive-header--fixed .bactive-header__mobile > .bactive-header__brand,
    .bactive-header--fixed .bactive-header__mobile-bag {
        transition: top 220ms cubic-bezier(0.16, 1, 0.3, 1);
    }
}
/* The original image keeps the link's name and width while the loaded B fades in. */
#header.bactive-header--sage .site-logo-container { position: relative; }
#header.bactive-header--sage .bactive-header__brand img.bactive-header__compact-mark {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 64px;
    height: 64px;
    max-width: none;
    max-height: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    pointer-events: none;
}
#header.bactive-header--compact .bactive-header__mark-ready img:not(.bactive-header__compact-mark) { opacity: 0; }
#header.bactive-header--compact .bactive-header__mark-ready img.bactive-header__compact-mark {
    opacity: 1;
    transform: translate(-50%, -50%);
}
@media (max-width: 999.98px) {
    #header.bactive-header--sage .bactive-header__brand img.bactive-header__compact-mark { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: no-preference) {
    /* Let the turn read before the reflection: the B arrives at 1060ms,
       settles for 60ms, then the sage sweep finishes at 1770ms. */
    #header.bactive-header--fixed {
        --header-logo-turn-out: 520ms;
        --header-logo-turn-in: 1060ms;
        --header-logo-turn-delay: 0ms;
        --header-logo-sweep-duration: 650ms;
        --header-logo-sweep-delay: 1120ms;
    }
    #header.bactive-header--fixed .bactive-header__brand img {
        backface-visibility: hidden;
        transform-origin: 50% 50%;
    }
    #header.bactive-header--fixed .bactive-header__brand img:not(.bactive-header__compact-mark) {
        transform: perspective(420px) translateX(0) rotateY(0deg) rotateZ(0deg) scale(1);
        transition: height 220ms cubic-bezier(0.16, 1, 0.3, 1), max-height 220ms cubic-bezier(0.16, 1, 0.3, 1),
            opacity 420ms ease-out var(--header-logo-turn-delay),
            transform var(--header-logo-turn-in) cubic-bezier(0.32, 0, 0.2, 1) var(--header-logo-turn-delay);
    }
    #header.bactive-header--fixed.bactive-header--compact .bactive-header__mark-ready img:not(.bactive-header__compact-mark) {
        transform: perspective(420px) translateX(-14px) rotateY(100deg) rotateZ(-10deg) scale(0.72);
        transition: height 220ms cubic-bezier(0.16, 1, 0.3, 1), max-height 220ms cubic-bezier(0.16, 1, 0.3, 1),
            opacity 260ms ease-in 220ms, transform var(--header-logo-turn-out) cubic-bezier(0.4, 0, 0.6, 1);
    }
    #header.bactive-header--fixed .bactive-header__brand img.bactive-header__compact-mark {
        transform: translate(-50%, -50%) perspective(320px) translateX(20px) rotateY(-110deg) rotateZ(18deg) scale(0.48);
        transition: opacity 260ms ease-in 220ms, transform var(--header-logo-turn-out) cubic-bezier(0.4, 0, 0.6, 1);
    }
    #header.bactive-header--fixed.bactive-header--compact .bactive-header__mark-ready img.bactive-header__compact-mark {
        transform: translate(-50%, -50%) perspective(320px) translateX(0) rotateY(0deg) rotateZ(0deg) scale(1);
        transition: opacity 420ms ease-out var(--header-logo-turn-delay),
            transform var(--header-logo-turn-in) cubic-bezier(0.32, 0, 0.2, 1) var(--header-logo-turn-delay);
    }
    /* Unsupported masks omit the reflection; the 3D logo handoff still works. */
    @supports (mask-image: url('../images/header-sage-mark.png')) or (-webkit-mask-image: url('../images/header-sage-mark.png')) {
        #header.bactive-header--fixed .bactive-header__mark-ready::after {
            content: '';
            position: absolute;
            inset: 50% auto auto 50%;
            width: 64px;
            height: 64px;
            transform: translate(-50%, -50%);
            pointer-events: none;
            opacity: 0;
            background: linear-gradient(110deg, transparent 34%, var(--header-sage) 45%, var(--header-ivory) 50%, var(--header-sage) 55%, transparent 66%) 150% 50% / 300% 100% no-repeat;
            -webkit-mask: url('../images/header-sage-mark.png') center / contain no-repeat;
            mask: url('../images/header-sage-mark.png') center / contain no-repeat;
        }
        #header.bactive-header--fixed.bactive-header--compact .bactive-header__mark-ready::after {
            animation: bactive-logo-sage-sweep var(--header-logo-sweep-duration) cubic-bezier(0.2, 0.6, 0.35, 1) var(--header-logo-sweep-delay) both;
        }
        @media (max-width: 999.98px) {
            #header.bactive-header--fixed .bactive-header__mark-ready::after { width: 52px; height: 52px; }
        }
    }
    @keyframes bactive-logo-sage-sweep {
        0% { background-position: 150% 50%; opacity: 0; }
        15% { opacity: 0.95; }
        80% { opacity: 0.95; }
        100% { background-position: -50% 50%; opacity: 0; }
    }
}
@media print {
    .bactive-header-spacer { display: none; }
    #header.bactive-header--sage.bactive-header--fixed { position: relative; inset: auto; }
}
