/* =========================================================================
   Precise Smoke — дизайн-система
   Светлая тема (синий + белый) по умолчанию, тёмная (синий + чёрный + серый).
   ========================================================================= */

:root {
  /* Палитра-константы (не зависят от темы) */
  --blue-50:  #eef3ff;
  --blue-100: #d9e3ff;
  --blue-200: #b3c6ff;
  --blue-300: #84a2ff;
  --blue-400: #5680ff;
  --blue-500: #2563ff;   /* основной акцент */
  --blue-600: #1b4fe0;
  --blue-700: #163fb4;
  --blue-800: #142f80;
  --blue-900: #101f4d;

  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 26px;

  --container: 1280px;
  --header-h: 64px;

  --shadow-1: 0 1px 2px rgba(16, 31, 77, .06), 0 2px 8px rgba(16, 31, 77, .05);
  --shadow-2: 0 6px 24px rgba(16, 31, 77, .10);
  --shadow-pop: 0 12px 40px rgba(16, 31, 77, .16);

  --ease: cubic-bezier(.22,.61,.36,1);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ----- Светлая тема ----- */
:root,
[data-theme="light"] {
  --bg:           #f4f6fb;
  --bg-elevated:  #ffffff;
  --surface:      #ffffff;
  --surface-2:    #f1f4fa;
  --surface-3:    #e9eefa;

  --text:         #121726;
  --text-2:       #4a5468;
  --text-3:       #7b869b;
  --text-on-accent:#ffffff;

  --border:       #e5e9f2;
  --border-2:     #d8deec;

  --primary:      var(--blue-500);
  --primary-strong: var(--blue-600);
  --primary-soft: var(--blue-50);
  --primary-text: var(--blue-600);

  --success: #1aa251;
  --success-soft: #e4f6ec;
  --danger:  #e23b4e;
  --danger-soft: #fdeaec;
  --warning: #e69a1b;
  --star:    #f4b400;

  --skeleton: linear-gradient(90deg, #e9edf6 0%, #f3f6fc 50%, #e9edf6 100%);
  --header-bg: rgba(255,255,255,.82);
  --overlay: rgba(16, 23, 38, .42);
}

/* ----- Тёмная тема (синий + чёрный + серый) ----- */
[data-theme="dark"] {
  --bg:           #0c0f16;
  --bg-elevated:  #141925;
  --surface:      #141925;
  --surface-2:    #1b2230;
  --surface-3:    #232c3d;

  --text:         #f3f6fc;
  --text-2:       #aab4c8;
  --text-3:       #768297;
  --text-on-accent:#ffffff;

  --border:       #232c3d;
  --border-2:     #2d384c;

  --primary:      var(--blue-400);
  --primary-strong: var(--blue-500);
  --primary-soft: rgba(86, 128, 255, .14);
  --primary-text: #8aa6ff;

  --success: #2fcf6e;
  --success-soft: rgba(47, 207, 110, .14);
  --danger:  #ff5c6c;
  --danger-soft: rgba(255, 92, 108, .14);
  --warning: #f1b13b;
  --star:    #ffc83d;

  --skeleton: linear-gradient(90deg, #1a2030 0%, #232c3d 50%, #1a2030 100%);
  --header-bg: rgba(12, 15, 22, .80);
  --overlay: rgba(0, 0, 0, .58);
  --shadow-1: 0 1px 2px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.25);
  --shadow-2: 0 6px 24px rgba(0,0,0,.4);
  --shadow-pop: 0 12px 40px rgba(0,0,0,.5);
}

/* ========================= База ========================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  transition: background .25s var(--ease), color .25s var(--ease);
  overflow-x: hidden;
}

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

body.no-scroll { overflow: hidden; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 16px;
}

.view { min-height: calc(100vh - var(--header-h) - 120px); padding-block: 18px 60px; }

.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.center { text-align: center; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }

/* ========================= Шапка ========================= */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 14px;
  max-width: var(--container); margin-inline: auto; padding-inline: 16px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; flex-shrink: 0; }
.brand__mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px;
  box-shadow: 0 4px 12px rgba(37,99,255,.35);
}
.brand__name span { color: var(--primary-text); }

.search {
  flex: 1; max-width: 520px; position: relative; display: flex; align-items: center;
}
.search input {
  width: 100%; height: 42px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid transparent;
  padding: 0 16px 0 42px; outline: none; transition: border-color .15s, background .15s;
}
.search input:focus { border-color: var(--primary); background: var(--surface); }
.search__icon { position: absolute; left: 14px; color: var(--text-3); pointer-events: none; display: flex; }

.header__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; color: var(--text-2);
  background: transparent; position: relative; transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .badge {
  position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--primary); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1;
}

/* ========================= Кнопки ========================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 12px;
  font-weight: 700; font-size: 15px; white-space: nowrap;
  transition: transform .08s var(--ease), background .15s, opacity .15s, box-shadow .15s;
  user-select: none;
}
.btn:active { transform: scale(.975); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: var(--text-on-accent); box-shadow: 0 6px 18px rgba(37,99,255,.28); }
.btn--primary:hover:not(:disabled) { background: var(--primary-strong); }
.btn--ghost { background: var(--surface-2); color: var(--text); }
.btn--ghost:hover:not(:disabled) { background: var(--surface-3); }
.btn--outline { background: transparent; border: 1.5px solid var(--border-2); color: var(--text); }
.btn--outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary-text); }
.btn--danger { background: var(--danger-soft); color: var(--danger); }
.btn--tg { background: #29a9eb; color: #fff; box-shadow: 0 6px 18px rgba(41,169,235,.3); }
.btn--tg:hover:not(:disabled) { background: #1b95d4; }

.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-3); font-size: 13px; font-weight: 600; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.tg-widget { display: flex; justify-content: center; min-height: 48px; }
.tg-widget iframe { margin: 0 auto !important; }
.btn--block { width: 100%; }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn--lg { height: 52px; font-size: 16px; }

/* ========================= Чипы / табы ========================= */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; height: 38px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; transition: all .15s;
}
.chip:hover { border-color: var(--border-2); color: var(--text); }
.chip--active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ========================= Карточки товаров ========================= */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 2px 14px; }
.section-head h1, .section-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .14s var(--ease), box-shadow .14s, border-color .14s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--border-2); }
.card__media {
  position: relative; aspect-ratio: 1/1; background: var(--surface-2);
  display: grid; place-items: center; overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media .ph { color: var(--text-3); opacity: .5; }
.card__badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--bg-elevated); color: var(--text-2); border: 1px solid var(--border);
  font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px;
}
.card__badge--out { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.card__body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__cat { font-size: 12px; font-weight: 600; color: var(--primary-text); }
.card__name { font-size: 14.5px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.card__rating { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; }
.card__price { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.card__price small { font-size: 12px; font-weight: 600; color: var(--text-3); }
.add-btn {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary-text);
  display: grid; place-items: center; transition: background .15s, transform .08s;
}
.add-btn:hover { background: var(--primary); color: #fff; }
.add-btn:active { transform: scale(.92); }

/* ========================= Карточка товара (детально) ========================= */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.product__media { position: sticky; top: calc(var(--header-h) + 16px); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2); aspect-ratio: 1/1; border: 1px solid var(--border); }
/* Фото товаров портретные — показываем целиком (contain), без обрезки сверху/снизу */
.product__media img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.product__title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.product__price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.label { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; display: block; }

.variants { display: flex; flex-wrap: wrap; gap: 9px; }
.variant {
  padding: 9px 14px; border-radius: 11px; border: 1.5px solid var(--border);
  background: var(--surface); font-weight: 600; font-size: 14px;
  display: flex; flex-direction: column; gap: 2px; min-width: 84px; transition: all .14s;
}
.variant small { font-size: 12px; color: var(--text-3); font-weight: 600; }
.variant:hover:not(.variant--out) { border-color: var(--border-2); }
.variant--active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); }
.variant--active small { color: var(--primary-text); }
.variant--out { opacity: .45; cursor: not-allowed; text-decoration: line-through; }

.qty { display: inline-flex; align-items: center; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.qty button { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); color: var(--text); font-size: 20px; box-shadow: var(--shadow-1); }
.qty button:disabled { opacity: .4; box-shadow: none; }
.qty span { min-width: 36px; text-align: center; font-weight: 700; }

.prose { color: var(--text-2); line-height: 1.65; white-space: pre-line; }

/* Отзывы */
.review { padding: 14px 0; border-top: 1px solid var(--border); }
.review__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.review__author { font-weight: 700; font-size: 14px; }
.stars { display: inline-flex; gap: 1px; color: var(--star); }
.stars--empty { color: var(--border-2); }

/* ========================= Корзина / список строк ========================= */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
.panel + .panel { margin-top: 16px; }

.cart-row { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--border); }
.cart-row:first-child { border-top: none; }
.cart-row__img { width: 64px; height: 64px; border-radius: 12px; background: var(--surface-2); object-fit: cover; flex-shrink: 0; }
.cart-row__info { flex: 1; min-width: 0; }
.cart-row__name { font-weight: 700; font-size: 14.5px; }
.cart-row__flavor { font-size: 13px; color: var(--text-3); }
.cart-row__price { font-weight: 800; white-space: nowrap; }

.summary-line { display: flex; justify-content: space-between; padding: 7px 0; color: var(--text-2); font-weight: 600; }
.summary-line--total { color: var(--text); font-size: 19px; font-weight: 800; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 14px; }
.summary-line--save { color: var(--success); }

.checkout-grid { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 22px; align-items: start; }
.checkout-grid .col-summary { position: sticky; top: calc(var(--header-h) + 16px); }

/* Сегмент-переключатель */
.segment { display: flex; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px; }
.segment button { flex: 1; height: 40px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--text-2); transition: all .14s; }
.segment button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }

/* ========================= Поля ввода ========================= */
.field { margin-bottom: 14px; }
.field > label { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 7px; display: block; }
.input, .select, .textarea {
  width: 100%; height: 48px; border-radius: 12px;
  background: var(--surface-2); border: 1.5px solid transparent;
  padding: 0 14px; outline: none; transition: border-color .15s, background .15s;
}
.textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 96px; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); background: var(--surface); }
.input--err { border-color: var(--danger); }
.field__err { color: var(--danger); font-size: 12.5px; margin-top: 6px; font-weight: 600; }

/* ========================= Профиль ========================= */
.stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-card { background: var(--surface-2); border-radius: var(--radius); padding: 16px; transition: background .15s, transform .08s; }
a.stat-card:hover { background: var(--surface-3); }
a.stat-card:active { transform: scale(.99); }
.stat-card__val { font-size: 26px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 6px; }
.stat-card__label { font-size: 13px; color: var(--text-3); font-weight: 600; margin-top: 2px; }

.order-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.order-item__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.order-item__id { font-weight: 800; }
.status-pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.status-pill--ok { background: var(--success-soft); color: var(--success); }
.status-pill--wait { background: var(--primary-soft); color: var(--primary-text); }
.status-pill--cancel { background: var(--danger-soft); color: var(--danger); }

/* ========================= Пустые состояния ========================= */
.empty { text-align: center; padding: 64px 20px; }
.empty__icon { width: 84px; height: 84px; border-radius: 24px; background: var(--surface-2); color: var(--text-3); display: grid; place-items: center; margin: 0 auto 18px; }
.empty h3 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.empty p { color: var(--text-3); max-width: 360px; margin: 0 auto 20px; }

/* ========================= Скелетоны ========================= */
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; padding-top: 60px; }
.sk-card, .sk-line { background: var(--skeleton); background-size: 200% 100%; animation: sk 1.2s infinite linear; border-radius: var(--radius); }
.sk-card { aspect-ratio: .72; }
.sk-line { height: 14px; border-radius: 6px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.spinner { width: 22px; height: 22px; border: 2.5px solid var(--primary-soft); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
.spinner--page { margin: 80px auto; width: 38px; height: 38px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========================= Тосты ========================= */
.toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast {
  pointer-events: auto; background: var(--text); color: var(--bg);
  padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow-pop); display: flex; align-items: center; gap: 9px;
  animation: toast-in .25s var(--ease);
}
.toast--ok { background: var(--success); color: #fff; }
.toast--err { background: var(--danger); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* ========================= Модалки ========================= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 150; background: var(--overlay);
  display: grid; place-items: center; padding: 18px;
  animation: fade .2s var(--ease); backdrop-filter: blur(3px);
}
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--bg-elevated); border-radius: var(--radius-lg);
  width: 100%; max-width: 440px; padding: 26px; box-shadow: var(--shadow-pop);
  animation: pop .25s var(--ease); max-height: 90vh; overflow-y: auto;
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal h2 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.modal__close { position: absolute; }

/* ========================= Age gate ========================= */
.agegate { text-align: center; max-width: 400px; }
.agegate__mark { width: 72px; height: 72px; border-radius: 22px; background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); color: #fff; display: grid; place-items: center; font-size: 30px; font-weight: 800; margin: 0 auto 18px; box-shadow: 0 10px 30px rgba(37,99,255,.4); }

/* ========================= Чат ========================= */
.chat { display: flex; flex-direction: column; height: calc(100vh - var(--header-h) - 96px); }
.chat__head { display: flex; align-items: center; gap: 10px; padding: 6px 2px 12px; }
.chat__list { flex: 1; overflow-y: auto; padding: 8px 4px; display: flex; flex-direction: column; gap: 4px; scrollbar-width: thin; }
.chat__date { align-self: center; font-size: 12px; font-weight: 700; color: var(--text-3); background: var(--surface-2); padding: 3px 12px; border-radius: 999px; margin: 10px 0 6px; }
.chat__row { display: flex; }
.chat__row--mine { justify-content: flex-end; }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 16px; position: relative; }
.bubble--them { background: var(--surface-2); border-bottom-left-radius: 5px; }
.bubble--mine { background: var(--primary); color: #fff; border-bottom-right-radius: 5px; }
.bubble__text { font-size: 14.5px; line-height: 1.45; word-break: break-word; }
.bubble__time { font-size: 10.5px; opacity: .6; text-align: right; margin-top: 3px; }
.chat__compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 0 4px; border-top: 1px solid var(--border); }
.chat__compose .textarea { resize: none; }
.chat__system { align-self: center; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--text-3); background: var(--surface-2); padding: 6px 14px; border-radius: 12px; margin: 8px auto; max-width: 80%; }
.vic-avatar { width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center; font-size: 15px; background: linear-gradient(135deg, var(--primary), var(--primary-strong)); color: #fff; }
.vic-avatar--staff { background: var(--surface-3); }
.vic-quick { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 2px 4px; }
.vic-quick .chip { height: 34px; font-size: 13px; }
.bubble.typing { display: inline-flex; gap: 4px; padding: 13px 14px; }
.typing__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: typing 1.2s infinite ease-in-out; }
.typing__dot:nth-child(2) { animation-delay: .2s; }
.typing__dot:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ========================= Новости ========================= */
.news-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px; transition: box-shadow .15s, border-color .15s; }
.news-card:hover { box-shadow: var(--shadow-2); border-color: var(--border-2); }
.news-card__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--surface-2); }
.news-card__body { padding: 16px 18px; }
.news-card__text { color: var(--text); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card__meta { display: flex; gap: 14px; align-items: center; margin-top: 12px; color: var(--text-3); font-size: 13px; font-weight: 600; }
.reactions { display: flex; gap: 8px; flex-wrap: wrap; }
.reaction-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 13px; border-radius: 999px; background: var(--surface-2); border: 1.5px solid transparent; font-weight: 700; font-size: 14px; transition: all .14s; }
.reaction-btn:hover { border-color: var(--border-2); }
.reaction-btn--active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-text); }
.reaction-btn .emoji { font-size: 17px; }

/* ========================= Меню профиля ========================= */
.menu-list { display: flex; flex-direction: column; }
.menu-row { display: flex; align-items: center; gap: 13px; padding: 14px 4px; border-top: 1px solid var(--border); color: var(--text); text-align: left; width: 100%; transition: color .12s; }
.menu-row:first-child { border-top: none; }
.menu-row:hover { color: var(--primary-text); }
.menu-row__icon { width: 38px; height: 38px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-2); flex-shrink: 0; }
.menu-row__label { flex: 1; font-weight: 600; }
.menu-row__chev { color: var(--text-3); }
.menu-row .badge { background: var(--primary); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 2px 8px; }

/* ========================= Промокод-карточка ========================= */
.promo-card { border: 1.5px dashed var(--primary); background: var(--primary-soft); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.promo-card__code { font-size: 18px; font-weight: 800; letter-spacing: .04em; color: var(--primary-text); }
.promo-card__desc { font-size: 13px; color: var(--text-2); }

/* ========================= Лояльность / инфо-страницы ========================= */
.hero {
  border-radius: var(--radius-xl); padding: 30px 24px; text-align: center; position: relative; overflow: hidden;
  border: 1px solid var(--border);
}
.hero--gold { background: linear-gradient(135deg, rgba(244,180,0,.22), rgba(244,180,0,.05)); border-color: rgba(244,180,0,.4); }
.hero--fire { background: linear-gradient(135deg, rgba(255,122,61,.22), rgba(255,122,61,.05)); border-color: rgba(255,122,61,.4); }
.hero__badge { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; color: #fff; }
.hero__badge--gold { background: linear-gradient(135deg, #ffce3a, #ffa62e); box-shadow: 0 10px 30px rgba(244,180,0,.4); }
.hero__badge--fire { background: linear-gradient(135deg, #ff8a3d, #ff6a2e); box-shadow: 0 10px 30px rgba(255,122,61,.4); }
.hero__badge svg { width: 40px; height: 40px; }
.hero__value { font-size: 50px; font-weight: 900; line-height: 1; letter-spacing: -.03em; }
.hero__label { color: var(--text-2); font-weight: 600; margin-top: 4px; }

.info-card { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-top: 12px; }
.info-card__icon { width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center; }
.info-card__icon svg { width: 22px; height: 22px; }
.info-card h4 { font-size: 15.5px; font-weight: 800; margin-bottom: 3px; }
.info-card p { color: var(--text-2); font-size: 13.5px; line-height: 1.5; }

.level-row { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; font-weight: 700; }
.level-row--locked { opacity: .55; }
.level-row__check { color: var(--success); flex-shrink: 0; display: flex; }
.level-row__lock { color: var(--text-3); flex-shrink: 0; display: flex; }

.copy-tile { display: flex; align-items: center; gap: 12px; background: var(--primary-soft); border-radius: var(--radius); padding: 14px 16px; margin-top: 12px; }
.copy-tile__val { font-weight: 800; font-size: 17px; letter-spacing: .04em; flex: 1; color: var(--primary-text); }

/* FAQ-аккордеон */
.faq { margin-top: 8px; }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__q { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 2px; font-weight: 700; font-size: 15px; }
.faq__q svg { transition: transform .2s var(--ease); color: var(--text-3); flex-shrink: 0; }
.faq__item--open .faq__q svg { transform: rotate(90deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .25s var(--ease); color: var(--text-2); line-height: 1.55; }
.faq__item--open .faq__a { max-height: 320px; }
.faq__a > div { padding: 0 2px 16px; }

/* Прогресс заказа */
.progress { display: flex; flex-direction: column; gap: 0; margin: 6px 0; }
.progress__step { display: flex; gap: 14px; position: relative; padding-bottom: 22px; }
.progress__step:last-child { padding-bottom: 0; }
.progress__dot { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); border: 2px solid var(--border); z-index: 1; }
.progress__step::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--border); }
.progress__step:last-child::before { display: none; }
.progress__step--done .progress__dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.progress__step--done::before { background: var(--primary); }
.progress__step--current .progress__dot { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--primary-soft); }
.progress__label { font-weight: 700; padding-top: 3px; }
.progress__step--pending .progress__label { color: var(--text-3); font-weight: 600; }

/* ========================= Футер ========================= */
.footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 40px; }
.footer__inner { max-width: var(--container); margin-inline: auto; padding: 30px 16px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.footer__col h4 { font-size: 14px; font-weight: 800; margin-bottom: 10px; }
.footer__col a, .footer__col p { display: block; color: var(--text-3); font-size: 13.5px; line-height: 2; }
.footer__col a:hover { color: var(--primary-text); }
.footer__legal { border-top: 1px solid var(--border); padding: 16px; text-align: center; color: var(--text-3); font-size: 12.5px; }

/* ========================= Мобильная нижняя навигация ========================= */
.tabbar { display: none; }

/* ========================= Адаптив ========================= */
@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; gap: 20px; }
  .product__media { position: static; max-width: 460px; margin-inline: auto; width: 100%; }
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-grid .col-summary { position: static; }
}

@media (max-width: 720px) {
  body { padding-bottom: 64px; } /* место под таб-бар */
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .header__inner { gap: 8px; }
  .brand__name { display: none; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .header { }
  .header__inner { flex-wrap: wrap; height: auto; padding-block: 10px; row-gap: 10px; }
  :root { --header-h: 110px; }
  .section-head h1, .section-head h2 { font-size: 19px; }
  .product__title { font-size: 21px; }
  .product__price { font-size: 25px; }
  .stat-cards { grid-template-columns: 1fr 1fr; }

  /* Нижняя таб-навигация на мобильных */
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-3); font-size: 10.5px; font-weight: 600; padding: 4px 0; position: relative; }
  .tabbar button.active { color: var(--primary-text); }
  .tabbar .badge { position: absolute; top: 0; right: 50%; margin-right: -22px; min-width: 16px; height: 16px; padding: 0 4px; background: var(--primary); color: #fff; border-radius: 999px; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .modal { padding: 20px; }
}

/* Оценка работы поддержки (чат Виктории) */
.rate-box { align-self: center; text-align: center; background: var(--surface-2); border-radius: 14px; padding: 14px 18px; margin: 10px auto; }
.rate-stars { display: inline-flex; gap: 6px; }
.rate-star { font-size: 28px; line-height: 1; color: var(--border-2); transition: color .12s, transform .08s; cursor: pointer; background: none; }
.rate-star:hover { transform: scale(1.15); }
.rate-star--on { color: var(--star); }

/* Колесо удачи */
.wheel-box { position: relative; width: 300px; max-width: 88vw; margin: 0 auto; }
.wheel-svg { width: 100%; display: block; filter: drop-shadow(0 8px 24px rgba(16,31,77,.18)); }
.wheel-pointer { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 22px solid var(--primary); z-index: 2; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }

/* Избранное — сердечко */
.fav-heart { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-elevated); color: var(--text-3); box-shadow: var(--shadow-1); transition: transform .12s var(--ease), color .15s, background .15s; }
.fav-heart:hover { color: var(--danger); background: var(--surface); }
.fav-heart--on { color: var(--danger); }
.fav-heart svg { width: 18px; height: 18px; }
.fav-heart--big { width: 46px; height: 46px; top: 12px; right: 12px; }
.fav-heart--big svg { width: 24px; height: 24px; }
.fav-heart--pop { animation: favpop .32s var(--ease); }
@keyframes favpop { 0% { transform: scale(1); } 40% { transform: scale(1.32); } 100% { transform: scale(1); } }

/* Соцсети в футере */
.footer__social { display: flex; gap: 10px; margin-top: 14px; }
.social-btn { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; transition: transform .1s var(--ease), filter .15s; box-shadow: var(--shadow-1); }
.social-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.social-btn--tg { background: #29a9eb; }
.social-btn--vk { background: #0077ff; }

/* Cookie-баннер */
.cookie-banner { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 0); z-index: 120; width: min(680px, 94vw); display: flex; align-items: center; gap: 14px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 16px; padding: 13px 16px; box-shadow: var(--shadow-pop); animation: cookie-in .35s var(--ease); transition: transform .3s var(--ease); }
@keyframes cookie-in { from { transform: translate(-50%, 160%); } to { transform: translate(-50%, 0); } }
.cookie-banner__icon { font-size: 26px; flex-shrink: 0; }
.cookie-banner__text { font-size: 13px; line-height: 1.45; color: var(--text-2); flex: 1; }
.cookie-banner__text a { color: var(--primary-text); font-weight: 600; }
.cookie-banner .btn { flex-shrink: 0; }
@media (max-width: 720px) { .cookie-banner { bottom: 74px; flex-wrap: wrap; } .cookie-banner .btn { width: 100%; } }

/* ===== Оценка заказа (на странице заказа) ===== */
.review-card { margin-top: 0; border: 1px solid var(--primary-soft); background: linear-gradient(180deg, var(--primary-soft) 0%, var(--bg-elevated) 70%); }
.review-card__head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 6px; }
.review-card__badge { font-size: 26px; flex-shrink: 0; }
.review-card__line { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--border); margin-top: 4px; }
.review-card__label { font-weight: 700; font-size: 14.5px; }
.review-card textarea { margin: 12px 0 14px; }
.review-card--done { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border: none; }
.review-card__icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--success, #1aa251); color: #fff; font-size: 20px; font-weight: 800; flex-shrink: 0; }

/* ===== Колесо: обратный отсчёт ===== */
.wheel-countdown { margin-top: 14px; text-align: center; }
.wheel-countdown__title { font-weight: 800; font-size: 16px; margin-bottom: 2px; }
.wheel-countdown__time { margin: 10px auto 0; display: inline-block; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 30px; letter-spacing: 2px; color: var(--primary-text); background: var(--surface-2); border-radius: 14px; padding: 10px 22px; }

/* ===== Чекаут: требование телефона ===== */
.phone-alert { border: 1px solid var(--danger); background: var(--danger-soft); border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; animation: cookie-in .3s var(--ease); }
.phone-alert__head { display: flex; gap: 12px; align-items: flex-start; }
.phone-alert__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--danger); color: #fff; flex-shrink: 0; }
.phone-alert__title { font-weight: 800; color: var(--danger); }
.phone-alert__text { font-size: 13.5px; color: var(--text-2); margin-top: 2px; line-height: 1.45; }
.phone-alert__row { display: flex; gap: 8px; margin-top: 12px; }
.phone-alert__row .input { flex: 1; }
.phone-alert__row .btn { flex-shrink: 0; }

/* ===== Чекаут: способ оплаты ===== */
.pay-opt { display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; margin-top: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.pay-opt:first-of-type { margin-top: 8px; }
.pay-opt--on { border-color: var(--primary); background: var(--primary-soft); }
.pay-opt input { margin-top: 3px; accent-color: var(--primary); }
.pay-opt__title { font-weight: 700; font-size: 14.5px; }
.pay-opt__desc { font-size: 12.5px; color: var(--text-3); margin-top: 2px; line-height: 1.4; }
.pay-sub { margin: 4px 2px 6px; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; }
.pay-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-chips .chip { height: 34px; padding: 0 14px; font-size: 13.5px; cursor: pointer; }
.chip--on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pay-note { margin: 4px 2px 6px; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }

/* ===== Модалка оплаты криптой ===== */
.crypto-pay__badge { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #26a17b, #1e8c69); }
.crypto-pay__amount { font-size: 30px; font-weight: 800; letter-spacing: .5px; }
.crypto-pay__status { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--text-2); }

/* ===== Подсветка крипто-оплаты ===== */
.pay-opt--hot { border-color: var(--success); background: linear-gradient(180deg, var(--success-soft), var(--surface) 80%); box-shadow: 0 0 0 1px var(--success) inset; }
.pay-opt--hot.pay-opt--on { box-shadow: 0 0 0 2px var(--success) inset, 0 6px 18px rgba(26,162,81,.18); }
.pay-badge { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #1aa251, #0f8a44); vertical-align: middle; }

/* ===== Виктория: индикатор онлайн ===== */
.vic-online { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(26,162,81,.5); animation: vicpulse 2s infinite; flex-shrink: 0; }
@keyframes vicpulse { 0% { box-shadow: 0 0 0 0 rgba(26,162,81,.5); } 70% { box-shadow: 0 0 0 6px rgba(26,162,81,0); } 100% { box-shadow: 0 0 0 0 rgba(26,162,81,0); } }
