/* ==========================================================================
   Moka Kitchen — storefront styles
   Palette sampled from the brand video & poster.
   ========================================================================== */

:root {
  --navy-950: #070d1f;
  --navy-900: #0b1533;
  --navy-850: #0e1a40;
  --navy-800: #111e47;
  --navy-700: #1a2a5e;
  --blue-700: #1f3f9e;
  --blue-600: #2851c2;   /* brand blue */
  --blue-500: #3a64d8;
  --blue-400: #5b82f0;
  --blue-300: #8fa9f6;   /* "KITCHEN" */
  --amber-400: #fdc165;
  --green-500: #1f9d61;
  --red-500: #d93a3a;

  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #fbfcfe;
  --surface-3: #eef1f8;
  --line: #e3e7f1;
  --line-strong: #cfd6e6;
  --ink: #0e1116;
  --ink-2: #2e3442;
  --ink-3: #5a6275;
  --ink-4: #8a91a3;
  --accent: var(--blue-600);
  --accent-hover: var(--blue-700);
  --accent-soft: #eaf0fe;
  --accent-soft-ink: #1f3f9e;
  --focus-ring: rgba(58, 100, 216, 0.28);
  --ok: #157347;
  --ok-soft: #e3f6ec;
  --warn: #9a5b00;
  --warn-soft: #fff1d6;
  --danger: #b42318;
  --danger-soft: #fde8e8;

  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-xs: 0 1px 2px rgba(11, 21, 51, 0.05);
  --shadow-sm: 0 1px 2px rgba(11, 21, 51, 0.05), 0 6px 18px -10px rgba(11, 21, 51, 0.18);
  --shadow: 0 18px 50px -20px rgba(11, 21, 51, 0.35);

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Oswald", "Arial Narrow", "Roboto Condensed", var(--font);
  --header-h: 60px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070d1f;
    --surface: #0e1834;
    --surface-2: #0b142d;
    --surface-3: #16224a;
    --line: rgba(143, 169, 246, 0.13);
    --line-strong: rgba(143, 169, 246, 0.26);
    --ink: #eef2fd;
    --ink-2: #ccd5f1;
    --ink-3: #9aa8cf;
    --ink-4: #7382ad;
    --accent: #4a72e6;
    --accent-hover: #5b82f0;
    --accent-soft: rgba(91, 130, 240, 0.14);
    --accent-soft-ink: #b4c6fa;
    --focus-ring: rgba(91, 130, 240, 0.4);
    --ok: #5fd39a;
    --ok-soft: rgba(31, 157, 97, 0.16);
    --warn: #fdc165;
    --warn-soft: rgba(253, 193, 101, 0.13);
    --danger: #ff8a80;
    --danger-soft: rgba(217, 58, 58, 0.16);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
html.modal-open { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; }

/* 16 px from the screen edge, more where an iPhone held sideways has its notch and rounded corners */
.container { width: min(1180px, 100% - 2 * max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px))); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: #fff; color: var(--navy-900); padding: 10px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }

.ic { width: 20px; height: 20px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- logo ---------- */
.logo { height: 44px; width: auto; }
.logo__word { fill: #fff; }
.logo__sub { fill: var(--blue-300); }
.brand { display: inline-flex; align-items: center; text-decoration: none; border-radius: 8px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(90% 120% at 88% -10%, rgba(40, 81, 194, 0.55) 0%, rgba(40, 81, 194, 0) 60%),
    radial-gradient(60% 80% at 0% 110%, rgba(40, 81, 194, 0.22) 0%, rgba(40, 81, 194, 0) 70%),
    linear-gradient(180deg, var(--navy-850) 0%, var(--navy-900) 100%);
  padding-bottom: 12px;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -30px;
  right: -40px;
  width: min(640px, 92vw);
  height: 440px;
  background: url("/assets/img/hex.svg") right top / 640px auto no-repeat;
  opacity: 0.9;
  -webkit-mask-image: radial-gradient(85% 85% at 100% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(85% 85% at 100% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero__inner { padding-top: max(14px, env(safe-area-inset-top)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--header-h); }
.topbar__actions { display: flex; align-items: center; gap: 10px; }

.hero__copy { padding: 26px 0 24px; max-width: 680px; }
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-300);
  margin-bottom: 12px;
}
.eyebrow--dark { color: var(--accent); }
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 6.4vw, 64px);
  line-height: 1.02;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  text-wrap: balance;
}
.hero__title span { display: block; color: var(--blue-300); }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #e8edfb;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(143, 169, 246, 0.22);
  backdrop-filter: blur(6px);
}
.chip .ic { width: 16px; height: 16px; color: var(--blue-300); }
/* Each chip carries a long and a short label. app.js (fitChips) sets data-fit to the
   first level that keeps all chips on one row: 0 = all long, 1 = prep and payment short,
   2 = only the status short, 3 = all short. Screen readers always get the long label. */
.chip__s { display: none; }
/* before app.js has measured: prep and payment start on their short labels (the three long labels of
   the loading state need about 680 px and would wrap, then jump); phones start all short (see below) */
.chips:not([data-fit]) .chip--opt .chip__l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.chips:not([data-fit]) .chip--opt .chip__s { display: inline; }
.chips[data-fit="1"] .chip--opt .chip__l,
.chips[data-fit="2"] .chip--status .chip__l,
.chips[data-fit="3"] .chip__l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.chips[data-fit="1"] .chip--opt .chip__s,
.chips[data-fit="2"] .chip--status .chip__s,
.chips[data-fit="3"] .chip__s { display: inline; }
.chip--status .dot { width: 8px; height: 8px; border-radius: 50%; background: #8a91a3; box-shadow: 0 0 0 4px rgba(138, 145, 163, 0.18); }
.chip--status.is-open .dot { background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2); animation: pulse 2.4s ease-in-out infinite; }
.chip--status.is-soon .dot { background: var(--amber-400); box-shadow: 0 0 0 4px rgba(253, 193, 101, 0.2); }
.chip--status.is-closed .dot { background: #f87171; box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.2); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0.06); } }

/* compact header: same space above and below the logo (14px + 12px each side) */
.hero--compact { padding-bottom: 14px; }
.hero--compact .topbar { min-height: 64px; }
.hero--compact .logo { height: 40px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.icon-btn:active { transform: scale(0.96); }
.icon-btn--glass { color: #fff; background: rgba(255, 255, 255, 0.08); border-color: rgba(143, 169, 246, 0.25); }
.icon-btn--glass:hover { background: rgba(255, 255, 255, 0.14); }
.icon-btn--ghost { background: transparent; border-color: transparent; color: var(--ink-3); }
.icon-btn--ghost:hover { background: var(--surface-3); color: var(--ink); }
.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(143, 169, 246, 0.25);
}
.pill-link:hover { background: rgba(255, 255, 255, 0.14); }
.pill-link .badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber-400); }
.pill-link.is-ready .badge-dot { background: #34d399; }

/* ---------- notices ---------- */
.notices { display: grid; gap: 10px; }
.notices:not(:empty) { margin-top: 18px; }
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.notice .ic { color: var(--accent); margin-top: 1px; }
.notice__title { font-weight: 700; font-size: 14.5px; }
.notice__text { color: var(--ink-3); font-size: 14px; margin-top: 2px; }
.notice__text a { color: var(--accent); font-weight: 700; }
.notice--warn { background: var(--warn-soft); border-color: transparent; }
.notice--warn .ic { color: var(--warn); }
.notice--sample { background: var(--accent-soft); border-color: transparent; }

/* ---------- category nav ---------- */
.catnav {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-top: 18px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.catnav.is-stuck { border-bottom-color: var(--line); }
.catnav__inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.catnav__inner::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cat-chip:hover { border-color: var(--line-strong); }
.cat-chip[aria-current="true"] { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
@media (prefers-color-scheme: dark) {
  .cat-chip[aria-current="true"] { background: var(--blue-600); border-color: var(--blue-600); }
}

/* ---------- layout ---------- */
.layout { display: grid; gap: 32px; padding: 22px 0 48px; align-items: start; }
.cart-panel { display: none; }
@media (min-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr) 360px; padding-bottom: 72px; }
  .cart-panel { display: block; position: sticky; top: 72px; }
}

/* ---------- menu ---------- */
.menu:focus { outline: none; }
.menu-cat { margin-bottom: 34px; scroll-margin-top: 72px; }
.cat-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.cat-title::after {
  content: "";
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue-400) 0 44px, var(--line) 44px);
}
.cat-desc { color: var(--ink-3); margin: -6px 0 14px; }
.menu-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); } /* a wide card can never widen the page */
@media (min-width: 680px) { .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto; /* the price row stays at the bottom when the grid stretches the card */
  column-gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.item:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.item:has(.item__open:active) { transform: scale(0.995); }
.item.in-cart { border-color: color-mix(in srgb, var(--blue-500) 50%, var(--line)); box-shadow: inset 3px 0 0 var(--blue-500), var(--shadow-xs); }
.item--img { grid-template-columns: minmax(0, 1fr) auto; }
.item__body { grid-column: 1; grid-row: 1; min-width: 0; }
/* labels sit next to the name; when they wrap they start at the left edge like the name */
.item__name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 16px; font-weight: 700; line-height: 1.3; }
.item__name .tag { margin-left: 0; }
.item__open {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.item__open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.item__open:focus-visible { outline: none; }
.item__open:focus-visible::after { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.item__desc {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* price + cart controls across the whole card (under the photo too); they wrap on very narrow cards */
.item__foot { grid-column: 1 / -1; grid-row: 2; padding-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; }
.item__price { font-weight: 700; font-size: 15.5px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.item__weight { font-weight: 500; font-size: 12.5px; color: var(--ink-4); }
.item__actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin-left: auto; }
.item__img { grid-column: 2; grid-row: 1; width: 96px; height: 96px; border-radius: 12px; object-fit: cover; background: var(--surface-3); }
.item.is-soldout { opacity: 0.62; }
.item.is-soldout .item__img { filter: grayscale(1); }

.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  margin-left: 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 2px;
  white-space: nowrap;
}
.tag--hit { background: var(--warn-soft); color: var(--warn); }
.tag--new { background: var(--accent-soft); color: var(--accent-soft-ink); }
.tag--spicy { background: var(--danger-soft); color: var(--danger); }
.tag--veg { background: var(--ok-soft); color: var(--ok); }

.add-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 18px -8px rgba(40, 81, 194, 0.8);
  transition: background 0.15s, transform 0.12s;
}
.add-btn:hover { background: var(--accent-hover); }
.add-btn:active { transform: scale(0.92); }
.add-btn .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.in-cart-badge { font-size: 12px; font-weight: 700; color: var(--accent-soft-ink); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.soldout-pill { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); background: var(--surface-3); padding: 6px 10px; border-radius: 999px; }

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--accent-soft);
}
.stepper button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: var(--surface);
  color: var(--accent-soft-ink);
  box-shadow: var(--shadow-xs);
  transition: transform 0.1s;
}
.stepper button:active { transform: scale(0.9); }
.stepper button .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.stepper output { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.stepper--sm button { width: 30px; height: 30px; }
.stepper--sm output { min-width: 24px; font-size: 14px; }
.stepper--lg { padding: 4px; }
.stepper--lg button { width: 42px; height: 42px; }
.stepper--lg output { min-width: 34px; font-size: 17px; }

/* skeleton */
.skeleton__title { width: 160px; height: 24px; border-radius: 8px; margin-bottom: 16px; }
.skeleton__card { height: 128px; border-radius: var(--radius); }
.skeleton__title, .skeleton__card {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface) 50%, var(--surface-3) 75%) 0 0 / 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { to { background-position: -150% 0; } }
.noscript { padding: 16px; background: var(--warn-soft); border-radius: var(--radius); }

.empty-state { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 48px 16px; color: var(--ink-3); }
.empty-state .ic { width: 40px; height: 40px; color: var(--ink-4); }
.empty-state strong { color: var(--ink); }

/* ---------- buttons & fields ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s, opacity 0.15s;
}
.btn:active:not([disabled]) { transform: translateY(1px); }
.btn .ic { width: 18px; height: 18px; }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 12px 26px -14px rgba(40, 81, 194, 0.95); }
.btn--primary:hover:not([disabled]) { background: var(--accent-hover); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover:not([disabled]) { background: var(--surface-3); }
.btn--soft { background: var(--accent-soft); color: var(--accent-soft-ink); }
.btn--block { width: 100%; }
.btn--grow { flex: 1; }
.btn--lg { min-height: 54px; font-size: 16px; border-radius: 16px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field__label { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.field__label small { font-weight: 500; color: var(--ink-4); }
.field input, .field textarea, .field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-size: 16px; /* prevents iOS zoom */
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface-2);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px var(--focus-ring); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field__hint { font-size: 12.5px; color: var(--ink-4); }
.field__error { font-size: 13px; font-weight: 600; color: var(--danger); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.form-error {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 600;
  font-size: 14px;
  margin-top: 12px;
}
.form-error .ic { width: 18px; height: 18px; margin-top: 1px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- cart ---------- */
.cart {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 96px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.cart__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 20px 10px; }
.cart__title, .sheet__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
}
.cart__count { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.cart__lines { list-style: none; padding: 0 20px; overflow: auto; overscroll-behavior: contain; }
.cart__foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.cart__total { display: flex; align-items: baseline; justify-content: space-between; font-size: 15px; }
.cart__total strong { font-size: 20px; }
.cart__pay { display: flex; gap: 8px; align-items: center; color: var(--ink-3); font-size: 13px; }
.cart__pay .ic { width: 16px; height: 16px; }
.cart__warn { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; font-weight: 600; color: var(--warn); }
.cart__warn .ic { width: 16px; height: 16px; margin-top: 1px; }
.cart__msg { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.cart__msg .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.cart > .cart__msg { margin: 0 20px 12px; } /* the desktop panel: inset like its title and lines */
.cart__msg:focus { outline: none; } /* focused from code, for screen readers */
.cart__msg:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
/* a phone held sideways: the sheet's body is short, leave room for the product the message is about */
@media (max-height: 500px) {
  .cart__msg { gap: 8px; margin-bottom: 8px; padding: 8px 12px; font-size: 12.5px; line-height: 1.35; }
  .cart__msg .ic { width: 16px; height: 16px; }
  /* with the header above it and the full footer under it, the list was a 26-55 px slit (568x320, 667x375):
     there the header and the list scroll together above a smaller footer that stays in place, so "Продължи" is
     always in sight (the payment note is said again in the checkout). The scroll padding keeps a control reached
     with the keyboard above that footer (in em: the footer grows with the text size) */
  #cart-dialog .sheet__form { overflow-y: auto; overscroll-behavior: contain; scroll-padding-bottom: 10em; }
  #cart-dialog .sheet__head { flex-shrink: 0; padding-top: 16px; padding-bottom: 10px; }
  #cart-dialog .sheet__body { flex: 0 0 auto; overflow: visible; padding-top: 12px; }
  #cart-dialog .sheet__foot { position: sticky; bottom: -1px; flex-shrink: 0; gap: 8px; padding-top: 10px; padding-bottom: calc(11px + env(safe-area-inset-bottom)); }
  #cart-dialog .sheet__foot .btn--lg { min-height: 46px; }
  #cart-dialog .cart__pay { display: none; }
  /* after a refusal, while the lines it is about are still marked („Продължи“ can't be pressed yet): the footer
     scrolls with the list, so the message and the line it is about fit in sight together. It stays in place
     again once they are removed or changed */
  #cart-dialog .sheet__form.has-problems { scroll-padding-bottom: 0; }
  #cart-dialog .has-problems .sheet__foot { position: static; }
}
.cart--empty { align-items: center; text-align: center; padding: 36px 24px; gap: 6px; }
.cart--empty .ic { width: 54px; height: 54px; color: var(--blue-400); stroke-width: 1.6; margin-bottom: 8px; }
.cart-empty__title { font-weight: 700; font-size: 16px; }
.cart-empty__text { color: var(--ink-3); font-size: 14px; }

.line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.line:first-child { border-top: 0; }
.line__name { font-weight: 700; font-size: 14.5px; line-height: 1.35; }
.line__opts { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.line__note { font-size: 13px; color: var(--ink-3); font-style: italic; margin-top: 2px; }
.line__problem { font-size: 12.5px; font-weight: 700; color: var(--danger); margin-top: 4px; }
.line__side { display: grid; justify-items: end; align-content: start; gap: 8px; }
.line__price { font-weight: 700; font-variant-numeric: tabular-nums; }
.line--problem .line__name { color: var(--ink-3); text-decoration: line-through; }
.link-btn { padding: 0; border: 0; background: none; color: var(--danger); font-weight: 700; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* mobile cart bar */
.cartbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: linear-gradient(180deg, transparent, var(--bg) 40%);
  animation: rise 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (min-width: 1000px) { .cartbar { display: none !important; } }
.cartbar__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(560px, 100%);
  margin-inline: auto;
  min-height: 58px;
  padding: 0 18px 0 12px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  font-weight: 700;
  font-size: 15.5px;
  background: var(--navy-900);
  box-shadow: 0 16px 36px -14px rgba(7, 13, 31, 0.7);
}
@media (prefers-color-scheme: dark) { .cartbar__btn { background: var(--blue-600); } }
.cartbar__count {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 11px;
  background: var(--blue-500);
  font-size: 15px;
}
@media (prefers-color-scheme: dark) { .cartbar__count { background: rgba(255, 255, 255, 0.18); } }
.cartbar__label { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cartbar__total { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 320–360 px phones: keep "Виж поръчката" on one line next to the count and the total */
@media (max-width: 360px) { .cartbar__btn { gap: 8px; padding: 0 14px 0 10px; font-size: 15px; } }
.cartbar.bump .cartbar__count { animation: bump 0.35s ease; }
@keyframes bump { 40% { transform: scale(1.25); } }
@keyframes rise { from { transform: translateY(100%); } }

/* ---------- dialogs / sheets ---------- */
.sheet {
  width: min(560px, calc(100vw - 32px));
  max-width: none;
  max-height: min(calc(100vh - 48px), 880px);
  max-height: min(calc(100dvh - 48px), 880px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; animation: pop 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sheet::backdrop { background: rgba(7, 13, 31, 0.58); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes slide-up { from { transform: translateY(100%); } }
@media (max-width: 640px) {
  .sheet {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
  .sheet[open] { animation: slide-up 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
}
/* flex-basis must stay "auto" here and on .sheet__body: with "flex: 1" (basis 0%) Safari sizes the
   dialog from that zero basis and the whole sheet opens 0 px tall, so nothing appears */
.sheet__form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.sheet__head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 640px) {
  .sheet__head::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    width: 40px;
    height: 4px;
    border-radius: 4px;
    transform: translateX(-50%);
    background: var(--line-strong);
  }
}
.sheet__sub { margin-top: 4px; color: var(--ink-3); font-size: 14px; font-weight: 600; }
.sheet__body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 18px 20px 8px; }
.sheet__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.sheet__foot--stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; } /* the column never grows past the sheet */
/* narrow phones (360 px and less): quantity + "Добави · цена" in the product sheet must fit on one line */
@media (max-width: 400px) {
  #item-dialog .sheet__foot { gap: 10px; }
  #item-dialog .stepper--lg button { width: 38px; height: 38px; }
  #item-dialog .stepper--lg output { min-width: 26px; }
  #item-dialog .sheet__foot .btn--lg { min-width: 0; padding: 0 12px; gap: 6px; font-size: 15px; overflow: hidden; }
}
/* the checkout's send button: on a phone narrower than its label (a three-digit total at 341–359 px)
   the label wraps instead of running off the sheet; while sending, the spinner takes the price's place */
#checkout-dialog [data-submit] .co-submit { min-width: 0; white-space: normal; text-align: center; }
#checkout-dialog [data-submit].is-loading .co-submit__total { display: none; }
@media (max-width: 360px) { #checkout-dialog [data-submit] { padding: 0 12px; } }
@media (max-width: 340px) { /* 320 px phones: room for a three-digit total ("Добави · 159,60 €") */
  #item-dialog .sheet__foot { gap: 8px; }
  #item-dialog .sheet__foot .btn--lg { padding: 0 8px; font-size: 14px; }
  #checkout-dialog [data-submit] { padding: 0 12px; font-size: 14px; } /* "Изпрати поръчката · 159,80 €" */
}
/* product photo: edge to edge at the top of the sheet. On a short screen (a phone held sideways) it gets smaller and
   centred instead of cut at the top and bottom, so the whole plate stays in sight (46vh tall at most) */
.sheet__img {
  --img-w: min(calc(100% + 40px), 73.6vh);
  display: block;
  width: var(--img-w);
  max-width: none;
  height: auto;
  margin: -18px 0 16px calc((100% - var(--img-w)) / 2);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--surface-3);
}
.sheet .cart__lines { padding: 0; overflow: visible; }

.item-desc { color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.item-allergens { margin-top: 8px; color: var(--ink-3); font-size: 13px; }
.item-desc + .opt-group, .item-allergens + .opt-group, .item-desc + .field, .item-allergens + .field { margin-top: 18px; }

.opt-group { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.opt-group legend { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0; margin-bottom: 8px; font-weight: 700; font-size: 15px; }
.opt-group.has-error .opt { border-color: var(--danger); }
.opt-group__error { margin: -2px 0 10px; }
.opt-badge { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--surface-3); color: var(--ink-3); }
.opt-badge--req { background: var(--warn-soft); color: var(--warn); }
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.opt:hover { border-color: var(--line-strong); }
.opt:has(input:checked) { border-color: var(--blue-500); background: var(--accent-soft); }
.opt:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
.opt input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--blue-600); }
.opt__name { font-weight: 600; font-size: 14.5px; }
.opt__price { margin-left: auto; font-weight: 600; font-size: 14px; color: var(--ink-3); white-space: nowrap; }

/* checkout */
.co-block { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.co-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 15px; font-weight: 700; }
.co-h .ic { width: 18px; height: 18px; color: var(--accent); }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice__card {
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--line-strong);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.choice__title { font-weight: 700; font-size: 15px; }
.choice__sub { font-size: 13px; color: var(--ink-3); }
.choice input:checked + .choice__card { border-color: var(--blue-500); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--focus-ring); }
.choice input:focus-visible + .choice__card { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.slot-picker { margin-top: 14px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-3); margin-bottom: 12px; }
.seg__btn { min-height: 38px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; font-size: 14px; color: var(--ink-3); }
.seg__btn[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
.slot-day { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--ink-2); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; max-height: 232px; overflow: auto; padding: 2px; }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot span {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 10px;
  border: 1.5px solid var(--line-strong);
  font-weight: 700;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.slot span:hover { border-color: var(--blue-400); }
.slot input:checked + span { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
@media (prefers-color-scheme: dark) { .slot input:checked + span { background: var(--blue-600); border-color: var(--blue-600); } }
.slot input:focus-visible + span { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.when-none { padding: 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 600; font-size: 14px; }

.co-lines { list-style: none; display: grid; gap: 8px; font-size: 14px; }
.co-lines li { display: flex; justify-content: space-between; gap: 12px; }
.co-lines small { color: var(--ink-3); }
.co-lines li > span:last-child { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.co-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.co-total strong { font-size: 20px; }
.co-pay { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-3); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.co-pay .ic { width: 18px; height: 18px; color: var(--accent); }
.co-legal { font-size: 12.5px; color: var(--ink-4); line-height: 1.5; }
.co-legal a { color: var(--ink-3); }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 60;
  width: max-content; /* left: 50% would otherwise leave it only the right half of the screen to wrap in */
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--navy-900);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1000px) { .toast { bottom: 32px; } }

/* ---------- footer ---------- */
.footer { background: var(--navy-950); color: #b9c4e6; padding: 48px 0 calc(36px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
/* phones, while the cart bar is shown over the bottom of the screen (app.js: has-cartbar): room for it UNDER the
   footer, on the page's background like everywhere else, so at the end of the page it neither covers the footer nor
   fades into it */
.page-home.has-cartbar { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.page-home.has-cartbar .footer { padding-bottom: 36px; }
@media (min-width: 1000px) { .page-home.has-cartbar { padding-bottom: 0; } }
.footer a { color: #e6ebfa; text-decoration-color: rgba(143, 169, 246, 0.5); text-underline-offset: 3px; }
.footer__grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.footer .logo { height: 50px; }
.footer__tag { margin-top: 14px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #7f8db9; }
.footer__tag span { white-space: nowrap; } /* a new line only between the phrases, never inside one */
/* "Работно време": the kitchen's, then the Inbet point's (config otherHours), each under its own small title */
.footer__sub { margin-bottom: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #8fa9f6; }
.footer__hours + .footer__sub { margin-top: 16px; }
.footer__sub--logo { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; } /* config otherHours[].logo */
.footer__sub--logo img { height: 24px; width: auto; }
.footer__badge { /* "18+": a small round mark */
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0;
  color: #e6ebfa;
  vertical-align: middle;
}
.footer__hours { display: grid; gap: 6px; margin: 0; }
.footer__hours div { display: flex; gap: 14px; }
.footer__hours dt { min-width: 5.5em; color: #e6ebfa; font-weight: 600; } /* wide enough for "Всеки ден": the times line up */
.footer__hours dd { margin: 0; font-variant-numeric: tabular-nums; }
.footer__hours dd span { white-space: nowrap; }
.footer__hours .is-off { color: #7f8db9; }
.footer__h { margin-bottom: 8px; font-family: var(--font-display); font-weight: 500; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; }
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(143, 169, 246, 0.14);
  font-size: 12.5px;
  color: #7f8db9;
}
.footer--slim { padding: 8px 0 28px; }
.footer--slim .footer__legal { margin-top: 0; border-top: 0; }

/* ---------- order status page ---------- */
.card {
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.order-page { display: grid; gap: 16px; max-width: 680px; padding: 24px 0 56px; }
.order-loading { display: grid; justify-items: center; gap: 12px; padding: 48px 22px; color: var(--ink-3); }
.order-hero { position: relative; overflow: hidden; text-align: center; padding: 28px 22px 24px; }
.order-hero .eyebrow { color: var(--accent); }
.order-no { font-family: var(--font-display); font-weight: 600; font-size: clamp(46px, 12vw, 64px); line-height: 1; letter-spacing: 0.01em; }
.order-state { margin-top: 12px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13.5px;
  background: var(--surface-3);
  color: var(--ink-2);
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge--blue { background: var(--accent-soft); color: var(--accent-soft-ink); }
.badge--amber { background: var(--warn-soft); color: var(--warn); }
.badge--green { background: var(--ok-soft); color: var(--ok); }
.badge--red { background: var(--danger-soft); color: var(--danger); }
.badge--muted { background: var(--surface-3); color: var(--ink-3); }
.order-msg { margin: 14px auto 0; max-width: 460px; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.order-msg strong { color: var(--ink); }
.order-msg a { color: var(--accent); font-weight: 700; }
.order-hero--ready { border-color: color-mix(in srgb, var(--green-500) 45%, var(--line)); box-shadow: 0 0 0 4px var(--ok-soft), var(--shadow-sm); }
.order-hero--ready .order-no { color: var(--ok); }

/* equal columns (minmax 0): the connecting lines below run from dot to dot, and a long label can't widen its column */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 24px auto 4px; max-width: 520px; }
.step { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; }
.step::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 50%;
  width: 100%;
  height: 3px;
  background: var(--line);
  z-index: 0;
}
.step:first-child::before { display: none; }
.step.is-done::before, .step.is-current::before { background: var(--accent); }
.step__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--line-strong);
  color: #fff;
}
.step__dot .ic { width: 16px; height: 16px; stroke-width: 3; }
.step.is-done .step__dot { background: var(--accent); border-color: var(--accent); }
.step.is-current .step__dot { border-color: var(--accent); box-shadow: 0 0 0 5px var(--focus-ring); }
.step.is-current .step__dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse-dot 1.6s ease-in-out infinite; }
.step.is-current.is-final .step__dot { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 5px var(--ok-soft); }
.step.is-current.is-final .step__dot::after { display: none; }
@keyframes pulse-dot { 50% { transform: scale(0.6); opacity: 0.6; } }
.step__label { font-size: 12.5px; font-weight: 700; color: var(--ink-4); }
.step.is-done .step__label, .step.is-current .step__label { color: var(--ink); }
.notify-btn { margin-top: 18px; }
.btn.notify-btn { max-width: 100%; white-space: normal; text-align: center; } /* wraps on 320 px phones instead of being cut */
@media (max-width: 400px) { .step__label { font-size: 11.5px; } }
/* 320–360 px phones: a word like "Изпратена" is wider than a quarter of the card; use some of the card's padding */
@media (max-width: 360px) { .steps { margin-inline: -12px; } .step__label { font-size: 10.5px; } }
@media (max-width: 310px) { .steps { margin-inline: -16px; } .step__label { font-size: 9.5px; letter-spacing: -0.01em; } }

.card__title { margin-bottom: 14px; font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: 0.03em; text-transform: uppercase; }
.kv { display: grid; gap: 12px; margin: 0; }
.kv div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; }
.kv dt { color: var(--ink-3); font-size: 14px; font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; }
.card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.order-items { list-style: none; display: grid; gap: 12px; }
.order-items li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; }
.order-items .q { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.order-items small { display: block; color: var(--ink-3); font-size: 13px; }
.order-items .price { font-weight: 600; font-variant-numeric: tabular-nums; }
.order-note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--surface-3); color: var(--ink-2); font-size: 14px; }
.order-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.order-total strong { font-size: 22px; }
.order-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
/* both buttons on one row from 375 px phones up, Safari included (its 1.5 px borders make each button 1 px wider) */
.order-actions .btn { padding: 0 16px; }

/* ---------- documents (privacy, 404) ---------- */
.doc { padding: 28px 0 56px; }
.doc__card { max-width: 760px; margin: 0 auto; padding: clamp(22px, 4vw, 40px); }
.doc__card--center { text-align: center; display: grid; gap: 14px; justify-items: center; }
.doc h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 5vw, 40px); text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.1; }
.doc__lead { margin-top: 10px; color: var(--ink-3); font-size: 16px; }
.doc h2 { margin: 26px 0 8px; font-size: 17px; }
.doc p, .doc li { color: var(--ink-2); line-height: 1.65; }
.doc ul { padding-left: 20px; }
.doc a:not(.btn) { color: var(--accent); font-weight: 600; }
.doc__back { margin-top: 30px; }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .logo { height: 38px; }
  .hero__copy { padding: 18px 0 20px; }
  .chips { gap: 6px; margin-top: 16px; }
  .chip { min-height: 34px; padding: 5px 11px; gap: 6px; font-size: 12.5px; }
  .chip .ic { width: 15px; height: 15px; }
  /* before app.js has measured: start phones on the short labels so the row does not jump */
  .chips:not([data-fit]) .chip__l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .chips:not([data-fit]) .chip__s { display: inline; }
  .item { padding: 14px; }
  .item__img { width: 84px; height: 84px; }
  .cat-title { font-size: 22px; }
  .kv div { grid-template-columns: 80px 1fr; }
  .card { padding: 18px; }
}
/* narrow phones: a little tighter so the three short chips share one row */
@media (max-width: 389px) {
  .chip { padding: 5px 9px; font-size: 12px; }
  .chip .ic { width: 14px; height: 14px; }
}
@media (max-width: 359px) {
  .chips { gap: 5px; }
  .chip { padding: 5px 7px; gap: 5px; font-size: 11.5px; }
  .chip .ic { width: 13px; height: 13px; }
}
@media (max-width: 339px) {
  .chips { gap: 4px; }
  .chip { gap: 4px; font-size: 11px; }
  .chip .ic { width: 12px; height: 12px; }
}

/* ---------- small additions used by app.js ---------- */
.line__edit {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  text-align: left;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.line__edit:hover { text-decoration-color: var(--line-strong); }
.link-btn--accent { color: var(--accent); }
.line__side .link-btn + .link-btn { margin-top: 2px; }
.choice input:disabled + .choice__card { opacity: 0.5; cursor: not-allowed; }
.sheet__foot .form-error { margin: 0; }
.sheet__sub--tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sheet__sub--tags .tag { margin-left: 0; }
.sheet.is-fallback { position: fixed; inset: auto 0 0; z-index: 100; }
.sheet .empty-state { padding: 32px 8px; }
.sheet .empty-state .ic { color: var(--blue-400); }
.empty-state .btn { margin-top: 6px; }
.notify-on { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 14px; font-weight: 600; }
.notify-on .ic { width: 18px; height: 18px; color: var(--accent); }
.doc__card--center > .ic, .order-loading > .ic { width: 40px; height: 40px; color: var(--ink-4); }
