/* =========================================================
   МОРЕМ — Переключатель тем (светлая/тёмная)
   Адаптивный дизайн. Шрифт: Inter (Google Fonts).
   ========================================================= */

/* СВЕТЛАЯ ТЕМА (по умолчанию) */
:root {
  --bg: #FFFFFF;
  --bg-elevated: #F8F9FA;
  --surface: #F1F3F5;
  --surface-2: #E9ECEF;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);

  --text: #1A1A1A;
  --text-muted: #6C757D;
  --text-faint: #ADB5BD;

  --accent: #2563EB;
  --accent-strong: #1D4ED8;
  --accent-2: #1E40AF;
  --accent-light: #EFF6FF;
  --tag: #DC2626;
  --success: #16A34A;
  --danger: #DC2626;
  --warning: #F59E0B;

  --font-display: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, Consolas, monospace;

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;

  --container: 1180px;
  --gap: clamp(16px, 3vw, 32px);

  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.08);
}

/* ТЁМНАЯ ТЕМА */
[data-theme="dark"] {
  --bg: #121212;
  --bg-elevated: #191919;
  --surface: #1e1e1e;
  --surface-2: #232323;
  --border: rgba(245, 241, 232, 0.10);
  --border-strong: rgba(245, 241, 232, 0.22);

  --text: #F5F1E8;
  --text-muted: #A8A29A;
  --text-faint: #706C64;

  --accent: #3B82F6;
  --accent-strong: #60A5FA;
  --accent-2: #93C5FD;
  --accent-light: rgba(59, 130, 246, 0.12);
  --tag: #E0522A;
  --success: #4C8C6B;
  --danger: #E0522A;
  --warning: #F59E0B;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,.3);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.4);
}

/* Плавный переход тем — только после готовности, без FOUC при первом заходе */
html.theme-ready body,
html.theme-ready body * {
  transition: background-color 0.3s ease,
              color 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

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

/* ---------- Кнопка переключения темы ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: rotate(15deg);
}
.theme-toggle:active {
  transform: scale(0.92) rotate(15deg);
}

.theme-icon {
  position: absolute;
  transition: all 0.3s ease;
}

.theme-icon-light { opacity: 1; transform: rotate(0deg); }
.theme-icon-dark { opacity: 0; transform: rotate(-90deg); }

[data-theme="dark"] .theme-icon-light { opacity: 0; transform: rotate(90deg); }
[data-theme="dark"] .theme-icon-dark { opacity: 1; transform: rotate(0deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-m);
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-strong); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 10px 18px; font-size: 13.5px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .site-header {
  background: rgba(18, 18, 18, 0.92);
}

.nav {
  display: flex;
  align-items: center;
  padding: clamp(12px, 2vw, 16px) 0;
  gap: clamp(12px, 2vw, 24px);
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 26px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-decoration: none;
}
.logo-brand {
  display: inline;
  white-space: nowrap;
}
.logo-brand span,
.logo > span:not(.logo-desc):not(.logo-brand) {
  color: var(--accent);
}
.logo-desc {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-muted);
  margin-top: 2px;
  max-width: 200px;
  line-height: 1.25;
  white-space: normal;
}
@media (max-width: 900px) {
  .logo-desc { display: none; }
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  z-index: 45;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s ease;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (min-width: 900px) {
  .hamburger { display: none; }
}

.nav-links {
  display: none;
  gap: clamp(16px, 2vw, 28px);
  font-size: 14px;
  color: var(--text-muted);
  flex: 1;
  justify-content: center;
}
.nav-links a { padding: 4px 0; }
.nav-links a:hover { color: var(--accent); }

@media (min-width: 900px) {
  .nav-links { display: flex; }
}

.nav-links.mobile-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px clamp(16px, 4vw, 32px);
  gap: 12px;
  box-shadow: var(--shadow-lg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 14px);
  flex-shrink: 0;
  margin-left: auto;
}
.header-phone {
  display: none;
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
}
@media (min-width: 700px) { .header-phone { display: inline; } }

.cart-btn, .auth-btn, .profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius-m);
  font-size: 14px;
  transition: all .15s ease;
}
.cart-btn:hover, .auth-btn:hover, .profile-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.cart-count {
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.profile-btn span {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  gap: var(--gap);
  padding: clamp(32px, 5vw, 60px) 0 clamp(40px, 6vw, 80px);
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; align-items: center; }
}

.hero-media {
  order: -1;
  border-radius: var(--radius-l);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 900px) { .hero-media { order: 1; aspect-ratio: 3/4; } }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 6vw, 56px);
  line-height: 1.05;
  margin-bottom: 18px;
  color: var(--text);
}
.hero .lead {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 24px;
  line-height: 1.55;
}

.gift-badge {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #FFF7ED;
  border: 1px dashed #F97316;
  border-radius: var(--radius-m);
  padding: 14px 16px;
  margin: 20px 0 24px;
  max-width: 50ch;
  line-height: 1.45;
  font-size: 14px;
}
.gift-badge strong { color: #EA580C; }
.gift-badge .icon { font-size: 20px; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.gift-badge em { font-style: normal; opacity: 0.85; font-size: 13px; }

html[data-theme="dark"] .gift-badge {
  background: rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.3);
}
html[data-theme="dark"] .gift-badge strong { color: #FB923C; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 8px 0 20px;
  align-items: center;
}
.hero-ctas .btn {
  min-height: 48px;
  padding: 14px 22px;
}
.hero-set-info {
  margin-top: 4px;
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(48px, 6vw, 80px) 0;
  border-top: 1px solid var(--border);
}
.section-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 40px); }
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  display: block;
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.08;
  margin-bottom: 12px;
}
.section-lead { color: var(--text-muted); font-size: clamp(14px, 1.5vw, 16px); }

/* ---------- Concept steps ---------- */
.concept-steps {
  display: grid;
  gap: 20px;
}
@media (min-width: 800px) { .concept-steps { grid-template-columns: repeat(3, 1fr); } }

.concept-step {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: clamp(20px, 3vw, 28px) clamp(18px, 2.5vw, 24px);
}
.step-number {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  border: 1.5px solid rgba(37, 99, 235, 0.3);
  background: var(--accent-light);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.concept-step h3 { font-size: clamp(16px, 2vw, 19px); margin-bottom: 8px; }
.concept-step p { color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.concept-step.freeze { border-color: rgba(37, 99, 235, 0.3); background: var(--accent-light); }
.freeze-temp {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3vw, 34px);
  color: var(--accent-2);
  margin: 4px 0 10px;
}

/* ---------- Catalog ---------- */
.catalog-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.filter-chip {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}
.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.filter-chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.catalog-grid {
  display: grid;
  gap: clamp(16px, 2vw, 22px);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

@media (max-width: 600px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 380px) {
  .catalog-grid { grid-template-columns: 1fr; }
}

/* ---------- Product Card (редизайн) ---------- */
.product-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: var(--shadow-sm);
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.product-media {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  background: var(--surface);
}
.product-media img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  background: var(--surface);
}

/* Новые бейджи */
.product-badges {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
  max-width: 70%;
}
.product-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  white-space: nowrap;
}
.badge-hit {
  background: linear-gradient(135deg, #EF4444 0%, #F97316 100%);
}
.badge-premium {
  background: linear-gradient(135deg, #7C3AED 0%, #A855F7 100%);
}
.badge-time {
  background: linear-gradient(135deg, #0EA5E9 0%, #2563EB 100%);
}

.product-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-title {
  font-size: clamp(13.5px, 1.6vw, 15.5px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.product-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.product-kbju {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
}
.product-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

/* Цена + кнопка в одну строку */
.product-buy {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.product-price {
  font-family: var(--font-mono);
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.btn-add {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-s);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all .15s ease;
}
.btn-add:hover {
  background: var(--accent-strong);
  transform: scale(1.02);
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-s);
  overflow: hidden;
  background: var(--surface);
}
.qty-control button {
  background: transparent;
  color: var(--text);
  width: 32px;
  height: 34px;
  font-size: 16px;
  font-weight: 600;
}
.qty-control button:hover {
  background: var(--accent-light);
  color: var(--accent);
}
.qty-control span {
  width: 28px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Compare ---------- */
.compare-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  overflow: hidden;
}
.compare-row {
  display: grid;
  gap: 4px;
  background: var(--bg-elevated);
  padding: clamp(16px, 2.5vw, 22px) clamp(16px, 3vw, 24px);
  border-bottom: 1px solid var(--border);
}
.compare-row:last-child { border-bottom: none; }
@media (min-width: 760px) {
  .compare-row { grid-template-columns: 1fr 24px 1fr; align-items: center; gap: 20px; }
}
.compare-problem { color: var(--text-faint); font-size: 13.5px; }
.compare-problem b { color: var(--text-muted); font-weight: 600; display: block; font-size: 14.5px; margin-bottom: 4px;}
.compare-arrow { display: none; color: var(--accent); font-size: 18px; font-weight: 700; }
@media (min-width: 760px) { .compare-arrow { display: block; } }
.compare-solution { font-size: 14px; color: var(--text); }
.compare-solution b { color: var(--accent); font-weight: 600; }

/* ---------- Отзывы ---------- */
.reviews-grid {
  display: block;
  width: 100%;
}

.review-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 20px 22px 18px;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.review-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.review-date {
  font-size: 11px;
  color: var(--text-faint);
}

.review-stars {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.review-star {
  color: #F59E0B;
  font-size: 15px;
}

.review-star.empty {
  color: var(--border-strong);
}

.review-text {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 2px 0 0 0;
}

.review-product {
  font-size: 12px;
  color: var(--text-faint);
  padding-top: 6px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

@media (max-width: 600px) {
  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .review-card {
    padding: 14px 16px 12px;
  }
  .review-text {
    font-size: 13px;
  }
  .review-avatar {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .review-name {
    font-size: 13px;
  }
  .review-star {
    font-size: 13px;
  }
}

/* ---------- Documents ---------- */

.documents-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.documents-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-m);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 52px;
}

.documents-list-item:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.documents-list-item:active {
  transform: scale(0.98);
}

.documents-list-item .doc-info {
  flex: 1;
  min-width: 0;
}

.documents-list-item .doc-title {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.documents-list-item .doc-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin: 2px 0 0 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.documents-list-item .doc-open-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--radius-s);
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  min-height: 38px;
}

.documents-list-item .doc-open-btn:hover {
  background: var(--accent-strong);
  transform: scale(1.02);
}

.documents-list-item .doc-open-btn:hover {
  background: var(--accent-strong);
}

@media (max-width: 768px) {
  .documents-list-item {
    padding: 8px 12px;
    gap: 8px;
  }
  .documents-list-item .doc-title {
    font-size: 12px;
  }
  .documents-list-item .doc-desc {
    font-size: 10px;
  }
  .documents-list-item .doc-open-btn {
    padding: 4px 10px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .documents-list-item {
    padding: 12px 14px;
    gap: 10px;
    min-height: 56px;
  }
  .documents-list-item .doc-info {
    flex: 1;
    min-width: 0;
  }
  .documents-list-item .doc-open-btn {
    padding: 8px 14px;
    font-size: 12px;
    min-height: 40px;
  }
  .documents-list-item .doc-title {
    font-size: 13px;
  }
}
.documents-hidden {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, margin-top 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}

.documents-hidden.open {
  max-height: 2000px; /* достаточно большое значение */
  opacity: 1;
  margin-top: 8px;
}
/* ---------- PDF Modal ---------- */
/* ---------- PDF Modal ---------- */
.pdf-modal-card {
  width: min(880px, 96vw);
  height: 92vh;
  max-height: 92vh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: var(--radius-l);
}

.pdf-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  backdrop-filter: blur(4px);
}

.pdf-modal-close:hover {
  background: rgba(0, 0, 0, 0.7);
}

.pdf-modal-title {
  padding: 12px 50px 10px 18px;
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.pdf-viewer {
  flex: 1;
  min-height: 300px;
  background: var(--surface);
  position: relative;
  padding: 0;
  overflow: hidden;
}

.pdf-viewer iframe {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: none;
  background: #fff;
}

.pdf-modal-footer {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .pdf-modal-card {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .pdf-modal-close {
    top: 4px;
    right: 4px;
    width: 44px;
    height: 44px;
  }
  .pdf-modal-title {
    font-size: 14px;
    padding: 10px 52px 10px 14px;
    min-height: 48px;
  }
  .pdf-viewer {
    min-height: 200px;
  }
  .pdf-viewer iframe {
    min-height: 200px;
  }
  .pdf-modal-footer {
    padding: 8px 10px 10px;
  }
  .pdf-modal-footer .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- Cookie Banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-text {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 200px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.cookie-text a {
  color: var(--accent);
  text-decoration: underline;
}

.cookie-text a:hover {
  color: var(--accent-strong);
}

.cookie-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 8px 20px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border-strong);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  color: var(--text);
  white-space: nowrap;
}

.cookie-btn:hover {
  background: var(--surface);
}

.cookie-btn-accept {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.cookie-btn-accept:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.cookie-btn-settings {
  color: var(--text-muted);
}

.cookie-btn-settings:hover {
  color: var(--text);
  background: var(--surface);
}

@media (max-width: 600px) {
  .cookie-banner {
    padding: 12px 16px;
  }
  .cookie-content {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .cookie-text {
    font-size: 12px;
    gap: 10px;
  }
  .cookie-text svg {
    width: 20px;
    height: 20px;
  }
  .cookie-buttons {
    justify-content: flex-end;
    gap: 6px;
  }
  .cookie-btn {
    padding: 6px 14px;
    font-size: 12px;
  }
}

@media (max-width: 400px) {
  .cookie-buttons {
    flex-direction: column;
    gap: 4px;
  }
  .cookie-btn {
    text-align: center;
    padding: 6px 12px;
    font-size: 11px;
  }
}

/* ---------- FAQ ---------- */
.faq-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: all 0.2s ease;
  height: fit-content;
}

.faq-item:hover {
  border-color: var(--border-strong);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  transition: all 0.2s ease;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.3s ease;
  padding: 0 18px;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 18px 16px;
}

.faq-answer p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Мобильная адаптация */
@media (max-width: 700px) {
  .faq-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .faq-question {
    padding: 14px 16px;
    font-size: 14px;
  }
  .faq-answer p {
    font-size: 13px;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(28px, 4vw, 40px) 0;
  background: var(--bg-elevated);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
}

.footer-note {
  color: var(--text-faint);
  max-width: 50ch;
}

.footer-links a {
  color: var(--accent);
  text-decoration: underline;
}

.footer-links a:hover {
  color: var(--accent-strong);
}

[data-theme="dark"] .footer-links a {
  color: var(--accent-strong);
}

.footer-company-details {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-faint);
}

.footer-company-details p {
  margin-bottom: 2px;
}

.footer-company-details strong {
  color: var(--text-muted);
  font-weight: 600;
}

.footer-note a {
  color: var(--accent);
  text-decoration: none;
}

.footer-note a:hover {
  text-decoration: underline;
}

/* ---------- Overlay ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 50;
}
.overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Cart drawer ---------- */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 55;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s ease;
  box-shadow: var(--shadow-lg);
}
.cart-drawer.is-open {
  transform: translateX(0);
}
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 2vw, 20px);
  border-bottom: 1px solid var(--border);
}
.cart-header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}
.icon-btn {
  color: var(--text-muted);
  font-size: 22px;
  padding: 4px 8px;
  border-radius: var(--radius-s);
  transition: all .15s ease;
}
.icon-btn:hover {
  color: var(--text);
  background: var(--surface);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cart-empty {
  color: var(--text-faint);
  text-align: center;
  margin-top: 60px;
  font-size: 14px;
  line-height: 1.6;
}
.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
}
.cart-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-s);
}
.cart-item-name {
  font-size: 13.5px;
  line-height: 1.3;
  margin-bottom: 4px;
  font-weight: 500;
}
.cart-item-price {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
}
.cart-item-remove {
  color: var(--danger);
  font-size: 13px;
  text-decoration: underline;
  padding: 4px;
}

.cart-summary {
  border-top: 1px solid var(--border);
  padding: 16px 20px 20px;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  margin-bottom: 12px;
}
.cart-total-row strong {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--accent);
}

/* ---------- Modals ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
}
.modal-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  width: min(480px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: clamp(20px, 3vw, 28px) clamp(18px, 2.5vw, 24px);
  transform: scale(.92) translateY(10px);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  box-shadow: var(--shadow-lg);
}
.modal.is-open .modal-card {
  transform: scale(1) translateY(0);
}
.modal-card h2 {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 700;
  margin-bottom: 4px;
}
.modal-sub {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-bottom: 20px;
  line-height: 1.5;
}
/* ---------- Модалка установки приложения (PWA) ---------- */
.install-modal-card {
  width: min(520px, 100%);
  padding: 24px 20px;
  position: relative;
}

.install-close {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 20px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.install-close:hover {
  background: var(--surface);
  color: var(--text);
}

.install-modal-card h2 {
  font-size: 20px;
  margin-bottom: 6px;
  padding-right: 30px;
}

.install-modal-card .modal-sub {
  margin-bottom: 18px;
  font-size: 14px;
}

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.install-step {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius-m);
  padding: 14px;
}

.step-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.step-content h3 {
  font-size: 15px;
  margin-bottom: 6px;
  font-weight: 600;
}

.step-content ol {
  padding-left: 18px;
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.step-content li {
  margin-bottom: 4px;
}

.icon-placeholder {
  font-size: 16px;
  vertical-align: middle;
}

@media (max-width: 480px) {
  .install-modal-card {
    padding: 20px 16px;
  }
  .install-modal-card h2 {
    font-size: 18px;
  }
  .install-step {
    padding: 12px;
  }
  .step-icon {
    font-size: 24px;
  }
  .step-content h3 {
    font-size: 14px;
  }
  .step-content ol {
    font-size: 12px;
  }
}
/* ---------- Auth Modal ---------- */
.auth-modal-card {
  width: min(440px, 100%);
}
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}
.auth-tab {
  flex: 1;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .15s ease;
}
.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.auth-form {
  display: none;
}
.auth-form.active {
  display: block;
}
.auth-form h2 {
  font-size: 20px;
  margin-bottom: 8px;
}
.auth-error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}
.auth-error.show {
  display: block;
}
.auth-agreement {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.auth-agreement a {
  color: var(--accent);
  text-decoration: underline;
}
[data-theme="dark"] .auth-agreement a {
  color: var(--accent-strong);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 400px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Profile Modal ---------- */
.profile-modal-card {
  width: min(540px, 100%);
}
.profile-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.profile-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.profile-section .muted {
  color: var(--text-faint);
  font-size: 13.5px;
}

.address-card, .card-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius-m);
  margin-bottom: 8px;
  font-size: 14px;
}
.address-card .delete-btn, .card-card .delete-btn {
  color: var(--danger);
  font-size: 12px;
  text-decoration: underline;
}

/* ---------- Form Fields ---------- */
.form-field {
  margin-bottom: 14px;
}
.form-field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-s);
  color: var(--text);
  padding: 11px 14px;
  font-size: 14.5px;
  font-family: var(--font-body);
  transition: border-color .15s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-field textarea {
  resize: vertical;
  min-height: 70px;
}
.form-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}
.form-field.has-error input,
.form-field.has-error select {
  border-color: var(--danger);
}
.form-field.has-error .form-error {
  display: block;
}

.zone-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ---------- Product Modal ---------- */
.product-modal-card {
  position: relative;
  width: min(800px, 96vw);
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  max-height: 90vh;
  height: auto;
  background: var(--bg-elevated);
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,0.3) transparent;
}
.product-modal-card::-webkit-scrollbar { width: 6px; }
.product-modal-card::-webkit-scrollbar-track { background: transparent; }
.product-modal-card::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,0.3);
  border-radius: 999px;
}

@media (min-width: 760px) {
  .product-modal-card {
    grid-template-columns: 1fr 1fr;
    height: min(500px, 82vh);
    max-height: 82vh;
  }
}

.product-modal-media {
  position: relative;
  background: #0d0d0d;
  min-height: 200px;
  height: 240px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-modal-media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

@media (min-width: 760px) {
  .product-modal-media {
    height: 100%;
    min-height: 0;
    padding: 16px;
  }
  .product-modal-media img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

.product-modal-body {
  padding: 18px 16px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,0.3) transparent;
}
.product-modal-body::-webkit-scrollbar { width: 5px; }
.product-modal-body::-webkit-scrollbar-track { background: transparent; }
.product-modal-body::-webkit-scrollbar-thumb {
  background: rgba(148,163,184,0.3);
  border-radius: 999px;
}

@media (min-width: 760px) {
  .product-modal-body {
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    padding: 20px 18px 18px;
  }
}

@media (max-width: 759px) {
  .product-modal-card {
    height: 88vh;
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
    width: 100%;
    display: flex;
    flex-direction: column;
  }
  .product-modal-media {
    min-height: 200px;
    height: 220px;
    flex-shrink: 0;
    padding: 8px;
  }
  .product-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 20px;
    max-height: none;
  }
  .modal {
    align-items: flex-end;
    padding: 0;
  }
}

.product-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 30;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  border: none;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.product-modal-close:hover {
  background: rgba(0,0,0,0.85);
  color: #fff;
}
[data-theme="dark"] .product-modal-close {
  background: rgba(0,0,0,0.7);
  color: #fff;
}

.product-modal-title {
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 700;
  line-height: 1.15;
}

.product-modal-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.product-modal-weight {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.product-modal-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.product-kbju-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.kbju-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 8px 12px;
  min-width: 64px;
}
.kbju-pill .val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}
.kbju-pill .lab {
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.product-cook {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-m);
  padding: 16px 18px;
}
.product-cook h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin-bottom: 8px;
}
.product-cook ol {
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.product-cook li {
  margin-bottom: 4px;
}

.product-modal-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.product-modal-price {
  font-family: var(--font-mono);
  font-size: clamp(24px, 3vw, 28px);
  font-weight: 700;
  color: var(--accent);
}
.product-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Payment ---------- */
.pay-amount {
  text-align: center;
  margin-bottom: 20px;
}
.pay-amount .value {
  font-family: var(--font-mono);
  font-size: 34px;
  color: var(--accent);
  display: block;
}
.pay-amount .label {
  color: var(--text-faint);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.pay-methods {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.pay-method {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-m);
  padding: 14px 16px;
  cursor: pointer;
  background: var(--bg-elevated);
  transition: all .15s ease;
}
.pay-method.is-selected {
  border-color: var(--accent);
  background: var(--accent-light);
}
.pay-method .radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
  position: relative;
}
.pay-method.is-selected .radio {
  border-color: var(--accent);
}
.pay-method.is-selected .radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}
.pay-name {
  font-size: 14px;
  font-weight: 600;
}
.pay-hint {
  font-size: 12px;
  color: var(--text-faint);
}
.pay-method.sbp .pay-name::after {
  content: "рекомендуем";
  font-size: 10px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 8px;
  vertical-align: middle;
}

.pay-success {
  text-align: center;
  padding: 8px 0;
}
.pay-success .check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.1);
  border: 2px solid var(--success);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 16px;
}
.pay-success h2 {
  font-size: 19px;
  font-weight: 600;
}
.receipt {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-s);
  padding: 14px;
  text-align: left;
  margin: 16px 0;
}
.receipt div {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  margin: 0 auto;
  animation: spin .8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.toast {
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  animation: toast-in .2s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.inline-form {
  display: flex;
  gap: 8px;
}
.inline-form input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-s);
  color: var(--text);
  padding: 11px 14px;
  font-size: 14.5px;
  font-family: var(--font-body);
  transition: border-color .15s ease;
}
.inline-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ---------- Системная тема ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212;
    --bg-elevated: #191919;
    --surface: #1e1e1e;
    --surface-2: #232323;
    --border: rgba(245, 241, 232, 0.10);
    --border-strong: rgba(245, 241, 232, 0.22);
    --text: #F5F1E8;
    --text-muted: #A8A29A;
    --text-faint: #706C64;
    --accent: #3B82F6;
    --accent-strong: #60A5FA;
    --accent-2: #93C5FD;
    --accent-light: rgba(59, 130, 246, 0.12);
    --tag: #E0522A;
    --success: #4C8C6B;
    --danger: #E0522A;
    --warning: #F59E0B;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,.3);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.4);
  }
}
@media (max-width: 400px) {
  .hero h1 {
    font-size: 24px;
  }
  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }
  .product-modal-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  body, body * {
    transition: none !important;
  }
}
/* ---------- История заказов в профиле ---------- */
.order-history-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 12px 14px;
  margin-bottom: 8px;
}

.order-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.order-history-number {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.order-history-status {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 999px;
}

.order-history-status.status-новый { background: rgba(59,130,246,0.15); color: var(--accent); }
.order-history-status.status-подтверждён { background: rgba(245,158,11,0.15); color: var(--warning); }
.order-history-status.status-готовится { background: rgba(239,68,68,0.15); color: var(--danger); }
.order-history-status.status-готов { background: rgba(34,197,94,0.15); color: var(--success); }
.order-history-status.status-в доставке { background: rgba(168,85,247,0.15); color: #a855f7; }
.order-history-status.status-доставлен { background: rgba(34,197,94,0.2); color: var(--success); }
.order-history-status.status-отменён { background: rgba(100,116,139,0.2); color: var(--text-faint); }

.order-history-details {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 2px;
}

.order-history-items {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* ---------- Карточки адресов ---------- */
.address-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius-s);
  margin-bottom: 6px;
  font-size: 13px;
  border: 1px solid var(--border);
}

.address-card strong {
  font-weight: 600;
  color: var(--text);
}

.address-card .delete-btn {
  color: var(--danger);
  font-size: 12px;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
}

.card-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius-s);
  margin-bottom: 6px;
  font-size: 13px;
  border: 1px solid var(--border);
}

.card-card .delete-btn {
  color: var(--danger);
  font-size: 12px;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
}
/* ==================== HERO SLIDER ==================== */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  height: clamp(560px, 72vh, 720px);
  min-height: 560px;
}

.hero-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  display: flex;
  align-items: center;
  height: 100%;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hero-slide-inner {
  display: grid;
  gap: var(--gap);
  padding: clamp(32px, 5vw, 60px) 0;
  width: 100%;
}

@media (min-width: 900px) {
  .hero-slide-inner {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.hero-slide .hero-content {
  max-width: 540px;
}

.hero-slide .hero-media {
  order: -1;
  border-radius: var(--radius-l);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 900px) {
  .hero-slide .hero-media {
    order: 1;
    aspect-ratio: 3/4;
  }
}

.hero-slide .hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-set-info {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface);
  padding: 10px 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--border);
}

/* Стрелки снизу справа, как у BeFit */
.hero-nav-controls {
  position: absolute;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
}

.hero-arrow {
  position: static;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  color: #1a1a1a;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  line-height: 1;
}

[data-theme="dark"] .hero-arrow {
  background: rgba(30, 30, 30, 0.9);
  color: #fff;
  border: 1px solid var(--border-strong);
}

.hero-arrow:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
}

.hero-arrow-prev,
.hero-arrow-next {
  left: auto;
  right: auto;
  top: auto;
  transform: none;
}

@media (max-width: 600px) {
  .hero-nav-controls {
    bottom: 16px;
    right: 16px;
  }
  .hero-arrow {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
}

.hero-dots {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-dot.is-active {
  background: var(--accent);
  transform: scale(1.2);
}

.hero-dot:hover {
  background: var(--accent);
}

/* ==================== CATALOG TABS ==================== */
.catalog-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.catalog-tab {
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.catalog-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.catalog-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.catalog-badge {
  background: var(--accent);
  color: #fff !important;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
  font-size: 11px !important;
}

.sets-placeholder {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-elevated);
  border-radius: var(--radius-l);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
}

.sets-placeholder p { margin-bottom: 16px; max-width: 480px; margin-left: auto; margin-right: auto; }
.market-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: var(--radius-s);
  font-weight: 600;
  font-size: 14px;
}

/* ==================== DELIVERY ==================== */
.delivery-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.delivery-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 24px 20px;
  text-align: center;
}
.delivery-icon {
  font-size: 32px;
  margin-bottom: 12px;
}
.delivery-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.delivery-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==================== FREE DELIVERY BAR ==================== */
.free-delivery-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.free-delivery-bar.is-free {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.3);
}
.free-delivery-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-align: center;
}
.free-delivery-bar.is-free .free-delivery-text {
  color: var(--success);
  font-weight: 600;
}
.free-delivery-track {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.free-delivery-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #22c55e);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ==================== REVIEWS SLIDER ==================== */
.reviews-slider-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 0 8px;
}
.reviews-track {
  display: flex;
  gap: 20px;
  transition: transform 0.35s ease;
  padding: 8px 4px 16px;
  will-change: transform;
}
.reviews-track .review-card {
  flex: 0 0 clamp(300px, 42vw, 440px);
  width: clamp(300px, 42vw, 440px);
  max-width: 100%;
  box-sizing: border-box;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  box-shadow: var(--shadow-sm);
}
.reviews-track .review-card .review-text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  flex: 1;
}
.reviews-track .review-card .review-name {
  font-size: 15px;
}
.reviews-track .review-card .review-product {
  font-size: 13px;
}
.review-avatar.mascot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.review-role {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}
.review-date {
  font-size: 11px;
  color: var(--text-faint);
}
.review-text {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.5;
  flex: 1;
}
.review-product {
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.reviews-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  box-shadow: var(--shadow-md);
  transition: all 0.15s;
}
.reviews-nav:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.reviews-prev { left: 4px; }
.reviews-next { right: 4px; }
@media (max-width: 600px) {
  .reviews-nav { display: none; }
  .reviews-slider-wrap {
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .reviews-slider-wrap::-webkit-scrollbar { display: none; }
  .reviews-track {
    transform: none !important;
    padding: 8px 16px 16px;
  }
  .reviews-track .review-card {
    flex: 0 0 min(85vw, 340px);
    width: min(85vw, 340px);
    min-height: 200px;
    padding: 18px 16px;
    scroll-snap-align: start;
  }
}
@media (min-width: 1100px) {
  .reviews-track .review-card {
    flex: 0 0 420px;
    width: 420px;
  }
}

/* ==================== SETS GRID ==================== */
.sets-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.set-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--radius-m);
  margin-bottom: 12px;
  background: var(--surface);
  display: block;
}
.set-card {

  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 20px;
  transition: all 0.2s ease;
}
.set-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.set-title {
  font-size: 17px;
  font-weight: 700;
  margin: 8px 0 6px;
}
.set-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 10px;
}
.set-items {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text);
}
.set-items li {
  padding: 4px 0;
  border-bottom: 1px dashed var(--border);
}
.set-items li:last-child { border-bottom: none; }
.set-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.set-badges { min-height: 24px; }


@media (max-width: 600px) {
  .sets-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .set-card {
    padding: 14px;
  }
  .set-card-img {
    aspect-ratio: 16/9;
    border-radius: 10px;
  }
}

/* ==================== PAYMENT ENHANCEMENTS ==================== */
.pay-badge {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: middle;
  font-weight: 600;
}
.success-info {
  text-align: left !important;
}
.success-info div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
}
.success-tip {
  background: var(--accent-light);
  border: 1px dashed var(--accent);
  border-radius: var(--radius-m);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text);
  margin-top: 12px;
  line-height: 1.45;
  text-align: left;
}

/* ==================== DELIVERY ZONES ==================== */
.zones-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.zone-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 18px 16px;
}
.zone-card ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}
.zone-label {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
}
.zone-green { border-color: rgba(34, 197, 94, 0.35); }
.zone-yellow { border-color: rgba(245, 158, 11, 0.35); }
.zone-red { border-color: rgba(239, 68, 68, 0.3); }

/* ==================== ADDRESS ZONE CHECK ==================== */
.address-check-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.address-check-form input {
  flex: 1;
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-s);
  color: var(--text);
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: inherit;
}
.address-check-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.zone-check-result {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-m);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}
.zone-check-result.zone-ok {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: var(--text);
}
.zone-check-result.zone-warn {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--text);
}
.zone-check-result.zone-no {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--text);
}
.zone-check-result strong { display: block; margin-bottom: 4px; font-size: 15px; }

.pay-secure-note {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  margin: 12px 0 4px;
}


/* ---------- Promo Tom Yam ---------- */
.promo-cart-bar {
  background: rgba(249, 115, 22, 0.1);
  border: 1px dashed rgba(249, 115, 22, 0.45);
  border-radius: var(--radius-m);
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13.5px;
  color: var(--text);
}
.promo-cart-bar strong { color: #EA580C; }
.promo-cart-hint {
  font-size: 12px;
  color: var(--text-muted);
}
.promo-tag {
  display: inline-block;
  background: linear-gradient(135deg, #F97316, #EF4444);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

@media (max-width: 900px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header-actions { gap: 6px; }
  .cart-btn, .auth-btn, .profile-btn { padding: 8px 10px; }
  .profile-btn span { display: none; }
  .theme-toggle { width: 38px; height: 38px; }

  .nav {
    padding-left: 0;
    padding-right: 0;
  }

  .hero-slider {
    height: 600px;
    min-height: 600px;
  }
  .hero-slides { height: 100%; }
  .hero-slide { height: 100%; }
  .hero-slide-inner {
    padding: 28px 0 80px;
    gap: 20px;
  }
  .hero-slide .hero-content h1 {
    font-size: clamp(22px, 7vw, 30px);
    line-height: 1.15;
  }
  .hero-slide .lead { font-size: 14.5px; }
  .gift-badge {
    font-size: 13px;
    padding: 12px 14px;
    max-width: 100%;
  }
  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }
  .hero-set-info { font-size: 12.5px; }
  .hero-dots { bottom: 18px; }
  .hero-nav-controls { bottom: 12px; right: 16px; }

  .catalog-tabs {
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-left: 0;
    margin-right: 0;
  }
  .catalog-tab {
    padding: 10px 14px;
    font-size: 13px;
    flex-shrink: 0;
  }
  .catalog-filters {
    margin-left: 0;
    margin-right: 0;
  }

  .section { padding: 40px 0; }
  .section-title { font-size: clamp(22px, 5.5vw, 28px); }

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

  .product-body { padding: 12px 12px 14px; gap: 5px; }
  .product-title { font-size: 13.5px; min-height: 2.4em; }
  .product-meta, .product-kbju, .product-desc { font-size: 11.5px; }
  .product-price { font-size: 16px; }
  .btn-add { padding: 9px 12px; font-size: 12.5px; }
  .product-badge { font-size: 10px; padding: 4px 8px; }

  .cart-drawer {
    width: 100%;
    max-width: 100%;
  }
  .cart-drawer .cart-header,
  .cart-drawer .cart-items,
  .cart-drawer .cart-summary {
    padding-left: 20px;
    padding-right: 20px;
  }

  .modal-card {
    width: 100%;
    max-height: 92vh;
    padding: 20px 20px;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
  }
  .modal {
    align-items: flex-end;
    padding: 0;
  }
  .product-modal-card { max-height: 92vh; }

  .delivery-grid,
  .concept-steps,
  .sets-grid,
  .zones-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cookie-banner .cookie-content {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-buy {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .btn-add {
    width: 100%;
    justify-content: center;
  }
  .filter-chip {
    padding: 8px 12px;
    font-size: 12.5px;
  }
  .hero-slide-inner {
    padding: 24px 0 76px;
  }
}

@media (max-width: 360px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (hover: none) {
  .product-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }
  .btn:active { opacity: 0.85; }
}

@supports (padding: max(0px)) {
  .cart-drawer {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  @media (max-width: 900px) {
    .container {
      padding-left: max(20px, env(safe-area-inset-left));
      padding-right: max(20px, env(safe-area-inset-right));
    }
  }
  @media (max-width: 480px) {
    .container {
      padding-left: max(16px, env(safe-area-inset-left));
      padding-right: max(16px, env(safe-area-inset-right));
    }
  }
  .cookie-banner {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}
