/* ═══════════════════════════════════════════════════════════
   Tagam landing — mobile-first CSS (без зависимостей)
   ═══════════════════════════════════════════════════════════ */

:root {
  --green: #1F7A3E;
  --green-dark: #155C2E;
  --green-light: #2E9E54;
  --orange: #F2871E;
  --orange-dark: #E3651A;
  --coral: #E23B2E;
  --ink: #16271A;
  --gray: #69786A;
  --gray-light: #E3EADC;
  --sage: #E8F5E9;
  --cream: #FFF8F0;
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-400: #a8a29e;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-900: #1c1917;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

  --header-h: 72px;
  --chips-h: 60px;
  --safe-bottom: env(safe-area-inset-bottom);

  /* Touch targets минимум 44px (Apple HIG / WCAG) */
  --tap-min: 44px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--stone-50);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input { font: inherit; }
input:focus { outline: none; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; }

/* iOS: предотвратить зум при focus в input — минимум 16px */
input, textarea, select { font-size: 16px; }

/* Скрыть скроллбар у горизонтальных лент */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.tabular { font-variant-numeric: tabular-nums; }
.ico { width: 22px; height: 22px; flex-shrink: 0; stroke: currentColor; }
.ico-sm { width: 16px; height: 16px; }

/* ═══════════════════ HEADER ═══════════════════ */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gray-light);
  box-shadow: var(--shadow-sm);
}
.hdr-inner {
  max-width: 1280px; margin: 0 auto;
  height: var(--header-h);
  padding: 0 12px;
  display: flex; align-items: center; gap: 12px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.brand-logo {
  width: 52px; height: 52px; border-radius: 12px;
  object-fit: cover; background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1.5px solid var(--gray-light);
}
.brand-text { line-height: 1; }
.brand-name {
  font-weight: 800; font-size: 18px; color: var(--green);
  letter-spacing: 0.3px;
}
.brand-tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--gray); margin-top: 3px;
}
.hdr-nav {
  display: none;
  gap: 20px; margin: 0 auto;
  font-size: 14px; font-weight: 500;
}
.hdr-nav a:hover { color: var(--green); }
.hdr-actions {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto;
}
.hdr-phone {
  display: none;
  align-items: center; gap: 6px;
  font-size: 14px; font-weight: 700;
  padding: 8px 12px; border-radius: var(--radius-md);
  transition: background .15s;
}
.hdr-phone:hover { background: var(--sage); color: var(--green); }
.hdr-cart {
  position: relative;
  width: var(--tap-min); height: var(--tap-min);
  border-radius: var(--radius-md);
  background: var(--sage);
  border: none;
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.hdr-cart:hover { background: var(--green-light); color: white; }
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px;
  background: var(--orange); color: white;
  font-size: 11px; font-weight: 800; line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px white;
}

@media (min-width: 768px) {
  :root { --header-h: 80px; }
  .hdr-inner { padding: 0 24px; gap: 20px; }
  .brand-logo { width: 56px; height: 56px; }
  .brand-name { font-size: 20px; }
  .brand-tag { display: block; }
  .hdr-nav { display: flex; }
  .hdr-phone { display: inline-flex; }
}

/* ═══════════════════ CHIPS BAR ═══════════════════ */
.chips-bar {
  position: sticky; top: var(--header-h); z-index: 30;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gray-light);
}
.chips-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 10px 12px;
  display: flex; gap: 10px; align-items: center;
}
.search {
  position: relative; flex-shrink: 0;
  display: flex; align-items: center;
  width: 140px;
}
.search .ico { position: absolute; left: 12px; color: var(--gray); pointer-events: none; }
.search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 36px;
  border: none;
  background: var(--stone-100);
  border-radius: var(--radius-md);
  color: var(--ink);
}
.search input::placeholder { color: var(--gray); }
.search input:focus {
  background: white;
  box-shadow: 0 0 0 2px var(--green);
}
.chips {
  display: flex; gap: 8px;
  overflow-x: auto; flex: 1;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 14px;
  background: var(--stone-100);
  border: none;
  border-radius: var(--radius-full);
  font-size: 13.5px; font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  scroll-snap-align: start;
  transition: background .15s;
}
.chip:hover { background: var(--sage); }
.chip.is-active {
  background: var(--green); color: white;
}
.chip .count {
  font-size: 11px; opacity: 0.7; font-weight: 500;
}
.chip .ico { width: 16px; height: 16px; }

@media (min-width: 768px) {
  .chips-inner { padding: 12px 24px; gap: 16px; }
  .search { width: 280px; }
}

/* ═══════════════════ HERO ═══════════════════ */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 100%);
  color: white;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('img/korolevskaya_filadel_fiya_1-md.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  filter: blur(2px) saturate(.85);
  z-index: -1;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(31,122,62,0.6) 0%, rgba(46,158,84,0.6) 100%);
  z-index: -1;
  pointer-events: none;
}
.hero-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 32px 16px 40px;
  display: grid; gap: 20px;
}
.hero-text { display: flex; flex-direction: column; gap: 12px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  width: fit-content;
}
.hero-h1 {
  font-size: 36px; line-height: 1.05;
  font-weight: 800;
  letter-spacing: -1px;
}
.hero-sub {
  font-size: 16px; line-height: 1.5;
  opacity: 0.92;
  max-width: 480px;
  margin: 4px 0 8px;
}
.hero-sub strong { font-weight: 700; }
.hero-features {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 13px;
}
.hero-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-weight: 500;
}
.hero-photo {
  display: none;
  position: relative;
  height: 360px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-photo-label {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  color: var(--ink);
}
.hero-photo-label .small {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--green); font-weight: 700;
  margin-bottom: 4px;
}
.hero-photo-label .name {
  font-size: 16px; font-weight: 800; line-height: 1.2;
}

@media (min-width: 768px) {
  .hero-inner {
    padding: 64px 24px;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
  }
  .hero-h1 { font-size: 56px; }
  .hero-sub { font-size: 18px; }
  .hero-photo { display: block; }
}

/* ═══════════════════ КАТАЛОГ ═══════════════════ */
.menu {
  max-width: 1280px; margin: 0 auto;
  padding: 0 12px;
  padding-bottom: calc(120px + var(--safe-bottom));
}
.cat {
  scroll-margin-top: calc(var(--header-h) + var(--chips-h) + 8px);
  padding-top: 32px;
}
.cat-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 24px; font-weight: 800; letter-spacing: -0.4px;
  margin-bottom: 16px;
  color: var(--ink);
}
.cat-title .ico { width: 26px; height: 26px; color: var(--green); }
.cat-title .count { font-weight: 500; font-size: 16px; color: var(--gray); }

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 480px) {
  .grid { gap: 12px; }
}
@media (min-width: 768px) {
  .menu { padding: 0 24px; padding-bottom: 60px; }
  .cat { padding-top: 48px; }
  .cat-title { font-size: 28px; margin-bottom: 20px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

/* ═══════════════════ CARD ═══════════════════ */
.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-light);
  overflow: hidden;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.card:active { transform: scale(0.98); }
@media (hover: hover) {
  .card:hover { box-shadow: var(--shadow-md); }
  .card:hover .card-img img { transform: scale(1.04); }
}
.card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--stone-100);
}
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s cubic-bezier(.32,.72,0,1);
}
.card-img-empty {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  color: var(--stone-400); font-size: 12px;
}
.tag {
  position: absolute; top: 8px; left: 8px;
  display: inline-flex; align-items: center;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: white;
  box-shadow: var(--shadow-sm);
}
.tag-hit { background: var(--orange); }
.tag-new { background: var(--coral); }
.tag-sale { background: var(--coral); }

.card-body {
  padding: 10px 12px 12px;
  display: flex; flex-direction: column;
  flex: 1;
}
.card-name {
  font-size: 16px; font-weight: 800; line-height: 1.25;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-desc {
  font-size: 13px; color: var(--gray); line-height: 1.45;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--gray);
  margin-bottom: 8px;
}
.card-meta .dot { opacity: 0.5; }
.card-spice { color: var(--orange-dark); display: inline-flex; align-items: center; gap: 1px; }
.card-spice .ico { width: 11px; height: 11px; }
.card-bottom {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.card-price { font-size: 15px; font-weight: 800; color: var(--ink); }
.card-old-price { font-size: 12px; color: var(--gray); text-decoration: line-through; margin-left: 4px; }

@media (min-width: 480px) {
  .card-body { padding: 12px 14px 14px; }
  .card-name { font-size: 17px; }
  .card-desc { font-size: 14.5px; }
  .card-price { font-size: 17px; }
}

/* Add/Stepper кнопки в карточках */
.add-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  border: 2px solid var(--green);
  background: transparent;
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.add-btn:hover, .add-btn:active { background: var(--green); color: white; }
.add-btn .ico { width: 18px; height: 18px; }
.stepper {
  display: inline-flex; align-items: center;
  background: var(--green); color: white;
  border-radius: var(--radius-full);
  height: 36px;
}
.stepper button {
  width: 32px; height: 32px;
  border: none; background: transparent;
  color: white;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  transition: background .15s;
  margin: 2px;
}
.stepper button:hover { background: var(--green-dark); }
.stepper .ico { width: 14px; height: 14px; }
.stepper .qty {
  min-width: 24px;
  font-weight: 800; font-size: 14px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════ EMPTY STATE ═══════════════════ */
.empty {
  text-align: center;
  padding: 60px 16px;
  color: var(--gray);
}
.empty p { margin: 0; font-size: 16px; }
.empty .small { font-size: 13px; margin-top: 6px; }

/* ═══════════════════ FAB (mobile cart) ═══════════════════ */
.cart-fab {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(12px + var(--safe-bottom));
  z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 56px;
  padding: 0 8px 0 20px;
  border-radius: 28px;
  background: var(--green);
  color: white;
  border: none;
  box-shadow: 0 10px 30px rgba(31,122,62,0.4);
  font-weight: 700; font-size: 15px;
}
.cart-fab:active { transform: scale(0.97); }
.cart-fab-text { flex: 1; text-align: left; }
.cart-fab-count {
  background: rgba(255,255,255,0.25);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 13px; font-weight: 800;
}
.cart-fab-total {
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
  .cart-fab {
    left: auto; right: 24px;
    bottom: 24px;
    width: 280px;
  }
}

/* ═══════════════════ FOOTER ═══════════════════ */
.ftr {
  background: var(--stone-900);
  color: white;
  padding: 40px 0 24px;
  margin-top: 40px;
}
.ftr-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.ftr-col h4 {
  font-size: 13px; font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--stone-400);
}
.ftr-col ul li { margin-bottom: 8px; font-size: 14px; }
.ftr-col ul a { color: white; opacity: 0.8; }
.ftr-col ul a:hover { opacity: 1; color: var(--green-light); }
.ftr-brand {
  font-size: 22px; font-weight: 800; color: var(--green-light);
  margin-bottom: 8px;
}
.ftr-about { font-size: 14px; color: var(--stone-400); margin: 0 0 14px; line-height: 1.5; }
.ftr-social { display: flex; gap: 10px; }
.ftr-social a {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: white;
  transition: background .15s;
}
.ftr-social a:hover { background: var(--green); }
.ftr-phone {
  display: inline-block;
  color: var(--orange); font-weight: 800; font-size: 18px;
  margin-bottom: 12px;
}
.ftr-addr, .ftr-hours {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--stone-400);
  margin: 6px 0;
}
.ftr-bottom {
  text-align: center;
  font-size: 12px; color: var(--stone-600);
  padding: 20px 16px 0;
  margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

@media (min-width: 768px) {
  .ftr-inner {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding: 0 24px;
  }
}

/* ═══════════════════ МОДАЛКА ═══════════════════ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .2s;
}
.modal-bd {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
}
.modal-content {
  position: relative;
  background: white;
  width: 100%;
  height: 92vh;
  height: 92dvh;            /* динамическая viewport — учитывает iOS bottom bar */
  max-height: 92vh;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: slideUp .3s cubic-bezier(.32,.72,0,1);
}
@media (min-width: 768px) {
  .modal { align-items: center; padding: 24px; }
  .modal-content {
    max-width: 900px;
    height: auto;
    max-height: 90vh;
    border-radius: var(--radius-xl);
    flex-direction: row;
  }
}

.modal-photo {
  position: relative;
  width: 100%;
  height: 40vh;             /* фикс высота на мобиле (не aspect — чтобы info место осталось) */
  max-height: 380px;
  background: var(--stone-100);
  flex-shrink: 0;
  touch-action: pan-y;      /* swipe горизонтально не блокирует scroll */
  user-select: none;
  -webkit-user-select: none;
}
.modal-photo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
@media (min-width: 768px) {
  .modal-photo {
    width: 50%; height: auto; max-height: none;
    aspect-ratio: auto;
  }
}

.modal-dots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  padding: 6px 10px;
  border-radius: var(--radius-full);
}
.modal-dots button {
  width: 8px; height: 8px;
  min-width: 8px;
  border: none; padding: 0;
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius-full);
  transition: all .25s;
}
.modal-dots button.is-active { width: 24px; background: white; }

/* Стрелки навигации фото — поверх mobile photo */
.modal-photo-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  border: none; border-radius: var(--radius-full);
  color: white;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  cursor: pointer;
}
.modal-photo-nav.prev { left: 12px; }
.modal-photo-nav.next { right: 12px; }
.modal-photo-nav:hover { background: rgba(0,0,0,0.6); }

.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: none; border-radius: var(--radius-full);
  color: white;
  display: flex; align-items: center; justify-content: center;
  z-index: 3;
}

.modal-info {
  flex: 1;                  /* КРИТИЧНО для scroll */
  min-height: 0;            /* флекс-фикс: иначе ребёнок overflow не работает */
  display: flex; flex-direction: column;
  overflow: hidden;
}
@media (min-width: 768px) {
  .modal-info { width: 50%; flex: 1 1 50%; }
}

.modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 18px 22px;
  overscroll-behavior: contain;
}
.modal-title {
  font-size: 24px; font-weight: 800; line-height: 1.2;
  padding-right: 50px;
  margin-bottom: 8px;
}
.modal-price {
  font-size: 24px; font-weight: 800; color: var(--green);
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}
.modal-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--gray);
  margin-bottom: 16px;
}
.modal-desc {
  font-size: 16.5px; line-height: 1.55;
  margin: 0 0 16px;
}
.modal-ingredients {
  padding-top: 16px;
  border-top: 1px dashed var(--gray-light);
}
.modal-ingredients h4 {
  font-size: 13px; font-weight: 700;
  margin-bottom: 6px;
}
.modal-ingredients p {
  margin: 0; font-size: 13px; color: var(--gray); line-height: 1.5;
}

.modal-bottom {
  padding: 14px 18px calc(18px + var(--safe-bottom));
  border-top: 1px solid var(--gray-light);
  background: white;
  display: flex; gap: 12px; align-items: center;
}
.modal-add-btn {
  flex: 1;
  height: 52px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--green); color: white;
  font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s;
}
.modal-add-btn:hover { background: var(--green-dark); }
.modal-add-btn:active { transform: scale(0.98); }

.modal-stepper {
  display: inline-flex; align-items: center;
  background: var(--green); color: white;
  border-radius: var(--radius-full);
  height: 52px; padding: 4px;
}
.modal-stepper button {
  width: 44px; height: 44px;
  border: none; background: transparent; color: white;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
}
.modal-stepper button:hover { background: var(--green-dark); }
.modal-stepper .qty {
  font-weight: 800; font-size: 18px;
  min-width: 30px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.modal-total {
  flex: 1; text-align: right;
  font-size: 18px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════ DRAWER (КОРЗИНА) ═══════════════════ */
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }

.drawer {
  position: fixed; inset: 0; z-index: 50;
  display: flex; justify-content: flex-end;
}
.drawer-bd {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  animation: fadeIn .2s;
}
.drawer-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: white;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 24px rgba(0,0,0,0.15);
  animation: slideInRight .3s cubic-bezier(.32,.72,0,1);
}
.drawer-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-light);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.drawer-head h2 {
  font-size: 20px; font-weight: 800;
}
.drawer-head h2 span {
  font-size: 13px; color: var(--gray); font-weight: 500; margin-left: 6px;
}
.drawer-close {
  width: var(--tap-min); height: var(--tap-min);
  border: none; background: transparent;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
}
.drawer-close:hover { background: var(--sage); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.drawer-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; padding: 32px;
  text-align: center;
}
.drawer-empty-ico {
  width: 80px; height: 80px;
  border-radius: var(--radius-full);
  background: var(--sage);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.drawer-empty-ico .ico { width: 40px; height: 40px; color: var(--green); }
.drawer-empty p { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.drawer-empty .small { font-size: 14px; color: var(--gray); margin-bottom: 20px; }

.cart-progress {
  margin: 16px 16px 0;
  background: var(--sage);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.cart-progress-text {
  font-size: 13px; margin-bottom: 8px;
}
.cart-progress-text b { color: var(--green); font-weight: 700; }
.cart-progress-bar {
  height: 8px; background: white;
  border-radius: var(--radius-full); overflow: hidden;
}
.cart-progress-fill {
  height: 100%; background: var(--green);
  transition: width .3s;
  border-radius: var(--radius-full);
}

.cart-items {
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.cart-item {
  display: flex; gap: 10px;
  background: var(--stone-50);
  border-radius: var(--radius-md);
  padding: 8px;
}
.cart-item img {
  width: 60px; height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0;
}
.cart-item-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between;
}
.cart-item-name {
  font-size: 14px; font-weight: 700; line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px;
}
.cart-item-price { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cart-item-stepper {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--green);
  border-radius: var(--radius-full);
  background: white;
}
.cart-item-stepper button {
  width: 44px; height: 44px;
  border: none; background: transparent;
  border-radius: var(--radius-full);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  transition: background .12s;
}
.cart-item-stepper button:active { background: var(--sage); transform: scale(.94); }
.cart-item-stepper button .ico { width: 20px; height: 20px; stroke-width: 3; }
.cart-item-stepper .qty {
  font-size: 17px; font-weight: 800;
  min-width: 32px; text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.cart-item img { width: 72px; height: 72px; border-radius: var(--radius-md); }
.cart-item-name { font-size: 15px; }
.cart-item-price { font-size: 16px; }

.drawer-footer {
  padding: 16px 20px calc(20px + var(--safe-bottom));
  border-top: 1px solid var(--gray-light);
  background: white;
  display: flex; flex-direction: column; gap: 8px;
  flex-shrink: 0;
}
.drawer-row {
  display: flex; justify-content: space-between;
  font-size: 14px; color: var(--gray);
}
.drawer-total {
  display: flex; justify-content: space-between;
  font-size: 18px; font-weight: 800;
  padding-top: 8px;
  border-top: 1px solid var(--gray-light);
}
.drawer-total .green { color: var(--green); font-variant-numeric: tabular-nums; }
.drawer-warn {
  font-size: 12px; color: var(--coral);
  text-align: center;
  background: #fef2f2;
  padding: 8px; border-radius: var(--radius-sm);
}
.order-btn {
  width: 100%;
  min-height: 52px;
  border: none; border-radius: var(--radius-md);
  background: var(--green); color: white;
  font-weight: 800; font-size: 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 4px;
  transition: background .15s;
}
.order-btn:hover { background: var(--green-dark); }
.order-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.order-btn .ico { width: 20px; height: 20px; }
.order-hint {
  font-size: 11px; color: var(--gray); text-align: center;
  margin-top: 4px;
}

/* ═══════════════════ TOAST ═══════════════════ */
@keyframes toastIn {
  0%   { transform: translate(-50%, 30px); opacity: 0; }
  100% { transform: translate(-50%, 0);    opacity: 1; }
}
@keyframes toastOut {
  0%   { transform: translate(-50%, 0);    opacity: 1; }
  100% { transform: translate(-50%, -30px); opacity: 0; }
}
.toast {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-weight: 700; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: toastIn .25s cubic-bezier(.32,.72,0,1) both;
  max-width: calc(100vw - 32px);
}
.toast.is-out { animation: toastOut .25s ease-out both; }
.toast .ico {
  width: 18px; height: 18px;
  color: var(--green-light);
  background: white;
  border-radius: 9px;
  padding: 1px;
}
@media (min-width: 768px) {
  .toast { bottom: 24px; }
}

/* ═══════════════════ A11Y ═══════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible — для клавиатуры */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

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