/* =====================================================
   OMBORX SHOP — витрина покупателя. Редизайн 24.09.2026.

   Прежняя витрина была монохромной с «цветной» фиолетовой темой — владельцу
   не понравились ни цвета, ни общий вид. Новая система:
     • спокойный тёплый серый фон и белые карточки — фото товара на белом
       выглядят чисто, карточки отделены от фона без тяжёлых рамок;
     • ОДИН акцентный цвет — глубокий изумрудный: «свежий магазин», кнопки
       и выбранное состояние; красный — только скидки и ошибки;
     • шрифт Inter (с системным запасным), цифры одной ширины;
     • крупные зоны нажатия, липкая панель «поиск + категории», плавающая
       кнопка корзины над меню.

   Тем две — светлая и тёмная (плюс «как в системе»); переключает их
   атрибут data-theme на <html>. Все цвета — только в переменных ниже.
   ===================================================== */

/* ---------- Тема ---------- */
:root {
  --bg:            #F3F4F1;   /* фон страницы */
  --surface:       #FFFFFF;   /* карточки, шапка, меню */
  --surface-2:     #F2F3F0;   /* подложки: поля, чипсы, фото-заглушки */
  --surface-3:     #E7E9E4;   /* нажатое состояние подложки */
  --border:        #E6E8E3;
  --border-strong: #D2D6CE;
  --text:          #15181C;
  --dim:           #5E6570;   /* второстепенный текст */
  --faint:         #979EA7;   /* даты, единицы */
  --accent:        #0E8A5F;   /* главный цвет: кнопки, выбор */
  --accent-press:  #0B7550;
  --accent-soft:   #E4F4EC;   /* мягкая заливка кнопки «В корзину» */
  --accent-ink:    #0A6B49;   /* текст на мягкой заливке */
  --on-accent:     #FFFFFF;
  --sale:          #E5383B;   /* скидка */
  --sale-soft:     #FDEBEC;
  --star:          #F5A524;
  --info:          #2563EB;  --info-soft: #E8EFFE;
  --warn:          #B45309;  --warn-soft: #FEF3E2;
  --violet:        #6D4AE0;  --violet-soft: #EFEAFD;
  --overlay:       rgba(17, 20, 24, .48);
  --shadow-sm:     0 1px 2px rgba(20, 24, 28, .05);
  --shadow-md:     0 6px 20px rgba(20, 24, 28, .08);
  --shadow-lg:     0 -10px 40px rgba(20, 24, 28, .14);
  --shadow-float:  0 10px 28px rgba(14, 138, 95, .32);
  --skeleton:      linear-gradient(90deg, #ECEDEA 25%, #E2E4DF 37%, #ECEDEA 63%);
  --danger:        #DC2626;
  --danger-soft:   #FDEDED;

  --radius:   18px;
  --radius-s: 13px;
  --tabbar:   64px;           /* высота нижнего меню без safe-area */
  --hdr-h:    64px;           /* высота шапки — уточняет shop.js */
  /* Безопасные зоны экрана. Внутри Telegram на весь экран (16.11.2026) к
     ним добавляется зона кнопок Telegram — см. html.in-tg ниже. */
  --sat: env(safe-area-inset-top);
  --sab: env(safe-area-inset-bottom);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="dark"] {
  --bg:            #0E1012;
  --surface:       #171A1E;
  --surface-2:     #1F2328;
  --surface-3:     #2A2F35;
  --border:        #262A30;
  --border-strong: #363C44;
  --text:          #F2F4F5;
  --dim:           #A4ABB4;
  --faint:         #707881;
  --accent:        #2FBF85;
  --accent-press:  #27A472;
  --accent-soft:   rgba(47, 191, 133, .14);
  --accent-ink:    #5AD7A2;
  --on-accent:     #05241A;
  --sale:          #FF5A5F;
  --sale-soft:     rgba(255, 90, 95, .14);
  --star:          #F7B541;
  --info:          #6EA0FF;  --info-soft: rgba(110, 160, 255, .14);
  --warn:          #F5B04C;  --warn-soft: rgba(245, 176, 76, .14);
  --violet:        #A58BFF;  --violet-soft: rgba(165, 139, 255, .14);
  --overlay:       rgba(0, 0, 0, .64);
  --shadow-sm:     none;
  --shadow-md:     0 6px 20px rgba(0, 0, 0, .35);
  --shadow-lg:     0 -10px 40px rgba(0, 0, 0, .6);
  --shadow-float:  0 10px 28px rgba(0, 0, 0, .5);
  --skeleton:      linear-gradient(90deg, #1F2328 25%, #2A2F35 37%, #1F2328 63%);
  --danger:        #F87171;
  --danger-soft:   rgba(248, 113, 113, .12);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--font);
  font-feature-settings: "tnum" 1, "cv11" 1;   /* цифры одной ширины: цены не «прыгают» */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Выделение текста выключено ради ощущения приложения; в полях — включено. */
  -webkit-user-select: none; user-select: none;
  overscroll-behavior-y: none;
}
input, textarea { -webkit-user-select: text; user-select: text; }
img { display: block; -webkit-user-drag: none; user-drag: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
a { color: inherit; }
/* 16px — минимум, при котором Safari не увеличивает страницу при фокусе. */
input, textarea, select { font: inherit; font-size: 16px; color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
.dim { color: var(--dim); }

/* ---------- Заставка до загрузки каталога ---------- */
.boot { padding: 30vh 24px; text-align: center; color: var(--faint); font-size: 14px; }

/* ---------- Шапка ---------- */
.hdr {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-top: var(--sat);
  transition: box-shadow .2s;
}
/* Тень — только когда под шапкой уже едет страница (класс ставит shop.js). */
.hdr.scrolled { box-shadow: 0 6px 16px -12px rgba(20, 24, 28, .45); }
html[data-theme="dark"] .hdr.scrolled { box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .9); }
/* Высота строки одна в обоих состояниях (название ↔ поиск): страница под
   шапкой не прыгает, когда раскрывается поле поиска. */
.hdr-in { max-width: 1120px; margin: 0 auto; padding: 8px 16px; min-height: 60px; box-sizing: border-box; display: flex; align-items: center; }
.hdr-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.hdr-main .hdr-txt { margin: 0 4px 0 4px; }
.hdr-search { flex: 1; min-width: 0; display: none; align-items: center; gap: 10px; }
.hdr.searching .hdr-main { display: none; }
.hdr.searching .hdr-search { display: flex; animation: hdr-in .16s ease-out; }
@keyframes hdr-in { from { opacity: 0; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .hdr.searching .hdr-search { animation: none; } }
.hdr-cancel {
  flex: 0 0 auto; height: 44px; padding: 0 2px;
  color: var(--accent); font-size: 15px; font-weight: 600;
}
html[data-theme="dark"] .hdr-cancel { color: var(--accent-ink); }
/* Кружок с первой буквой названия — вместо логотипа, которого у магазина нет. */
.hdr-logo {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 14px;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; letter-spacing: -.5px;
  box-shadow: 0 4px 12px rgba(14, 138, 95, .25);
}
html[data-theme="dark"] .hdr-logo { box-shadow: none; }
.hdr-txt { flex: 1; min-width: 0; }
.hdr-txt h1 {
  margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.35px; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hdr-txt small {
  display: block; color: var(--dim); font-size: 12.5px; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ibtn {
  position: relative;
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%;
  background: var(--surface-2); color: var(--text);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  transition: background .15s, transform .1s;
}
.ibtn:active { background: var(--surface-3); transform: scale(.93); }
.ibtn svg { width: 19px; height: 19px; }
/* Точка на кнопке «Категории»: список сейчас отфильтрован. */
.ibtn-dot { display: none; }
.ibtn.has-dot .ibtn-dot {
  display: block; position: absolute; top: 6px; right: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface);
}

/* ---------- Экран ---------- */
#app { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
/* Нижний отступ = таббар + safe-area: последний товар не должен прятаться. */
#screen { flex: 1 1 auto; padding-bottom: calc(var(--tabbar) + var(--sab) + 16px); }
body.has-cartbar #screen { padding-bottom: calc(var(--tabbar) + var(--sab) + 84px); }
.scr-head { padding: 20px 0 10px; }
.scr-head h2 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.8px; line-height: 1.15; }
.scr-head p { margin: 4px 0 0; color: var(--dim); font-size: 14px; }

/* ---------- Поиск (раскрывается в шапке) ---------- */
.search { position: relative; flex: 1; min-width: 0; }
.search input {
  width: 100%; height: 44px; padding: 0 42px 0 42px;
  border: 1.5px solid transparent; border-radius: 14px;
  background: var(--surface-2); outline: none; color: var(--text);
  font-size: 16px; /* меньше 16px — iPhone сам увеличивает страницу при вводе */
  -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.search .s-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; display: flex; }
.search .s-ico svg { width: 18px; height: 18px; }
.search .s-clr {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; color: var(--dim); font-size: 12px;
  background: var(--surface-3);
  display: none; align-items: center; justify-content: center;
}
.search.has-text .s-clr { display: flex; }

/* ---------- Баннеры магазина ---------- */
.banners { margin-top: 14px; }
.banners.hidden, .featured.hidden { display: none; }
.b-track {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; border-radius: 20px;
}
.b-track::-webkit-scrollbar { display: none; }
.b-slide {
  flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 2 / 1;
  background: var(--surface-2); border-radius: 20px; overflow: hidden;
}
@media (min-width: 760px) { .b-slide { aspect-ratio: auto; height: min(33vw, 300px); } }
.b-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.b-dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 0; }
.b-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--border-strong); transition: width .2s, background .2s; }
.b-dot.on { background: var(--accent); width: 18px; }

/* ---------- Полоса условий магазина (доставка, самовывоз, оплата) ---------- */
.perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 14px; }
.perk {
  min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 12px; border-radius: 16px; background: var(--surface);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
@media (min-width: 640px) { .perk { flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; } }
.perk-ico {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
}
.perk-ico svg { width: 18px; height: 18px; }
.perk > span:last-child { min-width: 0; width: 100%; }
.perk b { display: block; font-size: 13px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.perk b::first-letter, .perk small::first-letter { text-transform: uppercase; }
.perk small { display: block; font-size: 11.5px; color: var(--dim); margin-top: 2px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Заголовки разделов ---------- */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.sec-head h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.45px; display: flex; align-items: center; gap: 8px; }
.sec-head .n { font-size: 13px; font-weight: 700; color: var(--faint); }
.sec-head h2 { min-width: 0; }
.sec-head #grid-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* «✕» у заголовка — вернуться ко всем товарам из выбранной категории. */
.cat-reset {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-2); color: var(--dim); font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.cat-reset.hidden { display: none; }
.cat-pick {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px 0 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-sm);
  transition: transform .1s, background .15s;
}
.cat-pick:active { transform: scale(.96); background: var(--surface-2); }
/* Кнопка «плитка / список» (23.10.2026) — круглая, только значок. */
.sec-acts { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.view-pick { width: 36px; padding: 0; justify-content: center; }
.view-pick svg { width: 18px; height: 18px; }
/* На телефоне две кнопки с подписью съедали заголовок («Barcha mahs…»):
   «Категории» там тоже становится круглой, только значок — как кнопка вида. */
@media (max-width: 480px) {
  #cat-pick { width: 36px; padding: 0; justify-content: center; }
  #cat-pick span { display: none; }
  #cat-pick svg { width: 18px; height: 18px; }
}
.cat-pick svg { width: 16px; height: 16px; color: var(--accent); }
html[data-theme="dark"] .cat-pick svg { color: var(--accent-ink); }

/* ---------- Список категорий (окно по кнопке «Категории») ---------- */
.cat-sheet .mbody { padding-top: 0; }
.cat-list { display: flex; flex-direction: column; }
.cat-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 52px; padding: 8px 4px; text-align: left;
  border-bottom: 1px solid var(--border); color: var(--text);
}
.cat-row:last-child { border-bottom: none; }
.cat-row:active { background: var(--surface-2); }
.cat-dot { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; margin: 0 8px; }
.cat-ico { flex: 0 0 auto; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--dim); }
.cat-ico svg { width: 18px; height: 18px; }
.cat-name { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-n { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
.cat-tick { flex: 0 0 22px; width: 22px; height: 22px; color: var(--accent); display: flex; }
.cat-tick svg { width: 22px; height: 22px; }
.cat-row.on .cat-name { color: var(--accent); }
html[data-theme="dark"] .cat-row.on .cat-name, html[data-theme="dark"] .cat-tick { color: var(--accent-ink); }
.sec-tag {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; min-width: 22px; padding: 0 6px; border-radius: 7px;
  background: var(--sale); color: #fff; font-size: 12px; font-weight: 800;
}

/* ---------- Подборка «Скидочные товары» ---------- */
.featured { margin-top: 6px; }
.feat-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 10px; }
.feat-head h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.45px; display: flex; align-items: center; gap: 8px; }
.feat-head h2::before {
  content: "%"; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 8px; background: var(--sale); color: #fff;
  font-size: 13px; font-weight: 800;
}
.feat-row {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 16px 6px; margin: 0 -16px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.feat-row::-webkit-scrollbar { display: none; }
.feat-row .pcard.mini { flex: 0 0 156px; scroll-snap-align: start; }

/* ---------- Полки в конце карточки товара (25.09.2026) ----------
   Та же лента, что у «Скидочных товаров», но внутри окна: поля окна 18px,
   поэтому лента выходит к его краям на эти 18px, а не на 16px страницы. */
.pm-shelf { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.pm-shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pm-shelf-head b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.3px; line-height: 1.2; }
.pm-shelf-head small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--dim); line-height: 1.3; }
.pm-shelf-hit .pm-shelf-head b::before { content: "★"; color: var(--star); margin-right: 6px; }
.pm-all { flex: none; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.mbody .pm-row { padding: 2px 18px 8px; margin: 0 -18px; }
.mbody .pm-row .pcard.mini { flex: 0 0 148px; }

/* ---------- Чипсы категорий ---------- */

/* ---------- Сетка товаров ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; padding: 0 0 8px; }
@media (max-width: 400px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 16px; } }

.pcard {
  position: relative;
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; text-align: left;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: box-shadow .2s, transform .2s;
}
@media (hover: hover) { .pcard:hover { box-shadow: var(--shadow-md); } }
.pimg {
  position: relative; aspect-ratio: 1 / 1; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer;
}
.pimg img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
@media (hover: hover) { .pcard:hover .pimg img { transform: scale(1.04); } }
.pimg .ph, .cimg .ph { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--faint); opacity: .6; }
.pimg .ph svg, .cimg .ph svg, .pm-img .ph svg { width: 100%; height: 100%; stroke-width: 1.5; }
.pm-img .ph { display: flex; align-items: center; justify-content: center; color: var(--faint); opacity: .6; }
.cimg .ph { width: 26px; height: 26px; }
.pimg:active img { transform: scale(.98); }
/* Нет в наличии — фото притушено, поверх подпись. */
.pcard.out .pimg img { filter: grayscale(1); opacity: .45; }
.badge-out {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 6px 11px; border-radius: 999px; white-space: nowrap;
  background: rgba(21, 24, 28, .78); color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1px;
}
.badge-rate {
  position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: 11.5px; font-weight: 800;
  display: flex; align-items: center; gap: 3px; box-shadow: var(--shadow-sm);
}
.badge-rate::first-letter { color: var(--star); }

.pbody { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.pname {
  order: 2;
  font-size: 13.5px; font-weight: 500; line-height: 1.35; cursor: pointer; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px;
  margin-top: 3px;
}
.pprice { order: 1; font-size: 17px; font-weight: 800; letter-spacing: -.4px; }
.punit { order: 2; font-size: 12.5px; font-weight: 500; color: var(--faint); letter-spacing: 0; }
/* «Осталось 3 шт» — когда товара мало (06.10.2026). Между ценой и кнопкой. */
.plow { order: 3; font-size: 12px; font-weight: 600; color: var(--danger, #d92d20); letter-spacing: 0; margin-top: 2px; }
.cinfo small.plow { display: block; margin-top: 2px; color: var(--danger, #d92d20); font-size: 12px; }
/* Оптовая цена (07.10.2026): «Оптом от 10 шт — 9 000 so‘m» под ценой. */
.pws { order: 3; font-size: 12px; font-weight: 700; color: var(--accent-ink); letter-spacing: 0; margin-top: 2px; line-height: 1.3; }
.cinfo small.pws { display: block; margin-top: 2px; color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.ws-tag {
  display: inline-block; padding: 1px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink);
  font-size: 10.5px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; vertical-align: 1px; white-space: nowrap;
}
.pm-ws {
  display: flex; flex-direction: column; gap: 3px; margin: 12px 0 2px; padding: 11px 13px; border-radius: var(--radius-s);
  background: var(--accent-soft); color: var(--accent-ink);
}
.pm-ws b { font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.pm-ws span { font-size: 15px; font-weight: 800; color: var(--text); }
.pm-ws small { font-size: 12.5px; color: var(--dim); line-height: 1.35; }

/* Скидка: старая цена зачёркнута, новая — красным, на фото плашка «−18%». */
.pprice { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 7px; }
.pold { order: 3; flex-basis: 100%; font-size: 12.5px; font-weight: 500; color: var(--faint); text-decoration: line-through; letter-spacing: 0; }
.pnow { order: 1; }
.pcard.sale .pnow { color: var(--sale); }
.badge-sale {
  position: absolute; left: 8px; top: 8px; padding: 4px 8px; border-radius: 9px;
  background: var(--sale); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .1px;
}
.pm-price.sale { color: var(--sale); }
.pm-price.sale small { color: var(--faint); }
.pm-old { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.pm-old s { font-size: 15px; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.pm-pct { padding: 3px 8px; border-radius: 8px; background: var(--sale); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0; }
.pm-save {
  display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 8px;
  background: var(--sale-soft); font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--sale);
}

/* Кнопка «в корзину» и счётчик — одна высота, чтобы карточка не дёргалась. */
.padd {
  order: 4;
  margin-top: 10px; height: 40px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, transform .1s;
}
.padd::before {
  content: ""; width: 16px; height: 16px; flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
}
.padd:active { transform: scale(.97); }
@media (hover: hover) { .padd:not(.muted):hover { background: var(--accent); color: var(--on-accent); } }
.padd.muted { background: var(--surface-2); color: var(--faint); }
.padd.muted::before { display: none; }
.qtyrow {
  order: 4;
  margin-top: 10px; height: 40px; border-radius: 12px; overflow: hidden;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: space-between;
}
.qtyrow button { width: 42px; height: 100%; font-size: 20px; font-weight: 600; color: inherit; }
.qtyrow button:active { background: var(--accent-press); }
.qtyrow b { font-size: 13.5px; font-weight: 700; }

/* ---------- Скелетоны загрузки ---------- */
.sk { border-radius: var(--radius); background: var(--skeleton); background-size: 400% 100%; animation: sk 1.2s ease-in-out infinite; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sk-card .sk-img { aspect-ratio: 1 / 1; border-radius: 0; }
.sk-card .sk-line { height: 12px; margin: 12px 12px 0; border-radius: 6px; }
.sk-card .sk-line.s { width: 55%; margin-bottom: 16px; }
main > .wrap > .grid:first-child { padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* ---------- Пустые состояния ---------- */
.empty { padding: 56px 20px; text-align: center; }
.e-ico {
  display: flex; align-items: center; justify-content: center;
  width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
}
.e-ico svg { width: 36px; height: 36px; stroke-width: 1.6; }
.e-ico.solid { width: 84px; height: 84px; background: var(--accent); color: var(--on-accent); }
.e-ico.solid svg { width: 42px; height: 42px; stroke-width: 1.8; }
.empty h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.empty p { margin: 0 auto; max-width: 300px; color: var(--dim); font-size: 14px; }
.empty .btn { margin-top: 18px; max-width: 260px; margin-left: auto; margin-right: auto; }

/* ---------- Нижнее меню ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--surface); border-top: 1px solid var(--border);
  padding-bottom: var(--sab);
  padding-left: max(0px, calc((100% - 560px) / 2));
  padding-right: max(0px, calc((100% - 560px) / 2));
  display: flex;
}
.tab {
  flex: 1; height: var(--tabbar); position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: -.1px;
}
.tab svg {
  width: 22px; height: 22px; box-sizing: content-box; padding: 4px 18px; border-radius: 999px;
  transition: background .2s, color .2s;
}
.tab.on { color: var(--accent); }
.tab.on svg { background: var(--accent-soft); stroke-width: 2.2; }
.tab:active svg { transform: scale(.92); }
.tab .cnt {
  position: absolute; top: 3px; left: 50%; margin-left: 8px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--sale); color: #fff; border: 2px solid var(--surface);
  font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  box-sizing: content-box;
}

/* ---------- Плавающая кнопка корзины (каталог) ---------- */
.cartbar {
  position: fixed; z-index: 39; left: 12px; right: 12px;
  bottom: calc(var(--tabbar) + var(--sab) + 10px);
  max-width: 536px; margin: 0 auto;
  height: 58px; padding: 0 8px 0 18px; border-radius: 18px;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; gap: 18px;
  box-shadow: var(--shadow-float);
  animation: rise .25s cubic-bezier(.22, 1, .36, 1);
}
.cartbar:active { background: var(--accent-press); transform: scale(.99); }
.cartbar .cb-ico { display: flex; position: relative; }
.cartbar .cb-ico svg { width: 24px; height: 24px; }
.cartbar .cb-n {
  position: absolute; top: -7px; right: -9px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: #fff; color: var(--accent);
  font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.cartbar .cb-txt { flex: 1; min-width: 0; text-align: left; line-height: 1.2; }
.cartbar .cb-txt b { display: block; font-size: 15px; font-weight: 800; letter-spacing: -.2px; }
.cartbar .cb-txt small { display: block; font-size: 12px; opacity: .85; font-weight: 600; }
.cartbar .cb-go {
  height: 42px; padding: 0 14px; border-radius: 13px;
  background: rgba(255, 255, 255, .18); display: flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 14px; white-space: nowrap;
}
html[data-theme="dark"] .cartbar .cb-go { background: rgba(0, 0, 0, .14); }
.cartbar .cb-go svg { width: 18px; height: 18px; }

/* ---------- Кнопки ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 13px 18px; border-radius: 15px;
  background: var(--surface-2); color: var(--text);
  font-weight: 700; font-size: 15px; text-align: center; text-decoration: none;
  transition: background .15s, transform .1s, border-color .15s;
}
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .5; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:active { background: var(--accent-press); }
.btn-outline { background: var(--surface); border: 1.5px solid var(--border-strong); }
.btn-ghost { background: transparent; color: var(--dim); }
.btn-sm { min-height: 40px; padding: 9px 14px; font-size: 13.5px; border-radius: 12px; width: auto; }
.btn-danger { background: var(--surface); border: 1.5px solid var(--border); color: var(--danger); }
/* Специфичность выше, чем у .btn-outline, и правило стоит НИЖЕ него: кнопка
   с обоими классами («Локация прикреплена») обязана быть залитой. */
.btn.btn-primary { background: var(--accent); color: var(--on-accent); border: 1.5px solid transparent; }
.linkbtn { color: var(--accent); font-weight: 700; font-size: 14px; padding: 8px 0; }
.linkbtn:active { opacity: .6; }

/* ---------- Карточки-списки ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.card > h3 { margin: 0 0 10px; font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.rows { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); overflow: hidden; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 15px; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.row:last-child { border-bottom: none; }
.row > span:first-child { color: var(--dim); }
.row b { font-weight: 700; text-align: right; }
.row a { color: var(--accent); text-decoration: none; }
/* Строка-кнопка (язык, тема, установка) — стрелка справа. */
.row-btn { width: 100%; text-align: left; transition: background .12s; }
.row-btn > span:first-child { color: var(--text); font-weight: 600; }
.row-btn:active { background: var(--surface-2); }
.row-btn .chev { color: var(--faint); font-size: 18px; font-weight: 400; margin-left: 4px; }
.row-btn > b { color: var(--dim); font-weight: 600; }
.row-btn > span:first-child b { text-align: left; color: var(--text); font-weight: 700; }
.row-btn > span:first-child small { font-weight: 500; }

/* ---------- Корзина ---------- */
#cart-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 14px; box-shadow: var(--shadow-sm); }
#cart-body:has(> .empty) { background: transparent; border: 0; box-shadow: none; padding: 0; }
#cart-body > .hint { margin: 10px 0 12px !important; }
.cline { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cline:last-of-type { border-bottom: none; }
.cimg { width: 64px; height: 64px; border-radius: 14px; background: var(--surface-2); overflow: hidden; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.cimg img { width: 100%; height: 100%; object-fit: cover; }
.cinfo { flex: 1; min-width: 0; }
.cinfo b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.cinfo small { color: var(--faint); font-size: 12.5px; }
.cinfo .qtyrow { max-width: 124px; height: 36px; margin-top: 8px; background: var(--surface-2); color: var(--text); border-radius: 11px; }
.cinfo .qtyrow button { width: 38px; color: var(--accent); }
.cinfo .qtyrow button:active { background: var(--surface-3); }
.csum { text-align: right; font-weight: 800; font-size: 15px; white-space: nowrap; align-self: flex-start; padding-top: 2px; letter-spacing: -.2px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0 2px; font-size: 15px; color: var(--dim); }
.total-row b { font-size: 22px; font-weight: 800; letter-spacing: -.6px; color: var(--text); }
.total-row.sub { font-size: 14px; color: var(--dim); padding: 5px 0; }
.total-row.sub b { font-size: 14px; font-weight: 700; }

/* Итог корзины прилипает над меню — сумма видна всегда. */
.cart-foot {
  position: sticky; bottom: calc(var(--tabbar) + var(--sab));
  background: var(--surface); border-top: 1px solid var(--border);
  margin: 16px -16px 0; padding: 14px 16px 14px;
  box-shadow: 0 -8px 20px -14px rgba(20, 24, 28, .3);
}
@media (min-width: 600px) { .cart-foot { margin: 16px 0 0; border: 1px solid var(--border); border-radius: var(--radius); } }

/* ---------- Модалки (шторки снизу) ---------- */
body.modal-open { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.overlay {
  position: fixed; inset: 0; z-index: 50; background: var(--overlay);
  display: flex; align-items: flex-end; justify-content: center;
  overscroll-behavior: contain; animation: fade .18s ease-out;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
@keyframes fade { from { opacity: 0; } }
@media (min-width: 640px) { .overlay { align-items: center; padding: 24px; } }
.modal {
  background: var(--surface); width: 100%; max-width: 580px; max-height: 92dvh;
  border-radius: 26px 26px 0 0; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-lg); animation: rise .28s cubic-bezier(.22, 1, .36, 1);
}
@keyframes rise { from { transform: translateY(28px); opacity: .6; } }
@media (min-width: 640px) { .modal { border-radius: 26px; } @keyframes rise { from { transform: scale(.97); opacity: .6; } } }
@media (prefers-reduced-motion: reduce) { .overlay, .modal, .cartbar { animation: none; } }
/* Полоска-«ручка» вверху: понятно, что шторку можно закрыть. */
.mhead { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 18px 12px; }
.mhead::before { content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 40px; height: 5px; border-radius: 3px; background: var(--border-strong); }
@media (min-width: 640px) { .mhead::before { display: none; } .mhead { padding-top: 16px; } }
.mhead b { font-size: 18px; font-weight: 800; letter-spacing: -.4px; }
.mclose { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; background: var(--surface-2); color: var(--dim); font-size: 14px; display: flex; align-items: center; justify-content: center; }
.mclose:active { background: var(--surface-3); }
.mbody { padding: 6px 18px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.mfoot { padding: 12px 18px calc(14px + var(--sab)); border-top: 1px solid var(--border); display: flex; gap: 10px; background: var(--surface); }
.mfoot .btn { flex: 1; }

/* ---------- Формы ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--dim); font-weight: 600; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--border); border-radius: var(--radius-s);
  background: var(--surface); outline: none; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
/* Номер, подтверждённый Telegram (28.09.2026), — только для чтения: без
   рамки фокуса и приглушённым фоном, чтобы не выглядел как поле для ввода. */
.field input.locked { background: var(--bg); color: var(--dim); cursor: default; }
.field input.locked:focus { border-color: var(--border); box-shadow: none; }
.field textarea { resize: vertical; min-height: 64px; }
/* Незаполненное обязательное поле: краснеет само, сообщение прямо под ним. */
.field.bad > span { color: var(--danger); }
.field.bad input, .field.bad textarea { border-color: var(--danger); background: var(--danger-soft); }
.field.bad input:focus, .field.bad textarea:focus { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.field-err { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--danger); }
/* «На этот номер уже есть аккаунт» в форме регистрации (28.09.2026). */
.dup-box { background: var(--surface-2); border-radius: var(--radius-s); padding: 14px; margin: 0 0 14px; }
.dup-title { font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.dup-mail { font-weight: 700; font-size: 14px; margin-bottom: 6px; word-break: break-all; }
.dup-text { font-size: 13px; line-height: 1.5; color: var(--dim); }
.dup-actions { display: flex; gap: 8px; margin-top: 12px; }
.dup-actions .btn { min-height: 44px; padding: 10px 12px; font-size: 14px; }
.dup-box .linkbtn { display: block; margin-top: 6px; text-align: left; }
.seg { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.seg button { flex: 1; min-height: 42px; padding: 8px 6px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--dim); line-height: 1.25; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(20, 24, 28, .12); }
html[data-theme="dark"] .seg button.on { background: var(--surface-3); }
.hint { font-size: 13px; line-height: 1.5; color: var(--dim); background: var(--surface-2); border-radius: var(--radius-s); padding: 12px 14px; margin: 0 0 14px; }
.hint b { color: var(--text); }
.err { font-size: 13.5px; font-weight: 600; color: var(--danger); background: var(--danger-soft); padding: 11px 14px; margin: 0 0 12px; border-radius: var(--radius-s); }
.code-in { letter-spacing: 8px; font-size: 22px; text-align: center; font-weight: 700; }

/* ---------- Вход через Google ----------
   Саму кнопку рисует Google в своём iframe — здесь только место под неё. */
.gauth { margin: 0 0 16px; }
.gauth-slot { display: flex; justify-content: center; min-height: 44px; }
.gauth-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 2px; color: var(--faint); font-size: 12px; }
.gauth-or::before, .gauth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---------- Карточка товара ---------- */
.pm-img { aspect-ratio: 1 / 1; max-height: 380px; width: 100%; border-radius: 22px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 12px; }
.pm-img img { width: 100%; height: 100%; object-fit: contain; }
.pthumbs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.pthumbs::-webkit-scrollbar { display: none; }
.pthumb { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 14px; overflow: hidden; border: 2px solid transparent; background: var(--surface-2); opacity: .7; transition: opacity .15s, border-color .15s; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; }
.pthumb.on { border-color: var(--accent); opacity: 1; }
.pm-name { margin: 4px 0 8px; font-size: 21px; font-weight: 800; line-height: 1.25; letter-spacing: -.5px; }
.pm-price { font-size: 28px; font-weight: 800; letter-spacing: -.8px; margin-bottom: 16px; }
.pm-price small { font-size: 14px; color: var(--faint); font-weight: 600; letter-spacing: 0; }

/* Описание товара от владельца. Свёрнуто — 7 строк. */
.pm-desc-box { margin: -4px 0 16px; padding: 14px 15px; background: var(--surface-2); border-radius: var(--radius-s); }
.pm-desc-head { font-size: 13px; font-weight: 700; color: var(--dim); margin-bottom: 6px; }
.pm-desc {
  font-size: 14.5px; line-height: 1.55; white-space: pre-line;
  overflow-wrap: anywhere; overflow: hidden;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7;
}
.pm-desc.on { display: block; -webkit-line-clamp: unset; overflow: visible; }
.pm-desc-more { display: block; margin-top: 2px; }

/* ---------- Отзывы ---------- */
.rev-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 22px 0 10px; }
.rev-head b { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.rev-avg { font-size: 14px; font-weight: 700; white-space: nowrap; }
.rev-avg .stars, .rev-stars-s { color: var(--star); letter-spacing: -1px; }
.star-off { color: var(--border-strong); }
.rev-form { border: 1px solid var(--border); border-radius: var(--radius-s); padding: 14px; margin-bottom: 14px; background: var(--surface-2); }
.rev-stars { display: flex; gap: 4px; margin-bottom: 10px; }
.rev-star { font-size: 30px; line-height: 1; color: var(--border-strong); padding: 0 2px; transition: transform .1s; }
.rev-star:active { transform: scale(1.2); }
.rev-star.on { color: var(--star); }
.rev-form textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; outline: none; background: var(--surface); color: var(--text); resize: vertical; }
.rev-form textarea:focus { border-color: var(--accent); }
.rev-item { border-bottom: 1px solid var(--border); padding: 14px 0; }
.rev-item:last-child { border-bottom: none; }
.rev-item.mine { background: var(--accent-soft); border-radius: var(--radius-s); padding: 14px; border-bottom: none; margin-bottom: 8px; }
.rev-top { display: flex; align-items: center; gap: 8px; font-size: 14.5px; flex-wrap: wrap; }
.rev-top b { font-weight: 700; }
.rev-tag { font-size: 11px; font-weight: 700; border-radius: 7px; padding: 2px 7px; background: var(--accent-soft); color: var(--accent-ink); }
.rev-stars-s { margin-left: auto; font-size: 13px; }
.rev-text { font-size: 14px; margin-top: 6px; white-space: pre-wrap; line-height: 1.55; }
.rev-date { color: var(--faint); font-size: 12px; margin-top: 6px; }
.rev-reply { margin-top: 10px; padding: 10px 13px; background: var(--surface-2); border-radius: var(--radius-s); font-size: 13.5px; line-height: 1.5; }
.rev-reply b { font-weight: 800; color: var(--accent-ink); }

/* ---------- Заказы ---------- */
.order { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.order .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.order .top > div { min-width: 0; }
.order .top .status, .od-head .status { flex: 0 1 auto; max-width: 60%; white-space: normal; text-align: center; line-height: 1.25; }
.order .num { font-weight: 800; font-size: 16px; letter-spacing: -.1px; }
.order .dt { color: var(--faint); font-size: 12.5px; margin-top: 3px; }
.order .dt a { color: var(--accent); text-decoration: none; font-weight: 600; }
/* Пояснение к статусу под шапкой карточки: «Курьер везёт заказ». */
.status-hint { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--dim); display: flex; align-items: center; gap: 7px; }
.status-hint::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.od-head + .status-hint { margin: -4px 0 12px; }
.order .items { margin: 10px 0 4px; font-size: 13px; color: var(--dim); }
.order .items div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.order .sum { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: 17px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 10px; letter-spacing: -.3px; }
.order .sum span:first-child { font-size: 14px; font-weight: 600; color: var(--dim); letter-spacing: 0; }
.order [data-cancel] { color: var(--danger); display: block; margin-top: 4px; }
/* Короткая строка вместо полного состава: сам состав живёт в окне «Подробно». */
.oitems-sum { margin: 10px 0 0; font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Состав заказа (окно «Подробно») ---------- */
.od-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.od-head b { font-size: 17px; font-weight: 800; }
.od-head .dt { color: var(--faint); font-size: 12.5px; margin-top: 3px; }
.od-list { border: 1px solid var(--border); border-radius: var(--radius-s); overflow: hidden; }
.od-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 11px 13px; border-bottom: 1px solid var(--border); }
.od-row:last-child { border-bottom: 0; }
.od-name { font-size: 14px; font-weight: 600; }
.od-qty { grid-column: 1; font-size: 12.5px; color: var(--faint); }
.od-sum { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 800; font-size: 14.5px; white-space: nowrap; }
/* Статусы — мягкими цветными плашками. */
.status { display: inline-block; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .05px; white-space: nowrap; }
.st-new { background: var(--info-soft); color: var(--info); }
.st-confirmed { background: var(--warn-soft); color: var(--warn); }
.st-shipping { background: var(--violet-soft); color: var(--violet); }
.st-done { background: var(--accent-soft); color: var(--accent-ink); }
.st-cancelled { background: var(--surface-2); color: var(--faint); }

/* ---------- Тосты ---------- */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + var(--sab) + 16px); z-index: 99; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
body.has-cartbar #toasts { bottom: calc(var(--tabbar) + var(--sab) + 84px); }
.toast { background: #15181C; color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; max-width: 92%; text-align: center; box-shadow: var(--shadow-md); animation: rise .2s ease-out; }
.toast.err { background: var(--danger); }
html[data-theme="dark"] .toast { background: #F2F4F5; color: #15181C; }
html[data-theme="dark"] .toast.err { background: var(--danger); color: #fff; }

/* ---------- Профиль ---------- */
.prof-head {
  display: flex; align-items: center; gap: 14px; padding: 18px; margin: 18px 0 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.prof-ava { width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; flex: 0 0 auto; }
.prof-ava svg { width: 28px; height: 28px; }
.prof-txt { min-width: 0; }
.prof-txt b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.35px; }
.prof-txt small { color: var(--dim); font-size: 13px; display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
#screen .card.row-list, #screen .card[style*="padding:0"] { padding: 0; }

/* ---------- Карта лояльности ---------- */
.loy {
  background: linear-gradient(135deg, #0E8A5F 0%, #0A6446 100%); color: #fff;
  border-radius: 22px; padding: 18px 20px 16px; margin-bottom: 14px; position: relative; overflow: hidden;
  box-shadow: 0 12px 30px -12px rgba(14, 138, 95, .6);
}
.loy::after { content: ""; position: absolute; right: -40px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .08); pointer-events: none; }
html[data-theme="dark"] .loy { background: linear-gradient(135deg, #16784F 0%, #0C4A34 100%); box-shadow: none; }
.loy-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.loy-t { font-size: 11.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; opacity: .8; }
.loy-lvl { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .18); white-space: nowrap; }
.loy-big { font-size: 38px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; margin-top: 10px; font-variant-numeric: tabular-nums; }
.loy-sub { font-size: 13px; opacity: .8; margin-top: 3px; }
.loy-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .22); margin-top: 14px; overflow: hidden; }
.loy-bar i { display: block; height: 100%; background: #fff; border-radius: 99px; }
.loy-note { font-size: 12.5px; opacity: .8; margin-top: 8px; }
.loy-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .22); }
.loy-card { font-size: 12.5px; font-weight: 700; letter-spacing: 1px; opacity: .8; font-variant-numeric: tabular-nums; }
.loy-more { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-size: 13.5px; font-weight: 700; }
/* Штрихкод карты лояльности (28.09.2026): белая подложка — сканер читает
   тёмные полосы на светлом; модули не сглаживаем (crispEdges в SVG). */
.loy-code { display: block; width: 100%; margin-top: 14px; padding: 10px 12px 8px; border: 0; border-radius: 14px; background: #fff; color: #111; font: inherit; text-align: center; cursor: pointer; }
.loy-code .loy-bars, .loy-code-box .loy-bars { display: block; }
.loy-code .loy-bars svg { display: block; width: 100%; height: 44px; }
.loy-num { display: block; margin-top: 5px; font-size: 14px; font-weight: 800; letter-spacing: 2px; font-variant-numeric: tabular-nums; color: #111; }
.loy-code-big { display: flex; flex-direction: column; gap: 14px; }
.loy-code-box { padding: 18px 16px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--border); text-align: center; }
.loy-code-box .loy-bars svg { display: block; width: 100%; height: 90px; }
.loy-code-box .loy-num { font-size: 18px; margin-top: 8px; }
/* Карта до первой покупки: заливки нет — обещание ещё не карта. */
.loy-flat { background: var(--surface); color: var(--text); border: 1.5px dashed var(--border-strong); box-shadow: none; }
.loy-flat::after { display: none; }
.loy-flat .loy-t { opacity: 1; color: var(--accent-ink); }
.loy-flat .loy-sub { opacity: 1; color: var(--dim); }
/* Мои долги (28.09.2026) — под картой баллов, в той же форме, но своим
   тоном: долг не должен читаться как ещё одна «карта бонусов». */
.dbt {
  background: var(--surface); color: var(--text); border: 1.5px solid var(--danger);
  border-radius: 22px; padding: 18px 20px 16px; margin-bottom: 14px;
  box-shadow: 0 10px 26px -14px rgba(220, 38, 38, .45);
}
.dbt .loy-t { opacity: 1; color: var(--danger); }
.dbt .loy-big { color: var(--danger); font-size: 32px; }
.dbt-cnt { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: var(--danger-soft); color: var(--danger); white-space: nowrap; }
.dbt-sub { font-size: 13px; color: var(--dim); margin-top: 3px; }
.dbt-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.dbt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.dbt-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dbt-row small { display: block; font-size: 12px; font-weight: 500; color: var(--dim); }
.dbt-row b { flex: none; font-variant-numeric: tabular-nums; }
.dbt-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--dim); }
.dbt-foot .loy-more { color: var(--danger); flex: none; }
.loy-go { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--accent-ink); text-decoration: none; }

/* Подтверждение номера через бота магазина из браузера (28.09.2026) */
.loy-flat .loy-tg { margin-top: 12px; }
.tgl-steps { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: tgl; display: flex; flex-direction: column; gap: 10px; }
.tgl-steps li { counter-increment: tgl; display: flex; align-items: center; gap: 12px; font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.tgl-steps li::before {
  content: counter(tgl); flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 800;
}
.tgl-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 4px 0 14px; }
.tgl-qr[hidden] { display: none; }
/* Код — всегда чёрным по белому, и в тёмной теме тоже: иначе камера не читает. */
.tgl-qr-img { width: 180px; height: 180px; padding: 12px; background: #fff; border-radius: 14px; box-sizing: content-box; }
.tgl-qr-img svg { width: 100%; height: 100%; display: block; }
.tgl-qr small { font-size: 12.5px; color: var(--dim); }
.tgl-state { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; padding: 12px 14px; border-radius: var(--radius-s); background: var(--surface-2); margin-bottom: 12px; }
.tgl-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.tgl-state.wait .tgl-dot { background: var(--accent); animation: tgl-pulse 1.2s ease-in-out infinite; }
.tgl-state.err { color: var(--danger); }
.tgl-state.err .tgl-dot { background: var(--danger); }
@keyframes tgl-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .tgl-state.wait .tgl-dot { animation: none; } }
.tgl-open.is-off { opacity: .5; pointer-events: none; }
.btn[hidden] { display: none; }
.tgl-offer { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--dim); }
.dimmed { color: var(--faint); }

/* Карта магазина */
.map-frame { width: 100%; height: 200px; border: 0; border-radius: var(--radius-s); margin-top: 12px; display: block; }
html[data-theme="dark"] .map-frame { filter: invert(.9) hue-rotate(180deg) contrast(.9); }

.foot { padding: 26px 16px 10px; text-align: center; color: var(--faint); font-size: 12px; }

/* ---------- Локация доставки ---------- */
.loc-btns { display: flex; gap: 8px; margin-bottom: 10px; }
.loc-btns .btn { flex: 1; margin: 0; padding: 12px 6px; font-size: 13.5px; min-height: 46px; }
.loc-status {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
  background: var(--accent-soft); border-radius: var(--radius-s);
  padding: 11px 14px; margin: 0 0 14px; font-size: 13px;
}
.loc-ok { font-weight: 800; color: var(--accent-ink); }
.loc-coord { color: var(--dim); font-variant-numeric: tabular-nums; }
.loc-link { color: var(--accent); font-weight: 700; text-decoration: none; }
.loc-clear { color: var(--dim); font-weight: 700; text-decoration: underline; margin-left: auto; }

/* Флажок «сохранить адрес» и подобные */
.check { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 14px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--accent); }

/* ---------- Модалка выбора точки ---------- */
.map-search { display: flex; gap: 8px; margin-bottom: 10px; }
.map-search input {
  flex: 1; min-width: 0; padding: 12px 14px; font-size: 16px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-s); color: var(--text); outline: none;
}
.map-search input:focus { border-color: var(--accent); }
.mp-find { padding: 0 16px; border-radius: var(--radius-s); background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14px; flex: 0 0 auto; }
.map-results { max-height: 168px; overflow-y: auto; background: var(--surface-2); border-radius: var(--radius-s); margin-bottom: 10px; }
.map-res { display: block; width: 100%; text-align: left; padding: 11px 13px; font-size: 13.5px; line-height: 1.4; color: var(--text); border-bottom: 1px solid var(--border); }
.map-res:last-child { border-bottom: 0; }
.map-res:active { background: var(--surface-3); }
.map-res-note { padding: 12px 13px; font-size: 13px; color: var(--dim); }
.map-box { border-radius: var(--radius-s); overflow: hidden; margin-bottom: 10px; border: 1px solid var(--border); }
.map-canvas { width: 100%; height: 300px; background: var(--surface-2); }
html[data-theme="dark"] .map-canvas .leaflet-tile-pane { filter: invert(.9) hue-rotate(180deg) contrast(.9); }
.map-off { display: flex; align-items: center; justify-content: center; height: 100%; padding: 20px; text-align: center; font-size: 13px; font-weight: 600; color: var(--dim); }
.map-status { font-size: 13px; color: var(--dim); margin-bottom: 10px; }
.map-status b { color: var(--text); }

/* ---------- Адресная книга ---------- */
.addr-book { margin-bottom: 12px; }
.addr-cap { font-size: 13px; color: var(--dim); font-weight: 600; margin-bottom: 7px; }
.addr-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.addr-row::-webkit-scrollbar { display: none; }
.addr-chip {
  flex: 0 0 auto; max-width: 210px; text-align: left;
  padding: 10px 14px; border-radius: var(--radius-s);
  background: var(--surface-2); border: 1.5px solid transparent;
}
.addr-chip.on { border-color: var(--accent); background: var(--accent-soft); }
.addr-chip b { display: block; font-size: 13.5px; font-weight: 800; }
.addr-chip span { display: block; font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr-card { display: flex; align-items: flex-start; gap: 10px; padding: 14px; background: var(--surface-2); border-radius: var(--radius-s); margin-bottom: 10px; }
.addr-main { min-width: 0; flex: 1; }
.addr-main b { display: block; font-size: 14.5px; font-weight: 800; margin-bottom: 3px; }
.addr-main > span { display: block; font-size: 13px; color: var(--dim); line-height: 1.45; }
.addr-def { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; border-radius: 6px; padding: 2px 6px; background: var(--accent-soft); color: var(--accent-ink); }
.addr-nogeo { display: block; margin-top: 4px; font-size: 12px; color: var(--faint); }
.addr-main .loc-link { display: inline-block; margin-top: 4px; font-size: 12px; }
.addr-acts { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.addr-act { font-size: 12.5px; font-weight: 700; color: var(--accent); }
.addr-act.danger { color: var(--danger); }

/* ---------- «О магазине»: связаться в WhatsApp / Telegram (27.09.2026) ---------- */
.ct { margin: 2px 0 14px; }
.ct-h { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--faint); margin: 0 2px 8px; }
.ct-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.ct-grid.one { grid-template-columns: 1fr; }
.ct-btn {
  --c: #1FA855; --c-soft: #E7F7EE; --c-edge: #BDE8CF;
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 64px; padding: 11px 12px;
  border-radius: 16px; border: 1.5px solid var(--c-edge); background: var(--c-soft); color: var(--text);
  text-align: left; cursor: pointer; transition: transform .1s, box-shadow .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.ct-tg { --c: #229ED9; --c-soft: #E8F5FC; --c-edge: #BFE3F5; }
.ct-btn:active { transform: scale(.98); }
@media (hover: hover) { .ct-btn:hover { border-color: var(--c); box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 22%, transparent); } }
.ct-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--c); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 35%, transparent); }
.ct-ic svg { width: 21px; height: 21px; }
.ct-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ct-t b { font-size: 15px; font-weight: 800; letter-spacing: -.2px; }
.ct-t small { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-go { flex: none; color: var(--c); display: flex; }
.ct-go svg { width: 18px; height: 18px; }
html[data-theme="dark"] .ct-btn { --c-soft: rgba(31, 168, 85, .13); --c-edge: rgba(31, 168, 85, .38); }
html[data-theme="dark"] .ct-tg { --c: #3AAEE6; --c-soft: rgba(58, 174, 230, .13); --c-edge: rgba(58, 174, 230, .38); }
.ct-btn { min-width: 0; }
@media (max-width: 440px) { .ct-go { display: none; } .ct-btn { gap: 9px; padding: 10px; } .ct-ic { width: 36px; height: 36px; } }
@media (max-width: 330px) { .ct-grid { grid-template-columns: 1fr; } .ct-go { display: flex; } }

/* =====================================================
   Полный чек в профиле (30.09.2026)
   Номер чека в «Истории баллов» и «Моих долгах» нажимается и открывает
   сам чек: «бумажный» чек сверху, под ним — оплата лентой событий.
   ===================================================== */

/* Строки-кнопки с чеком */
.row-tap { width: 100%; text-align: left; transition: background .12s; }
.row-tap:active { background: var(--surface-2); }
.dbt-tap { text-align: left; border-radius: 10px; margin: -4px -6px; padding: 4px 6px; width: calc(100% + 12px); transition: background .12s; }
.dbt-tap:active { background: var(--danger-soft); }
.rc-link { color: var(--accent-ink); font-weight: 700; }
.dbt-row .rc-link { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.rc-chev { font-style: normal; color: var(--faint); font-weight: 400; margin-left: 6px; font-size: 17px; line-height: 1; }

/* «Бумага» чека: тон фона страницы на белой шторке и зубчатый край снизу */
.rc-paper {
  position: relative; background: var(--bg); border-radius: 16px 16px 0 0;
  padding: 18px 16px 18px; margin: 4px 0 26px;
}
.rc-paper::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px;
  background:
    linear-gradient(135deg, var(--bg) 50%, transparent 50%) 0 0 / 14px 10px repeat-x,
    linear-gradient(225deg, var(--bg) 50%, transparent 50%) 0 0 / 14px 10px repeat-x;
}
.rc-top { text-align: center; }
.rc-store { font-size: 11.5px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-no { font-size: 21px; font-weight: 800; letter-spacing: -.3px; margin-top: 4px; font-variant-numeric: tabular-nums; word-break: break-all; }
.rc-no-long { font-size: 15.5px; letter-spacing: 0; }
.rc-date { font-size: 12.5px; color: var(--faint); margin-top: 3px; }
.rc-st { display: inline-block; margin-top: 10px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.rc-st-paid { background: var(--accent-soft); color: var(--accent-ink); }
.rc-st-part { background: var(--warn-soft); color: var(--warn); }
.rc-st-debt { background: var(--danger-soft); color: var(--danger); }
.rc-st-ret  { background: var(--surface-3); color: var(--dim); }
.rc-due {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 14px; padding: 11px 14px; border-radius: 12px;
  background: var(--danger-soft); color: var(--danger); font-size: 13.5px; font-weight: 700;
}
.rc-due b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-sep { border-top: 1.5px dashed var(--border-strong); margin: 14px 0 4px; }
.rc-none { font-size: 13px; padding: 10px 0; }

/* Позиции */
.rc-it { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rc-it:last-child { border-bottom: 0; }
.rc-it-name { font-size: 14.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-it-sum { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-it-sum s { display: block; font-size: 12px; color: var(--faint); }
.rc-it-sum b { font-size: 15px; font-weight: 800; }
.rc-it-meta { grid-column: 1; font-size: 12.5px; color: var(--dim); font-variant-numeric: tabular-nums; line-height: 1.6; }
.rc-tag { display: inline-block; padding: 1px 7px; border-radius: 99px; background: var(--sale-soft); color: var(--sale); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.rc-tag-ret { background: var(--surface-3); color: var(--dim); }

/* Строки итога */
.rc-sum { padding-top: 6px; }
.rc-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; }
.rc-line span:first-child { color: var(--dim); min-width: 0; }
.rc-line span:last-child { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-minus span:last-child { color: var(--accent-ink); }
.rc-soft { font-size: 13px; }
.rc-soft span:first-child, .rc-soft span:last-child { color: var(--faint); font-weight: 500; }
.rc-debt span:first-child, .rc-debt span:last-child { color: var(--danger); font-weight: 700; }
.rc-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 8px; padding-top: 12px; border-top: 1.5px dashed var(--border-strong); }
.rc-total span { font-size: 15px; font-weight: 800; }
.rc-total b { font-size: 23px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Оплата — лента событий */
.rc-tl { margin-top: 4px; }
.rc-ev { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.rc-ev:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--border); }
.rc-ev-dot { flex: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-ink); }
.rc-ev-dot svg { width: 17px; height: 17px; }
.rc-ev-ret .rc-ev-dot { background: var(--surface-2); color: var(--dim); }
.rc-ev-ret .rc-ev-dot svg { transform: scaleX(-1); }
.rc-ev-body { flex: 1; min-width: 0; padding-top: 5px; }
.rc-ev-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rc-ev-head b { font-size: 14.5px; font-weight: 700; }
.rc-ev-head span { font-size: 14.5px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-ev-sub { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.rc-ev-lines { margin-top: 8px; padding: 4px 11px; border-radius: 11px; background: var(--surface-2); }
.rc-green { color: var(--accent-ink); }
.rc-dim { color: var(--dim); }
.rc-bal { border-top: 1px solid var(--border); padding-top: 8px; }
.rc-left { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 700; }
.rc-left b { font-size: 18px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-left-debt { background: var(--danger-soft); color: var(--danger); }
.rc-left-ok { justify-content: flex-start; background: var(--accent-soft); color: var(--accent-ink); }
.rc-left-ok svg { flex: none; width: 20px; height: 20px; }

/* Баллы за покупку */
.rc-pts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 12px 14px; margin: 0 0 12px; border-radius: var(--radius-s); border: 1.5px dashed var(--accent); color: var(--accent-ink); }
.rc-pts span { flex: 1; font-size: 13.5px; font-weight: 700; }
.rc-pts b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rc-pts small { width: 100%; font-size: 12px; color: var(--dim); }
.rc-empty { padding: 36px 12px; }
.rc-empty .btn { margin-top: 16px; }

/* ---------- Демо-витрина (30.09.2026) ---------- */
.demo-strip { background: var(--warn-soft); border-bottom: 1px solid var(--border); }
.demo-strip-in { max-width: 1120px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 10px; }
.demo-strip-ic { flex: none; width: 18px; height: 18px; color: var(--warn); display: inline-flex; }
.demo-strip-ic svg { width: 18px; height: 18px; }
.demo-strip-t { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.35; color: var(--text); }
.demo-strip-t b { color: var(--warn); font-weight: 700; }
.demo-strip-go { flex: none; font-size: 12.5px; font-weight: 700; color: var(--on-accent); background: var(--accent);
  padding: 7px 12px; border-radius: 10px; text-decoration: none; white-space: nowrap; }
.demo-strip-go:active { background: var(--accent-press); }
.demo-note { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 6px 4px 2px; }
.demo-note-ic { width: 56px; height: 56px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; }
.demo-note-ic svg { width: 28px; height: 28px; }
.demo-note p { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--text); }
.demo-note small { font-size: 13.5px; line-height: 1.45; color: var(--dim); }
.mfoot a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* ---------- Витрина без тарифа (22.10.2026): экран «не принимает онлайн-заказы» ---------- */
.shop-closed { max-width: 440px; margin: 0 auto; padding: 48px 4px 36px; text-align: center; }
.sc-ic { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--dim); }
.sc-ic svg { width: 36px; height: 36px; }
.sc-name { font-size: 13px; font-weight: 700; color: var(--faint); letter-spacing: .2px; margin-bottom: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-closed h2 { margin: 0 0 10px; font-size: 21px; line-height: 1.25; font-weight: 800; letter-spacing: -.3px; color: var(--text); }
.shop-closed > p { margin: 0 auto 22px; color: var(--dim); font-size: 14.5px; line-height: 1.55; }
.sc-contacts { text-align: left; }
.sc-contacts:empty { display: none; }
.sc-owner { margin-top: 22px; padding: 16px; border-radius: 16px; border: 1px dashed var(--border-strong); background: var(--surface);
  display: flex; flex-direction: column; gap: 6px; text-align: left; }
.sc-owner b { font-size: 14px; color: var(--text); }
.sc-owner span { font-size: 13px; line-height: 1.5; color: var(--dim); }
.sc-owner .btn { margin-top: 8px; width: 100%; }
.sc-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 22px; }
.sc-lang { border: 1px solid var(--border); background: transparent; color: var(--dim); border-radius: 999px;
  padding: 6px 11px; font: inherit; font-size: 12.5px; cursor: pointer; }
.sc-lang.on { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); font-weight: 700; }

/* ---------- Каталог списком (23.10.2026) ----------
   Та же карточка .pcard, только строкой: фото слева, справа название, цена,
   опт и кнопка. Включается классом .list у #grid (кнопка у «Все товары»). */
.grid.list { grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 900px) { .grid.list { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.grid.list .pcard { flex-direction: row; align-items: stretch; }
.grid.list .pimg { flex: 0 0 104px; width: 104px; height: 104px; aspect-ratio: auto; align-self: center; margin: 8px 0 8px 8px; border-radius: calc(var(--radius) - 4px); }
.grid.list .pbody { min-width: 0; padding: 10px 12px; justify-content: center; }
.grid.list .pname { order: 0; min-height: 0; margin-top: 0; margin-bottom: 2px; font-size: 14px; font-weight: 600; }
.grid.list .pprice { font-size: 16px; }
.grid.list .padd, .grid.list .qtyrow { margin-top: 8px; height: 36px; align-self: flex-start; min-width: 132px; }
.grid.list .padd { padding: 0 14px; font-size: 13.5px; }
.grid.list .badge-sale { left: 5px; top: 5px; padding: 2px 6px; font-size: 11px; border-radius: 7px; }
.grid.list .badge-rate { left: 5px; bottom: 5px; padding: 2px 6px; font-size: 10.5px; }
.grid.list .badge-out { padding: 4px 8px; font-size: 10.5px; }

/* ==========================================================================
   16.11.2026 — Telegram на весь экран и плотная витрина (просьба владельца:
   «чтобы много информации влезало на экран»).
   ========================================================================== */

/* Внутри Telegram на весь экран кнопки «Закрыть» и «⋯» лежат поверх
   страницы: верхний отступ = безопасная зона устройства + зона кнопок
   Telegram. Переменные ставит telegram-web-app.js; вне полного экрана они
   нулевые, и всё остаётся как было. */
html.in-tg {
  --sat: max(env(safe-area-inset-top), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --sab: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
}
/* Окна (карточка товара, оформление) не должны заезжать под кнопки Telegram. */
html.in-tg .modal { max-height: calc(100dvh - var(--sat) - 8px); }

/* --- Плотнее: поля, шапка, заголовки, карточки товара, меню --- */
:root { --tabbar: 58px; }
.wrap { padding: 0 12px; }
.feat-row { padding: 2px 12px 6px; margin: 0 -12px; }

.hdr-in { min-height: 52px; padding: 6px 12px; }
.hdr-logo { width: 36px; height: 36px; border-radius: 12px; font-size: 16px; }
.hdr-txt h1 { font-size: 16px; }
.hdr-txt small { font-size: 12px; }
.ibtn { width: 38px; height: 38px; }

.banners { margin-top: 10px; }
.b-dots { padding-top: 6px; }

.feat-head { margin: 14px 0 8px; }
.feat-head h2, .sec-head h2 { font-size: 17px; }
.feat-row .pcard.mini { flex-basis: 140px; }
.sec-head { margin: 14px 0 8px; }
.cat-pick { height: 34px; }
.view-pick { width: 34px; }
@media (max-width: 480px) { #cat-pick { width: 34px; } }

.grid { gap: 10px; }
@media (max-width: 400px) { .grid { gap: 8px; } }
.pbody { padding: 8px 10px 10px; }
.pname { min-height: 34px; margin-top: 2px; }
.pprice { font-size: 16px; }
.padd, .qtyrow { margin-top: 8px; height: 36px; border-radius: 11px; }

.grid.list { gap: 6px; }
.grid.list .pimg { flex-basis: 88px; width: 88px; height: 88px; }
.grid.list .pbody { padding: 8px 10px; }
.grid.list .padd, .grid.list .qtyrow { margin-top: 6px; height: 34px; }

.scr-head { padding: 14px 0 8px; }
.scr-head h2 { font-size: 22px; }

.tab { gap: 3px; }
.tab svg { padding: 3px 16px; }
.cartbar { height: 52px; border-radius: 16px; }
.cartbar .cb-go { height: 38px; }
.foot { padding: 18px 12px 8px; }

/* ==========================================================================
   23.11.2026 — модели с вариантами (цвет, размер). Варианты одной модели —
   одна карточка: цена «от», подпись вариантов, кнопка «Выбрать»; в окне
   товара — чипы значений.
   ========================================================================== */
.pvars {
  order: 3; font-size: 12px; font-weight: 600; color: var(--dim); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pchoose::before { display: none; }
.pchoose-in {
  margin-left: 2px; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: var(--on-accent);
  font-size: 11.5px; font-weight: 800;
}
.pm-vars { display: flex; flex-direction: column; gap: 14px; margin: -4px 0 16px; }
.pm-var-h { font-size: 13.5px; color: var(--dim); font-weight: 600; margin-bottom: 8px; }
.pm-var-h b { color: var(--text); font-weight: 800; }
.pm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-chip {
  min-height: 40px; min-width: 48px; padding: 0 14px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: border-color .15s, background .15s, transform .1s;
}
.pm-chip i { width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.pm-chip:active { transform: scale(.97); }
.pm-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
/* Закончился: видно, что такой есть, но взять нельзя. */
.pm-chip.off { color: var(--faint); text-decoration: line-through; border-style: dashed; }
.pm-chip.off.on { color: var(--accent-ink); }
/* Такого сочетания нет вовсе. */
.pm-chip.na, .pm-chip:disabled { opacity: .35; cursor: default; text-decoration: line-through; }
@media (hover: hover) { .pm-chip:not(:disabled):not(.on):hover { border-color: var(--accent); } }
.grid.list .pvars { margin-top: 1px; }

/* ==========================================================================
   27.11.2026 — товары с серийным номером (IMEI): список экземпляров в окне
   товара. У каждого своя цена, код (#K7M2Q), описание и гарантия; IMEI
   покупатель не видит.
   ========================================================================== */
.pm-units { margin: -4px 0 16px; }
.pm-units-in { color: var(--accent-ink); font-weight: 700; }
.pm-units-hint { font-size: 12.5px; color: var(--faint); margin: -4px 0 10px; line-height: 1.35; }
.pm-ulist { display: flex; flex-direction: column; gap: 8px; }
.pm-unit {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: var(--radius-s); border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}
.pm-unit:active { transform: scale(.99); }
.pm-unit.on { border-color: var(--accent); background: var(--accent-soft); }
@media (hover: hover) { .pm-unit:not(.on):hover { border-color: var(--accent); } }
.pu-radio {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); flex: 0 0 auto;
  margin-top: 2px; position: relative; background: var(--surface);
}
.pm-unit.on .pu-radio { border-color: var(--accent); }
.pm-unit.on .pu-radio::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent);
}
.pu-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pu-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pu-top b { font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.pu-tag {
  flex: 0 0 auto; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 800;
  background: var(--accent); color: var(--on-accent); white-space: nowrap;
}
.pu-meta { font-size: 12.5px; color: var(--dim); font-weight: 600; letter-spacing: .2px; }
.pu-note { font-size: 13.5px; color: var(--text); line-height: 1.35; overflow-wrap: anywhere; }
.pm-umore { margin-top: 10px; font-weight: 700; }
/* Корзина: экземпляр — своя строка, без «− +». */
.cinfo .cunit { display: block; color: var(--dim); font-weight: 600; margin-top: 2px; }
.cinfo .cunit-note { display: block; color: var(--text); margin-top: 2px; line-height: 1.35; }
.cunit-rm { margin-top: 6px; font-size: 13px; font-weight: 700; padding: 0; }
.od-unit { display: block; color: var(--dim); font-size: 12px; font-weight: 500; margin-top: 2px; line-height: 1.35; }
.pm-tocart { flex: 0 0 auto; width: auto; padding-left: 18px; padding-right: 18px; }
