/* ==========================================================================
   FIRE SHAWARMA — style.css
   Светлая тема. Mobile-first. Breakpoints: 400 / 600 / 768 / 960 / 1200
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #FAF9F6;
  --surface: #FFFFFF;
  --surface-2: #F4F2ED;
  --surface-3: #ECE9E2;
  --line: #E8E5DF;
  --line-strong: #D6D2C9;

  --text: #222426;
  --text-muted: #6E6D6A;

  --fire: #C84B31;
  --fire-hover: #B03E26;
  --fire-text: #B03E26;      /* акцент для мелкого текста: контраст >= 4.5:1 */
  --fire-soft: rgba(200, 75, 49, 0.09);
  --success: #1E8E5A;
  --success-soft: rgba(30, 142, 90, 0.1);
  --danger: #D13434;
  --danger-soft: rgba(209, 52, 52, 0.08);

  --font-head: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(34, 36, 38, 0.04);
  --shadow-card: 0 1px 2px rgba(34, 36, 38, 0.03), 0 6px 20px rgba(34, 36, 38, 0.05);
  --shadow-hover: 0 2px 4px rgba(34, 36, 38, 0.04), 0 14px 32px rgba(34, 36, 38, 0.09);
  --shadow-fire: none;

  --gutter: 16px;
  --container: 1200px;
  --topbar-h: 88px;
  --navbar-h: 64px;
  --floating-h: 72px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 0.18s var(--ease);
  --t-med: 0.32s var(--ease);
}

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
    --topbar-h: 40px;
    --navbar-h: 72px;
  }
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--floating-h) + env(safe-area-inset-bottom, 0px));
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
dd, dl { margin: 0; }
[hidden] { display: none !important; }

::selection { background: var(--fire); color: #fff; }

:focus-visible {
  outline: 2px solid var(--fire);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--text);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top var(--t-fast);
}
.skip-link:focus { top: 12px; }

.text-fire { color: var(--fire); }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.btn--primary {
  background: var(--fire);
  color: #fff;
  box-shadow: var(--shadow-fire);
}
.btn--primary:hover {
  background: var(--fire-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(200, 75, 49, 0.22);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--fire);
  color: var(--fire-text);
}

.btn--sm { min-height: 40px; padding: 10px 18px; font-size: 14px; }
.btn--lg { min-height: 56px; padding: 16px 30px; font-size: 16px; }
.btn--block { width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover { background: var(--text); color: #fff; border-color: var(--text); }
.icon-btn--sm { width: 34px; height: 34px; }
.icon-btn--sm .icon { width: 16px; height: 16px; }
.icon-btn--sm:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky;
  top: calc(var(--topbar-h) * -1);
  z-index: 100;
}

.topbar {
  height: var(--topbar-h);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.topbar__inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "loc loc"
    "hours phone";
  align-items: center;
  row-gap: 2px;
}

.topbar__location { grid-area: loc; display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar__hours { grid-area: hours; display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.topbar__phone { grid-area: phone; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; transition: color var(--t-fast); }
.topbar__phone:hover { color: var(--fire-text); }
.topbar .icon { width: 16px; height: 16px; color: var(--fire); }
.topbar__hours span { white-space: nowrap; }
.topbar__days { display: none; }
@media (min-width: 400px) { .topbar__days { display: inline; } }

.location-select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  max-width: 100%;
  padding: 6px 28px 6px 2px;
  border: 0;
  border-bottom: 1px dashed var(--line-strong);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C84B31' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 4px center;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.location-select:hover { border-bottom-color: var(--fire); }
.location-select option { background: #fff; color: var(--text); }

@media (min-width: 768px) {
  .topbar__inner {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "loc hours phone";
    column-gap: 32px;
  }
}

.navbar {
  height: var(--navbar-h);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.navbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Логотип — спокойная типографика */
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo__fire { color: var(--fire); }
.logo__word { color: var(--text); font-weight: 500; }
@media (min-width: 768px) { .logo { font-size: 20px; } }

.main-nav { display: none; }
.main-nav__list { display: flex; gap: 8px; }
.main-nav__list a {
  position: relative;
  display: block;
  padding: 10px 16px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  transition: color var(--t-fast);
}
.main-nav__list a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--fire);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med);
}
.main-nav__list a:hover { color: var(--text); }
.main-nav__list a:hover::after { transform: scaleX(1); }
@media (min-width: 768px) { .main-nav { display: block; } }

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.cart-btn:hover { border-color: var(--fire); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.cart-btn__label { display: none; }
.cart-btn__badge {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: var(--fire);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
@media (min-width: 480px) { .cart-btn__label { display: inline; } }

/* ---------- 5. Hero (split) ---------- */
.hero {
  padding: 32px 0 48px;
  background: var(--bg);
}

.hero__inner {
  display: grid;
  gap: 32px;
  align-items: center;
}

.hero__eyebrow {
  margin-bottom: 18px;
  color: var(--fire-text);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero__title {
  font-size: clamp(2.1rem, 7.6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.hero__usp {
  margin-top: 18px;
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 4.2vw, 1.4rem);
  font-weight: 700;
}

.hero__text {
  margin-top: 12px;
  max-width: 500px;
  color: var(--text-muted);
  font-size: 17px;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}
.hero__actions .btn { width: 100%; }

.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero__facts li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hero__facts strong {
  font-family: var(--font-head);
  font-size: clamp(0.9rem, 3.8vw, 1.2rem);
  font-weight: 700;
}
.hero__facts span { font-size: 12.5px; color: var(--text-muted); line-height: 1.35; }

.hero__figure { position: relative; margin: 0; }

.hero__frame {
  padding: 10px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.hero__photo {
  width: 100%;
  height: auto;
  aspect-ratio: 6 / 5;
  object-fit: cover;
  border-radius: 16px;
  background: var(--surface-2);
}

.hero__chip {
  position: absolute;
  left: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 40px);
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.35;
}
.hero__chip .icon { width: 26px; height: 26px; color: var(--fire); }
.hero__chip strong { display: block; color: var(--text); font-family: var(--font-head); font-size: 14px; }

@media (min-width: 600px) {
  .hero__actions { flex-direction: row; }
  .hero__actions .btn { width: auto; }
}

@media (min-width: 960px) {
  .hero { padding: 72px 0 88px; }
  .hero__inner { grid-template-columns: 1fr 1fr; gap: 64px; }
  .hero__photo { aspect-ratio: 1 / 1; max-height: 560px; }
  .hero__chip { left: 28px; bottom: 28px; }
}

/* ---------- 6. Sections ---------- */
.section {
  padding: 56px 0;
  scroll-margin-top: var(--navbar-h);
}
@media (min-width: 960px) { .section { padding: 88px 0; } }

.section__head { max-width: 680px; margin-bottom: 28px; }

.section__eyebrow {
  margin-bottom: 10px;
  color: var(--fire-text);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section__title {
  font-size: clamp(1.7rem, 6vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.section__lead { margin-top: 12px; color: var(--text-muted); font-size: 16px; }

/* ---------- 7. Menu: tabs ---------- */
.tabs {
  display: flex;
  gap: 8px;
  margin: 0 calc(var(--gutter) * -1) 24px;
  padding: 4px var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: none;
  scroll-snap-align: start;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text-muted);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.tab:hover { color: var(--text); border-color: var(--text); }
.tab.is-active,
.tab[aria-selected="true"] {
  background: var(--fire);
  border-color: var(--fire);
  color: #fff;
}

@media (min-width: 768px) {
  .tabs { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; overflow: visible; }
}

/* ---------- 8. Menu: product grid & cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 600px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
@media (min-width: 1200px) { .product-grid { gap: 28px; } }

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-hover);
}

.card__img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
}
.card { isolation: isolate; position: relative; }
.card__media { position: relative; overflow: hidden; background: var(--surface-2); }
.card__media .card__img { transition: transform 0.6s var(--ease); }
.card:hover .card__media .card__img { transform: scale(1.03); }
.card__img--empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 210px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  color: var(--line-strong);
}
.card__img--empty .icon { width: 44px; height: 44px; stroke-width: 1.25; }

/* Соусы и напитки: небольшое фото целиком на белом фоне */
.card--compact .card__media { background: #fff; padding: 18px 20px 0; }
.card--compact .card__img { height: 140px; object-fit: contain; }
.card--compact .card__img--empty { height: 140px; border-radius: var(--radius); }
.card--compact:hover .card__media .card__img { transform: none; }

/* Все фото целиком (contain) на белом фоне: блюдо реально уменьшается, а не обрезается */
.card .card__media { background: #fff; padding: 16px 20px 0; }
.card .card__img { object-fit: contain; border-radius: var(--radius); }
.card:hover .card__media .card__img { transform: none; }
.card[data-category="shawarma"] .card__img,
.card[data-category="shawarma"] .card__img--empty { height: 170px; }
.card[data-category="combo"] .card__img,
.card[data-category="combo"] .card__img--empty { height: 140px; }
.card[data-category="pita"] .card__img,
.card[data-category="pita"] .card__img--empty,
.card[data-category="snacks"] .card__img,
.card[data-category="snacks"] .card__img--empty { height: 120px; }

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  color: var(--fire-text);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pill {
  min-width: 44px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text-muted);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.pill:hover { border-color: var(--text-muted); color: var(--text); }
.pill[aria-checked="true"] { background: var(--fire-soft); border-color: var(--fire); color: var(--fire-text); }

.card__body { flex: 1; padding: 16px 20px 0; }

.card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.card__title { font-size: 18px; font-weight: 600; }
.card__weight { flex: none; color: var(--text-muted); font-size: 13.5px; font-weight: 500; }
.card__desc { margin-top: 8px; color: var(--text-muted); font-size: 14.5px; line-height: 1.5; }

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 20px;
}
.card__price { display: flex; align-items: baseline; gap: 6px; }
.card__price-value {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.card__price-cur { color: var(--text-muted); font-size: 13px; font-weight: 700; }

.menu-empty {
  padding: 40px 20px;
  border-radius: var(--radius);
  border: 1.5px dashed var(--line-strong);
  color: var(--text-muted);
  text-align: center;
}

/* ---------- 9. Perks strip ---------- */
.perks { padding: 8px 0 24px; scroll-margin-top: var(--navbar-h); }

.perks__list {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.perk {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}
.perk:first-child { border-top: 0; }

.perk__icon { flex: none; color: var(--fire); }
.perk__icon .icon { width: 26px; height: 26px; stroke-width: 1.4; }
.perk__title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.perk__text { margin-top: 3px; color: var(--text-muted); font-size: 13.5px; line-height: 1.45; }
.perk__code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--fire-soft);
  color: var(--fire-text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

@media (min-width: 600px) {
  .perks__list { grid-template-columns: repeat(2, 1fr); }
  .perk { border-top: 0; border-left: 1px solid var(--line); }
  .perk:nth-child(odd) { border-left: 0; }
  .perk:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (min-width: 1100px) {
  .perks__list { grid-template-columns: repeat(4, 1fr); }
  .perk { padding: 22px 22px; }
  .perk:nth-child(odd) { border-left: 1px solid var(--line); }
  .perk:first-child { border-left: 0; }
  .perk:nth-child(n+3) { border-top: 0; }
}

/* ---------- 10. Locations ---------- */
.locations__grid { display: grid; gap: 20px; }
@media (min-width: 768px) { .locations__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .locations__grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.location-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: border-color var(--t-med), transform var(--t-med), box-shadow var(--t-med);
}
.location-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.location-card--delivery { background: linear-gradient(160deg, var(--fire-soft), var(--surface) 55%); }
@media (min-width: 768px) { .location-card--delivery { grid-column: 1 / -1; } }
@media (min-width: 1200px) { .location-card--delivery { grid-column: auto; } }

.location-card__title { font-size: 22px; font-weight: 700; }
.location-card__sub { color: var(--text-muted); font-size: 14px; }
.location-card__note { margin-top: 14px; color: var(--fire-text); font-size: 14px; font-weight: 600; }
.location-card .btn { margin-top: 20px; }

.info-list { display: grid; gap: 12px; margin-top: 18px; font-size: 15px; }
.info-list li { display: flex; align-items: flex-start; gap: 12px; }
.info-list .icon { margin-top: 2px; width: 18px; height: 18px; color: var(--fire); }
.info-list a { transition: color var(--t-fast); }
.info-list a:hover { color: var(--fire-text); }

/* ---------- 11. Footer ---------- */
.site-footer {
  padding: 56px 0 24px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--navbar-h);
}

.footer__grid { display: grid; gap: 32px; }
@media (min-width: 600px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; } }

.footer__about { margin-top: 16px; max-width: 320px; color: var(--text-muted); font-size: 14.5px; }

.footer__title {
  margin-bottom: 14px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fire-text);
}
.footer__col ul { display: grid; gap: 10px; color: var(--text-muted); font-size: 15px; }
.footer__col a { transition: color var(--t-fast); }
.footer__col a:hover { color: var(--text); }

.socials { display: flex !important; gap: 10px !important; }
.socials__link {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text) !important;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.socials__link:hover { background: var(--fire); border-color: var(--fire); color: #fff !important; transform: translateY(-3px); }

.footer__legal {
  display: grid;
  gap: 8px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.footer__copy { color: var(--text); font-weight: 500; }

/* ---------- 12. Form controls (shared) ---------- */
.qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.qty__btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: background var(--t-fast), color var(--t-fast);
}
.qty__btn:hover { background: var(--fire); color: #fff; }
.qty__btn .icon { width: 16px; height: 16px; stroke-width: 2.5; }
.qty__value { min-width: 32px; text-align: center; font-family: var(--font-head); font-weight: 700; }
.qty--sm .qty__btn { width: 28px; height: 28px; }
.qty--sm .qty__btn .icon { width: 13px; height: 13px; }
.qty--sm .qty__value { min-width: 26px; font-size: 14px; }

.option-group { margin-top: 22px; }
.option-group__title {
  margin-bottom: 12px;
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.option-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }

.option { position: relative; display: block; cursor: pointer; }
.option input,
.check input,
.pay input,
.segmented input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.option__box {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.option:hover .option__box { border-color: var(--text-muted); }
.option__name { font-family: var(--font-head); font-weight: 600; font-size: 16px; }
.option__hint { color: var(--text-muted); font-size: 13px; }
.option__price { margin-top: 4px; color: var(--fire-text); font-size: 13px; font-weight: 700; }
.option input:checked + .option__box {
  border-color: var(--fire);
  background: var(--fire-soft);
  box-shadow: 0 0 0 1px var(--fire);
}
.option input:focus-visible + .option__box,
.check input:focus-visible ~ .check__box,
.pay input:focus-visible + .pay__box,
.segmented input:focus-visible + label {
  outline: 2px solid var(--fire);
  outline-offset: 2px;
}

.check-list { display: grid; gap: 8px; }
.check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1.5px solid var(--line);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.check:hover { border-color: var(--line-strong); }
.check__box {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  color: transparent;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.check__box .icon { width: 14px; height: 14px; stroke-width: 3.5; }
.check__name { flex: 1; font-weight: 500; }
.check__price { color: var(--text-muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.check input:checked ~ .check__box { background: var(--fire); border-color: var(--fire); color: #fff; }
.check:has(input:checked) { background: var(--fire-soft); border-color: var(--fire); }

/* ---------- 13. Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 0.32s;
}
.modal.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }

.modal__overlay,
.drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(34, 36, 38, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--t-med);
}
.modal.is-open .modal__overlay,
.drawer.is-open .drawer__overlay { opacity: 1; }

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--surface);
  box-shadow: 0 -20px 60px rgba(34, 36, 38, 0.25);
  transform: translateY(100%);
  transition: transform var(--t-med);
}
.modal.is-open .modal__dialog { transform: translateY(0); }
.modal__dialog:focus { outline: none; }

.modal__close { position: absolute; z-index: 5; top: 12px; right: 12px; background: rgba(255, 255, 255, 0.92); box-shadow: var(--shadow-card); }

.modal__media { height: 190px; background: var(--surface-2); }
.modal__img { width: 100%; height: 100%; object-fit: cover; }

.modal__form { padding: 22px 20px 0; }
.modal__title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.modal__title { font-size: 24px; font-weight: 700; }
.modal__weight { flex: none; color: var(--text-muted); font-size: 14px; font-weight: 500; }
.modal__desc { margin-top: 8px; color: var(--text-muted); font-size: 14.5px; }

.modal__footer {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px 16px;
  margin: 24px -20px 0;
  padding: 16px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.modal__price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.modal__price-label { color: var(--text-muted); font-size: 12px; }
.modal__price-value { font-family: var(--font-head); font-size: 26px; font-weight: 700; }
.modal__submit { grid-column: 1 / -1; }

@media (min-width: 600px) {
  .modal { align-items: center; padding: 24px; }
  .modal__dialog {
    max-height: 90vh;
    border-radius: var(--radius-lg);
    transform: translateY(24px) scale(0.96);
    opacity: 0;
    transition: transform var(--t-med), opacity var(--t-med);
  }
  .modal.is-open .modal__dialog { transform: none; opacity: 1; }
  .modal__media { height: 240px; }
  .modal__form { padding: 26px 28px 0; }
  .modal__footer { margin-inline: -28px; padding-inline: 28px; grid-template-columns: auto 1fr auto; }
  .modal__submit { grid-column: auto; }
  .modal__price { align-items: flex-start; }
}

/* ---------- 14. Cart drawer ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 210;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 0.38s;
}
.drawer.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }

.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 460px;
  background: var(--bg);
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgba(34, 36, 38, 0.2);
  transform: translateX(100%);
  transition: transform 0.38s var(--ease);
}
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__panel:focus { outline: none; }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.drawer__title { font-size: 22px; font-weight: 700; }

.drawer__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
  display: grid;
  gap: 28px;
  align-content: start;
}

.drawer__foot {
  padding: 16px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px rgba(34, 36, 38, 0.06);
}

.cart-list { display: grid; gap: 12px; }

.cart-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 28px 16px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1.5px dashed var(--line-strong);
}
.cart-empty__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--fire-soft);
  color: var(--fire);
}
.cart-empty__icon .icon { width: 26px; height: 26px; }
.cart-empty__title { font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.cart-empty__text { max-width: 260px; margin-bottom: 10px; color: var(--text-muted); font-size: 14px; }

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.cart-item__thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-2);
}
.cart-item__title { font-size: 15px; font-weight: 700; line-height: 1.25; }
.cart-item__opts { margin: 4px 0 10px; color: var(--text-muted); font-size: 12.5px; line-height: 1.4; }
.cart-item__side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; align-self: stretch; gap: 10px; }
.cart-item__price { font-family: var(--font-head); font-weight: 700; font-size: 15px; white-space: nowrap; }

.checkout { display: grid; gap: 24px; }
.checkout__title {
  margin-bottom: 12px;
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
}
.segmented label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.segmented label:hover { color: var(--text); }
.segmented input:checked + label {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.segmented .icon { width: 18px; height: 18px; }
.segmented__badge {
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--fire);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field__label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.field__opt { font-weight: 400; opacity: 0.8; }

.field__input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  color: var(--text);
  font-size: 16px; /* >=16px: iOS не масштабирует страницу */
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field__input::placeholder { color: #A5A3AE; }
.field__input:hover { border-color: var(--text-muted); }
.field__input:focus {
  outline: none;
  border-color: var(--fire);
  box-shadow: 0 0 0 4px rgba(200, 75, 49, 0.15);
}
.field__input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(209, 52, 52, 0.12);
}
.field__input--area { min-height: 76px; resize: vertical; }
.field__input--select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C84B31' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
.field__error { color: var(--danger); font-size: 13px; }

.pay-list { display: grid; gap: 8px; }
.pay { position: relative; display: block; cursor: pointer; }
.pay__box {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1.5px solid var(--line);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.pay__box .icon { color: var(--fire); }
.pay__name { flex: 1; font-weight: 600; }
.pay__box::after {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.pay:hover .pay__box { border-color: var(--line-strong); }
.pay input:checked + .pay__box { border-color: var(--fire); background: var(--fire-soft); }
.pay input:checked + .pay__box::after {
  border-color: var(--fire);
  background: var(--fire);
  box-shadow: inset 0 0 0 3px var(--surface);
}

.checkout__consent { color: var(--text-muted); font-size: 12px; line-height: 1.5; }

.totals { display: grid; gap: 6px; margin: 0 0 14px; }
.totals__row { display: flex; justify-content: space-between; gap: 16px; color: var(--text-muted); font-size: 14px; }
.totals__row dd { color: var(--text); font-weight: 600; text-align: right; }
.totals__row--discount dd { color: var(--success); }
.totals__row--grand {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  color: var(--text);
}
.totals__row--grand dt { font-family: var(--font-head); font-size: 16px; font-weight: 700; }
.totals__row--grand dd { font-family: var(--font-head); font-size: 26px; font-weight: 700; }

/* Прогресс бесплатной доставки */
.progress {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.progress__text { margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.progress__text b { color: var(--fire-text); }
.progress__track { height: 8px; overflow: hidden; border-radius: var(--radius-pill); background: var(--surface-3); }
.progress__bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--fire);
  transition: width var(--t-med);
}
.progress.is-complete { border-color: rgba(30, 142, 90, 0.4); background: var(--success-soft); }
.progress.is-complete .progress__text { color: var(--success); }
.progress.is-complete .progress__bar { background: var(--success); }

/* Промокод */
.promo-form { display: flex; gap: 8px; }
.promo-form__input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.promo-form__input::placeholder { text-transform: none; letter-spacing: 0; }
.promo-form__input:disabled { color: var(--success); border-color: rgba(30, 142, 90, 0.5); background: var(--success-soft); opacity: 1; }
.promo-form__btn { flex: none; min-height: 44px; }
.promo-msg { margin: 8px 2px 0; font-size: 13px; line-height: 1.45; }
.promo-msg.is-success { color: var(--success); }
.promo-msg.is-info { color: var(--fire-text); }
.promo-msg.is-error { color: var(--danger); }
.promo-form + .totals,
.promo-form + .promo-msg + .totals { margin-top: 14px; }

.checkout__error {
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  border: 1px solid rgba(209, 52, 52, 0.35);
  color: var(--danger);
  font-size: 13.5px;
  line-height: 1.45;
}

/* Подтверждение заказа */
.order-done {
  display: none;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 24px;
  overflow-y: auto;
  text-align: center;
}
.drawer__panel.is-done .order-done { display: flex; }
.drawer__panel.is-done .drawer__body,
.drawer__panel.is-done .drawer__foot { display: none; }

.order-done__icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--fire);
  color: #fff;
  box-shadow: var(--shadow-fire);
  animation: pop 0.5s var(--ease);
}
.order-done__icon .icon { width: 42px; height: 42px; stroke-width: 3; }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
.order-done__title { font-size: 28px; font-weight: 700; }
.order-done__title:focus { outline: none; }
.order-done__num { color: var(--text-muted); }
.order-done__num strong { color: var(--fire-text); font-family: var(--font-head); letter-spacing: 0.04em; }
.order-done__text { max-width: 320px; color: var(--text-muted); font-size: 15px; }
.order-done__sum {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 340px;
  margin: 10px 0 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
}
.order-done__sum > div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--text-muted); }
.order-done__sum dd { color: var(--text); font-weight: 700; text-align: right; }

/* ---------- 15. Mobile floating cart bar ---------- */
.floating-cart {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(248, 247, 244, 0.96) 60%, rgba(248, 247, 244, 0));
  pointer-events: none;
}
.floating-cart__btn {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  min-height: 52px;
  margin-inline: auto;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  background: var(--fire);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 10px 28px rgba(200, 75, 49, 0.4);
  transition: transform var(--t-fast);
}
.floating-cart__btn:active { transform: scale(0.98); }
.floating-cart__left { display: inline-flex; align-items: center; gap: 8px; }
.floating-cart__label { display: none; }
.floating-cart__total { font-size: 16px; white-space: nowrap; }
@media (min-width: 400px) { .floating-cart__label { display: inline; } }
@media (min-width: 768px) {
  .floating-cart { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- 16. States, toast ---------- */
.btn:disabled,
.btn:disabled:hover {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn.is-loading,
.btn.is-loading:disabled { opacity: 0.9; cursor: progress; pointer-events: none; }
.btn.is-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.cart-btn__badge.is-bump,
.floating-cart__count.is-bump { animation: bump 0.4s var(--ease); }
@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--floating-h) + 16px + env(safe-area-inset-bottom, 0px));
  z-index: 250;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--text);
  box-shadow: 0 12px 30px rgba(34, 36, 38, 0.3);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity var(--t-med), transform var(--t-med);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 768px) { .toast { bottom: 32px; } }

/* ---------- 17. Reduced motion ---------- */
@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;
  }
}
