/* ============================================================
   NAV COMPONENT — CoffeeCup Software
   Requires components/base.css BEFORE (tokens, .sr-only).
   Desktop bar ≥ 1081px; below that, the hamburger menu.
   ============================================================ */

:root {
  --nav-height: 64px;
  --nav-bg: rgba(22, 18, 13, 0.72);
  --nav-bg-scrolled: rgba(22, 18, 13, 0.94);
  --nav-panel-bg: #211A14;
  --nav-line: rgba(255, 255, 255, 0.09);
  --nav-line-soft: rgba(255, 255, 255, 0.06);
  --nav-text: rgba(242, 240, 237, 0.86);
  --nav-text-strong: var(--text-on-dark, #F2F0ED);
  --nav-text-muted: var(--text-muted-on-dark, rgba(242, 240, 237, 0.7));
  --nav-text-soft: rgba(242, 240, 237, 0.8);    /* panel descriptions: 10:1 on the panel, 8.5:1 on hover */
  --nav-row-hover-solid: #312A24;               /* panel + hover tint, for the app-stack rings */
  --nav-hover: rgba(255, 255, 255, 0.07);
  --nav-ease: var(--ease-out);
}

/* Dark context: the solid orange ring drops below 3:1 here */
.nav,
.nav-mobile,
.nav-skip-link { --focus-ring: var(--primary-on-dark, #FFA98A); }

/* ── Reset ── */
.nav *, .nav *::before, .nav *::after,
.nav-mobile *, .nav-mobile *::before, .nav-mobile *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.nav ul,
.nav-mobile ul { list-style: none; }

.nav a,
.nav-mobile a { text-decoration: none; }

.nav :focus-visible,
.nav-mobile :focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ============================================================
   SKIP LINK
   ============================================================ */
.nav-skip-link {
  position: fixed;
  top: 8px;
  left: 16px;
  z-index: 9999;
  padding: 12px 18px;
  border-radius: var(--radius-sm, 8px);
  background: var(--primary-solid, #D14000);     /* white 4.72:1 */
  color: #fff;
  font-size: var(--fs-small, 14px);
  font-weight: var(--fw-strong, 550);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--nav-ease);
}
.nav-skip-link:focus { transform: none; }
.nav-skip-link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ============================================================
   BAR
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  font-family: var(--font-body, 'Nohemi', -apple-system, sans-serif);
}

.nav.scrolled {
  background: var(--nav-bg-scrolled);
  box-shadow: 0 1px 0 var(--nav-line-soft), 0 8px 32px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  max-width: 1360px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── Logo: a plain link home ── */
.nav-logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  border-radius: var(--radius-sm, 8px);
  flex-shrink: 0;
}

.nav-logo-svg {
  display: block;
  width: auto;
  height: 22px;
  filter: brightness(0) invert(1);
}

/* ── Sections ── */
.nav-links {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.nav-item { position: relative; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: none;
  font-family: inherit;
  font-size: var(--fs-small, 14px);
  font-weight: var(--fw-medium, 500);
  color: var(--nav-text);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover,
.nav-item.open > .nav-link {
  background: var(--nav-hover);
  color: var(--nav-text-strong);
}

.nav-chevron {
  flex-shrink: 0;
  opacity: 0.6;
  transition: transform 0.2s var(--nav-ease);
}

.nav-item.open > .nav-link .nav-chevron { transform: rotate(180deg); }

/* The section you're in: full-strength text and a short rule */
.nav-item.is-current > .nav-link { color: var(--nav-text-strong); }
.nav-item.is-current > .nav-link::after {
  content: '';
  position: absolute;
  left: 12px;
  bottom: 6px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary-on-dark, #FFA98A);
}

/* ============================================================
   PANELS
   ============================================================ */
.nav-panel {
  --nav-shift: 0px;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 2;
  width: 340px;
  padding: 8px;
  border: 1px solid var(--nav-line);
  border-radius: 16px;
  background: var(--nav-panel-bg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 64px -16px rgba(0, 0, 0, 0.7), 0 4px 16px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;                 /* closed panels are out of the Tab order */
  transform: translateX(calc(-50% + var(--nav-shift))) translateY(-6px);
  transition: opacity 0.18s ease, transform 0.25s var(--nav-ease), visibility 0s linear 0.25s;
}

/* Bridges the gap between the button and the panel for the pointer */
.nav-panel::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: -10px;
  height: 10px;
}

.nav-item.open > .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(calc(-50% + var(--nav-shift))) translateY(0);
  transition: opacity 0.18s ease, transform 0.25s var(--nav-ease), visibility 0s;
}

.nav-panel--mega { width: 780px; }
.nav-panel--wide { width: 480px; }

.nav-panel--mega .nav-panel-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

/* A column can hold more than one group (Email + Free) */
.nav-col .nav-group + .nav-group { margin-top: 6px; }

.nav-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 6px;
  font-size: var(--fs-label, 12px);
  font-weight: var(--fw-bold, 600);
  letter-spacing: var(--tr-caps, 0.08em);
  text-transform: uppercase;
  font-feature-settings: 'case' 1;
  color: var(--nav-text-muted);
}

.nav-group-label img { border-radius: 5px; }

/* ── One row vocabulary for every link in every panel ── */
.nav-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background-color 0.15s ease;
}

.nav-row:hover { background: var(--nav-hover); }
.nav-row:focus-visible { outline-offset: -2px; }

.nav-row-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 9px;
}

.nav-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nav-row-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: var(--fs-small, 14px);
  font-weight: var(--fw-bold, 600);         /* ≤ 27px headings: 600 (CLAUDE.md scale) */
  line-height: 1.35;
  color: var(--nav-text-strong);
}

.nav-row-desc {
  font-size: var(--fs-meta, 13px);
  line-height: 1.45;
  color: var(--nav-text-soft);
  text-wrap: pretty;
}

/* Glyph tile: the nav's line icons sit on the same 36px footprint as
   the app icons, so every panel's text starts on the same column.
   Neutral at rest (no tint); the row's hover, keyboard focus and the
   current page switch the icon to the accessible orange.
   Icon #DEDCD9 (#F2F0ED at 0.9, flattened: a translucent colour shows
   the duotone layer through the stroke) on the tile: > 10:1. Orange
   (--primary-on-dark) on the hovered tile: > 6:1, above the 3:1 for
   graphics. */
.nav-row-tile {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #DEDCD9;
  transition: color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.nav-row:hover .nav-row-tile,
.nav-row:focus-visible .nav-row-tile,
.nav-row[aria-current="page"] .nav-row-tile {
  color: var(--primary-on-dark, #FFA98A);
  box-shadow: inset 0 0 0 1px rgba(255, 169, 138, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ── Featured row (Super Pack): its own card, every app and the price ──
   --primary only paints here (tint, border); text stays on the
   accessible pairs. */
.nav-row--featured {
  margin-bottom: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 90, 31, 0.3);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 90, 31, 0.15), rgba(255, 90, 31, 0.05) 70%);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.nav-row--featured:hover {
  border-color: rgba(255, 90, 31, 0.45);
  background: linear-gradient(135deg, rgba(255, 90, 31, 0.21), rgba(255, 90, 31, 0.08) 70%);
}

.nav-row--featured .nav-row-text { flex: 1; }
.nav-row--featured .nav-row-title { font-size: var(--fs-body, 16px); }

.nav-row--featured .nav-badge {
  background: rgba(255, 90, 31, 0.18);
  color: var(--primary-on-dark, #FFA98A);
}

.nav-feature-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.nav-feature-price {
  flex-shrink: 0;
  font-size: var(--fs-meta, 13px);
  color: var(--nav-text-soft);
  white-space: nowrap;
}

.nav-feature-price strong {
  font-size: var(--fs-body, 16px);
  font-weight: var(--fw-bold, 600);
  color: var(--nav-text-strong);
}

/* Real icons of the apps in a pack, overlapping, on the trailing edge */
.nav-row-apps {
  display: flex;
  align-items: center;
  align-self: center;
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 12px;
}

/* Every app sits on the same tile, so mixed icon shapes stack cleanly */
.nav-row-app {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #2E261F;
  box-shadow: 0 0 0 2px var(--nav-panel-bg);
  transition: box-shadow 0.15s ease;
}

.nav-row-app img { width: 20px; height: 20px; object-fit: contain; }

.nav-row-app + .nav-row-app { margin-left: -6px; }

.nav-row-app--more,
.nav-row-app--glyph {
  background: #3A3129;
  font-size: var(--fs-label, 12px);
  font-weight: var(--fw-bold, 600);
  color: var(--nav-text-strong);
}

.nav-row:hover .nav-row-app { box-shadow: 0 0 0 2px var(--nav-row-hover-solid); }

/* All eight, side by side: no overlap, so no ring against the tint */
.nav-row-apps--all { gap: 4px; margin-left: 0; padding-left: 0; }
.nav-row-apps--all .nav-row-app,
.nav-row:hover .nav-row-apps--all .nav-row-app { box-shadow: none; background: rgba(22, 18, 13, 0.55); }
.nav-row-apps--all .nav-row-app + .nav-row-app { margin-left: 0; }

.nav-row[aria-current="page"] { background: rgba(255, 255, 255, 0.04); }
.nav-row[aria-current="page"] .nav-row-title { color: var(--primary-on-dark, #FFA98A); }

.nav-ext { flex-shrink: 0; color: var(--nav-text-muted); }

.nav-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-pill, 99px);
  background: rgba(255, 255, 255, 0.08);
  font-size: var(--fs-label, 12px);
  font-weight: var(--fw-bold, 600);
  letter-spacing: var(--tr-caps, 0.08em);
  text-transform: uppercase;
  font-feature-settings: 'case' 1;
  line-height: 1.4;
  color: var(--nav-text-muted);
}

/* ── Panel footer ── */
.nav-panel-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin: 8px -8px -8px;
  padding: 6px 8px;
  border-top: 1px solid var(--nav-line-soft);
  border-radius: 0 0 16px 16px;
  background: rgba(0, 0, 0, 0.18);
}

.nav-foot-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: var(--fs-small, 14px);
  font-weight: var(--fw-medium, 500);
  color: var(--nav-text);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-foot-link svg { transition: transform 0.15s ease; }
.nav-foot-link:hover { background: var(--nav-hover); color: var(--nav-text-strong); }
@media (hover: hover) and (pointer: fine) { .nav-foot-link:hover svg { transform: translateX(2px); } }
.nav-foot-link:focus-visible { outline-offset: -2px; }
.nav-foot-link--accent { color: var(--primary-on-dark, #FFA98A); }
.nav-foot-link--accent:hover { color: var(--primary-on-dark, #FFA98A); }

/* ── Footer row: "Compare all apps" / "Compare packs" ──
   The panel's next step after browsing, so it reads as an action at
   rest, not only on hover: the nav's own glyph tile, a strong title and
   one line on what it opens. Same hover and focus language as the panel
   rows (tile turns orange, arrow nudges). */
.nav-foot-link--row {
  gap: 12px;
  min-height: 56px;
  padding: 8px 14px 8px 12px;  /* tile on the panel rows' icon column */
  color: var(--nav-text-strong);
}
.nav-foot-text { display: flex; flex-direction: column; gap: 2px; }
.nav-foot-title { font-size: var(--fs-small, 14px); font-weight: var(--fw-bold, 600); line-height: 1.25; }
.nav-foot-desc { font-size: var(--fs-meta, 13px); font-weight: var(--fw-regular, 400); line-height: 1.35; color: var(--nav-text-soft); }
.nav-foot-link--row > svg { margin-left: 6px; color: var(--nav-text-soft); transition: transform 0.15s ease, color 0.15s ease; }
.nav-foot-link--row:hover > svg,
.nav-foot-link--row:focus-visible > svg { color: var(--primary-on-dark, #FFA98A); }
.nav-foot-link--row:hover .nav-row-tile,
.nav-foot-link--row:focus-visible .nav-row-tile,
.nav-foot-link--row[aria-current="page"] .nav-row-tile {
  color: var(--primary-on-dark, #FFA98A);
  box-shadow: inset 0 0 0 1px rgba(255, 169, 138, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ── Scrim behind an open panel: a soft blur plus a light dim ──
   Stays up while moving between sections (panels switch in place),
   so it doesn't flicker. */
.nav-scrim {
  position: fixed;
  inset: var(--nav-height) 0 0;
  z-index: 999;
  background: rgba(10, 8, 6, 0.22);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.nav-scrim.visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease, visibility 0s;
}

/* ============================================================
   ACTIONS
   ============================================================ */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-cart {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: #D3D1CE;  /* --nav-text flattened on the bar: an opaque icon, see GLYPHS */
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-cart:hover { background: var(--nav-hover); color: var(--nav-text-strong); }

/* The count sits on the icon's top-right corner, clear of the basket.
   Anchored by its left edge, so "12" or "99+" grow outwards instead of
   covering the icon. */
.nav-cart-count {
  position: absolute;
  top: 0;
  left: calc(50% + 4px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill, 99px);
  background: var(--primary-solid, #D14000);
  box-shadow: 0 0 0 2px #16120D;
  font-size: var(--fs-label, 12px);
  font-weight: var(--fw-bold, 600);
  line-height: 1;
  color: #fff;
  pointer-events: none;
}

.nav-cart-count[hidden] { display: none; }

/* Pops when the count goes up (nav.js adds .is-bump): confirms the add */
.nav-cart-count.is-bump { animation: nav-cart-bump 0.3s var(--ease-bounce, cubic-bezier(0.34, 1.56, 0.64, 1)); }
@keyframes nav-cart-bump { from { transform: scale(0.85); } }

.nav-signin {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: var(--fs-small, 14px);
  font-weight: var(--fw-medium, 500);
  color: var(--nav-text);
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-signin:hover { background: var(--nav-hover); color: var(--nav-text-strong); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: 4px;
  padding: 0 18px;
  border-radius: var(--radius-pill, 99px);
  background: var(--primary-solid, #D14000);
  font-size: var(--fs-small, 14px);
  font-weight: var(--fw-strong, 550);
  color: #fff;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

/* Darker on hover, never lighter under white text */
.nav-cta:hover { background: var(--primary-solid-hover, #B83800); }

.nav-signin[aria-current="page"],
.nav-cta[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

/* ============================================================
   HAMBURGER
   ============================================================ */
.nav-hamburger {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: none;
  border-radius: 10px;
  background: none;
  color: var(--nav-text-strong);
  cursor: pointer;
  touch-action: manipulation;
}

.nav-hamburger:hover { background: var(--nav-hover); }

.nav-hamburger-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-hamburger-box span {
  display: block;
  width: 20px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--nav-ease), opacity 0.2s ease;
}

.nav-hamburger[aria-expanded="true"] .nav-hamburger-box span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] .nav-hamburger-box span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] .nav-hamburger-box span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   MOBILE MENU
   ============================================================ */
.nav-mobile {
  position: fixed;
  inset: var(--nav-height) 0 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background: #16120D;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-family: var(--font-body, 'Nohemi', -apple-system, sans-serif);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.25s var(--nav-ease);
}

.nav-mobile[hidden] { display: none; }
.nav-mobile.open { opacity: 1; transform: none; }

/* Page behind the open menu doesn't scroll */
html.nav-locked { overflow: hidden; }

.nav-m-item { border-bottom: 1px solid var(--nav-line-soft); }

.nav-m-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 17px;
  font-weight: var(--fw-medium, 500);
  color: var(--nav-text-strong);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.nav-m-trigger .nav-chevron { width: 18px; height: 18px; }
.nav-m-item.open .nav-m-trigger .nav-chevron { transform: rotate(180deg); }

.nav-m-trigger .nav-chevron { order: 2; }
.nav-m-item.is-current .nav-m-trigger::after {
  content: '';
  order: 1;
  width: 6px;
  height: 6px;
  margin: 0 auto 0 10px;
  border-radius: 50%;
  background: var(--primary-on-dark, #FFA98A);
}

/* Collapsed: out of the Tab order and the accessibility tree */
.nav-m-panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.3s var(--nav-ease), visibility 0s linear 0.3s;
}

.nav-m-item.open .nav-m-panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.3s var(--nav-ease), visibility 0s;
}

.nav-m-panel-inner { overflow: hidden; }
.nav-m-item.open .nav-m-panel-inner { padding-bottom: 12px; }

.nav-m-group-label {
  padding: 12px 12px 4px;
  font-size: var(--fs-label, 12px);
  font-weight: var(--fw-bold, 600);
  letter-spacing: var(--tr-caps, 0.08em);
  text-transform: uppercase;
  font-feature-settings: 'case' 1;
  color: var(--nav-text-muted);
}

.nav-m-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: var(--fs-body, 16px);
  color: var(--nav-text);
}

.nav-m-link:active { background: var(--nav-hover); }

.nav-m-icon { width: 28px; height: 28px; flex-shrink: 0; border-radius: 7px; }

.nav-m-glyph {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #DEDCD9;  /* opaque, see .nav-row-tile */
}
.nav-m-link[aria-current="page"] .nav-m-glyph,
.nav-m-link:active .nav-m-glyph { color: var(--primary-on-dark, #FFA98A); box-shadow: inset 0 0 0 1px rgba(255, 169, 138, 0.3); }
.nav-m-link[aria-current="page"] { color: var(--primary-on-dark, #FFA98A); }
.nav-m-link--foot { font-weight: var(--fw-medium, 500); color: var(--nav-text-strong); }

.nav-m-link--featured {
  margin: 4px 0;
  border: 1px solid rgba(255, 90, 31, 0.3);
  background: linear-gradient(135deg, rgba(255, 90, 31, 0.15), rgba(255, 90, 31, 0.05) 70%);
  font-weight: var(--fw-medium, 500);
  color: var(--nav-text-strong);
}

.nav-m-link--featured .nav-badge {
  background: rgba(255, 90, 31, 0.18);
  color: var(--primary-on-dark, #FFA98A);
}
.nav-m-links--foot { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--nav-line-soft); }

/* ── Bottom actions ── */
.nav-m-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
  padding-top: 24px;
}

.nav-m-cart {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--nav-line);
  border-radius: 14px;
  color: var(--nav-text-strong);
}

.nav-m-cart-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.nav-m-cart-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav-m-cart-label { font-size: var(--fs-body, 16px); font-weight: var(--fw-medium, 500); }
.nav-m-cart-sub { font-size: var(--fs-meta, 13px); color: var(--nav-text-muted); }

.nav-m-cart-count {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill, 99px);
  background: var(--primary-solid, #D14000);
  font-size: var(--fs-label, 12px);
  font-weight: var(--fw-bold, 600);
  color: #fff;
}

.nav-m-cart-count[hidden] { display: none; }

.nav-m-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-pill, 99px);
  font-size: 15px;
  font-weight: var(--fw-strong, 550);
  white-space: nowrap;
}

.nav-m-btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--nav-text-strong);
}

.nav-m-btn--primary {
  background: var(--primary-solid, #D14000);
  color: #fff;
}

.nav-m-btn--primary:active { background: var(--primary-solid-hover, #B83800); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .nav-links,
  .nav-actions,
  .nav-scrim { display: none; }
  .nav-hamburger { display: grid; }
}

@media (min-width: 1081px) {
  .nav-mobile { display: none !important; }
}

@media (max-width: 640px) {
  .nav-inner { padding: 0 12px 0 16px; }
}

@media (max-width: 360px) {
  .nav-m-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .nav,
  .nav-skip-link,
  .nav-chevron,
  .nav-row,
  .nav-foot-link svg,
  .nav-hamburger-box span,
  .nav-m-panel { transition: none !important; }
  /* Overlays keep a short fade (it explains what appeared), never movement */
  .nav-panel,
  .nav-scrim { transition: opacity 0.15s ease, visibility 0s linear 0.15s !important; }
  .nav-item.open > .nav-panel,
  .nav-scrim.visible { transition: opacity 0.15s ease, visibility 0s !important; }
  .nav-mobile { transition: opacity 0.15s ease !important; }
  .nav-panel,
  .nav-item.open > .nav-panel { transform: translateX(calc(-50% + var(--nav-shift))); }
  .nav-mobile { transform: none; }
}

@media (forced-colors: active) {
  .nav-panel,
  .nav-mobile { border: 1px solid CanvasText; }
  .nav-item.is-current > .nav-link::after,
  .nav-m-item.is-current .nav-m-trigger::after { background: CanvasText; }
}
