/* ===== Foodly — дизайн-система (тёплая «вкусная» палитра) ===== */
:root {
  /* Основные — тёплый оранжевый/янтарь */
  --orange: #f97316;
  --orange-dark: #ea580c;
  --amber: #fbbf24;
  --amber-2: #fcd34d;

  /* Зелёный акцент — под логотип-авокадо, для «экономии»/эко-смыслов */
  --leaf: #65a30d;
  --leaf-dark: #4d7c0f;
  --leaf-soft: #ecfccb;

  /* Фоны и поверхности */
  --bg: #fcf9f7;          /* тёплый белый */
  --card: #ffffff;
  --peach-50: #fff6ed;
  --peach-100: #ffefe2;
  --footer-bg: #fcf2e9;

  /* Границы */
  --line: #fde3c5;
  --line-soft: #fff1e0;

  /* Текст */
  --ink: #2c2c2c;
  --muted: #6b7280;
  --muted-2: #9ca3af;

  /* Статусы */
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warn: #b45309;
  --amber-soft: #fef3c7;

  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 1px 3px rgba(120, 60, 10, 0.05), 0 12px 28px rgba(120, 60, 10, 0.06);
  --shadow-soft: 0 8px 18px -6px rgba(249, 115, 22, 0.18);
  --max: 620px;
  --nav-h: 66px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---- Layout ---- */
.app {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 24px);
  position: relative;
}

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(252, 249, 247, 0.88);
  backdrop-filter: saturate(180%) blur(10px);
  padding: 12px 18px 10px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

/* Логотип-авокадо + вордмарк */
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.brand img { height: 34px; width: 34px; }
.brand .word { color: var(--ink); }
.brand .word b { color: var(--orange); font-weight: 800; }
.brand small { color: var(--orange); font-weight: 800; }

/* Навигация в шапке — только на десктопе (см. media-запрос ниже) */
.top-nav { display: none; }

.content { padding: 16px 16px 8px; }

.page-title { font-size: 23px; font-weight: 800; margin: 6px 2px 4px; letter-spacing: -0.02em; }
.page-sub { color: var(--muted); margin: 0 2px 16px; font-size: 14px; }

/* ---- HERO (лендинг покупателя) ---- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #fff5e9, #ffefe2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image:
    radial-gradient(circle at 82% 22%, rgba(251,191,36,0.20), transparent 42%),
    radial-gradient(circle at 12% 82%, rgba(249,115,22,0.14), transparent 40%);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { margin: 0 0 6px; font-size: 27px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
.hero h1 .accent { color: var(--orange); }
.hero p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* плитки еды в hero */
.food-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.food-tile {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 16px; padding: 12px 6px; text-align: center;
  backdrop-filter: blur(4px);
}
.food-tile .emo { font-size: 30px; }
.food-tile .lbl { font-size: 15px; font-weight: 800; color: var(--orange-dark); margin-top: 4px; }
.food-tile .sub { font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 1px; }

/* Кнопки hero — капсом, как в макете */
.hero-btn { text-transform: uppercase; letter-spacing: 0.03em; font-size: 14px; padding: 13px 22px; }

/* Иллюстрация-пакет в центре hero (только на широких экранах) */
.hero-bag-wrap { display: none; }
.hero-bag { width: 220px; height: 232px; filter: drop-shadow(0 12px 20px rgba(120,60,10,0.14)); }
@media (min-width: 1100px) {
  .hero-bag-wrap { display: block; flex: 0 0 auto; }
}

/* ---- Поиск с иконкой фильтра ---- */
.search-wrap { position: relative; margin-bottom: 12px; }
.search-wrap .search { margin: 0; padding-left: 44px; padding-right: 48px; }
.search-ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 15px; opacity: 0.6; pointer-events: none; }
.search-filter {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 10px; border: none; cursor: pointer;
  background: var(--peach-100); color: var(--orange-dark); font-size: 17px;
}
.search-filter:hover { background: var(--peach-50); }

/* ---- Section header ---- */
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 12px; }
.section-head h2 { font-size: 18px; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
.section-head a { color: var(--orange); font-size: 14px; font-weight: 700; }

/* ---- Filters / категории ---- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 9px 15px; border-radius: 999px;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: all 0.15s; box-shadow: 0 1px 2px rgba(120,60,10,0.04);
}
.chip:hover { background: var(--peach-50); border-color: var(--amber); }
.chip.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 7px; }
.chip-emoji {
  width: 22px; height: 22px; border-radius: 999px; background: var(--peach-100);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex: 0 0 auto;
}
.chip.active .chip-emoji { background: rgba(255,255,255,0.28); }

/* Фото на карточке (если у бокса есть image_url) */
.card-media.has-img { background: none; }
.card-img { width: 100%; height: 100%; object-fit: cover; }

/* Шеврон в кнопке профиля */
.profile-chev { opacity: 0.5; font-size: 11px; margin-left: 1px; }

.search {
  width: 100%; border: 1px solid var(--line); background: var(--card);
  border-radius: 14px; padding: 13px 15px; font-size: 15px; margin-bottom: 12px; font-family: inherit;
}
.search:focus { outline: 2px solid var(--peach-100); border-color: var(--orange); }

/* ---- Карточки офферов ---- */
.grid { display: grid; gap: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 26px -8px rgba(120,60,10,0.12); }
.card:active { transform: scale(0.99); }

.card-media {
  position: relative; height: 132px;
  background: linear-gradient(135deg, #ffe7cc, #fdd6ad);
  display: grid; place-items: center; font-size: 46px;
}
.badge-discount {
  position: absolute; top: 10px; left: 10px;
  background: var(--orange); color: #fff;
  font-weight: 800; font-size: 13px; padding: 5px 11px; border-radius: 999px;
  letter-spacing: 0.02em; box-shadow: 0 4px 10px -2px rgba(249,115,22,0.4);
}
.badge-left {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(44,44,44,0.72); color: #fff;
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
/* Таймер обратного отсчёта до конца самовывоза (справа сверху) */
.timer-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.95); color: #9a3412;
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 4px; backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.card-body { padding: 12px 14px 14px; }
.store-row { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 3px; }
.card-title { font-weight: 700; font-size: 16px; margin: 2px 0 6px; letter-spacing: -0.01em; }
.pickup { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 5px; margin-bottom: 10px; }

.price-row { display: flex; align-items: baseline; gap: 8px; }
.price-old { color: var(--muted-2); text-decoration: line-through; font-size: 14px; }
.price-new { color: var(--orange); font-weight: 800; font-size: 20px; }

/* ---- Категория-бейдж ---- */
.cat {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--peach-100); color: var(--orange-dark);
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}

/* ---- Кнопка «в корзину» / степпер на карточке ---- */
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.js-cart-ctl { flex: 0 0 auto; }
.add-btn {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px;
  background: var(--orange); color: #fff; border: none; cursor: pointer;
  font-size: 19px; font-weight: 700; line-height: 1;
  box-shadow: var(--shadow-soft); transition: background 0.15s, transform 0.1s;
}
.add-btn:hover { background: var(--orange-dark); }
.add-btn:active { transform: scale(0.92); }
.add-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ---- Степпер количества ---- */
.stepper { display: inline-flex; align-items: center; gap: 10px; }
.step-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); font-size: 18px; font-weight: 700; cursor: pointer; color: var(--ink);
  line-height: 1; transition: background 0.15s;
}
.step-btn:hover { background: var(--peach-50); border-color: var(--amber); }
.step-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.step-val { min-width: 20px; text-align: center; font-weight: 800; }
/* компактный вариант для карточки */
.stepper-sm { gap: 6px; background: var(--peach-50); border-radius: 12px; padding: 2px; }
.stepper-sm .step-btn { width: 30px; height: 30px; border: none; background: transparent; }
.stepper-sm .step-btn:hover { background: var(--peach-100); }
.stepper-sm .step-val { min-width: 18px; color: var(--orange-dark); }

.icon-btn { border: none; background: transparent; font-size: 20px; cursor: pointer; padding: 4px; border-radius: 8px; }
.icon-btn:hover { background: #fef2f2; }

/* ---- Счётчик корзины в нижней навигации ---- */
.cart-count {
  position: absolute; top: -7px; right: -11px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* ---- Мини-корзина в шапке (справа сверху) ---- */
.cart-mini {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--orange); color: #fff; border-radius: 999px;
  padding: 7px 13px 7px 11px; font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-soft); white-space: nowrap;
}
.cart-mini:hover { background: var(--orange-dark); }
.cart-mini .ico { font-size: 16px; }
.cart-mini .cart-mini-count {
  background: rgba(255,255,255,0.28); border-radius: 999px;
  min-width: 20px; height: 20px; padding: 0 5px; font-size: 12px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.cart-mini .cart-mini-sum { font-weight: 800; }

/* ---- Группа-поставщик на витрине ---- */
.store-group { margin-bottom: 22px; }
.store-group-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 2px 12px;
  padding: 12px 16px; background: var(--card); border: 1px solid var(--line-soft);
  border-radius: 16px; box-shadow: 0 1px 2px rgba(120,60,10,0.04);
}
.sg-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sg-emoji {
  width: 46px; height: 46px; border-radius: 13px; background: var(--peach-100);
  display: grid; place-items: center; font-size: 24px; flex: 0 0 auto; overflow: hidden;
}
.sg-emoji.has-img { background: none; }
.sg-name-row { display: flex; align-items: center; gap: 6px; }
.sg-name { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.sg-verified {
  width: 17px; height: 17px; border-radius: 999px; background: #2f9bf0;
  color: #fff; font-size: 10px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.sg-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 2px; flex-wrap: wrap; }
.sg-dist { background: var(--peach-100); color: var(--orange-dark); font-weight: 700; padding: 1px 8px; border-radius: 999px; font-size: 12px; }
.map-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.map-btn:hover { background: var(--peach-50); border-color: var(--amber); }

/* ---- Промо-карточка в сетке ---- */
.promo-card {
  order: 999; display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(135deg, #fff2e2, #ffe6cf);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: left;
}
.promo-card h3 { font-size: 17px; font-weight: 800; margin: 0 0 6px; }
.promo-card p { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.promo-card .btn { width: auto; align-self: flex-start; }

/* ---- Корзина: заказы по поставщикам ---- */
.cart-note {
  background: var(--amber-soft); color: var(--warn); border-radius: 12px;
  padding: 10px 14px; font-size: 14px; font-weight: 600; margin-bottom: 14px;
}
.cart-order {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px; margin-bottom: 14px;
}
.cart-order-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.cart-order-title { font-size: 16px; font-weight: 800; }
.cart-order-badge { font-size: 11px; font-weight: 700; color: var(--orange-dark); background: var(--peach-100); padding: 3px 9px; border-radius: 999px; }
.cart-order-total { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; margin-top: 4px; border-top: 1px dashed var(--line); font-size: 15px; }

/* ---- Раскладка страницы корзины ---- */
.cart-grid { display: block; }
/* min-width:0 обязательно, иначе широкая лента рекомендаций растягивает колонку за экран */
.cart-col-main { min-width: 0; }
.reco { min-width: 0; }
.count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px;
  background: var(--orange); color: #fff; font-size: 15px; font-weight: 800; vertical-align: middle; margin-left: 6px;
}
.continue-link { width: auto; display: inline-flex; margin-bottom: 12px; }

/* Баннер экономии */
.savings-banner {
  display: flex; align-items: center; gap: 12px;
  background: var(--leaf-soft); border: 1px solid #d9f99d; border-radius: 16px;
  padding: 14px 16px; margin-bottom: 16px;
}
.savings-banner .sb-leaf { font-size: 22px; }
.savings-banner .sb-title { font-weight: 800; color: var(--leaf-dark); }
.savings-banner .sb-sub { font-size: 13px; color: var(--muted); }

/* Строка товара в корзине */
.cart-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.cart-item:first-of-type { border-top: none; }
.ci-thumb {
  position: relative; width: 84px; height: 84px; border-radius: 14px; flex: 0 0 auto; overflow: hidden;
  background: linear-gradient(135deg, #ffe7cc, #fdd6ad); display: grid; place-items: center; font-size: 34px;
}
.ci-thumb.has-img { background: none; }
.ci-disc { top: 6px; left: 6px; font-size: 11px; padding: 3px 7px; }
.ci-info { flex: 1; min-width: 0; }
.ci-title { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.ci-meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.ci-price { text-align: right; min-width: 74px; flex: 0 0 auto; }
.ci-price-new { color: var(--orange); font-weight: 800; font-size: 18px; }
.ci-price-old { color: var(--muted-2); text-decoration: line-through; font-size: 13px; }
.ci-del { color: var(--muted-2); }
.ci-del:hover { color: var(--danger); }

.cart-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.cart-actions .btn { width: auto; }

/* ---- Блок «Ваш заказ» ---- */
.order-box {
  background: linear-gradient(180deg, #fff6ec, #fff);
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow);
}
.ob-title { font-size: 19px; font-weight: 800; margin: 0 0 14px; }
.ob-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 15px; color: var(--ink); }
.ob-row .muted, .ob-row > span:first-child { color: var(--muted); }
.ob-row.saved > span { color: var(--leaf-dark); font-weight: 700; }
.ob-row.total { font-size: 16px; margin: 4px 0 0; }
.ob-row.total > span:first-child { color: var(--ink); font-weight: 800; }
.ob-row.total > span:last-child { color: var(--orange); font-weight: 800; font-size: 24px; }
.ob-info { cursor: help; color: var(--muted-2); font-size: 13px; }
.ob-divider { height: 1px; background: var(--line); margin: 12px 0; }

/* Прогресс бесплатной доставки (витринно) */
.ob-delivery { background: var(--peach-50); border: 1px solid var(--line-soft); border-radius: 14px; padding: 12px 14px; margin: 14px 0; }
.obd-text { font-size: 13px; margin-bottom: 8px; }
.obd-bar { height: 7px; background: #f1e3d4; border-radius: 999px; overflow: hidden; }
.obd-fill { height: 100%; background: linear-gradient(90deg, var(--orange), var(--amber)); border-radius: 999px; transition: width 0.3s; }
.obd-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

.order-box .btn { margin-top: 6px; }
.ob-secure { text-align: center; font-size: 13px; color: var(--muted); margin-top: 12px; font-weight: 600; }
.pay-badges { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pay-badge {
  background: #f1f5f9; color: #475569; border: 1px solid var(--line-soft);
  border-radius: 7px; padding: 3px 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.02em;
}

/* ---- «Вам может понравиться» ---- */
.reco { margin-top: 26px; }
.reco-scroll { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.reco-scroll::-webkit-scrollbar { display: none; }
.reco-scroll .card { flex: 0 0 240px; width: 240px; }

/* ---- Футер-преимущества ---- */
.cart-features {
  display: grid; grid-template-columns: 1fr; gap: 14px;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 18px 20px; margin-top: 26px;
}
.feature { display: flex; align-items: center; gap: 12px; }
.feature .f-ico {
  width: 40px; height: 40px; border-radius: 11px; background: var(--peach-100); color: var(--orange-dark);
  display: grid; place-items: center; font-size: 18px; flex: 0 0 auto;
}
.feature b { display: block; font-size: 14px; }
.feature span { font-size: 13px; color: var(--muted); }

/* Десктоп: две колонки + липкий сайдбар + фичи в ряд */
@media (min-width: 980px) {
  .cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
  .cart-col-side { position: sticky; top: 90px; }
  .cart-features { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

/* ---- Итог корзины ---- */
.cart-summary {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-top: 8px;
}
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 15px; }
.cart-summary .row.saved { color: var(--leaf-dark); font-weight: 700; }
.cart-summary .row.total { font-size: 19px; font-weight: 800; margin: 8px 0 14px; }

/* ---- Кнопки ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: none;
  background: var(--orange); color: #fff;
  font-weight: 700; font-size: 16px; padding: 14px 18px; border-radius: 14px;
  cursor: pointer; transition: background 0.15s, transform 0.1s; box-shadow: var(--shadow-soft);
  font-family: inherit;
}
.btn:hover { background: var(--orange-dark); }
.btn:active { transform: scale(0.99); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.secondary:hover { background: var(--peach-50); border-color: var(--amber); }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid #fecaca; box-shadow: none; }
.btn.danger:hover { background: #fef2f2; }
.btn.small { width: auto; padding: 10px 16px; font-size: 14px; border-radius: 12px; }
.btn.pill { border-radius: 999px; }

/* ---- Нижняя навигация ---- */
.bottom-nav {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: var(--max); height: var(--nav-h);
  background: var(--card); border-top: 1px solid var(--line);
  display: flex; z-index: 30;
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted-2); font-size: 11px; font-weight: 600;
}
.bottom-nav a .ico { font-size: 20px; }
.bottom-nav a.active { color: var(--orange); }

/* ---- Детальная страница оффера ---- */
.detail-media {
  height: 230px; position: relative;
  background: linear-gradient(135deg, #ffe7cc, #fdd6ad);
  display: grid; place-items: center; font-size: 76px;
}
.back-btn {
  position: absolute; top: 14px; left: 14px; width: 40px; height: 40px; border-radius: 999px;
  background: rgba(255,255,255,0.92); border: none; display: grid; place-items: center; font-size: 18px; cursor: pointer;
}
.sheet {
  background: var(--card); border-radius: 24px 24px 0 0; margin-top: -24px; position: relative;
  padding: 22px 18px; box-shadow: var(--shadow);
}
.info-list { display: grid; gap: 12px; margin: 16px 0; }
.info-item { display: flex; gap: 12px; align-items: flex-start; }
.info-item .ico { font-size: 20px; width: 26px; text-align: center; }
.info-item .lbl { font-size: 12px; color: var(--muted); }
.info-item .val { font-weight: 600; }

.savings-box {
  background: var(--leaf-soft); border: 1px solid #d9f99d; border-radius: 16px;
  padding: 14px 16px; margin: 16px 0; display: flex; align-items: center; justify-content: space-between;
}
.savings-box .cur { font-size: 22px; font-weight: 800; color: var(--orange); }
.savings-box .big { font-size: 22px; font-weight: 800; color: var(--leaf-dark); }
.savings-box .lbl { font-size: 13px; color: var(--muted); }

/* ---- Как это работает ---- */
.how {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 20px 16px; margin: 8px 0 4px;
}
.how h2 { text-align: center; font-size: 19px; font-weight: 800; margin: 0 0 16px; }
.how-steps { display: grid; gap: 16px; }
.how-step { text-align: center; }
.how-step .circle {
  width: 56px; height: 56px; border-radius: 999px; background: var(--peach-100);
  display: grid; place-items: center; font-size: 26px; margin: 0 auto 8px;
}
.how-step h3 { font-size: 16px; font-weight: 700; margin: 0 0 2px; }
.how-step p { color: var(--muted); font-size: 13px; margin: 0; }

/* ---- Партнёрский CTA ---- */
.partner-cta {
  background: linear-gradient(120deg, var(--orange), var(--amber));
  color: #fff; border-radius: var(--radius-lg); padding: 22px 20px; margin: 20px 0 8px; text-align: center;
  box-shadow: var(--shadow);
}
.partner-cta h2 { font-size: 20px; font-weight: 800; margin: 0 0 6px; }
.partner-cta p { margin: 0 0 16px; opacity: 0.95; font-size: 14px; }
.partner-cta .btn { background: #fff; color: var(--orange); box-shadow: none; }
.partner-cta .btn:hover { background: #fff7ee; }

/* ---- Отзывы ---- */
.review { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; box-shadow: 0 1px 2px rgba(120,60,10,0.04); }
.review .who { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.review .ava { width: 38px; height: 38px; border-radius: 999px; background: var(--peach-100); color: var(--orange); font-weight: 800; display: grid; place-items: center; }
.review p { color: var(--muted); font-size: 14px; margin: 0; }

/* ---- Брони / строки-списки ---- */
.rez { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.rez-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.02em; }
.pill.reserved { background: var(--leaf-soft); color: var(--leaf-dark); }
.pill.picked_up { background: #e0e7ff; color: #4338ca; }
.pill.cancelled { background: var(--danger-soft); color: var(--danger); }
.pill.expired { background: #f1f5f9; color: var(--muted); }
.pill.active { background: var(--leaf-soft); color: var(--leaf-dark); }
.pill.paused { background: var(--amber-soft); color: var(--warn); }
.pill.sold_out { background: #f1f5f9; color: var(--muted); }

/* ---- Код выдачи + QR ---- */
.code-box {
  margin-top: 12px; background: var(--peach-50); border: 1px dashed var(--orange);
  border-radius: 14px; padding: 14px; text-align: center;
}
.code-box .lbl { font-size: 12px; color: var(--muted); }
.code-box .code { font-size: 26px; font-weight: 800; letter-spacing: 0.15em; color: var(--orange-dark); }
.code-box .qr { width: 148px; height: 148px; margin: 10px auto 4px; background: #fff; padding: 8px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.code-box .qr svg, .code-box .qr img { width: 100%; height: 100%; display: block; }

/* ---- Формы ---- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px;
  font-size: 15px; font-family: inherit; background: var(--card); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--peach-100); border-color: var(--orange); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---- Auth ---- */
.auth-wrap { padding: 30px 20px; max-width: 430px; margin: 0 auto; }
.auth-logo { text-align: center; margin-bottom: 6px; }
.auth-logo img { width: 64px; height: 64px; margin: 0 auto 8px; }
.tabs { display: flex; background: var(--peach-100); border-radius: 12px; padding: 4px; margin: 20px 0; }
.tabs button { flex: 1; border: none; background: transparent; padding: 10px; border-radius: 9px; font-weight: 700; color: var(--muted); cursor: pointer; font-family: inherit; }
.tabs button.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.tg-btn { background: #229ED9; box-shadow: none; }
.tg-btn:hover { background: #1c8ac0; }
.divider { text-align: center; color: var(--muted-2); font-size: 13px; margin: 16px 0; position: relative; }
.divider::before, .divider::after { content: ""; position: absolute; top: 50%; width: 38%; height: 1px; background: var(--line); }
.divider::before { left: 0; } .divider::after { right: 0; }

/* ---- Утилиты ---- */
.muted { color: var(--muted); }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb12 { margin-bottom: 12px; }
.stack { display: grid; gap: 10px; }
.flex { display: flex; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.hidden { display: none !important; }
.empty { text-align: center; color: var(--muted); padding: 46px 20px; }
.empty .ico { font-size: 46px; margin-bottom: 10px; }

.toast {
  position: fixed; top: 74px; right: 16px; left: auto; transform: translateY(-8px);
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px;
  font-weight: 600; z-index: 100; box-shadow: var(--shadow); max-width: 320px; opacity: 0;
  transition: opacity 0.2s, transform 0.2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--danger); }
.toast.cart { background: var(--orange); }

/* ---- Сегментные табы (кабинет/админка) ---- */
.seg { display: flex; gap: 6px; margin: 4px 0 16px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--card);
  padding: 9px 15px; border-radius: 11px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; font-family: inherit;
}
.seg button.active { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ---- Планшет ---- */
@media (min-width: 720px) and (max-width: 979px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .grid.single { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 30px; }
}

/* ======================================================================
   ДЕСКТОП: широкий лейаут. Мобилка/Telegram Mini App остаётся как есть.
   ====================================================================== */
@media (min-width: 980px) {
  .app { max-width: 1200px; padding-bottom: 32px; }

  /* Убираем нижнюю таб-панель — навигация уезжает в шапку */
  .bottom-nav { display: none; }

  /* Шапка во всю ширину */
  .topbar { padding: 16px 32px; }
  .brand { font-size: 22px; }
  .brand img { height: 38px; width: 38px; }
  .top-nav { display: flex; gap: 4px; margin: 0 auto 0 32px; }
  .top-nav a {
    padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 15px;
    color: var(--muted); transition: all 0.15s;
  }
  .top-nav a:hover { background: var(--peach-50); color: var(--ink); }
  .top-nav a.active { color: var(--orange); background: var(--peach-100); }

  .content { padding: 26px 32px 44px; }

  /* Контент-страницы (брони/кабинет/админка) — комфортная ширина */
  .content.narrow { max-width: 860px; margin: 0 auto; }

  /* HERO — две колонки */
  .hero { padding: 44px 48px; }
  .hero-inner { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 44px; }
  .hero-text { flex: 1; max-width: 560px; }
  .hero h1 { font-size: 42px; }
  .hero p { font-size: 18px; }
  .food-tiles { grid-template-columns: repeat(2, 1fr); width: 340px; margin-top: 0; gap: 12px; flex: 0 0 auto; }
  .food-tile { padding: 22px 10px; }
  .food-tile .emo { font-size: 38px; }

  /* Витрина — 3 колонки */
  .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .how-steps { grid-template-columns: repeat(3, 1fr); }
  .how { padding: 34px; }

  /* Партнёрский CTA — горизонтально */
  .partner-cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; text-align: left; padding: 28px 36px; }
  .partner-cta .cta-text { flex: 1; }
  .partner-cta h2 { font-size: 24px; }

  /* Детальная страница оффера — по центру, не на всю ширину */
  .detail-media { max-width: 760px; margin: 20px auto 0; border-radius: 24px; }
  .sheet { max-width: 760px; margin: -24px auto 0; }

  /* Форма входа выше и по центру */
  .auth-wrap { padding-top: 56px; }
}

/* Очень широкие экраны — 4 колонки витрины */
@media (min-width: 1280px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
