/* ================================================================
   Home.css — Topbar, navigation and home page layout
   All values use Momento design tokens from tokens.css
   ================================================================ */

/* ── Topbar (desktop) ───────────────────────────────────────── */
.topbar-container {
  display: flex;
  height: 100px;
  padding: var(--space-2);
  align-items: center;
  /* 16px — the BETWEEN-SECTION step (Momento: "sections are 16px apart, within-section is 8px").
     This was var(--space-1) = 8px, i.e. the within-section value applied at the section level,
     which read as the logo crowding the search box. The old note here said "was 15px — fixed to
     8px grid"; 15px snaps to 16, not 8. */
  gap: var(--space-2);
  flex-shrink: 0;
  align-self: stretch;
  background: var(--color-topbar-bg);
}

/* ── Nav-tab MOLECULE spacing ──────────────────────────────────────────────────────────────────
   The nav tabs are ONE molecule, so they sit 8px from EACH OTHER while the row keeps its 16px
   between molecules. Flexbox has no per-item gap, so the -8px margin cancels half of the row's
   16px to net 8px; the row then reads 16 / 8 / 16 by design.
   The ADJACENT-SIBLING combinator is what keeps this correct: it only fires on a tab that FOLLOWS
   another tab, so the FIRST tab (Stores) keeps its full 16px from the search molecule and only
   Saved/Sign In pull in to 8px. A blanket margin-left on .topbar-tab-container would also have
   closed the 16px molecule gap after the search box. */
.topbar-tab-container + .topbar-tab-container {
  margin-left: calc(var(--space-1) - var(--space-2));
}

/* The search molecule absorbs the row's leftover space so the header spans its full content box
   and the LAST tab lands exactly 16px from the right edge. This class carried no declaration at
   all, so it inherited the flex default `0 1 auto` — able to shrink but never to grow — and the
   16px freed from the two tab gaps went nowhere, stranding slack at the right edge.
   `min-width: 0` lets it shrink below the input's intrinsic width instead of overflowing. */
.topbar-search-wrapper {
  flex: 1;
  min-width: 0;
}
/* ...and the search box inside it shrinks with it. Its automatic minimum is the input's intrinsic
   width, which would stop it short and push it over the tabs at 1025–1279px. With the fluid header
   (.home_layout_sub below) the search box is the ONLY thing that gives way; tab padding is unchanged
   (Kelly, 2026-10-06). */
.topbar-search-wrapper > .home_height {
  min-width: 0;
}

.topbar-tab-container {
  display: flex;
  /* Compact pill (reference .fc-nav-tab: 8px/16px, no fixed height) so the active/hover background
     hugs the label instead of filling the full 64px topbar height. Centered in the row via the
     parent's align-items. */
  padding: var(--space-1) var(--space-2);
  align-items: center;
  gap: var(--space-1);
  cursor: pointer;
  /* These are real <button>s — strip the UA button chrome so the element change is inert. */
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

.topbar-tab-icon {
  color: var(--color-surface-default);
  text-align: center;
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
  line-height: normal;
}

.topbar-tab-text {
  color: var(--color-surface-default);
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--text-action-md-size);
  font-style: normal;
  font-weight: var(--fw-bold);
  line-height: var(--text-action-md-lh);
}

/* Active nav tab (current page: Stores / Saved / Profile) — yellow icon + label on a subtle dark
   pill, matching the reference .fc-nav-tab--active. Only the background animates — never a shadow. */
.topbar-tab-container {
  border-radius: var(--radius-lg);
  transition: background-color 0.15s ease;
  box-shadow: none !important;   /* no elevation/shadow on the tabs in any state (hover/press/active) */
}
/* Hover: subtle dark tint only (reference .fc-nav-tab:hover), NOT a drop-shadow. */
.topbar-tab-container:hover {
  background: rgba(0, 0, 0, 0.12);
}
.topbar-tab-container--active,
.topbar-tab-container--active:hover {
  background: rgba(0, 0, 0, 0.2);
}
.topbar-tab-container--active .topbar-tab-icon,
.topbar-tab-container--active .topbar-tab-text {
  color: var(--color-warning);
}

/* ── Search field container ─────────────────────────────────── */
.topbar-textfiled-container {
  display: flex;
  padding: var(--space-2);
  align-items: center;
  gap: var(--space-1);
  flex: 1 0 0;
  border-radius: var(--radius-lg);
  width: auto;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface-default);
  /* Containing block for .search-validation-error. The desktop row gets one from
     .store-locator-search-container; the ≤1024px row has no positioned ancestor, so without
     this the error escapes to the nearest one. */
  position: relative;
}

.home_height {
  display: flex;
  height: 56px;
  padding: 0 var(--space-2);
  align-items: center;
  gap: var(--space-1);
  flex: 1 0 0;
  border-radius: var(--radius-lg);
  width: auto;
  border: 1px solid var(--color-border);
  /* Web-desktop search box (#topbar_large_screen). v3.0.2 parity: 75% translucent fill at rest so the
     brand-blue header tints through, going to 100% opaque on focus. rgba (not the `opacity` property)
     so the placeholder/typed text stay fully crisp. */
  background: rgba(255, 255, 255, 0.75);
  box-sizing: border-box;
  transition: border-color 0.15s ease, border-width 0.15s ease, padding 0.15s ease,
              background-color 0.15s ease;
}

/* Focus/typing state: crisp 3px black border (matches reference .fc-nav-search:focus-within).
   Padding drops 16px -> 14px to compensate the 2px border growth so the text doesn't shift.
   Fill goes fully opaque here — the focused half of the 75% → 100% treatment above. */
.home_height:focus-within {
  border: 3px solid var(--color-text-primary);
  padding: 0 14px;
  background: rgba(255, 255, 255, 1);
}

.topbar-textfield-icon {
  color: var(--color-text-primary);
  text-align: center;
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.topbar-input-field {
  border: none;
  outline: none;
  flex: 1;
  min-width: 0;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-body-md-size);
  font-weight: var(--fw-normal);
  line-height: var(--text-action-md-lh);
  background: none;
}

/* ── Layout helpers ─────────────────────────────────────────── */
.home_layout {
  background: var(--color-topbar-bg);
}

/* Desktop header row: fluid up to 1280px (Kelly, 2026-10-06). A fixed 1280px box overflowed the
   viewport at 1025–1279px and cut off the last tabs (now the Menu tab). */
.home_layout_sub {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

/* ── Menu drawer animation ──────────────────────────────────── */
@keyframes custom_drawer_slide_up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes custom_drawer_slide_down {
  from { transform: translateY(0); }
  to   { transform: translateY(100%); }
}

.custom-drawer {
  position: fixed !important;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto !important;
  height: auto !important;
  max-height: 90vh;
  width: 100% !important;
  max-width: 700px;
  margin: 0 auto !important;
  background-color: var(--color-drawer-bg);
  /* --radius-xl (24px), not --radius-lg (16px) — reference .fc-megamenu's mobile sheet. */
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  overflow-y: auto;
  z-index: 1300;
  animation: custom_drawer_slide_up 0.3s ease-out;
  will-change: transform;
  /* Bottom sheet is pinned to bottom:0; add the system navigation-bar inset so the LAST item
     (Sign In / Sign Out) is not hidden behind the nav bar. Shared --fc-bottom-inset token. */
  padding-bottom: var(--fc-bottom-inset);
}

.custom-drawer.custom-drawer--closing {
  animation: custom_drawer_slide_down 0.28s ease-in forwards;
}

/* Backdrop for the native plain-div menu sheet (replaces MudDrawer's overlay).
   Fixed to the viewport so it dims the whole screen and closes the sheet on tap. */
.custom-drawer-backdrop {
  position: fixed !important;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 1299;
  animation: custom_drawer_backdrop_in 0.3s ease-out;
}
.custom-drawer-backdrop.custom-drawer-backdrop--closing {
  animation: custom_drawer_backdrop_out 0.28s ease-in forwards;
}
@keyframes custom_drawer_backdrop_in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes custom_drawer_backdrop_out { from { opacity: 1; } to { opacity: 0; } }

@media (min-width: 745px) {
  .custom-drawer {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
  }

  @keyframes custom_drawer_slide_up {
    from { transform: translate(-50%, 100%); }
    to   { transform: translate(-50%, 0); }
  }

  @keyframes custom_drawer_slide_down {
    from { transform: translate(-50%, 0); }
    to   { transform: translate(-50%, 100%); }
  }
}

/* ── Hamburger menu button ──────────────────────────────────── */
.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.menu-btn i {
  font-size: 32px;
  color: var(--color-surface-default);
}

/* ── Menu drawer items ──────────────────────────────────────── */
.drawer_items_text {
  font-family: var(--font-body);
  font-size: var(--text-action-md-size);
  font-weight: var(--fw-normal);
  letter-spacing: 0.2px;
  line-height: var(--text-action-md-lh);
  color: var(--color-text-primary);
}

/* ── Shop Online: prominent hamburger top entry (client parity — reference MegaMenu
   .fc-mega-mtop-item). Red bag icon + bold heading label on the left, muted chevron-right on the
   right, laid out edge-to-edge. Scoped to .drawer_shop_online so the other rows are untouched. */
.drawer_shop_online {
  justify-content: space-between;
}
.drawer_shop_online_left {
  display: flex;
  align-items: center;
  /* 8px — reference .fc-mega-mtop-left. Was 12px. */
  gap: var(--space-1);
  flex: 1;
  min-width: 0;
}
.drawer_shop_online_icon {
  color: var(--color-brand-accent) !important;
  font-size: 20px !important;
  /* Fixed 24px box so every row's label starts on the same x (reference .fc-mega-mtop-icon). */
  width: 24px;
  text-align: center;
}
.drawer_shop_online_text {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
}
.drawer_shop_online_chev {
  color: var(--color-text-muted) !important;
  font-size: 20px !important;
  opacity: 0.5;
  flex-shrink: 0;
}

.drawer_header_text {
  font-family: var(--font-heading);
  font-size: var(--text-heading-sm-size);
  font-weight: var(--fw-bold);
  letter-spacing: 0.2px;
  line-height: var(--text-heading-sm-lh);
  color: var(--color-text-primary);
}

.drawer_items_icon {
  /* 20px in a fixed 24px box — reference .fc-mega-mlink i. Was a bare 18px, which both looked
     lighter than the reference's and let each label start at a different x. */
  font-size: 20px;
  width: 24px;
  text-align: center;
  color: var(--color-text-primary);
}

/* Menu rows: 56px tall buttons (16px top/bottom + a 24px line) with a rounded hover fill, spaced 8px
   apart. The reference's are 48px (.fc-mega-mlink: `padding: 12px var(--space-1)`), but spacing moves
   in 8px increments with no 12px (Kelly, 2026-09-23), and 16px keeps the touch target above 48px
   where 8px would drop it to 40. main's were bare 24px text rows spaced 24px apart by the nav's
   `gap`, with no hover state at all, which is why the reference showed a grey highlight on the row
   under the cursor and main showed nothing. */
.drawer_items_div {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  cursor: pointer;
  width: 100%;
  padding: var(--space-2) var(--space-1);
  box-sizing: border-box;
  border-radius: var(--radius-sm);
  text-align: left;
}

/* Between two ADJACENT rows only — the reference's `.fc-mega-mlink + .fc-mega-mlink`. Deliberately
   NOT `.drawer_items_divider + .drawer_items_div`: the divider already carries an 8px margin on all
   four sides, so adding a row margin after it too made the divider gap 73px against the
   reference's 65px (48 + 8 + 1 + 8). */
.drawer_items_div + .drawer_items_div {
  margin-top: var(--space-1);
}

.drawer_items_div:hover {
  background: var(--color-surface-subtle);
}

.drawer_close_button {
  padding: var(--space-2);
  border-radius: var(--radius-lg);
  color: var(--color-brand-primary);
  border: 1px solid var(--color-brand-primary);
}

/* The sheet's ONE outer inset lives on .custom-drawer / .mud-drawer-content below, exactly as the
   reference puts it on .fc-megamenu. This nav therefore adds nothing: its own 16px sides used to
   stack on top of that inset and pushed every row 16px further in than the reference's (measured at
   412px: labels at x=70 vs 56, dividers starting at x=40 vs 24). Row spacing is now the 8px margins
   on .drawer_items_div, matching .fc-mega-mlink + .fc-mega-mlink. */
.drawer_items {
  padding: 0;
  gap: 0;
  display: flex;
  flex-direction: column;
}

/* ── Sheet chrome, matched to the reference MegaMenu's mobile panel ─────────────────────────────
   main renders this menu two ways — a MudDrawer on web (Topbar.razor) and a plain
   <div class="custom-drawer fc-native-menu"> on native (NativeHeader.razor) — and the reference
   renders it as its own .fc-megamenu panel. The COMPONENTS stay as they are; only the measurable
   box properties below are aligned, so all three trees land on the same geometry. */
.custom-drawer .mud-drawer-content,
.custom-drawer.fc-native-menu {
  /* 16px, MudBlazor's default is 24px (reference .fc-megamenu `padding: var(--space-2)`). */
  padding: var(--space-2);
  box-sizing: border-box;
}

/* Header row ("☰ Menu" + close) — reference .fc-mega-mhead. The old value stacked a second 16px on
   top of the sheet inset and pushed the title to x=32 against the reference's x=24. */
.custom-drawer .mud-drawer-header,
.custom-drawer.fc-native-menu .mud-drawer-header {
  padding: 0 var(--space-1) var(--space-1) !important;
  align-items: center;
  /* MudBlazor gives the header a 16px bottom margin; the reference's .fc-mega-mhead has none (its
     8px bottom padding is the whole gap). That margin was the last of the difference — it made the
     sheet 386px tall against the reference's 370. */
  margin-bottom: 0;
}

/* Header title icon: 20px like the row icons (reference .fc-mega-mhead-title), and the pair sits on
   an 8px gap rather than 12px. The gap is inline on #menu_header in Topbar.razor. */
#menu_header {
  gap: var(--space-1) !important;
}
#menu_header .drawer_items_icon {
  font-size: 20px;
}

/* Close button: the reference's is a borderless 40x40 .fc-iconbtn with an 18px glyph. MudBlazor's
   default renders 48x48 with a grey rgba(0,0,0,0.06) ripple surface and a 24px glyph, which read as
   a visible grey disc that the reference does not have. */
.custom-drawer .mud-drawer-header .mud-icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  background-color: transparent;
  flex-shrink: 0;
}
.custom-drawer .mud-drawer-header .mud-icon-button .mud-icon-button-label,
.custom-drawer .mud-drawer-header .mud-icon-button .mud-icon-root {
  font-size: 18px;
  width: 18px;
  height: 18px;
}

/* Dividers — reference .fc-mega-mdivider: a 1px --color-border line with an 8px margin all round.
   On web this is a <MudDivider>, which paints its line as a dark rgb(66,66,66) BORDER-top rather
   than a background, so both have to be reset; on native it is a plain <div> with no line at all.
   One rule now covers both trees (it was .fc-native-menu-only, so web-mobile kept MudBlazor's
   heavy dark rule). */
.custom-drawer .drawer_items_divider {
  height: 1px;
  background: var(--color-border);
  border: none;
  width: auto;
  align-self: stretch;
  margin: var(--space-1);
  /* The app's sheet list is a flex column that shrinks once the sheet reaches its cap (app.css
     .fc-native-menu .drawer_items; it was a 500px cap until 2026-10-07). When the signed-in list first
     passed that cap (2026-10-06: Layaway, Pawn Loans ▾ and Notifications rows), the empty dividers shrank
     to 0px and their lines vanished. */
  flex-shrink: 0;
}

/* ── Responsive screen visibility ───────────────────────────── */
@media (max-width: 1024px) {
  .small-screen  { display: block !important; }
  .large-screen  { display: none !important; }

  .cls_item_name_sg {
    font-size: var(--text-xs-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-xs-lh);
    letter-spacing: 0.2px;
  }
  .cls_item_name_search {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_name_mc {
    font-size: var(--text-xs-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-xs-lh);
    letter-spacing: 0.2px;
  }
  .cls_search_results_search {
    font-family: var(--font-heading);
    font-size: var(--text-heading-xsm-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-heading-xsm-lh);
  }
  .cls_search_results_search_count {
    font-family: var(--font-body);
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
  }
  .cls_item_price_sg {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_price_search {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_price_mc {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-action-md-lh);
  }
}

@media (min-width: 1025px) {
  .small-screen { display: none !important; }
  .large-screen { display: block; }

  .cls_height { height: 250px !important; }

  .cls_item_name_sg {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_name_search {
    font-size: 22px;
    font-weight: var(--fw-xbold);
    line-height: 32px;
  }
  .cls_search_results_search {
    font-family: var(--font-heading);
    font-size: var(--text-display-lg-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-display-lg-lh);
    letter-spacing: -1px;
  }
  .cls_search_results_search_count {
    font-family: var(--font-body);
    font-size: var(--text-heading-xsm-size);
    font-weight: var(--fw-normal);
    line-height: 28px;
  }
  .cls_item_name_mc {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_price_sg {
    font-size: 22px;
    font-weight: var(--fw-xbold);
    line-height: 32px;
  }
  .cls_item_price_search {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_price_mc {
    font-size: var(--text-heading-xsm-size);
    font-weight: var(--fw-xbold);
    line-height: 32px;
  }
}

@media (max-width: 950px) {
  .small-screen-1 { display: block !important; }
  .large-screen-1 { display: none !important; }

  .cls_item_name_sg {
    font-size: var(--text-xs-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-xs-lh);
    letter-spacing: 0.2px;
  }
  .cls_item_name_search {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-action-md-lh);
  }
  .cls_search_results_search {
    font-family: var(--font-heading);
    font-size: var(--text-heading-xsm-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-heading-xsm-lh);
  }
  .cls_search_results_search_count {
    font-family: var(--font-body);
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
  }
  .cls_item_price_sg {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_price_search {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_price_mc {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-action-md-lh);
  }
}

@media (min-width: 951px) {
  .small-screen-1 { display: none !important; }
  .large-screen-1 { display: block; }

  .cls_item_name_sg {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-action-md-lh);
  }
  .cls_item_name_search {
    font-size: 22px;
    font-weight: var(--fw-xbold);
    line-height: 32px;
  }
  .cls_search_results_search {
    font-family: var(--font-heading);
    font-size: var(--text-display-lg-size);
    font-weight: var(--fw-xbold);
    line-height: var(--text-display-lg-lh);
    letter-spacing: -1px;
  }
  .cls_search_results_search_count {
    font-family: var(--font-body);
    font-size: var(--text-heading-xsm-size);
    font-weight: var(--fw-normal);
    line-height: 28px;
  }
  .cls_item_price_sg {
    font-size: 22px;
    font-weight: var(--fw-xbold);
    line-height: 32px;
  }
  .cls_item_price_search {
    font-size: var(--text-action-md-size);
    font-weight: var(--fw-normal);
    line-height: var(--text-action-md-lh);
  }
}

/* ── Small screen topbar ────────────────────────────────────── */
.topbar-smallscreen-container {
  display: flex;
  padding: var(--space-2) 0;
  flex-direction: column;
  align-items: flex-start;
  /* No gap: this container holds only the logo row — the search row is a SIBLING outside it, and
     the 16px between the two comes from .topbar_search_div's own top-side spacing. A gap here
     added a third value to that rhythm. */
  align-self: stretch;
  background: var(--color-topbar-bg);
}

/* Hamburger: a 52px-tall button whose box sits 16px off the right edge. Scoped to the web header
   so NativeHeader's .menu-btn keeps its own sizing. */
#web-mobile-header .menu-btn {
  padding: var(--space-1) var(--space-2);
}
#web-mobile-header .menu-btn i {
  font-size: 36px;
  color: rgba(255, 255, 255, 0.85);
}

/* Logo aspect never distorts (the img is sized from an inline height/width on the markup). */
#web-mobile-header .topbar-smallscreen-space img {
  object-fit: contain;
}

/* ── Header search icons must reach the SOLID face ────────────────────────────────────────────
   .topbar-textfield-icon declares font-weight: 400. That is the same specificity as Font
   Awesome's own `.fa-solid { font-weight: 900 }`, and Home.css is linked AFTER Font Awesome in
   both hosts — so 400 wins and a fa-solid glyph renders against the REGULAR face. On web that
   face has the glyphs so it merely looked hollow; in the MAUI WebView FA7 Free's regular face
   (362 codepoints) has no magnifying-glass and no arrow-right, so it rendered missing-glyph
   boxes. Weight 900 reaches the solid face, which contains both. */
#web-mobile-header .topbar-textfield-icon,
#native-sticky-header .topbar-textfield-icon {
  font-weight: 900;
}

/* The location pill sits one 16px step below the search field. On Home the location bar — not the
   header — is the LAST blue row, so this is the spacing actually seen under the header there. It
   was an inline `padding-bottom: 10px` on the markup: off the 8px scale, and inline, so no
   stylesheet could reach it. No top padding on purpose — the header already contributes its own
   16px, and adding it here too would double the step to 32px. */
.fc-home-locationbar {
  padding-bottom: var(--space-2);
}

/* Search-results item name and price. Size/weight/line-height come from the responsive blocks
   below; family and colour are breakpoint-independent, so they live here. Both were pinned inline
   to a bare `Be Vietnam Pro` with no fallback list, which renders as the browser default serif. */
.cls_item_name_search,
.cls_item_price_search {
  font-family: var(--font-body);
  color: #312D33;
}

.topbar-smallscreen-space {
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
  padding: 0 var(--space-2);
}

.topbar_search_div {
  width: 100%;
  /* The HEADER owns the 16px below the search row and pages add nothing above the fold. Was
     var(--space-2) on all four sides, which doubled against the header container's own top
     padding. */
  padding: 0 var(--space-2) var(--space-2);
  background: var(--color-topbar-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Opt-out for pages that host this row outside the sticky header (Information Center). */
.topbar_search_div--nosticky {
  position: static !important;
  top: auto !important;
}

/* Information Center button beside the search field at 768–1024px and on tablets (Kelly, 2026-10-06:
   "keep the Information Center button until mobile sized screens"). Same geometry as the desktop
   header's button (Topbar.razor .info-icon-container: 56px square, --radius-lg, 1.5px border, solid
   white, 20px glyph) — restated here because NativeHeader renders no Topbar and so never sees that
   <style> block. The web search row reuses the desktop's .topbar-search-wrapper (Topbar.razor), so
   the button sits 8px right of the field exactly as it does there. Phones (≤767px) reach the
   Information Center through the ☰ menu's "Information Center & Policies" row, so the button is
   hidden there. */
#web-mobile-header .info-icon-container,
#native-sticky-header .info-icon-container {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  width: 56px;
  padding: 0;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-text-primary);
  background: var(--color-surface-default);
  color: var(--color-text-primary);
  font-size: 20px;
  cursor: pointer;
}
@media (max-width: 767px) {
  #web-mobile-header .info-icon-container,
  #native-sticky-header .info-icon-container {
    display: none;
  }
}
/* Notifications bell beside the ☰ (Topbar logo row, NativeHeader; Kelly, 2026-10-06): tablets only, so
   it is hidden on phones the same way. Styles: Components/Notifications.css. */
@media (max-width: 767px) {
  #web-mobile-header .fc-bell-btn,
  #native-sticky-header .fc-bell-btn {
    display: none;
  }
}

/* ── Physical-mobile directional header (native only) ──────────────────────
   The search + hamburger + set-location row is fixed to the top and slides out
   of view while scrolling DOWN, back in while scrolling UP (driven by
   fcNativeHeader in ScrollPositionHelper.js). #native-sticky-header exists only
   in the Topbar native branch, so this never affects the web layout. JS sets
   #shop_content's padding-top to the measured header height so content clears it. */
#native-sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #004faa;
  /* Status-bar inset via the shared token: env(safe-area-inset-top) on iOS, the injected
     status-bar height on Android (Android WebView doesn't report it through env()). This is
     the SINGLE place the app pads for the status bar — page content clears it because
     fcNativeHeader pads #main-scroll-container by this header's measured height. */
  padding-top: var(--fc-safe-top);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

html.fc-native-header-hidden #native-sticky-header {
  transform: translateY(-100%);
}

/* Sticky offset for page back-bars: sits just below the fixed header, and flips to 0
   when the header hides on scroll (so the back bar stays pinned to the very top while
   the menu reveals above it on scroll-up). --native-header-h is set by fcNativeHeader
   (JS) only on native, so on web this resolves to 0 → back bars keep top:0 unchanged. */
html {
  --native-header-offset: var(--native-header-h, 0px);
}
html.fc-native-header-hidden {
  --native-header-offset: 0px;
}

/* Saved sub-pages (Favourite Locations / Wish List) back bar: sticks just below the global
   header at rest (top:0 = the scroll container's padded edge), and rides up to the very top
   via a TRANSFORM when the header collapses on scroll — same property/curve as the header, so
   they stay locked (no seam). On web the class never applies → back bar stays at top:0. */
html.fc-native-header-hidden .fixed-header {
  transform: translateY(calc(-1 * var(--native-header-h, 0px)));
}

/* The resting pin. Was an inline `top: 0` on both call sites, which no stylesheet rule could
   override (inline beats every non-!important declaration) — moved here so the desktop block
   below can track the header. On native / web ≤1024px top:0 IS the right offset: the scroll
   container is padded by --native-header-h, so 0 lands just under the header. */
.fixed-header {
  top: 0;
}

/* ≥1025px: the desktop topbar (#topbar_large_screen, position:sticky, z 1300) OVERLAYS this bar
   and hides/reveals on its OWN controller (html.fc-header-hidden — a different class from the
   ≤1024px one above). The desktop scroller has NO padding, so with top:0 the bar pinned at y=0,
   i.e. inside the 0–100 band the topbar re-occupies on scroll-up: "Back" was visible at rest
   (in flow, below the header) and again while the header was hidden, but vanished the moment the
   menu came back down. Measured 2026-09-09 at 1440px: bar 0..40 vs topbar 0..100.
   Track the VISIBLE header height instead, on the header's own curve, so the two move as one —
   the same mechanism .fc-item-bar (Item Details) and .fc-campaign-bar already use.
   --fc-appbar-h ONLY: these pages have no Set-Location bar, and :root's --fc-header-h adds
   --fc-location-h, which can still hold Home's stale value. Below 1025px --fc-header-h is never
   declared, so `top` stays 0 above and mobile behaviour is untouched. */
@media (min-width: 1025px) {
  .fixed-header {
    --fc-header-h: var(--fc-appbar-h, 100px);
    top: var(--fc-header-h);
  }
  html.fc-header-hidden .fixed-header {
    --fc-header-h: 0px;
  }
}

/* ...but a TABLET in landscape is also >1024px, and it has no desktop topbar to clear. --fc-appbar-h
   is published by the desktop controller, which never runs on a device, so the rule above resolved
   to the literal 100px: the bar pinned 100px BELOW the scroll container's padded edge and floated
   over the first rows of Favourite Locations / Wish List. Portrait was unaffected because the media
   query does not apply there. Keep the resting pin at 0 on a native shell at every width - the same
   value portrait uses - and let the fc-native-header-hidden transform above ride it up as before. */
html.fc-native-shell .fixed-header {
  top: 0;
}

/* ── Homepage location bar: part of the directional header group (physical mobile + web ≤1024) ──
   NOT sticky/pinned. It's a FIXED bar sitting directly below the search+menu header (top =
   --native-header-h) that slides UP together with the header when scrolling down, and back in on
   scroll-up — so the location shows/hides "along with search bar and menu" instead of staying stuck.
   The JS adds this bar's height to #main-scroll-container's padding so content clears both. Desktop
   (≥1025) is excluded (no directional header there) → the bar stays in normal flow. */
@media (max-width: 1024px) {
  .fc-home-locationbar {
    position: fixed;
    top: var(--native-header-h, 0px);
    left: 0;
    right: 0;
    z-index: 999;                 /* just below the header (1000/1001), above page content */
    /* Paint 1px of blue upward from this bar's top edge. The fixed header (top:0) and this
       fixed bar (top:--native-header-h) are positioned independently; at fractional device-pixel
       ratios their edges can round to leave a 1px row where neither paints, exposing the white
       scroller backdrop as a hairline "white line" under the header (Android, high-DPR). This
       shadow bleeds the bar's own blue up over that seam. No layout impact (not in offsetHeight),
       so it never shifts content or the JS-measured header/location heights. */
    box-shadow: 0 -1px 0 0 #004faa;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
  }
  /* Hide upward with the header: up by the header height (top → 0) AND its own height (fully off). */
  html.fc-native-header-hidden .fc-home-locationbar {
    transform: translateY(calc(-1 * var(--native-header-h, 0px))) translateY(-100%);
  }
  /* The location bar is fixed (out of flow), so the home body must reserve its height — but ONLY
     here (this padding is scoped to the home wrapper, unlike #main-scroll-container which is shared
     by every page). --fc-location-h is published by fcNativeHeader (0 on pages without the bar). */
  .fc-home-scrollwrap {
    padding-top: var(--fc-location-h, 0px);
  }
}

/* ── Web desktop-mobile layout (≤1024px): directional header ────────────────
   Fix the wrapped search+hamburger header to the top and slide it out on scroll-down /
   back in on scroll-up (fcNativeHeader toggles fc-native-header-hidden), mirroring the
   physical-mobile behavior. #web-mobile-header is display:none at ≥1025px (.small-screen),
   so desktop is unaffected; content clears it via JS-measured padding on #main-scroll-container. */
@media (max-width: 1024px) {
  #web-mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: var(--color-topbar-bg);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
  }
  /* Travel the FULL header-group height (header + location) so the search/menu header and the
     Set-Location bar move as ONE rigid unit. With the old -100% the header moved 172px while the
     location moved 214px, so they eased apart mid-animation and the white page flashed through the
     seam ("white line on top of location"). Over-translating the header just parks it further off. */
  html.fc-native-header-hidden #web-mobile-header {
    transform: translateY(calc(-1 * (var(--native-header-h, 0px) + var(--fc-location-h, 0px))));
  }
}

.topbar-smallscreen-menu-icon .mud-icon-root {
  color: var(--color-surface-default);
  text-align: center;
  font-size: 36px;
  font-weight: 900;
  line-height: normal;
}

.topbar-snallscreen-tab-icon .mud-icon-root {
  color: var(--color-brand-dark);
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  line-height: normal;
}

.topbar-smallscreen-tab-text {
  color: var(--color-brand-dark);
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--text-xs-size);
  font-weight: var(--fw-normal);
  line-height: var(--text-xs-lh);
  letter-spacing: 0.2px;
}

/* ── Dropdown menu ──────────────────────────────────────────── */
.mud-menu-list {
  display: flex;
  width: 300px;
  padding: var(--space-2);
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  border-radius: var(--radius-lg);
  background: var(--color-surface-default);
  box-shadow: var(--elevation-md);
}

/* ── Bottom navigation bar — Reference (BottomNav) parity ─────────────────────
   Translucent white + backdrop blur, no top border/shadow. Unselected tab = muted grey;
   selected tab = brand-primary blue + BOLD label with NO filled pill. Consistent app-wide
   (this bar renders on every native page). */
.mud-tabs-tabbar-content {
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  /* 8px above, and below: --fc-tabbar-pad-bottom (tokens.css), which is
     `max(--space-3, --fc-bottom-inset)` everywhere EXCEPT Android, where it is 0 because the
     nav-bar clearance is reserved natively by trimming the WebView. Writing that expression
     literally here is what made this bar ~24px taller than the reference's on device: the
     reference hides its inset behind a full-height WebView's nav bar, main has nothing to hide it
     behind. See the token's own comment for the full derivation.
     (An earlier fix here corrected a separate 8px error — 16px top instead of 8px.) */
  padding: var(--space-1) var(--space-2) var(--fc-tabbar-pad-bottom);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(7.5px);
  backdrop-filter: blur(7.5px);
}

.nav-item {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  cursor: pointer;
  gap: 4px;
  color: var(--color-text-muted);   /* unselected tab: muted grey (reference) */
  font-family: var(--font-body);
  font-size: var(--text-xs-size);
  font-weight: var(--fw-normal);
  line-height: var(--text-xs-lh);
  letter-spacing: 0.2px;
  text-transform: none;
}

.nav-icon {
  color: var(--color-brand-dark);
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  line-height: normal;
}

.nav-text {
  color: var(--color-brand-dark);
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--text-xs-size);
  font-weight: var(--fw-normal);
  line-height: var(--text-xs-lh);
  letter-spacing: 0.2px;
}

.selected-nav-item {
  display: flex;
  width: 64px;
  height: 64px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  background: var(--color-brand-dark);
}

.selected-nav-icon {
  color: var(--color-surface-default);
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  line-height: normal;
}

.selected-nav-text {
  color: var(--color-surface-default);
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--text-xs-size);
  font-weight: var(--fw-normal);
  line-height: var(--text-xs-lh);
  letter-spacing: 0.2px;
}

/* Selected tab — reference: brand-primary blue + bold label, NO filled pill/background.
   No fixed height (Kelly, 2026-10-02: "Upon selecting a nav button on mobile, the alignment of the
   buttons change"). It had `height: 64px` while the other tabs size to their content (58px), all
   top-aligned, so the selected tab's centred icon and label sat 3px lower than the rest (measured on the
   iPhone 17 Pro: label 814 vs 811). It is now the same box as the others; the bar keeps its height
   through the min-height on #mobile_tabs .mud-tabs-tabbar-wrapper below. */
.mud-tab.mud-tab-active,
.mud-tab.mud-tab-active:hover {
  display: flex;
  width: 64px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  border-radius: 0;
  background: none;
  color: var(--color-brand-primary);
}

/* Label is regular when inactive, bold only on the active tab (reference parity). */
.mud-tab.mud-tab-active .mud-tab-icon-text {
  font-weight: var(--fw-bold);
}

.mud-tab-slider-horizontal { display: none; }
.mud-tabs-scroll-button    { display: none; }

.mud-tab .mud-tab-icon-text {
  margin-right: 0;
  margin-inline-end: 0;
  margin-inline-start: 0;
}

.mud-tabs-tabbar .mud-tabs-tabbar-inner {
  display: block !important;
  min-height: 48px;
}

/* The row of tabs keeps the 64px the selected tab used to give it, so the bar is exactly as tall as
   before, and the tabs stay at its top, where they already sat. */
#mobile_tabs .mud-tabs-tabbar-wrapper {
  min-height: 64px;
  align-items: flex-start;
}

/* ── Fixed tab bar ──────────────────────────────────────────── */
.fixed-bottom-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--color-surface-default);
}

.custom-tabs-p {
  position: fixed !important;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  /* Reference: no top border/shadow — the translucent bar + backdrop-blur provide the separation. */
  background-color: transparent;
  height: 0 !important;
}

.custom-tabs {
  height: 100vh;
  display: flex;
  flex-direction: column;
  --tab-min-width: 100px;
}

.custom-tabs .mud-tabs-tab {
  min-width: var(--tab-min-width) !important;
}

/* Lock scrolling on the fixed bottom tab bar. Dragging on the bar's empty space was being
   interpreted as a pan of #main-scroll-container behind it, so the page slid up under the fixed
   header. touch-action:none stops pan/scroll gestures that start anywhere on the bar (the value
   intersects down to every child, incl. the gaps around the tabs); taps still fire, since a tap
   isn't a pan gesture — so the Shop/Stores/Saved/Profile tabs stay fully clickable. */
.custom-tabs .mud-tabs-tabbar {
  touch-action: none;
}

/* While the on-screen keyboard is open (a text field is focused, toggled by fc-keyboard-open in
   ScrollPositionHelper.js), hide the fixed bottom tab bar. Otherwise the keyboard shrinks the
   viewport and the position:fixed bar floats up above the keyboard, mid-screen. */
html.fc-keyboard-open .custom-tabs-p,
html.fc-keyboard-open .fixed-bottom-tabs {
  display: none !important;
}

/* Ported unchanged from v3.0.2 (Kelly, 2026-09-23). Driven by fc-modal-open, which fcDialogA11y in
   ScrollPositionHelper.js sets while any dialog or drawer is open. The comments below quote v3.0.2's
   z-index scale (--fc-z-*); this fork does not define it, but neither rule depends on it. */
/* ── Keep modals and toasts above the bottom bar on device ──
   Kelly, 2026-08-19: modals and toasts must be the penultimate layer (only --fc-z-tooltip sits
   above them). By the numbers they already are — bar 1000, sheets/toasts --fc-z-modal 9990 — and a
   faithful reproduction in the browser confirms the sheet DOES win there (hit-tested a fixed bar at
   1000 outside .page against the sheet at 9990 inside it). On the iOS WebView the bar still painted
   over the sign-in sheet anyway, so on device the z-index ordering is simply not being honoured for
   this bar — a WebKit compositing behaviour, not a value we can out-number.
   MEASURED DEAD END, do not retry: dropping the bar's `backdrop-filter` (the obvious suspect, since
   it promotes the bar to its own compositing layer) removed the blur but did NOT change the paint
   order — verified on the simulator, bar still over the sheet. The blur was only ever the
   appearance, never the cause.
   So take the bar out of the equation entirely while a surface is open, reusing the pattern this
   file already uses for the on-screen keyboard 30 lines above. Safe because the bar is already
   inert-ed and aria-hidden by fcDialogA11y whenever a modal is up, so nothing interactive or
   announceable is lost — it was unusable chrome that happened to be visible.
   fc-modal-open is set by fcDialogA11y's scan() in ScrollPositionHelper.js while any dialog or
   drawer is open, and cleared when the last one closes. */
html.fc-modal-open .custom-tabs-p,
html.fc-modal-open .fixed-bottom-tabs {
  display: none !important;
}

/* ── Same problem at the TOP of the screen: the native header out-paints the scrim ──
   Kelly, 2026-08-19: "why is the TopHeaderNav brought forward in the z-index with the modal?"
   It is not brought forward — it never moved. MEASURED on device with the store sheet open:
       scrim  position:fixed  z-index:9980  top=0  height=874 (= full viewport)  offsetParent=NULL
       header position:fixed  z-index:1000  top=0  height=152
       ancestors of the scrim with a containing-block trigger: NONE
   So the scrim covers the header geometrically AND outranks it by ~9000, and the header still
   paints over it. Identical to the bottom tab bar earlier the same day: two position:fixed
   elements, and the iOS WebView does not honour z-index between them. REFUTED on the way here, so
   do not re-investigate: the overlay is NOT position:absolute (mud-overlay-absolute=false), and
   there is NO transformed/filtered ancestor bounding it.
   Scoped to #native-sticky-header only: on the WEB host the scrim correctly covers and dims
   #web-mobile-header (measured top=0 h=812 vs a 156px header, coveredByScrim=true), so web needs
   nothing and is deliberately left alone.
   DO NOT "FIX" THIS BY HIDING THE HEADER — that was my first attempt and it was wrong twice over.
   `visibility: hidden` did stop it out-painting the scrim, but it left a bare grey rectangle where
   the search bar had been, which reads as broken rather than as "behind a modal". And `display: none`
   is worse still: fcNativeHeader._measure() reads `header.offsetHeight` and writes it into
   --native-header-h plus #main-scroll-container's padding-top, so display:none makes that 0 and the
   next scroll/resize collapses the padding and jumps the page content up.
   The header must DIM WITH the page, not vanish.
   Since we cannot reliably paint OVER it (that is the whole bug), the header dims ITSELF: a
   pseudo-element inside its own stacking context, filled with the scrim's exact colour. Sampled from
   the live scrim rather than guessed — `--mud-palette-overlay-dark` is rgba(33,33,33,0.498) — so the
   header and the page below it land on identical pixels.
   Not `filter: brightness()`: the scrim ADDS grey rather than multiplying, so no single brightness
   value can match it (#004FAA needs k=0.71 on green but k=0.60 on blue). The pseudo-element is exact
   by construction.
   z-index 1400 is local to this header (it is position:fixed + z-index:1000, so its own stacking
   context) and clears the one positioned child that could otherwise paint through — the search
   autocomplete dropdown at --fc-z-header-popover (1310), NativeHeader.razor:89. pointer-events:none
   so it never eats a tap; the header is inert under a modal anyway.
   REMOVED 2026-10-01 (Kelly: "Fix for all of them"). Every MudDialog's scrim already covered this
   header, so under Set Location, Sort By, Face ID and the other dialogs the header was dimmed TWICE
   (measured on the iPhone 18 Pro: header #15273C vs #0D325C on the location bar right below it). And
   app.css "Momento modal layout" now freezes #main-scroll-container while a modal is open, which lets
   every sheet's scrim paint over the header as well. So the real scrim dims the header, once, for
   every modal, and the self-dim pseudo-element that lived here is gone. */

@media (max-width: 420px) {
  .custom-tabs { --tab-min-width: 90px; }

  .mud-tabs-tabbar-content .mud-tabs-tabbar-wrapper {
    width: 100% !important;
    transform: none !important;
    justify-content: space-around;
  }
}

.mud-tabs-panels {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 70px;
}

.mud-tabs-toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  /* Reference parity: this wrapper must NOT paint an opaque fill/shadow behind the bar — otherwise it
     hides the translucent rgba(255,255,255,0.92) + blur that the visible .mud-tabs-tabbar-content
     provides. Keep it transparent so the bar's colour is IDENTICAL to the reference BottomNav. */
  background: transparent;
  height: 70px;
  box-shadow: none;
}

/* MudBlazor paints its own default fill on the tab-bar wrapper; clear it so nothing opaque sits
   behind the reference translucent+blur bar (.mud-tabs-tabbar-content is the single painted layer). */
.mud-tabs-tabbar {
  background-color: transparent !important;
  box-shadow: none !important;
}

/* ── Page layout ─────────────────────────────────────────────── */
.page-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.content-area {
  flex: 1;
  overflow-y: auto;
}

/* ── Search box fill + focus (v3.0.2 parity) ────────────────────────────────────
   Ported from the reference. Both mobile headers get a 75% translucent fill at rest
   (brand blue tints through) and brighten to opaque white with a 3px border on focus.
   Web-mobile (#web-mobile-header, Topbar isBrowser branch) and native
   (#native-sticky-header, NativeHeader.razor) are scoped separately so neither the
   desktop bar nor each other is affected. */
#web-mobile-header .topbar-textfiled-container {
  height: 56px;
  padding: 0 var(--space-2);
  gap: var(--space-1);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(18, 18, 18, 1);
  box-sizing: border-box;
  transition: border-color 0.15s ease, border-width 0.15s ease, padding 0.15s ease;
}

#web-mobile-header .topbar-textfiled-container.inputtext_color {
  background: rgba(255, 255, 255, 0.75);
}

/* NATIVE header — same 75%/100% treatment. The field is a bare MudPaper with only
   .topbar-textfiled-container, so it matched none of the web-scoped fill/focus rules and
   rendered solid white with no focus border; these two rules give it parity. */
#native-sticky-header .topbar-textfiled-container {
  background: rgba(255, 255, 255, 0.75);
  transition: border-color 0.15s ease, border-width 0.15s ease, padding 0.15s ease,
              background-color 0.15s ease;
}

#native-sticky-header .topbar-textfiled-container:focus-within {
  border: 3px solid var(--color-text-primary);
  /* 14px on all sides so the 2px border growth is paid back and the field doesn't grow on focus. */
  padding: 14px;
  background: rgba(255, 255, 255, 1);
}

/* Focus/typing on web-mobile — 3px border, padding 16px→14px to keep text from shifting,
   and brighten to 100% (the resting rule was repeating the 0.75 fill, so it never brightened). */
#web-mobile-header .topbar-textfiled-container.inputtext_color:focus-within {
  border: 3px solid var(--color-text-primary);
  padding: 0 14px;
  background: rgba(255, 255, 255, 1);
}

/* X beside the header-search submit arrow — appears once a search is applied; clears it
   (ported from the reference / v3.0.1 Nav.css .fc-nav-search-clear). Used by BOTH headers: the web
   Topbar and — since 2026-09-07 — NativeHeader, which was missing the control entirely on device. */
.fc-nav-search-clear {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 0;
    margin-right: var(--space-1);
    font-size: 20px;
}

/* ── Active filter chips bar: pin to the top of the scroll area on scroll (v3.0.2 parity) ──────
   Previously this bar scrolled away with the content. It now sticks at the top of #main-scroll-container.
   Web-desktop & web-mobile: the topbar scrolls off above it, so top:0 pins it at the very top.
   Native (iOS/Android): pay the status-bar inset once the native header has slid away, so the pinned
   chips clear the notch / Dynamic Island (--fc-safe-top is 0 on web, so web geometry is unchanged). */
.fc-active-chips-bar {
    position: sticky;
    /* ≥1025px this rides just below the directional desktop header (--fc-header-h = its visible
       height, 0 once it slides away); undefined off the home page → 0. */
    top: var(--fc-header-h, 0px);
    z-index: 20;
    /* OPAQUE page-matching background (not transparent): on the white page it still reads as a clean
       blended band at rest, but being opaque it also COVERS the heading / Sort&Filter row that scrolls
       up behind it (the transparent version let them show through on mobile — the reported mess). Once
       pinned, .fc-chips-stuck adds the shadow + border on top of this same background. */
    background: var(--color-surface-default);
    /* Full-bleed: the bar lives inside the padded #suggested-items-container, but when it pins it must
       span the FULL viewport width (edge-to-edge), like the client. Negative side margins widen it to
       the viewport; the matching side padding puts the chips back in line with the page content. */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
    padding-top: var(--space-1);
    padding-bottom: var(--space-1);
    /* Was inline on #fc-chips-bar (ItemListingPage.razor). It lives here so the pinned state can
       shrink it by --fc-safe-top to offset the status-bar padding it takes on — an inline style
       would have outranked that. */
    /* No margin-bottom. v3.0.2's `.fc-home-chips-bar` has none; the gap under the chips is owned
       by the row below it (`.fc-home-content { padding-top: var(--space-2) }`, mirrored on this
       fork by the sidebar+grid row's padding-top in ItemListingPage.razor). That also keeps the
       spacing correct once the bar pins, because a margin in the bar's flow slot scrolls away
       with the slot whereas the row's own padding does not. Was 12px, a non-token value that
       stacked to 28px against the restored row padding. */
    box-sizing: border-box;
    transition: top 0.42s cubic-bezier(0.4, 0, 0.2, 1), padding-top 0.42s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease, box-shadow 0.3s ease;
}
/* ≤1024px (web-mobile + native): #main-scroll-container is padded by the directional header's measured
   height, so a sticky `top` here is measured from that PADDED edge — verified with a temporary sticky
   probe: `top: 0` pins at viewport y=156 (just under the fixed header), not at y=0. The block below
   therefore expresses both pin positions relative to that edge. */
@media (max-width: 1024px) {
    /* PLAIN STICKY — the bar is free until it reaches the top, then it pins there. Nothing here
       displaces it while it is free, and nothing animates.
       NO TRANSFORM. A transform moves a box whether or not it is currently pinned, so keyed on
       `html.fc-native-header-hidden` (which flips on any sustained scroll-down, long before this
       bar reaches the top) it hauled the still-in-flow bar upwards — out of its slot and above the
       "Suggested Items" heading. That is the one failure mode this element keeps coming back with,
       and gating the transform on "actually pinned" is not dependable either: the only signal for
       that is the #fc-chips-sentinel observer, whose threshold is the scroller's PADDING box and so
       sits ~200px of scroll away from the real pin line.
       `top` instead: on a sticky box `top` has NO effect until the box would actually pin, so it
       is structurally incapable of pulling a free bar out of the grid. And it is NOT transitioned —
       animating `top` on a sticky box cannot run on the compositor (every frame forces layout, and
       this bar is full-bleed via negative side margins), which is what previously read as lag. An
       instant reposition costs one layout, and it only ever happens while the bar is pinned, where
       the header sliding over it hides the change.
       Pin line: --fc-location-h below the scroller's content edge at rest (the bar rests under the
       location bar); once the header group has slid away, one header-height ABOVE that edge, which
       puts it at the real top of the screen. --fc-safe-top keeps the chips clear of the status-bar
       clock there without changing the bar's height — a padding-top for that grew the bar by the
       inset whenever the header was hidden, including while free, which opened a widening gap under
       the heading. 0 on web, so web geometry is unchanged. */
    /* THE PIN POINT MUST BE THE VISIBLE TOP, AND THE VISIBLE TOP MOVES.
       Sticky offsets here are measured from the scroller's content edge (= --native-header-h below
       the viewport top, since fcNativeHeader pads the scroller by the header's height). The top of
       the *visible* area is therefore:
         • header shown  → --fc-location-h below that edge (the fixed header group ends there);
         • header hidden → --native-header-h ABOVE it, i.e. viewport y=0.
       So `top` has to swap between the two. It is NOT enough to leave `top` alone and relocate the
       bar with a transform once stuck: the pin point would stay at the header-shown value (208px at
       412px), so with the header hidden the bar was declared stuck — and teleported to the top —
       while its real position was still 208px down the page. That is the reported "it gets into
       sticky position without scrolling past the filter row". A transform can move the bar; it
       cannot move the threshold at which the bar pins.
       `top` is also inert until the bar would actually pin, so swapping it cannot displace a free
       bar (the yank), and no .fc-chips-stuck gate is needed for position at all.
       Transitioned on the header's exact duration and curve (0.3s cubic-bezier(.25,.46,.45,.94) —
       the #web-mobile-header / #native-sticky-header rules in this file) so the bar travels in
       lockstep with the search + location group rather than arriving after it. */
    .fc-active-chips-bar {
        top: var(--fc-location-h, 0px);
        /* The hairline's 1px is RESERVED here as transparent, and .fc-chips-stuck only sets its
           colour. Adding `border-bottom: 1px` on pin instead made the bar 1px taller at that exact
           moment — nudging every row below it — and snapped the line on with no fade, which is the
           one genuinely instant thing that happened as the bar became fixed. */
        border-bottom: 1px solid transparent;
        transition: top 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    background-color 0.3s ease, box-shadow 0.3s ease,
                    border-bottom-color 0.3s ease;
    }

    /* NO per-host override of the rest offset — --fc-location-h is correct on BOTH hosts.
       There was briefly a `.page.has-bottomnav { top: 0 }` override here, on the
       theory that #native-sticky-header contains the set-location row and so --native-header-h
       already accounted for it. That was a MISREADING of the screenshot it came from: the white
       band above the chips in that report was ~49px of padding INSIDE the bar (the --fc-safe-top
       inset firing while the header was still shown — see the gated rule further down), not a
       positioning gap. The bar was already pinning flush under the header.
       Overriding the offset to 0 therefore moved the pin 52px too high, behind the location bar:
       first the chips came out clipped against the header's bottom edge, then — once the padding
       was correctly gated — the bar disappeared behind the location bar entirely. Reverted.
       If a report ever does look like a positioning gap here, measure whether the space is OUTSIDE
       the bar (offset) or INSIDE it (padding) before changing this. */

    /* Header gone → pin at the real top of the screen. The offset is measured from the scroller's
       content edge, which sits exactly --native-header-h below the viewport top. */
    html.fc-native-header-hidden .fc-active-chips-bar {
        /* NO --fc-safe-top TERM. This offset must be the header's own travel and nothing else, on
           every platform, or the bar and the header move at different speeds and visibly separate.
           The header hides by its full height; a bar that stops --fc-safe-top short covers that
           much less ground in the same 300ms. That is 0 on web — which is exactly why
           desktop-mobile always looked correct and the devices did not.
           The status-bar strip is covered by a page-level scrim instead (app.css), which is
           completely outside this bar's motion and therefore cannot desynchronise it. */
        /* Pin BELOW the safe area. The chips then clear the status-bar clock WITHOUT the bar's box
           ever changing size — which is what matters for the flicker (see the pinned rule). The
           safe strip itself is painted by .page::before (app.css). 0 on web → lands at 0 as before. */
        top: calc(var(--fc-safe-top, 0px) - var(--native-header-h, 0px));
    }
}

/* The chips row scrolls horizontally when the chips overflow the content width (flex-wrap:nowrap +
   overflow-x:auto on the bar); hide the scrollbar on WebKit (scrollbar-width:none covers Firefox). */
.fc-active-chips-bar::-webkit-scrollbar { display: none; }

/* 1px sentinel above the chips bar; its flow position is what fcNativeHeader._syncChips compares
   against the bar's pin line to drive .fc-chips-stuck. */
.fc-home-chips-sentinel { height: 1px; margin-bottom: -1px; pointer-events: none; }

/* Once pinned, the bar takes the card background (reference .fc-home-chips-bar.fc-chips-stuck) and
   KEEPS THE 12px GAP it has below itself at rest.
   That gap is the bar's own margin-bottom, which lives in its flow slot — and by the time the bar
   is pinned the slot has scrolled off the top, so the bar's bottom edge sat flush against the grid
   sliding underneath and the cards read as sliced right at the edge (reported on web desktop).
   Painted with box-shadows, NOT padding/margin and NOT a pseudo-element:
     • growing a sticky element's box while it is pinned changes its slot height, which pushes
       everything after it down — the whole grid would jump 12px at the moment it pins;
     • an absolutely-positioned ::after would be clipped away, because this bar carries
       overflow-x: auto for horizontal chip scrolling (see the scrollbar rule above).
   Box-shadows paint outside the border box, are not subject to the element's own overflow, and cost
   no layout. First shadow = the 12px white band, second = the hairline at the bottom of that band
   (listed after, so the band paints over everything but the last 1px), third = the elevation. */
.fc-active-chips-bar.fc-chips-stuck {
    background-color: var(--color-surface-default);
    /* Separation below the bar is the reference's: a hairline plus a soft shadow, nothing more.
       An earlier attempt here also painted a 12px white band below the bar (as a box-shadow) to
       reproduce the gap the bar has at rest — that read as too much space against the grid, and the
       reference keeps it tight (see its desktop chips bar), so it is gone. */
    box-shadow: var(--elevation-sm);
    /* Colour only — the 1px is already reserved on the base rule, so pinning fades the hairline in
       instead of snapping it on, and does not change the bar's height. */
    border-bottom-color: var(--color-border);
}

/* PINNED STATE MUST CHANGE PAINT ONLY — NEVER LAYOUT. This is the flicker fix.
   This rule used to set `padding-top: calc(var(--space-1) + var(--fc-safe-top))` with a
   compensating negative `margin-bottom` to push the chips below the safe area. Those are the only
   LAYOUT properties in the pin path, and .fc-chips-stuck is toggled from the scroll handler — so
   pinning reflowed the scroller mid-scroll, which perturbs scrollTop, which apply() then reads as a
   spurious upward delta, which reveals the header. That is the intermittent "whole header comes
   down and then it is ok" flicker: a feedback loop between the pin styling and the direction
   detector, firing only when the perturbation happens to cross _DELTA (hence ~3 in 5).
   The chips now clear the safe area via the `top` offset instead (above), so the box is a constant
   54px in every state and pinning touches nothing the layout depends on.
   The band below covers the seam that pinning lower than the header opens: the bar stops
   --fc-safe-top short of where the header group goes, so mid-slide the location bar's bottom can
   sit that far above this bar's top. It extends the bar's own white backing upward by that much.
   The `var(--space-1)` SPREAD is load-bearing: a bare offset shadow is the border box translated up
   by the inset, so once the inset exceeds the box height the copy stops short and leaves an
   uncovered strip — that was the iOS gap (59pt vs a 53px box; Android's 40 happened to fit). Spread
   inflates every side, keeping it contiguous with the bar at any inset. All 0 on web. */
html.fc-native-header-hidden .fc-active-chips-bar.fc-chips-stuck {
    box-shadow: 0 calc(-1 * var(--fc-safe-top, 0px)) 0 var(--space-1) var(--color-surface-default),
                var(--elevation-sm);
}

/* ══ WEB / DESKTOP ONLY (≥1025px): the reference's filtered-row treatment, verbatim ══════════════
   Everything above stays exactly as it is, so web-mobile and native (≤1024px) are untouched.

   The reference (.fc-home-chips-bar, its Home.css) is only ever two states:
       at rest : background == THE PAGE BACKGROUND, `box-shadow: none`, no border  → invisible inline
       pinned  : background-color: var(--color-surface-default)
                 box-shadow: var(--elevation-sm)
                 border-bottom: 1px solid var(--color-border)

   Measured from the running reference at 1512px: at rest its bar computes
   background rgb(247,247,247) — byte-identical to its body/#suggested-items-container — with
   box-shadow none and border 0, i.e. nothing renders at rest at all. Pinned, the hairline applies.

   ONE DELIBERATE TRANSLATION, NOT A COPY: the reference writes that rest background as
   `var(--color-surface-subtle)` (#F7F7F7) because ITS page is #F7F7F7 — its own comment says
   "== page bg → invisible while inline". MAIN'S PAGE IS WHITE (measured: body rgb(255,255,255)),
   so copying the token literally would paint a grey #F7F7F7 band on a white page — a *more* visible
   band, the exact opposite of the intent. Main therefore keeps --color-surface-default at rest,
   which is what "same as the page" means here. Do not "fix" this to match the reference's literal
   token unless main's page background changes too.

   Why this block is needed at all: the 1px hairline reservation lives in the ≤1024px block, so at
   ≥1025px `.fc-chips-stuck`'s `border-bottom-color` had no width to paint — the pinned desktop bar
   showed only the soft elevation. And that elevation was itself erased whenever the header was
   hidden, because the status-bar band above resolves to `0 0 0 8px white` on web (--fc-safe-top is
   0) and, being the FIRST shadow, painted over it. Together that is the reported "the line shows
   when I scroll one way and not the other" on web. Both are corrected here, for web only. */
@media (min-width: 1025px) {
    .fc-active-chips-bar {
        /* Reserved transparent so pinning only changes its COLOUR: the bar's height is identical in
           both states. The reference adds the 1px on pin instead, which nudges the grid down by 1px
           at that moment — main avoids that while rendering identically. */
        border-bottom: 1px solid transparent;
        transition: top 0.42s cubic-bezier(0.4, 0, 0.2, 1),
                    padding-top 0.42s cubic-bezier(0.4, 0, 0.2, 1),
                    background-color 0.3s ease, box-shadow 0.3s ease,
                    border-bottom-color 0.3s ease;
    }
    /* Pinned. Listed for BOTH header states with the same declarations, so the status-bar band can
       never come back and cover the separator on web (it has nothing to cover there anyway). */
    .fc-active-chips-bar.fc-chips-stuck,
    html.fc-native-header-hidden .fc-active-chips-bar.fc-chips-stuck {
        background-color: var(--color-surface-default);
        box-shadow: var(--elevation-sm);
        border-bottom-color: var(--color-border);
    }
}

/* ── Desktop filter sidebar sticky offset (≥1025px) ──────────────────────────
   The sidebar is position:sticky (inline top:16px). It must pin BELOW the directional header, and
   when the chips bar is present it must clear that too (~53px) — otherwise the Filters card slides
   up under the pinned chips row (reported: "filters going under the sticked filter part"). Mirrors
   the reference .fc-home-sidebar top offsets. !important beats the element's inline top. */
@media (min-width: 1025px) {
    .filter-sidebar-desktop {
        top: calc(var(--fc-header-h, 0px) + 16px) !important;
        /* --fc-header-h flips between its full value and 0 the instant the header hides/reveals; without
           this the sidebar's sticky `top` jumped down instantly while the header eased in. Same curve/
           duration as the header + chips so all three glide together. */
        transition: top 0.42s cubic-bezier(0.4, 0, 0.2, 1);
    }
    #suggested-items-container:has(#fc-chips-bar) .filter-sidebar-desktop {
        top: calc(var(--fc-header-h, 0px) + 53px + 16px) !important;
    }
}

/* ── Directional desktop header (≥1025px) ── ported from the reference (FcShopping.js behaviour,
   now in ScrollPositionHelper.js). The blue nav row is sticky inside #main-scroll-container; a
   sustained scroll-down slides it away and scroll-up brings it back, so the search + location/tab row
   reveals on scroll like the ≤1024px header. The controller toggles fc-header-hidden on <html> and
   measures the bar into --fc-appbar-h. --fc-header-h tracks the VISIBLE header offset, so the sticky
   chips bar (top:var(--fc-header-h)) and the filter sidebar glide with it. ≤1024px already has
   directional behaviour via fcNativeHeader, so this is desktop-only. */
@media (min-width: 1025px) {
    /* --fc-header-h is the TOTAL height of the visible header group that sticky elements (chips bar,
       filter sidebar) must clear: the nav row (--fc-appbar-h) PLUS the fixed Set-Location bar
       (--fc-location-h) that now sits directly below it. Without the location term, those elements
       pinned at 100 and slid under the 100–142 location bar ("filters going inside the menu"). */
    :root { --fc-header-h: calc(var(--fc-appbar-h, 88px) + var(--fc-location-h, 0px)); }
    html.fc-header-hidden { --fc-header-h: 0px; }
    #topbar_large_screen {
        position: sticky;
        top: 0;
        z-index: var(--fc-z-header, 1300);
        transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;   /* promote to a compositor layer so the hide/reveal doesn't stutter */
    }
    /* Travel the FULL header-group height (nav + location) so the nav row and the Set-Location bar move
       as one rigid unit — with the old -105% the nav (moved 105px) and the location (moved 142px) eased
       apart mid-animation. Over-translating the nav just parks it further off-screen (harmless). */
    html.fc-header-hidden #topbar_large_screen {
        transform: translateY(calc(-1 * (var(--fc-appbar-h, 100px) + var(--fc-location-h, 0px))));
    }

    /* ── Set-Location row travels with the desktop header (client parity) ──────────────────────────
       It used to sit in normal flow and scroll away, so scrolling up brought back the blue nav bar
       ALONE (the reported bug: location not visible on scroll-up). Make it FIXED just below the header
       and ride it up/down with the header via a companion transform on the same curve, so the two move
       as one group — exactly like the ≤1024px block and the reference. The wrapper reserves its height
       (--fc-location-h, measured by the desktop controller) since the bar is now out of flow. */
    .fc-home-locationbar {
        position: fixed;
        top: var(--fc-appbar-h, 100px);
        left: 0;
        right: 0;
        z-index: 999;                 /* under the header (--fc-z-header), above page content */
        transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: transform;
    }
    .fc-home-scrollwrap {
        padding-top: var(--fc-location-h, 0px);
    }
    /* Travel the same full distance as the nav header so the two stay locked together (no seam). */
    html.fc-header-hidden .fc-home-locationbar {
        transform: translateY(calc(-1 * (var(--fc-appbar-h, 100px) + var(--fc-location-h, 0px))));
    }
}

/* Paint the reserved Set-Location slot brand-blue at EVERY width (desktop + web-mobile + native). The
   location bar is fixed and eases into this reserved slot over the header animation; until it arrives
   the reserved padding showed the white page behind it (the reported "white line / white space that
   becomes normal after a moment"). This ::before fills exactly that slot with the same blue as the
   location bar + campaign, so the gap is invisible during the glide. Height is --fc-location-h (0 →
   invisible on pages with no location bar), sits behind the fixed location bar (z 999). */
.fc-home-scrollwrap { position: relative; }
.fc-home-scrollwrap::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--fc-location-h, 0px);
    background: var(--color-brand-primary);
    z-index: 0;
    pointer-events: none;
}

/* ── KEPT FROM MAIN ──────────────────────────────────────────────
   Rules 3.2 does not have. Appended after its stylesheet so they still win on equal
   specificity, exactly as they did before the import. */
/* ── Same problem at the TOP of the screen: the native header out-paints the scrim ──
   Kelly, 2026-08-19: "why is the TopHeaderNav brought forward in the z-index with the modal?"
   It is not brought forward — it never moved. MEASURED on device with the store sheet open:
       scrim  position:fixed  z-index:9980  top=0  height=874 (= full viewport)  offsetParent=NULL
       header position:fixed  z-index:1000  top=0  height=152
       ancestors of the scrim with a containing-block trigger: NONE
   So the scrim covers the header geometrically AND outranks it by ~9000, and the header still
   paints over it. Identical to the bottom tab bar earlier the same day: two position:fixed
   elements, and the iOS WebView does not honour z-index between them. REFUTED on the way here, so
   do not re-investigate: the overlay is NOT position:absolute (mud-overlay-absolute=false), and
   there is NO transformed/filtered ancestor bounding it.
   Scoped to #native-sticky-header only: on the WEB host the scrim correctly covers and dims
   #web-mobile-header (measured top=0 h=812 vs a 156px header, coveredByScrim=true), so web needs
   nothing and is deliberately left alone.
   DO NOT "FIX" THIS BY HIDING THE HEADER — that was my first attempt and it was wrong twice over.
   `visibility: hidden` did stop it out-painting the scrim, but it left a bare grey rectangle where
   the search bar had been, which reads as broken rather than as "behind a modal". And `display: none`
   is worse still: fcNativeHeader._measure() reads `header.offsetHeight` and writes it into
   --native-header-h plus #main-scroll-container's padding-top, so display:none makes that 0 and the
   next scroll/resize collapses the padding and jumps the page content up.
   The header must DIM WITH the page, not vanish.
   Since we cannot reliably paint OVER it (that is the whole bug), the header dims ITSELF: a
   pseudo-element inside its own stacking context, filled with the scrim's exact colour. Sampled from
   the live scrim rather than guessed — `--mud-palette-overlay-dark` is rgba(33,33,33,0.498) — so the
   header and the page below it land on identical pixels.
   Not `filter: brightness()`: the scrim ADDS grey rather than multiplying, so no single brightness
   value can match it (#004FAA needs k=0.71 on green but k=0.60 on blue). The pseudo-element is exact
   by construction.
   z-index 1400 is local to this header (it is position:fixed + z-index:1000, so its own stacking
   context) and clears the one positioned child that could otherwise paint through — the search
   autocomplete dropdown at --fc-z-header-popover (1310), NativeHeader.razor:89. pointer-events:none
   so it never eats a tap; the header is inert under a modal anyway. */
/* REMOVED (3.2 port): html.fc-modal-open #native-sticky-header::after painted a second, header-only
   scrim (inset:0, overlay-dark, z-index 1400) on top of the real dialog scrim. It was main's own way
   of dimming the native header, written before 3.2 solved the same problem properly: app.css now
   freezes #main-scroll-container while a modal is open (html.fc-modal-open .page.has-bottomnav), so
   the sheet's own scrim paints over the header like any fixed element. With both in place the header
   strip got dimmed twice and read as a band ending at the location bar, while the rest of the page
   had a single even scrim. 3.2 has no such rule. */

/* ── Native shell at ANY width (iPad landscape is 1180px) ─────────────────────────────────────
   The directional-header rules above are scoped to max-width:1024px. An iPad in landscape is wider
   than that, so the location bar fell through to the DESKTOP rules - which position it at
   var(--fc-appbar-h, 100px) and hide it on html.fc-header-hidden. Neither exists on a device: the
   desktop controller never runs, so --fc-appbar-h was unset (bar pinned at the 100px fallback,
   underlapping the 122px header) and the hide class never matched (bar left floating over the grid
   when the header slid away). Keyed on the native header being present, not on viewport width.
   Higher specificity than the desktop block, so it wins wherever both apply. */
html.fc-native-shell .fc-home-locationbar {
    position: fixed;
    top: var(--native-header-h, 0px);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
/* Ride up with the header: its height, then the bar's own, exactly like the <=1024px rule. */
html.fc-native-shell.fc-native-header-hidden .fc-home-locationbar {
    transform: translateY(calc(-1 * var(--native-header-h, 0px))) translateY(-100%);
}
