.bf-header { position: sticky; inset-block-start: 0; z-index: 10; background: var(--bf-paper); }
.bf-header-inner { height: 96px; padding: 0 10px 0 24px; display: flex; align-items: center; gap: clamp(20px, 3.1vw, 36px); }
.bf-logo { display: inline-flex; flex: 0 0 auto; align-items: center; }
.bf-logo img { display: block; width: 189px; height: 48px; object-fit: contain; object-position: left center; }
.bf-primary { margin-inline-start: auto; }
.bf-nav-list, .bf-submenu-list { list-style: none; margin: 0; padding: 0; }
.bf-primary .bf-nav-list { display: flex; align-items: center; gap: clamp(14px, 2vw, 24px); font: 500 16px/1.4 BF America, Helvetica, Arial, sans-serif; white-space: nowrap; }
.bf-nav-list a { text-decoration: none; }
.bf-nav-list a:hover, .bf-menu-label:focus-within > a, .bf-submenu.is-open .bf-menu-label > a { text-decoration: underline; }
.bf-menu-label, .bf-mobile-nav-row { display: flex; align-items: center; }
.bf-nav-toggle { display: grid; place-items: center; flex: 0 0 auto; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.bf-nav-toggle::after { content: ''; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-2px) rotate(45deg); }
.bf-menu-label { position: relative; }
.bf-submenu--mega.is-open .bf-menu-label::after { content: ""; position: absolute; inset: 100% 0 auto; height: 32px; }
.bf-menu-label > .bf-nav-toggle { width: 19px; height: 32px; }
.bf-nav-panel { position: absolute; z-index: 1; background: var(--bf-paper); white-space: normal; font-weight: 400; overflow-wrap: normal; word-break: normal; }
.bf-submenu--mega .bf-nav-panel { inset: 100% 0 auto; border-top: 4px solid #000; padding: 39px 0 49px; max-height: calc(100dvh - 96px); overflow: auto; }
.bf-mega-grid { width: 85%; margin: 0 auto; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: start; gap: 18px; }
.bf-mega-heading { display: block; margin-bottom: 20px; font-weight: 500; }
.bf-mega-group li + li { margin-top: 12px; }
.bf-mega-tile { display: grid; gap: 24px; text-align: center; font-weight: 500; }
.bf-mega-tile img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.bf-mega-tile span { text-decoration: underline; text-underline-offset: 3px; }
.bf-submenu--simple { position: relative; }
.bf-submenu--simple .bf-nav-panel { inset: calc(100% + 8px) auto auto -14px; width: 180px; padding: 16px 18px; font-size: 14px; }
.bf-submenu--simple li + li { margin-top: 8px; }
.bf-actions { display: flex; flex: 0 0 auto; align-items: center; }
.bf-header .bf-actions .bf-action, .bf-mobile-menu .bf-actions .bf-action { width: 44px; height: 44px; }
.bf-header .bf-actions svg, .bf-mobile-menu .bf-actions svg { width: 23px; height: 23px; }
.bf-header .bf-menu { display: none; }
.bf-header-cart-count { position: absolute; inset: 3px 3px auto auto; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding-inline: 3px; border-radius: 20px; background: #000; color: #fff; font-size: 11px; line-height: 1; }
.bf-header-cart-count[hidden] { display: none; }

html:has(.bf-mobile-menu[open]) { overflow: hidden; }
.bf-mobile-menu { inset: 0; width: 100%; height: 100dvh; padding: 0; overflow: hidden; }
.bf-mobile-menu[open] { display: flex; flex-direction: column; }
.bf-mobile-menu-top { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; min-height: 76px; padding: 12px 12px 0 clamp(16px, 6vw, 24px); border-bottom: 4px solid #000; }
.bf-mobile-menu-top .bf-logo img { width: 140px; }
.bf-mobile-menu > nav { min-height: 0; flex: 1; display: flex; flex-direction: column; padding: 4px 20px 0; }
.bf-mobile-nav-list { overflow-y: auto; }
.bf-mobile-nav-list > li + li { border-top: 1px solid #52392f; }
.bf-mobile-nav-list > li > :is(a, span), .bf-mobile-nav-row > :is(a, span) { display: block; padding: 15px 0; font: 500 18px/1.2 BF America, Helvetica, Arial, sans-serif; color: #52392f; }
.bf-mobile-nav-row { justify-content: space-between; }
.bf-mobile-nav-row > :is(a, span) { flex: 1; }
.bf-mobile-nav-row .bf-nav-toggle { width: 44px; height: 44px; justify-items: end; padding-inline-end: 5px; color: #52392f; }
.bf-mobile-nav-row .bf-nav-toggle::after { border-width: 0 2px 2px 0; transform: rotate(-45deg); }
.bf-mobile-nav-row .bf-nav-toggle[aria-expanded="true"]::after { transform: translateY(-2px) rotate(45deg); }
.bf-mobile-nav-row:has([aria-expanded="true"]) > a { text-decoration: underline; }
.bf-mobile-nav-children > li { border-top: 1px solid #52392f; }
.bf-mobile-nav-children :is(a, span) { display: block; padding: 14.5px 20px; font-size: 16px; line-height: 1.4; font-weight: 500; }
.bf-mobile-menu .bf-mobile-account { display: inline-flex; align-items: center; gap: 5px; min-height: 58px; flex: 0 0 auto; padding: 16px 0 8px; border-top: 1px solid #382014; font-size: 18px; text-decoration: none; }
.bf-mobile-menu :is(button, a) { -webkit-tap-highlight-color: transparent; }
.bf-mobile-account svg { width: 18px; height: 18px; }

@media (1024px < width <= 1120px) {
    .bf-header-inner { gap: 20px; }
    .bf-primary .bf-nav-list { gap: 12px; font-size: 14px; }
    .bf-mega-grid { width: 90%; }
}
@media (max-width: 1024px) {
    .bf-header-inner { height: 88px; padding: 0 12px 0 clamp(16px, 6vw, 24px); gap: 0; justify-content: space-between; }
    .bf-header-inner .bf-logo img { width: 140px; }
    .bf-primary, .bf-header .bf-account { display: none; }
    .bf-header .bf-menu { display: inline-grid; }
}

.bf-header .bf-search { position: absolute; z-index: 2; inset: 100% 0 auto; width: 100%; padding: 37px 32px 55px; border-block: 1px solid #382014; }
.bf-header .bf-search .bf-dialog-close { inset: 5px 10px auto auto; }
.bf-header .bf-search .bf-dialog-close .bf-action { width: 25px; height: 28px; }
.bf-header .bf-search .bf-dialog-close svg { width: 17px; height: 17px; }
.bf-search-field { display: flex; align-items: stretch; border-bottom: 1px solid var(--bf-ink); }
.bf-search-field input[type="search"] { min-width: 0; flex: 1; height: 55px; padding: 8px 8px 8px 0; border: 0; background: transparent; color: inherit; font: 400 24px/1.2 BF Mono, monospace; }
.bf-search-field input[type="search"]:focus { outline-offset: -2px; }
.bf-search-field button { width: 125px; border: 1px solid var(--bf-ink); border-bottom: 0; background: transparent; color: inherit; font-weight: 500; cursor: pointer; }
.bf-search-field button:hover { background: var(--bf-ink); color: var(--bf-paper); }
.bf-search-collections { display: flex; align-items: baseline; gap: 20px; padding: 14px 0 26px; border-bottom: 1px solid #382014; }
.bf-search-collections ul { display: flex; flex-wrap: wrap; row-gap: 3px; list-style: none; margin: 0; padding: 0; }
.bf-search-collections li:not(:last-child)::after { content: '/'; margin: 0 9px; }
.bf-search-collections a { text-decoration: none; }
.bf-search-collections a:hover { text-decoration: underline; }

@media (max-width: 1024px) {
    .bf-header .bf-search { inset-block-start: calc(100% - 28px); padding: 24px 24px 40px; }
    .bf-header .bf-search .bf-dialog-close { display: none; }
    .bf-search-field input[type="search"] { height: 49px; font-size: 21px; }
    .bf-search-field button { width: 72px; }
    .bf-search-collections { flex-direction: column; gap: 3px; padding-bottom: 26px; }
    .bf-search-collections ul { line-height: 1.65; }
}

.bf-header .bf-search { max-height: calc(100dvh - 96px); }
.bf-search-field input[type="search"]:not(:placeholder-shown) { font-family: BF America, Helvetica, Arial, sans-serif; }
.bf-search-preview { margin-top: 24px; }
.bf-search-preview-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bf-search-preview-heading h2 { margin: 0; font-size: 24px; }
.bf-search-preview-heading a { flex-shrink: 0; }
.bf-search-preview-products { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 150px) / 6); gap: 30px; overflow-x: auto; list-style: none; padding: 0 0 5px; margin: 22px 0 0; scroll-snap-type: x mandatory; }
.bf-search-preview-products:empty { display: none; }
.bf-search-preview-products li { min-width: 0; scroll-snap-align: start; }
.bf-search-preview-products img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; margin-bottom: 8px; }
.bf-search-preview-products span { font-weight: 500; }
.bf-search-preview-products p { font: 400 14px/1.35 BF Mono, monospace; }
.bf-search-result-action { display: block; padding: 12px 8px; border: 1px solid currentColor; text-align: center; font-weight: 500; text-decoration: none; }
.bf-search-result-action:hover { background: var(--bf-ink); color: var(--bf-paper); }
@media (max-width: 1024px) {
    .bf-header .bf-search { max-height: calc(100dvh - 60px); }
    .bf-search-preview-products { grid-auto-columns: calc((100% - 16px) / 2); gap: 16px; }
}
