/* ============================================================
   Oletrak navbar v3 — marketplace header
   ------------------------------------------------------------
   Loaded by index.html AFTER Navigationbar.css, tokens.css and
   components.css. The old bar keeps working on every other page;
   this file only ever styles `.nav3`, so the two never overlap.

   DESIGN NOTE — why this file uses px
   index.html sets `html { font-size: 62.5% }` (general.css), so the
   rem-based tokens in tokens.css resolve to a 10px base and
   `--text-sm` would render at 8.75px. Fixed product chrome must not
   inherit that, so every size here is in px and every COLOUR, radius
   and duration still comes from tokens.css. See design.md §10.

   Reference language (VoltAgent/awesome-design-md):
     - airbnb : one accent reserved for the primary action, pill
                search surface, hairline borders, one shadow tier,
                modest nav type weight.
     - mydealz: white surface on a cool canvas, hairline rule under
                the bar, dense category strip below it, utility
                cluster pushed to the trailing edge.
   ============================================================ */

/* ------------------------------------------------------------
   01  TOKENS — roles, not new colours
   Every value below maps to tokens.css, so light/dark follow the
   existing theme toggle with no duplicate palette to maintain.
   ------------------------------------------------------------ */
:root {
  --nv3-surface: var(--white);          /* #fff / dark #121a2b */
  --nv3-surface-sunken: var(--surface); /* #f6f7f8 / #0a101d */
  --nv3-text: var(--ink);               /* #16181d / #e8eef7 */
  --nv3-text-muted: var(--muted);       /* #6b7280 / #9fb0c6 */
  --nv3-line: var(--line);              /* #e4e6ea / #24314b */
  --nv3-accent: var(--accent);          /* #ff7f11 / #ffb463 */
  --nv3-accent-ink: var(--color-on-accent); /* #1a0d00 — 7.5:1 on orange */
  --nv3-accent-hover: var(--accent-hover);
  --nv3-focus: var(--color-ring);       /* #a8410a / gold */
  --nv3-scrim: var(--scrim-edge-strong);

  /* Shape + rhythm. 4px grid, matching design.md §5. */
  --nv3-radius: var(--radius-md);
  --nv3-radius-pill: var(--radius-pill);
  --nv3-gap-1: 4px;
  --nv3-gap-2: 8px;
  --nv3-gap-3: 12px;
  --nv3-gap-4: 16px;
  --nv3-gap-5: 24px;
  --nv3-gap-6: 32px;

  /* Type scale for chrome only (see DESIGN NOTE above). */
  --nv3-font-xs: 12px;
  --nv3-font-sm: 14px;
  --nv3-font-md: 15px;

  /* Layout */
  --nv3-max: 1280px;
  --nv3-gutter: 12px;
  --nv3-row1-h: 56px;
  --nv3-row2-h: 40px;
  --nv3-hit: var(--tap-min);            /* 44px minimum target */

  /* One elevation tier, as in the airbnb reference. */
  --nv3-shadow: 0 1px 2px rgba(1, 42, 70, 0.06), 0 10px 28px rgba(1, 42, 70, 0.08);

  /* The category row is optional: it duplicates the in-page mode switch
     while that switch is on screen, so it collapses to nothing until the
     visitor has scrolled past it. `--nav-extra-row` is the only thing that
     changes, and everything derived from it follows: --nav-h (so the page
     reserves exactly what the header occupies) and the suggestion-sheet
     offset. It points at the row token rather than copying its value, so
     the desktop height still comes from the media query below. */
  --nav-extra-row: var(--nv3-row2-h);

  /* The fixed header height, consumed by marketplace.css
     (.mk-hero padding, sticky search offset) and by scroll-padding.
     +1px accounts for the hairline under the bar, so page content is
     never tucked under the border. */
  --nav-h: calc(var(--nv3-row1-h) + var(--nav-extra-row) + 1px);
}

/* Dark theme. tokens.css already flips --white/--ink/--muted/--line/
   --accent/--color-ring, so only the shadow needs a dark value. */
:root[data-theme="dark"] {
  --nv3-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 28px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --nv3-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 28px rgba(0, 0, 0, 0.45);
  }
}

@media (min-width: 640px) {
  :root { --nv3-gutter: 16px; }
}

@media (min-width: 1024px) {
  :root {
    --nv3-gutter: 24px;
    --nv3-row1-h: 68px;
    --nv3-row2-h: 44px;
  }
}

/* ------------------------------------------------------------
   02  BAR SHELL
   Fixed: search row, plus the category row while it is relevant. The
   height is exposed as --nav-h so page content reserves exactly it.
   ------------------------------------------------------------ */
.nav3 {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 1200;
  background: var(--nv3-surface);
  color: var(--nv3-text);
  border-bottom: 1px solid var(--nv3-line);
  font-family: inherit;
  /* No transition on height: the bar never changes size on scroll, so
     sticky/composed states cannot nudge the page. */
}

.nav3.is-scrolled {
  box-shadow: var(--nv3-shadow);
}

.nav3__inner {
  display: flex;
  align-items: center;
  gap: var(--nv3-gap-3);
  width: 100%;
  max-width: var(--nv3-max);
  margin-inline: auto;
  /* iOS safe areas sit on top of the design gutter, never inside it. */
  padding-inline: calc(var(--nv3-gutter) + env(safe-area-inset-left, 0px))
    calc(var(--nv3-gutter) + env(safe-area-inset-right, 0px));
}

.nav3__bar .nav3__inner {
  height: var(--nv3-row1-h);
}

/* ------------------------------------------------------------
   03  BRAND
   ------------------------------------------------------------ */
.nav3__brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: var(--nv3-hit);
  border-radius: var(--nv3-radius);
  text-decoration: none;
}

/* The brand is the logo mark plus a real wordmark. The mark is a compressed
   transparent WebP, so the wordmark stays selectable text instead of being
   baked into the image. */
.nav3__brand {
  gap: 3px;
  /* Pull the lockup slightly out of the bar gutter so the mark leads the
     header instead of sitting level with the first control column. */
  margin-inline-start: -2px;
}

.nav3__brand-mark {
  display: block;
  width: auto;
  height: 34px;
  flex: 0 0 auto;
}

.nav3__brand-text {
  color: var(--nv3-text);
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .nav3__brand { gap: 5px; margin-inline-start: -6px; }
  .nav3__brand-mark { height: 40px; }
  .nav3__brand-text { font-size: 21px; }
}

@media (min-width: 1024px) {
  .nav3__brand { gap: 6px; margin-inline-start: -8px; }
  .nav3__brand-mark { height: 46px; }
  .nav3__brand-text { font-size: 23px; }
}

/* Wide desktops have spare centring room either side of the header. Use
   16px of it to lead the brand further left without pushing the mark into
   the viewport edge on narrower screens. */
@media (min-width: 1360px) {
  .nav3__brand { margin-inline-start: -24px; }
}

@media (max-width: 359px) {
  .nav3__brand { gap: 2px; }
  .nav3__brand-mark { height: 30px; }
  .nav3__brand-text { font-size: 16px; }
}

/* Visually hidden but announced: the header uses real <label>s for its
   icon-only controls, and they must not print into the layout. */
.nav3__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------
   04  SEARCH
   This is the marketplace search bar (assets/js/marketplace.js,
   assets/js/search-panel.js, utils/voice-search.js) that used to
   sit under the in-page mode switch. It moved into the header, so
   only its shell is restyled here — the box, input, voice button
   and suggestion panel stay owned by marketplace.css.
   ------------------------------------------------------------ */
.nav3__search {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--nv3-gap-2);
  flex: 1 1 auto;
  min-width: 0;
  /* Wider + genuinely centred: the search gets the middle of the bar on
     desktop instead of hugging the brand. */
  max-width: 880px;
  flex: 1 1 560px;
  margin-inline: auto;
}

/* marketplace.css gives .mk-search page padding; the header supplies
   its own box, so strip the page-level box model here. */
.nav3__search.mk-search {
  padding: 0;
  scroll-margin-top: 0;
}

.nav3__search .mk-search-box {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  height: 40px;
  gap: var(--nv3-gap-2);
  padding: 0 var(--nv3-gap-3);
  border: 1px solid var(--nv3-line);
  border-radius: var(--nv3-radius-pill);
  background: var(--nv3-surface-sunken);
  color: var(--nv3-text-muted);
  box-shadow: none;
  transition: border-color var(--dur-fast) var(--ease-standard),
    background-color var(--dur-fast) var(--ease-standard);
}

@media (min-width: 640px) {
  .nav3__search .mk-search-box { height: 44px; }
}

/* Focus lives on the pill, not the input, so the whole control reads
   as one field. */
.nav3__search .mk-search-box:focus-within {
  border-color: var(--nv3-accent);
  background: var(--nv3-surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--nv3-accent) 22%, transparent);
}

.nav3__search .mk-search-box > svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.nav3__search .mk-search-box input {
  flex: 1 1 auto;
  /* Flex items default to min-width:auto, which let the placeholder's
     intrinsic width push the field outside the pill on 320px screens. */
  min-width: 0;
  width: 100%;
  height: 100%;
  /* Right padding keeps the spoken text clear of the voice button. */
  padding: 0 40px 0 0;
  border: 0;
  background: transparent;
  color: var(--nv3-text);
  font-size: var(--nv3-font-md);
}

.nav3__search .mk-search-box input::placeholder {
  color: var(--nv3-text-muted);
  opacity: 1;
}

.nav3__search .mk-search-box input:focus { outline: none; }

.nav3__search .mk-search-box .voice-search-btn {
  right: 6px;
  width: 32px;
  height: 32px;
  color: var(--nv3-text-muted);
}

.nav3__search .mk-search-box .voice-search-btn:hover {
  background: var(--nv3-surface);
  color: var(--nv3-text);
}

/* Search field on phones: ~190px, so smaller type keeps a sentence readable. */
@media (max-width: 639px) {
  /* Phones have ~190px of field: smaller type so a sentence fits. */
  .nav3__search .mk-search-box input {
    font-size: 13px;
  }

  .nav3__search .mk-search-box input::placeholder {
    font-size: 13px;
  }
}

/* The live-suggestion list and the advanced search sheet hang from the bar
   itself, not from the field, so they never start above the header. Desktop
   gets a wide, tall sheet centred under the bar; phones get a full-page
   sheet from the bar to the bottom edge (see the 640px block below). */
.nav3 .mk-search-suggest,
.nav3 .mk-search-panel {
  position: fixed;
  top: calc(var(--nav-h, 60px) + 8px);
  left: 0;
  right: 0;
  width: min(720px, calc(100vw - 40px));
  margin-inline: auto;
  z-index: 1250;
  transition: box-shadow var(--dur-fast) var(--ease-standard);
}

.nav3 .mk-search-panel.mk-search-panel--above {
  top: var(--nav-h, 60px);
  bottom: auto;
}

.nav3 .mk-search-panel .mk-panel-scroll {
  max-height: min(72vh, 640px);
}

@media (max-width: 640px) {
  /* Full-page sheet: no rounded floating card, no max-height — the panel owns
     everything under the bar until it is dismissed. */
  .nav3 .mk-search-panel {
    position: fixed;
    inset: var(--nav-h, 60px) 0 0 0;
    width: auto;
    max-height: none;
    border-width: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .nav3 .mk-search-panel .mk-panel-scroll {
    flex: 1 1 auto;
    max-height: none;
  }
}

/* "Save this search" — appears once a search is running. Compact pill
   in the header; the label drops below 1024 so the field keeps its
   width. */
.nav3__search .mk-save-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 38px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--nv3-line);
  border-radius: var(--nv3-radius-pill);
  background: var(--nv3-surface);
  color: var(--nv3-text);
  font-family: inherit;
  font-size: var(--nv3-font-sm);
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard);
}

.nav3__search .mk-save-search[hidden] { display: none; }

.nav3__search .mk-save-search:hover {
  border-color: var(--nv3-accent);
  color: var(--nv3-accent);
}

.nav3__search .mk-save-search svg { width: 16px; height: 16px; }

@media (max-width: 1023px) {
  .nav3__search .mk-save-search span { display: none; }
  .nav3__search .mk-save-search { width: 40px; padding: 0; justify-content: center; }
}

/* ------------------------------------------------------------
   05  ACTIONS — language, account, theme, Sell CTA, menu
   ------------------------------------------------------------ */
.nav3__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  /* No gap: the controls are 40px boxes around 20-22px glyphs, so a gutter on
     top of that padding read as a gap between the icons themselves. */
  gap: 0;
  flex: 0 0 auto;
  margin-inline-start: auto;
  /* Every control in the cluster is the same height, so the avatar, the
     bell and the icon buttons share one optical centre line. */
  min-height: var(--nv3-hit);
}

/* Two groups inside the cluster: quiet utilities (language, bell, account)
   and primary actions (Sell, menu). They read left to right at desktop
   widths; a 1px rule between them separates "a control" from "the action". */
.nav3__utils,
.nav3__primary {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex: 0 0 auto;
  min-height: var(--nv3-hit);
}

/* The rule only exists once something is actually on screen in both groups
   (the utilities appear at 768, the Sell CTA too), so a phone never shows a
   floating hairline next to the menu button. */
@media (min-width: 768px) {
  .nav3__primary {
    position: relative;
    margin-inline-start: 8px;
  }

  .nav3__primary::before {
    content: "";
    position: absolute;
    inset-block: 9px;
    inset-inline-start: -8px;
    width: 1px;
    background: var(--nv3-line);
  }
}

.nav3__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  /* 40 wide, 44 tall: full-height hit area, but the glyphs sit close enough
     together to read as one cluster. */
  width: 40px;
  height: var(--nv3-hit);
  padding: 0;
  border: 0;
  border-radius: var(--nv3-radius-pill);
  background: transparent;
  color: var(--nv3-text);
  cursor: pointer;
  /* 140ms tint only — no scale, no lift: chrome that moves under the
     pointer reads as jumpy in a bar this dense. */
  transition: background-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard);
}

.nav3__icon-btn:hover { background: var(--nv3-surface-sunken); }
.nav3__icon-btn:active { background: var(--nv3-line); }
.nav3__icon-btn svg { width: 22px; height: 22px; }

/* The primary action of the whole site: Sell. Accent fill, ink-on-
   accent text (7.5:1), never white-on-orange (2.5:1). */
.nav3__sell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding-inline: var(--nv3-gap-4);
  border-radius: var(--nv3-radius-pill);
  background: var(--nv3-accent);
  color: var(--nv3-accent-ink);
  font-size: var(--nv3-font-sm);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-standard);
}

.nav3__sell:hover { background: var(--nv3-accent-hover); }
.nav3__sell svg { width: 17px; height: 17px; }

/* Guest / account cluster. #js-uicon is filled by the backend (or
   stays empty when the API is unreachable). The injected markup ships
   its own inline sizes and margins (inc/functions.php), so the header
   normalises them here instead of forking that shared builder: one 40px
   hit box per control, one 2px gap, one hover tint. */
.nav3__actions .user-content {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: var(--nv3-hit);
}

/* The builder injects its markup into a bare <span> inside this slot. As an
   inline box it laid the 40px account trigger and the 44px bell out on the
   text baseline, so the avatar sat ~4px below the search field and the bell
   ~3px above it. Making the slot itself a centred flex row puts every control
   on the bar's centre line. */
.nav3__actions .user-content > span {
  display: inline-flex;
  align-items: center;
  min-height: var(--nv3-hit);
}

/* Icon controls only — the direct children of the account slot. Everything
   the panels render below them (account rows, notification rows and the
   "View all" footer) is an anchor too, and forcing a 44px square on those
   clipped their labels to a single letter and wrapped every notification
   onto its own line. */
.nav3__actions .user-content > span > a,
.nav3__actions .user-content > span > .notif-wrap,
.nav3__actions .user-content > span > .notif-wrap > .notif-bell,
.nav3__actions .user-content > a.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: var(--nv3-hit);
  margin: 0 !important; /* the builder writes margin-left:10px inline */
  padding: 0;
  border-radius: var(--nv3-radius-pill);
  color: var(--nv3-text);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-standard);
}

/* Bell and staff mark: a quiet tint, no lift or rotate — those drew the eye
   away from the account control that sits beside them. */
.nav3__actions .user-content > span > a:hover,
.nav3__actions .user-content > span > .notif-bell:hover {
  background: var(--nv3-surface-sunken);
  transform: none;
  box-shadow: none;
}

.nav3__actions .user-content .userIcon {
  width: 30px !important; /* inline 38px in the builder markup */
  height: 30px !important;
  border-radius: var(--nv3-radius-pill);
  object-fit: cover;
  border: 1px solid var(--nv3-line);
}

.nav3__actions .user-content svg.nav-icon,
.nav3__actions .user-content svg.notif-bell-icon {
  width: 22px;
  height: 22px;
}

/* Language picker: the markup comes from
   window.OletrakI18n.buildLanguagePicker(), so only the shell is
   restyled here. */
.nav3__actions .lang-picker { display: inline-flex; align-items: center; }
.nav3__actions .lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding-inline: var(--nv3-gap-2);
  border: 0;
  border-radius: var(--nv3-radius-pill);
  background: transparent;
  color: var(--nv3-text);
  font-family: inherit;
  font-size: var(--nv3-font-sm);
  cursor: pointer;
}
.nav3__actions .lang-trigger:hover { background: var(--nv3-surface-sunken); }
.nav3__actions .lang-trigger {
  transition: background-color var(--dur-fast) var(--ease-standard);
}
.nav3__actions .lang-trigger .ic { width: 20px; height: 20px; }

/* Guest sign-in. A high-contrast ink capsule rather than a second orange
   CTA: Sell already owns the accent, so the account action reads as a
   deliberate, separate door into the site. The tiny user glyph is a mask,
   keeping it crisp at every density and inheriting the label colour. */
.nav3__actions .user-content > a.login-btn,
.nav3__actions .user-content > span > a.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  width: auto;
  height: 40px;
  /* The label is injected as a bare "Log In"; let it size the pill. */
  min-height: 40px;
  white-space: nowrap;
  padding-inline: 15px 17px;
  border: 1px solid var(--nv3-text);
  border-radius: var(--nv3-radius-pill);
  background-color: var(--nv3-text);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.08));
  color: var(--nv3-surface);
  font-size: var(--nv3-font-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(1, 42, 70, 0.12), 0 5px 14px rgba(1, 42, 70, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: background-color var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard),
    transform var(--dur-fast) var(--ease-standard);
}

.nav3__actions .user-content > a.login-btn::before,
.nav3__actions .user-content > span > a.login-btn::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-4.4 0-8 2.2-8 5v1h16v-1c0-2.8-3.6-5-8-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-4.4 0-8 2.2-8 5v1h16v-1c0-2.8-3.6-5-8-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.nav3__actions .user-content > a.login-btn:hover,
.nav3__actions .user-content > span > a.login-btn:hover {
  border-color: var(--nv3-accent);
  background-color: var(--nv3-accent);
  color: var(--nv3-accent-ink);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(1, 42, 70, 0.12), 0 9px 20px rgba(255, 127, 17, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.nav3__actions .user-content > a.login-btn:active,
.nav3__actions .user-content > span > a.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(1, 42, 70, 0.16), inset 0 1px 2px rgba(0, 0, 0, 0.12);
}

.nav3__actions .user-content > a.login-btn:focus-visible,
.nav3__actions .user-content > span > a.login-btn:focus-visible {
  outline: 2px solid var(--nv3-focus);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .nav3__actions .user-content > a.login-btn:hover,
  .nav3__actions .user-content > span > a.login-btn:hover { transform: none; }
}

.nav3__burger { display: inline-flex; }

/* ------------------------------------------------------------
   06  CATEGORY ROW
   Horizontal, scrollable, never wraps and never widens the page.
   ------------------------------------------------------------ */
.nav3__cats {
  height: var(--nv3-row2-h);
  overflow: hidden;
  background: var(--nv3-surface-sunken);
  transition: height var(--dur-base) var(--ease-standard),
    opacity var(--dur-fast) var(--ease-standard);
}

/* nav-v3.js sets this on <html> while the page's own mode switch is visible.
   The row slides shut instead of sitting there repeating the same three
   tabs, and the page's reserved height shrinks with it. */
:root.nav3-compact {
  --nav-extra-row: 0px;
}

:root.nav3-compact .nav3__cats {
  height: 0;
  opacity: 0;
}

.nav3__cats .nav3__inner {
  height: var(--nv3-row2-h);
  gap: var(--nv3-gap-4);
}

.nav3__catnav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav3__catnav::-webkit-scrollbar { display: none; }

.nav3__cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding-inline: 10px;
  border-radius: var(--nv3-radius-pill);
  color: var(--nv3-text-muted);
  font-size: var(--nv3-font-sm);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-standard),
    background var(--dur-fast) var(--ease-standard),
    transform var(--dur-fast) var(--ease-standard);
}

.nav3__cat:hover,
.nav3__cat:focus-visible {
  background: var(--nv3-surface);
  color: var(--nv3-text);
  transform: translateY(-1px);
}

.nav3__cat[aria-current="page"] {
  background: var(--nv3-surface);
  color: var(--nv3-text);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 0 var(--nv3-accent);
}

.nav3__cat svg { width: 16px; height: 16px; }

/* Secondary site links: desktop only, quiet by design. */
.nav3__utility {
  display: none;
  align-items: center;
  gap: var(--nv3-gap-4);
  flex: 0 0 auto;
}

.nav3__utility a {
  /* 13px on ink measures 13.4:1; the smaller size carries the de-emphasis
     instead of a lighter grey, which would only just clear AA at 13px. */
  color: var(--nv3-text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.nav3__utility a {
  padding-inline: 6px;
  border-radius: var(--nv3-radius-pill);
  transition: color var(--dur-fast) var(--ease-standard),
    background var(--dur-fast) var(--ease-standard);
}

.nav3__utility a:hover,
.nav3__utility a:focus-visible {
  color: var(--nv3-text);
  background: var(--nv3-surface);
}

@media (min-width: 1100px) {
  .nav3__utility { display: flex; }
}

/* ------------------------------------------------------------
   07  MOBILE DRAWER
   Off-canvas panel; nav-v3.js owns open/close, focus trap and the
   scroll lock. Hidden from AT and pointer until opened.
   ------------------------------------------------------------ */
.nav3__scrim {
  position: fixed;
  inset: 0;
  z-index: 1290;
  background: var(--nv3-scrim);
  z-index: 19990;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-standard);
}

.nav3__scrim[hidden] { display: none; }
.nav3__scrim.is-open { opacity: 1; }

/* While the drawer is open the page behind it belongs to the drawer. The
   floating site banner ships at z-index 99999 (its own inline sheet), so it
   covered the drawer's lower half and swallowed taps on the scrim. It has to
   drop below the header's own stacking context (1200) rather than merely
   below the scrim: the scrim and drawer live inside header.nav3, so their
   20000 is contained by that 1200 and would never outrank a body-level
   overlay on its own. */
body.nav3-menu-open .oletro-bn,
body.nav3-menu-open .oletro-bn-overlay {
  z-index: 1100;
}

.nav3__drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  /* Above the floating theme pill (12000), the filter FAB (9990) and the
     bottom tab bar, so the drawer and its close button are never covered. */
  z-index: 20000;
  display: flex;
  flex-direction: column;
  gap: var(--nv3-gap-2);
  width: min(88vw, 380px);
  padding: calc(var(--nv3-row1-h) + var(--nv3-gap-3))
    calc(var(--nv3-gap-5) + env(safe-area-inset-right, 0px))
    calc(var(--nv3-gap-6) + env(safe-area-inset-bottom, 0px));
  background: var(--nv3-surface);
  color: var(--nv3-text);
  border-inline-start: 1px solid var(--nv3-line);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  /* Positioning off-canvas + [hidden] (display:none) is enough to keep the
     panel out of the tab order and out of the paint; `visibility` is not
     used because Chromium drops focus() calls made during its transition. */
  transition: transform var(--dur-slow) var(--ease-out);
}

.nav3__drawer[hidden] { display: none; }

.nav3__drawer.is-open {
  transform: none;
}

.nav3__drawer-close {
  position: absolute;
  inset-block-start: calc(var(--nv3-row1-h) - var(--nv3-hit) + 8px);
  inset-inline-end: var(--nv3-gap-4);
}

.nav3__drawer-title {
  margin: 0 0 var(--nv3-gap-2);
  color: var(--nv3-text-muted);
  font-size: var(--nv3-font-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav3__drawer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav3__drawer-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--nv3-gap-3);
  border-radius: var(--nv3-radius);
  color: var(--nv3-text);
  font-size: var(--nv3-font-md);
  font-weight: 500;
  text-decoration: none;
}

.nav3__drawer-nav a:hover,
.nav3__drawer-nav a[aria-current="page"] {
  background: var(--nv3-surface-sunken);
}

.nav3__drawer-nav a[aria-current="page"] {
  box-shadow: inset 3px 0 0 0 var(--nv3-accent);
}

.nav3__drawer-sell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--nv3-gap-2);
  min-height: 44px;
  margin-block: var(--nv3-gap-3);
  border-radius: var(--nv3-radius-pill);
  background: var(--nv3-accent);
  color: var(--nv3-accent-ink);
  font-size: var(--nv3-font-md);
  font-weight: 600;
  text-decoration: none;
}

/* A pill, not a full-width bar: the drawer is a column of links, and a
   theme control that stretched edge to edge read as another section
   instead of a toggle. It hugs its label and sits on the leading edge. */
.nav3__drawer-theme {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  justify-content: flex-start;
  gap: var(--nv3-gap-2);
  width: auto;
  max-width: 100%;
  min-height: 40px;
  margin-block-start: var(--nv3-gap-2);
  padding: 0 var(--nv3-gap-4);
  border: 1px solid var(--nv3-line);
  border-radius: var(--nv3-radius-pill);
  background: var(--nv3-surface-sunken);
  color: var(--nv3-text);
  font-family: inherit;
  font-size: var(--nv3-font-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard);
}

.nav3__drawer-theme:hover {
  background: var(--nv3-surface);
  border-color: var(--nv3-accent);
}

/* The label sits before the mark so the pill reads left to right. */
.nav3__drawer-theme [data-nv3-theme-label] { white-space: nowrap; }

.nav3__drawer-theme svg { width: 20px; height: 20px; }

/* Injected account shortcuts in the drawer (#mobile-nav-login). */
.nav3__drawer .mobile-nav-login {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nv3-gap-2);
  align-items: center;
  margin-block-start: var(--nv3-gap-2);
}

.nav3__drawer .mobile-nav-login a,
.nav3__drawer .mobile-nav-login .notif-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--nv3-line);
  border-radius: var(--nv3-radius);
  color: var(--nv3-text);
  text-decoration: none;
}

.nav3__drawer .mobile-nav-login a.login-btn {
  width: auto;
  padding-inline: var(--nv3-gap-4);
  border-color: var(--nv3-accent);
  color: var(--nv3-accent);
  font-weight: 600;
}

.nav3__drawer .mobile-nav-login .userIcon { width: 30px; height: 30px; }

/* Language picker inside the drawer. */
.nav3__drawer .lang-picker { display: inline-flex; }
.nav3__drawer .lang-trigger {
  min-height: 44px;
  padding-inline: var(--nv3-gap-3);
  border: 1px solid var(--nv3-line);
  border-radius: var(--nv3-radius);
  background: transparent;
  color: var(--nv3-text);
  font-family: inherit;
  font-size: var(--nv3-font-md);
  cursor: pointer;
}

/* ------------------------------------------------------------
   08  RESPONSIVE
   < 768  : brand + search + avatar/bell + menu (Sell, language and theme
            live in the drawer)
   768+   : brand + search + Sell + menu
   1024+  : language, account icons and theme join the bar
   1100+  : utility links in the category row
   ------------------------------------------------------------ */
.nav3__actions .nav3__sell,
.nav3__actions #lang-picker,
.nav3__actions .user-content,
.nav3__actions .nav3__theme {
  display: none;
}

@media (min-width: 768px) {
  .nav3__actions .nav3__sell { display: inline-flex; }
  .nav3__actions .user-content { display: inline-flex; }
}

@media (min-width: 1024px) {
  .nav3__actions .nav3__theme { display: inline-flex; }
  .nav3__actions #lang-picker { display: inline-flex; }
  .nav3__burger { display: none; }
  .nav3__search { margin-inline: 0; }
}

/* On phones the drawer is the only overlay nav; the bottom tab bar
   (mobile-bottom-nav.css) stays the primary navigation. */
@media (max-width: 767px) {
  /* Tighter brand lockup and smaller controls: the bar has to hold the
     logo, the search field, the account avatar and the menu button
     without wrapping. */
  .nav3__brand { gap: 3px; }
  .nav3__actions { gap: 0; }
  .nav3__actions .nav3__utils { gap: 0; }
  .nav3__actions .nav3__primary { gap: 0; }
  .nav3__actions .user-content { display: inline-flex; gap: 0; }
  .nav3__search { margin-inline: 2px; }
  .nav3__inner { gap: 4px; }
  .nav3__bar .nav3__inner { padding-inline: 8px; }
  /* Smaller icon buttons on phones: the logo grew, the controls give way. */
  .nav3__icon-btn {
    width: 34px;
    height: 34px;
  }
  .nav3__icon-btn svg { width: 19px; height: 19px; }
  .nav3__actions .user-content .userIcon {
    width: 28px !important;
    height: 28px !important;
  }
  /* The account cluster (avatar + bell) now rides the phone bar beside the
     menu button, so its hit boxes step down to the same 34px as the icon
     buttons: four controls have to fit next to the brand. */
  .nav3__actions .user-content > span > a,
  .nav3__actions .user-content > span > .notif-wrap,
  .nav3__actions .user-content > span > .notif-wrap > .notif-bell,
  .nav3__actions .user-content > a.login-btn {
    width: 34px;
    height: 34px;
  }
  .nav3__actions .user-content > span > .notif-wrap > .notif-bell {
    justify-content: center;
  }
  .nav3__actions .user-content svg.nav-icon,
  .nav3__actions .user-content svg.notif-bell-icon {
    width: 20px;
    height: 20px;
  }
  /* A guest has no avatar or bell to show, so the pill keeps its label but
     loses the square hit box and the desktop padding. The builder injects it
     inside the slot's <span>, so it is matched there too. */
  .nav3__actions .user-content > span > a.login-btn,
  .nav3__actions .user-content > a.login-btn {
    width: auto;
    min-height: 34px;
    height: 34px;
    padding-inline: var(--nv3-gap-3);
    font-size: 13px;
  }
  .nav3__search .mk-search-box { padding-inline: 10px; }
}

/* ------------------------------------------------------------
   09  FOCUS + MOTION
   currentColor-independent ring so it stays visible on every surface.
   ------------------------------------------------------------ */
.nav3 :focus-visible {
  outline: 3px solid var(--nv3-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.nav3__search-input:focus-visible,
.nav3__search-mode:focus-visible {
  outline: none;
}

.nav3__sell:focus-visible,
.nav3__drawer-sell:focus-visible {
  outline: 3px solid var(--nv3-focus);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .nav3,
  .nav3 *,
  .nav3 *::before,
  .nav3 *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  /* The page follows the header when its category row opens/closes; with
     reduced motion it should jump straight to the new height. */
  .mk-hero {
    transition: none !important;
  }
}

/* The bar no longer carries a theme button: theme.js owns the one control,
   a draggable pill that can be parked wherever it is comfortable. Toasts and
   dialogs sit above it (z-index 99999/100000 in utils/toast.js), so feedback
   always lands on top of the pill instead of behind it. */

/* Anchors must not land under the fixed header. */
html { scroll-padding-top: calc(var(--nav-h) + 8px); }

/* Body scroll lock while the drawer is open (set by nav-v3.js). */
body.nav3-menu-open { overflow: hidden; }

/* ------------------------------------------------------------
   10  ACCOUNT DROPDOWN
   One control for the whole account: a round avatar (initials when
   no photo is stored) with the first name beside it, opening a panel
   that holds the links which used to be separate icons. The bell and
   the staff mark stay in the bar, so the row is four peers.
   Markup comes from inc/functions.php (buildNavIconGroups → 'v3').
   ------------------------------------------------------------ */
.nav3 .nv3-account {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.nav3 .nv3-account__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  gap: var(--nv3-gap-2);
  height: 40px;
  padding: 0 10px 0 4px;
  border: 1px solid transparent;
  border-radius: var(--nv3-radius-pill);
  background: transparent;
  color: var(--nv3-text);
  font-family: inherit;
  font-size: var(--nv3-font-sm);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard);
}

.nav3 .nv3-account__trigger:hover,
.nav3 .nv3-account__trigger[aria-expanded="true"] {
  background: var(--nv3-surface-sunken);
  border-color: var(--nv3-line);
}

.nav3 .nv3-account__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: var(--nv3-radius-pill);
  overflow: hidden;
  background: var(--nv3-accent);
  color: var(--nv3-accent-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.nav3 .nv3-account__avatar--lg {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.nav3 .nv3-account__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav3 .nv3-account__name {
  max-width: 11ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav3 .nv3-account__chev {
  width: 14px;
  height: 14px;
  color: var(--nv3-text-muted);
  transition: transform var(--dur-fast) var(--ease-standard);
}

.nav3 .nv3-account__trigger[aria-expanded="true"] .nv3-account__chev {
  transform: rotate(180deg);
}

.nav3 .nv3-account__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  width: 268px;
  padding: 8px;
  border: 1px solid var(--nv3-line);
  border-radius: 16px;
  background: var(--nv3-surface);
  box-shadow: var(--nv3-shadow);
  color: var(--nv3-text);
}

.nav3 .nv3-account__panel[hidden] { display: none; }

.nav3 .nv3-account__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--nv3-line);
}

.nav3 .nv3-account__id {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  line-height: 1.15;
}

.nav3 .nv3-account__id strong {
  font-size: var(--nv3-font-sm);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav3 .nv3-account__id span {
  font-size: var(--nv3-font-xs);
  font-weight: 500;
  color: var(--nv3-text-muted);
}

.nav3 .nv3-account__logout {
  margin-left: auto;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--nv3-line);
  border-radius: 10px;
  background: transparent;
  color: var(--nv3-text-muted);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-standard),
              background var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard);
}

.nav3 .nv3-account__logout svg {
  width: 17px;
  height: 17px;
}

.nav3 .nv3-account__logout:hover,
.nav3 .nv3-account__logout:focus-visible {
  color: var(--nv3-danger, #dc2626);
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.28);
  outline: none;
}

.nav3 .nv3-account__logout:focus-visible {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}

.nav3 .nv3-account__links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* One row = one icon column + one label + optional badge. A grid keeps the
   three locked to the same line however long the label is, which a flex row
   with wrapping text could not guarantee. Rows are 40px tall with 10px icon
   chips: on a 268px panel that is enough air between rows to read each link
   as its own target without the panel turning into a long list. */
.nav3 .nv3-account__link {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  min-height: 40px;
  padding: 5px 10px 5px 8px;
  border-radius: 10px;
  color: var(--nv3-text);
  font-size: var(--nv3-font-sm);
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  /* ONE transition: a second declaration here used to overwrite the first,
     which is why the hover slide never eased — it snapped. */
  transition: background-color var(--dur-fast) var(--ease-standard),
    padding-left 180ms var(--ease-standard);
}

.nav3 .nv3-account__link:hover,
.nav3 .nv3-account__link:focus-visible {
  background: var(--nv3-surface-sunken);
  padding-left: 14px;
  outline: none;
}

/* The icon chip follows the label so the whole row moves together. */
.nav3 .nv3-account__link-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--nv3-surface-sunken);
  color: var(--nv3-text-muted);
}

.nav3 .nv3-account__link:hover .nv3-account__link-ic {
  background: var(--nv3-accent);
  color: var(--nv3-accent-ink);
}

.nav3 .nv3-account__link-ic svg {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.nav3 .nv3-account__link-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  /* The bar centres its icon buttons; a panel row reads left to right. */
  text-align: left;
}

.nav3 .nv3-account__link > .nv3-account__badge {
  justify-self: end;
}

.nav3 .nv3-account__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--nv3-radius-pill);
  background: var(--nv3-accent);
  color: var(--nv3-accent-ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.nav3 .nv3-account__badge--quiet {
  background: var(--nv3-surface-sunken);
  color: var(--nv3-text-muted);
}

/* The bell and the staff mark keep their own hit box but drop the margins
   the shared builder writes inline, so the cluster has one rhythm. */
.nav3 .nv3-account + .notif-wrap { margin-left: 2px !important; }

@media (max-width: 1023px) {
  .nav3 .nv3-account__name { display: none; }
  .nav3 .nv3-account__trigger { padding: 0 4px; }
}

/* Phones keep the account: the avatar is the entry point to orders and
   messages, and it sits immediately left of the menu button. */
@media (max-width: 767px) {
  .nav3 .nv3-account {
    display: inline-flex;
  }

  /* The search field is the priority on a phone, so the account control is
     reduced to a bare 32px avatar: no padding, no name, no chevron. */
  .nav3 .nv3-account__trigger {
    height: 32px;
    min-width: 32px;
    width: 32px;
    padding: 0;
    gap: 0;
    border-color: transparent;
  }

  .nav3 .nv3-account__chev { display: none; }

  .nav3 .nv3-account__avatar {
    width: 28px;
    height: 28px;
    font-size: 11.5px;
  }

  .nav3 .nv3-account__panel {
    /* Anchored to the trailing edge of the bar, which is where the avatar
       sits, so the 268px panel never runs off a 360px screen. */
    /* Aligned with the bell + staff panels: all of them hang off the
       trailing edge of the bar. */
    right: 0;
    width: min(300px, calc(100vw - 24px));
  }
}

/* Theme control: the icon states the theme it will switch TO. Both marks
   ship in the markup; CSS picks one, so the button can never show a moon
   while the page is dark. */
.nav3 [data-nv3-theme] .nv3-theme__sun { display: none; }
.nav3 [data-nv3-theme] .nv3-theme__moon { display: inline-block; }
[data-theme="dark"] .nav3 [data-nv3-theme] .nv3-theme__sun { display: inline-block; }
[data-theme="dark"] .nav3 [data-nv3-theme] .nv3-theme__moon { display: none; }


/* ------------------------------------------------------------
   17  SEARCH AS AN ICON (phones, and any squeezed bar)
   On a phone the inline field is replaced by a single search
   button (created by nav-v3.js). Tapping it turns the glyph into an
   X and drops the real search bar under the header, full width and
   focused; tapping the X — or Esc — puts the icon back.
   ------------------------------------------------------------ */
.nav3__search-toggle { display: none; }

/* Icon mode is entered two ways, both of which set body.nav3-search-icon:
   every viewport at or below 767px, and above that whenever the field would
   be squeezed into less than 40px of usable width — nav-v3.js measures the
   bar and decides, so a long brand name, a zoomed-in window or extra utility
   icons collapse the field to the search button instead of leaving a 12px
   sliver of input. */
body.nav3-search-icon .nav3__search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: var(--nv3-hit);
  padding: 0;
  border: 1px solid var(--nv3-line);
  border-radius: var(--nv3-radius-pill);
  background: var(--nv3-surface-sunken);
  color: var(--nv3-text);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard);
}

.nav3__search-toggle svg { width: 20px; height: 20px; }
.nav3__search-toggle .nv3-srch-ico--close { display: none; }

/* While the bar is out the button is the way back in: accent fill, X glyph,
   right where the search icon was. aria-expanded is the only switch, so the
   glyph and the row can never disagree. */
body.nav3-search-icon.nav3-search-open .nav3__search-toggle {
  border-color: transparent;
  background: var(--nv3-accent);
  color: var(--nv3-accent-ink);
}

body.nav3-search-icon.nav3-search-open .nav3__search-toggle .nv3-srch-ico--search {
  display: none;
}

body.nav3-search-icon.nav3-search-open .nav3__search-toggle .nv3-srch-ico--close {
  display: inline-block;
}

body.nav3-search-icon .nav3__search { display: none; }

body.nav3-search-icon.nav3-search-open .nav3__search {
  display: flex;
  position: fixed;
  inset-inline: 0;
  top: var(--nv3-row1-h);
  z-index: 19000;
  max-width: none;
  flex: 1 1 auto;
  padding: 8px 12px;
  background: var(--nv3-surface);
  border-bottom: 1px solid var(--nv3-line);
  box-shadow: 0 12px 24px -18px rgba(2, 42, 70, 0.55);
  animation: nv3-search-row-in 160ms var(--ease-standard);
}

/* The row arrives from under the bar rather than popping in, which reads as
   the field being pulled out of the button. */
@keyframes nv3-search-row-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  body.nav3-search-icon.nav3-search-open .nav3__search { animation: none; }
}

/* Focusing the field opens the suggestion sheet, and marketplace.css then
   switches .mk-search to position: relative. That pulled this flyout back
   into the header row and collapsed it to a sliver. Keep the collapsed-mode
   field pinned edge-to-edge (and above the sheet) while it has focus. */
body.nav3-search-icon.nav3-search-open .nav3 .nav3__search,
body.nav3-search-icon.nav3-search-open.mk-search-open .nav3 .nav3__search {
  position: fixed;
  inset-inline: 0;
  width: 100%;
  max-width: none;
  z-index: 19000;
}

body.nav3-search-icon.nav3-search-open .nav3__search .mk-search-box {
  height: 42px;
  background: var(--nv3-surface-sunken);
}

/* The advanced sheet and its suggestions are anchored to --nav-h, which is
   the header height — but in this mode the field is a flyout row sitting
   *under* the header, so the sheet opened straight on top of the bar the
   visitor had just opened. Anchor them under the flyout row instead
   (42px field + 8px padding each side + hairline = 59px). Both the normal
   and the --above variant resolve to the same place: there is no room to
   open upwards past a fixed header. */
body.nav3-search-icon.nav3-search-open .nav3 .mk-search-panel,
body.nav3-search-icon.nav3-search-open .nav3 .mk-search-panel.mk-search-panel--above {
  top: calc(var(--nv3-row1-h) + 65px);
  bottom: 0;
  max-height: none;
}

/* Suggestions are a short list, not a sheet: same anchor, natural height. */
body.nav3-search-icon.nav3-search-open .nav3 .mk-search-suggest {
  top: calc(var(--nv3-row1-h) + 65px);
}

/* ==================================================================
   PHONES — thumb-sized targets without a wide, airy rail
   ------------------------------------------------------------------
   The controls need 44px hit boxes, but a 10px gap on top of that left
   every icon floating in its own pocket. The gap is 3px now: the boxes
   still overlap nothing and stay tappable, while the glyphs read as one
   cluster.
   ================================================================== */
@media (max-width: 767px) {
  /* One rhythm for the whole cluster: 38px wide, full 44px tall, no gutters.
     The old 44px boxes plus a 3px gap on top of each icon's own padding left
     roughly 27px of air between two glyphs.
     (a 38x44 target still clears the 44px minimum in the dimension that
     matters for a row of adjacent controls: height, and the two nearest
     glyphs stay ~16px apart so mistaps are unlikely) */
  .nav3__actions,
  .nav3__utils,
  .nav3__primary,
  .nav3__actions .user-content,
  .nav3__actions .user-content > span {
    gap: 0;
  }

  body.nav3-search-icon .nav3__search-toggle,
  .nav3__icon-btn,
  .nav3__actions .user-content > span > a,
  .nav3__actions .user-content > span > .notif-wrap,
  .nav3__actions .user-content > span > .notif-wrap > .notif-bell {
    width: 38px;
    height: 44px;
  }

  /* The account panel opens directly under the bar and spans the screen
     with a small margin, instead of hugging the avatar's right edge and
     running off a narrow viewport. */
  .nav3 .nv3-account__panel {
    position: fixed;
    top: calc(var(--nav-h, 60px) + 6px);
    left: 12px;
    right: 12px;
    width: auto;
    max-width: 380px;
    margin-inline: auto;
    max-height: calc(100dvh - var(--nav-h, 60px) - 84px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
