/* =============================================================
   NOD — shared blind storefront header (store home + by-size
   landing pages + the order builder). Matches store.html's header:
   brand (logo or name) → store home, product nav, "Start an order"
   CTA. Colors key off the --brand family (set per-store by
   store-theme.js) with neutral fallbacks so it's never unstyled.
   Rendered by store-header.js into <header data-store-header>.
   ============================================================= */
/* pre-render placeholder: the header arrives after the /store-catalog fetch — reserve its
   exact height so the page doesn't paint headerless and jump when it lands (FOUC). */
[data-store-header]:empty { display: block; min-height: 65px; background: #fff; border-bottom: 1px solid #e6ebf2; }
.sf-hdr { background: #fff; border-bottom: 1px solid #e6ebf2; position: sticky; top: 0; z-index: 30; }
.sf-hdr-in { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 clamp(16px, 4vw, 32px); }
.sf-hdr-brand { font-size: 19px; font-weight: 800; letter-spacing: -.02em; color: #0d1422; text-decoration: none; display: inline-flex; align-items: center; flex: 0 0 auto; }
.sf-hdr-logo { max-height: 38px; max-width: 170px; object-fit: contain; display: block; }
.sf-hdr-nav { display: flex; gap: 4px; align-items: center; margin-right: auto; flex-wrap: wrap; }
.sf-hdr-navlink { font-size: 14px; font-weight: 650; color: #475569; text-decoration: none; padding: 8px 12px; border-radius: 9px; white-space: nowrap; }
.sf-hdr-navlink:hover { color: var(--brand-ink, #0b63c4); background: var(--brand-soft, #eaf3ff); }
.sf-hdr-navlink.is-current { color: var(--brand-ink, #0b63c4); background: var(--brand-soft, #eaf3ff); }
.sf-hdr-cta { background: var(--brand, #0a84ff); color: #fff; border: 0; border-radius: 9px; padding: 9px 16px; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; flex: 0 0 auto; white-space: nowrap; }
.sf-hdr-cta { transition: filter .12s ease; }
.sf-hdr-cta:hover { filter: brightness(.9); }
/* no nav links (single product) → brand still left, CTA right */
.sf-hdr-nav:empty { margin-right: auto; }
.sf-hdr-burger { display: none; border: none; background: none; color: #0d1422; padding: 8px; cursor: pointer; border-radius: 9px; }
.sf-hdr-burger:hover { background: var(--brand-soft, #eaf3ff); color: var(--brand-ink, #0b63c4); }
.sf-blk-mlink { display: none; }
.sf-nav-x { display: none; border: 0; background: none; padding: 0; }
.sf-sup-mlink { display: none; }
.sf-dtf-mlink { display: none; }
.sf-hdr-dropmenu.sf-hdr-dropmenu--dtf { min-width: 420px; padding: 12px; }
.sf-dtf-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; }
.sf-dtf-thumb { width: 110px; height: 110px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: #f1f5f9; display: block; }
.sf-dtf-txt { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.sf-dtf-txt b { font-size: 15px; color: #0d1422; }
.sf-dtf-txt em { font-style: normal; font-size: 11.3px; color: #7c8aa0; }
.sf-dtf-pill { display: inline-block; width: max-content; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .05em; color: #fff; background: var(--nod-blue, #0a84ff); border-radius: 999px; padding: 2.5px 9px; }
@media (max-width: 767px) {
  .sf-hdr-nav.open .sf-nav-x { display: grid; place-items: center; align-self: flex-end; width: 42px; height: 42px; color: #0d1422; cursor: pointer; margin: -8px -4px 0 0; flex: 0 0 auto; }
  .sf-hdr-nav.open .sf-blk-mlink { display: block; }
  .sf-hdr-nav.open .sf-sup-mlink { display: block; }
  .sf-hdr-nav.open .sf-dtf-mlink { display: block; }
  .sf-hdr-nav.open .sf-hdr-drop--dtf { display: none; }
  .sf-hdr-nav.open .sf-hdr-drop--blanks { display: none; }
  .sf-hdr-nav.open .sf-hdr-drop--sup { display: none; }
  .sf-hdr-burger { display: inline-flex; order: -1; }
  .sf-hdr-cta { margin-left: auto; }
  .sf-hdr-nav { display: none; }
  /* burger opens the nav as a full-width panel under the sticky header */
  /* burger opens a FULL-HEIGHT left drawer at ~70% width; the giant box-shadow dims the rest (outside taps already close it) */
  .sf-hdr-nav.open { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; position: fixed; top: 0; left: 0; bottom: 0; right: auto; width: min(70vw, 340px); margin: 0; background: #fff; border-bottom: none; box-shadow: 0 0 0 100vmax rgba(13, 20, 34, 0.45); padding: 18px 14px 24px; gap: 2px; z-index: 205; max-height: none; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .sf-hdr-nav.open .sf-hdr-navlink { padding: 12px; font-size: 15.5px; }
  .sf-hdr-nav.open .sf-hdr-drop { position: static; }
  .sf-hdr-nav.open .sf-hdr-dropbtn { width: 100%; justify-content: space-between; }
  .sf-hdr-nav.open .sf-hdr-dropmenu { position: static; box-shadow: none; border: none; min-width: 0; padding: 0 0 4px 10px; }
}

/* supplies dropdown in the store header nav */
.sf-hdr-drop { position: relative; }
.sf-hdr-dropbtn { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; font-family: inherit; font-size: 14px; font-weight: 650; line-height: inherit; color: #475569; cursor: pointer; }
.sf-hdr-dropmenu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 60; min-width: 280px; background: #fff; border: 1px solid #e6ebf2; border-radius: 12px; box-shadow: 0 14px 34px rgba(13, 20, 34, 0.14); padding: 6px; }
.sf-hdr-dropitem { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: #0d1422; font-weight: 600; font-size: 14px; }
.sf-hdr-dropimg { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; background: #f1f5f9; display: block; }
.sf-hdr-dropimg--ph { border: 1px solid #e6ebf2; }
.sf-hdr-dropitem:hover { color: var(--brand-ink, #0b63c4); background: var(--brand-soft, #eaf3ff); }

/* variant quick-select rows in the supplies dropdown */
.sf-hdr-dropitem--var { flex-direction: column; align-items: stretch; gap: 8px; cursor: default; }
.sf-hdr-dropitem--var:hover { background: transparent; color: inherit; }
.sf-hdr-dropvarhead { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; border-radius: 8px; }
.sf-hdr-dropvarhead:hover { color: var(--brand-ink, #0b63c4); }
.sf-hdr-dropvarrow { display: flex; gap: 8px; }
.sf-hdr-varsel { flex: 1; min-width: 0; font: inherit; font-size: 13px; font-weight: 600; color: #0d1422; border: 1.5px solid #cbd5e1; border-radius: 9px; background: #fff; padding: 7px 8px; }
.sf-hdr-varadd { flex: 0 0 auto; border: none; border-radius: 9px; background: var(--brand, #019AFF); color: #fff; font: inherit; font-size: 13px; font-weight: 800; padding: 0 14px; cursor: pointer; transition: filter .12s ease; }
.sf-hdr-varadd:hover { filter: brightness(.93); }

/* wide 2-col supplies dropdown with big product images */
.sf-hdr-dropmenu--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; width: min(760px, calc(100vw - 40px)); padding: 14px; }
.sf-hdr-dropmenu--grid .sf-hdr-dropitem { min-width: 0; }
.sf-hdr-dropmenu--grid .sf-hdr-dropvarhead span, .sf-hdr-dropmenu--grid .sf-hdr-dropitem > span:last-child { min-width: 0; overflow-wrap: break-word; }
.sf-hdr-dropmenu--grid .sf-hdr-dropimg { width: 64px; height: 64px; border-radius: 12px; }
.sf-hdr-dropmenu--grid .sf-hdr-dropitem { font-size: 15px; font-weight: 700; }
@media (max-width: 700px) { .sf-hdr-dropmenu--grid { grid-template-columns: 1fr; width: auto; } }

/* owner announcement bar (rotates when 2+ messages are set) */
.sf-annc { text-align: center; font-size: 13px; font-weight: 700; padding: 8px 16px; }
.sf-annc span { display: inline-block; transition: opacity 0.18s ease; }
.sf-annc span.is-fade { opacity: 0; }

/* header site-wide smart search (input + live results dropdown) */
.sf-hdrsearch { position: relative; flex: 0 1 300px; min-width: 0; margin-right: -4px; }
.sf-hdrsearch > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.sf-hdrsearch input { width: 100%; box-sizing: border-box; border: 1.5px solid #dbe3ee; border-radius: 11px; background: #fff; padding: 9px 15px 9px 38px; font: inherit; font-size: 14px; color: #0d1422; }
.sf-hdrsearch input:focus { outline: none; border-color: var(--brand, #019AFF); }
.sf-hdrsearch input::placeholder { color: #94a3b8; }
.sf-hdrsearch .sf-search-drop { left: auto; right: 0; width: min(440px, calc(100vw - 32px)); }
.sf-search-drop { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 80; background: #fff; border: 1px solid #e6ebf2; border-radius: 16px; box-shadow: 0 22px 54px rgba(13, 20, 34, 0.18); padding: 6px; max-height: min(420px, 58vh); overflow-y: auto; }
.sf-srow { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 11px; text-decoration: none; color: #0d1422; cursor: pointer; }
.sf-srow:hover, .sf-srow.is-active { background: var(--brand-soft, #eaf3ff); }
.sf-srow-img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: #f1f5f9; display: block; }
.sf-srow-img--ph { border: 1px solid #e6ebf2; }
.sf-srow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sf-srow-name { font-size: 14px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-srow-meta { font-size: 12px; color: #7c8aa0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-srow-price { flex: 0 0 auto; font-size: 12.5px; font-weight: 800; color: var(--brand-ink, #0b63c4); white-space: nowrap; }
.sf-search-none { padding: 14px 12px; font-size: 13.5px; color: #7c8aa0; }
/* supplies dropdown foot strip (mirrors the blanks mega foot) */
.sf-supfoot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border-top: 1px solid #eef2f7; background: #f8fafc; margin: 6px -6px -6px; padding: 12px 14px; border-radius: 0 0 12px 12px; }
.sf-acctbtn { margin-right: -8px; }
.sf-acctbtn + .sf-hdr-cartbtn { margin-left: -6px; } /* halve the account->cart space (14px flex gap + 2px margin -> ~8px) */
.sf-hdr-cartbtn.sf-msearch-btn { display: none; border: 0; background: none; padding: 0; font: inherit; cursor: pointer; } /* mobile-only (outranks the base cartbtn display) */
.sf-msearch-x { display: none; }
@media (max-width: 767px) {
  /* phones (incl. wide ones): NO inline search row — icons run Search, Account, Cart,
     tight together on the right; the search icon opens a full-page overlay */
  .sf-hdrsearch { display: none; }
  .sf-hdr-in { gap: 2px; }
  .sf-hdr-in .sf-hdr-cartbtn { width: 36px; } /* tighter glyph-to-glyph spacing on phones */
  .sf-hdr-in .sf-hdr-cartbtn.sf-msearch-btn { display: inline-flex; order: 1; margin-left: auto; }
  .sf-hdr-in .sf-acctbtn { order: 2; margin-left: 0; margin-right: 0; }
  .sf-hdr-in .sf-hdr-cartbtn[data-sf-cart] { order: 3; margin-left: 0; }
  .sf-hdrsearch.is-open { display: block; position: fixed; inset: 0; z-index: 210; background: #fff; margin: 0; padding: 14px 62px 18px 16px; overflow: auto; -webkit-overflow-scrolling: touch; }
  .sf-hdrsearch.is-open > svg { top: 35px; left: 20px; transform: translateY(-50%); }
  .sf-hdrsearch.is-open input { font-size: 16px; padding-left: 30px; border-radius: 12px; }
  .sf-hdrsearch.is-open .sf-search-drop { position: static; width: auto; max-height: none; box-shadow: none; border: none; margin-top: 8px; padding: 0; }
  .sf-msearch-x { display: grid; place-items: center; position: absolute; top: 15px; right: 12px; width: 42px; height: 42px; border: 0; background: none; color: #0d1422; cursor: pointer; }
}

/* live header cart (badge + hover quick view) */
.sf-hdr-cartbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; color: var(--brand, #0a84ff); text-decoration: none; margin-left: 2px; flex: 0 0 auto; }
.sf-hdr-cartbtn:hover { background: #f1f5f9; }
.sf-hdr-cartct { position: absolute; top: 1px; right: 1px; min-width: 20px; height: 20px; border-radius: 999px; background: var(--brand, #019AFF); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0 3px; border: 2px solid #fff; box-sizing: border-box; }
.sf-hdr-cartpop { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; width: 290px; background: #fff; border: 1px solid #e6ebf2; border-radius: 14px; box-shadow: 0 18px 44px rgba(13, 20, 34, 0.16); padding: 12px; text-align: left; color: #0d1422; font-size: 13.5px; cursor: pointer; font-weight: 600; }
.sf-hdr-cartpop::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; } /* hover bridge over the 8px gap */
@media (hover: hover) { .sf-hdr-cartbtn:hover .sf-hdr-cartpop { display: block; } }
.sf-cartpop-row { display: flex; align-items: center; gap: 8px; padding: 5px 2px; color: #0d1422; }
.sf-cartpop-grp { display: flex; align-items: flex-start; gap: 9px; padding: 6px 2px; color: #0d1422; }
.sf-cartpop-gbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sf-cartpop-gname { font-size: 13px; font-weight: 800; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-cartpop-line { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: #64748b; }
.sf-cartpop-line b { color: #0d1422; font-weight: 700; }
.sf-cartpop-img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; background: #f1f5f9; display: block; }
.sf-cartpop-img--ph { border: 1px solid #e6ebf2; }
.sf-cartpop-row em { font-style: normal; color: #64748b; flex: 0 0 auto; }
.sf-cartpop-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-cartpop-row b { flex: 0 0 auto; }
.sf-cartpop-more { display: block; color: #64748b; font-size: 12.5px; padding: 2px 2px 4px; }
.sf-cartpop-total { display: flex; justify-content: space-between; border-top: 1px solid #eef2f7; margin-top: 6px; padding: 8px 2px 2px; font-weight: 800; }
.sf-cartpop-empty { color: #64748b; font-weight: 600; }
.sf-cartpop-cta { display: block; margin-top: 8px; text-align: center; background: var(--brand, #019AFF); color: #fff; border-radius: 10px; padding: 9px 0; font-weight: 800; }

/* footer social icons (store brand color) + cookie notice */
.sf-foot-socrow { display: flex; justify-content: center; gap: 16px; margin: 0 0 14px; }
.sf-foot-soc { color: var(--brand, var(--sf-brand, #019AFF)); display: inline-flex; }
.sf-foot-soc:hover { filter: brightness(.9); }
.sf-cookiebar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 90; display: flex; align-items: center; gap: 14px; max-width: min(680px, calc(100vw - 24px)); background: #0d1422; color: #e2e8f0; border-radius: 14px; padding: 13px 16px; font-size: 13px; line-height: 1.45; box-shadow: 0 16px 40px rgba(13, 20, 34, 0.35); }
.sf-cookiebar a { color: #fff; text-decoration: underline; }
.sf-cookiebar-ok { flex: 0 0 auto; border: none; border-radius: 9px; background: var(--brand, #019AFF); color: #fff; font: inherit; font-weight: 800; font-size: 13px; padding: 9px 18px; cursor: pointer; }
@media (max-width: 560px) {
  .sf-cookiebar { flex-direction: column; align-items: stretch; gap: 11px; left: 12px; right: 12px; transform: none; max-width: none; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); padding: 15px 16px; }
  .sf-cookiebar span { font-size: 13.5px; }
  .sf-cookiebar-ok { width: 100%; padding: 12px; font-size: 14.5px; border-radius: 10px; }
}


/* desktop: header stays pinned while scrolling */
@media (min-width: 821px) { .sf-hdr { position: sticky; top: 0; z-index: 80; } }

/* nested Blank Apparel submenu */
.sf-hdr-subbtn { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.sf-hdr-subbtn svg { transition: transform 0.15s ease; }
.sf-hdr-subbtn.is-open svg { transform: rotate(90deg); }
.sf-hdr-subpanel { padding: 2px 0 6px 8px; }

/* Blank Apparel mega menu (desktop) — accordion stays for mobile */
.sf-blk-mega { display: none; }
@media (min-width: 900px) {
  .sf-hdr-drop--blanks .sf-blk-acc { display: none; }
  .sf-blk-mega { display: block; }
  .sf-hdr-dropmenu--mega { width: min(880px, 94vw); left: 50%; transform: translateX(-50%); padding: 22px 22px 0; }
  .sf-mega { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }
  .sf-mega-col h5 { margin: 0 0 10px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #0d1422; border-bottom: 1px solid #e6ebf2; padding-bottom: 8px; }
  .sf-mega-col a { display: block; padding: 6px 0; color: #334155; text-decoration: none; font-size: 13.5px; font-weight: 600; }
  .sf-mega-col a:hover { color: var(--sf-brand, #019AFF); }
  .sf-mega-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid #eef2f7; background: #f8fafc; margin: 18px -22px 0; padding: 13px 22px; border-radius: 0 0 12px 12px; }
  .sf-mega-ship { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #64748b; }
  .sf-mega-ship b { color: #0d1422; letter-spacing: .04em; }
  .sf-mega-cta { background: var(--sf-brand, #019AFF); color: #fff; border-radius: 10px; padding: 10px 18px; font-weight: 800; font-size: 14px; text-decoration: none; white-space: nowrap; }
}
