/* ================= Фирменные цвета магазина =================
   Тёмно-синий «чернильный» текст, лавандовый фон, ягодные кнопки,
   лимонный ценник и мятный «в наличии». Тёмная тема — глубокий синий.
   Вёрстка от телефона: на экранах от 900px — шапка с поиском, боковая колонка
   с категориями и фильтрами, карточка товара и оформление в две колонки. */
:root {
  --bg2: #EEF1FA;          /* фон страницы */
  --card: #FFFFFF;         /* карточки */
  --bg: #F7F8FC;           /* поля ввода */
  --text: #1E2147;         /* основной текст (чернила) */
  --hint: #5B5E83;         /* вторичный текст */
  --accent: #CF2A6D;       /* ягодный — главные действия */
  --accent-text: #FFFFFF;
  --link: #B8205F;
  --accent-soft: #FBE3EC;
  --lemon: #FFD43B;        /* ценник */
  --lemon-text: #1E2147;
  --mint: #16896E;
  --danger: #D23030;
  --sale: #CF2A6D;
  --ink-chip: #1E2147;     /* выбранная категория */
  --ink-chip-text: #FFFFFF;
  --sep: rgba(30, 33, 71, .12);
  --foot: #1E2147;
  --foot-text: #D9DBF2;
  --radius: 20px;
  --font: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Dela Gothic One", "Golos Text", -apple-system, sans-serif;
  --maxw: 1180px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg2: #14162B;
  --card: #1E2140;
  --bg: #191B36;
  --text: #EEF0FF;
  --hint: #A3A6CC;
  --accent: #FF6FA5;
  --accent-text: #14162B;
  --link: #FF8DB8;
  --accent-soft: rgba(255, 111, 165, .16);
  --lemon: #FFD43B;
  --lemon-text: #14162B;
  --mint: #3CCB9F;
  --danger: #FF6B6B;
  --sale: #FF6FA5;
  --ink-chip: #EEF0FF;
  --ink-chip-text: #14162B;
  --sep: rgba(238, 240, 255, .12);
  --foot: #0E1022;
  --foot-text: #B9BCE0;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
html { scroll-padding-top: 80px; }
body {
  font: 15px/1.45 var(--font);
  background: var(--bg2);
  color: var(--text);
  min-height: 100vh;
  display: flex; flex-direction: column;
  -webkit-text-size-adjust: 100%;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--link); }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--hint); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--card); padding: 8px 12px; border-radius: 10px; }
.skip:focus { left: 8px; }
.wrap { flex: 1; width: 100%; padding: 12px 12px 110px; max-width: var(--maxw); margin: 0 auto; outline: none; }
.noscript { padding: 20px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ================= шапка ================= */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg2) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--sep); }
.top-in { max-width: var(--maxw); margin: 0 auto; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); display: flex; align-items: center; gap: 8px; }
.logo { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: var(--text); }
.logo img { width: 36px; height: 36px; flex: none; }
.logo-text { min-width: 0; }
.logo-name { font-family: var(--display); font-size: clamp(17px, 5vw, 22px); line-height: 1.08; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-sub { display: block; font-size: 12px; color: var(--hint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-title { font-family: var(--display); font-weight: 400; font-size: clamp(19px, 5.4vw, 26px); line-height: 1.12; margin: 2px 2px 12px; }
.search-note { margin: -4px 2px 14px; color: var(--hint); font-size: 14px; line-height: 1.4; }
.icon-btn { width: 40px; height: 40px; border-radius: 14px; background: var(--card); display: grid; place-items: center; position: relative; flex: none; color: var(--text); text-decoration: none; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .lbl { display: none; }
.badge { position: absolute; top: -4px; right: -4px; background: var(--accent); color: var(--accent-text); font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.badge.pop { animation: pop .35s ease-out; }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
.top-nav, .top-search { display: none; }
.crumbs { font-size: 13px; color: var(--hint); margin: 0 2px 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--hint); text-decoration: none; }
.crumbs a:hover { color: var(--link); }

/* поиск */
.search { position: relative; flex: 1; display: block; }
.search input { width: 100%; height: 42px; border-radius: 14px; border: 0; background: var(--card); padding: 0 12px 0 38px; outline: none; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--hint); }
.search input:focus { box-shadow: 0 0 0 2px var(--accent); }
.search svg { position: absolute; left: 12px; top: 12px; width: 18px; height: 18px; color: var(--hint); pointer-events: none; }
.search-row { display: flex; gap: 8px; }
.filter-btn { width: 42px; height: 42px; }
.filter-btn.open { background: var(--ink-chip); color: var(--ink-chip-text); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--card); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip.on, .panel .chip.on { background: var(--ink-chip); color: var(--ink-chip-text); }
.panel .chip, .filters .chip { background: var(--bg2); }
.filters { margin: 10px 0 0; background: var(--card); border-radius: 18px; padding: 12px 12px 4px; }
.frow > span { display: block; font-size: 13px; color: var(--hint); margin: 0 2px 6px; }
.frow .chips { padding: 0 0 10px; flex-wrap: wrap; overflow: visible; }
.reset { color: var(--link); font-weight: 600; font-size: 14px; padding: 4px 2px 10px; }

/* ================= главная ================= */
.hero { background: var(--card); border-radius: 24px; padding: 18px; margin-bottom: 14px; position: relative; overflow: hidden; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 6.4vw, 40px); line-height: 1.08; max-width: 18ch; }
.hero p { margin: 8px 0 0; color: var(--hint); max-width: 52ch; }
.perks { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 14px; }
.perk { color: var(--text); text-decoration: none; display: flex; gap: 10px; align-items: flex-start; background: var(--bg2); border-radius: 14px; padding: 10px 12px; font-size: 14px; line-height: 1.35; }
.perk b { display: block; font-weight: 600; }
.perk-d { display: block; }
.summary-items .sum span:last-child, .sum span:last-child { white-space: nowrap; }
.sticker.big { margin-top: 6px; }
/* телефон: шапка главной компактная — игрушки видно сразу */
@media (max-width: 639px) {
  .hero { padding: 16px 16px 14px; }
  .hero h1 { font-size: 22px; max-width: 13ch; }
  .hero p { display: none; }
  .hero-deco { width: 92px; height: 92px; right: -8px; top: -6px; }
  .perks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
  .perk { padding: 6px 10px; border-radius: 999px; font-size: 13px; align-items: center; gap: 6px; }
  .perk .ic { font-size: 15px; }
  .perk-d { display: none; }
  .top-in.inner .logo img { display: none; }
}
.perk .ic { font-size: 20px; line-height: 1.1; flex: none; }
.hero-deco { position: absolute; right: -18px; top: -18px; width: 120px; height: 120px; opacity: .9; pointer-events: none; }

.banner { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--ink-chip); color: var(--ink-chip-text); border-radius: 20px; padding: 14px; margin-bottom: 14px; }
:root[data-theme="dark"] .banner { background: #2B2F63; color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 212, 59, .25); }
.banner-label { flex: none; background: var(--lemon); color: var(--lemon-text); font-family: var(--display); font-size: 20px; padding: 10px 10px 9px; border-radius: 12px 12px 12px 4px; transform: rotate(-4deg); }
.banner-text { display: flex; flex-direction: column; gap: 2px; font-size: 13px; opacity: .92; }
.banner-text b { font-size: 15px; font-weight: 600; opacity: 1; }

.shelf { margin-bottom: 18px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 8px; }
.shelf-head h2, .grid-title { font-family: var(--display); font-weight: 400; font-size: 19px; }
.grid-title { margin: 4px 2px 10px; }
.shelf-head button { color: var(--link); font-weight: 600; font-size: 14px; }
.shelf-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -12px; padding: 0 12px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.shelf-row::-webkit-scrollbar { display: none; }
.mini-card { flex: none; width: 140px; text-align: left; scroll-snap-align: start; text-decoration: none; color: var(--text); }
.mini-card .ph { display: block; position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--card); }
.mini-card .ph img, .mini-card .ph .noph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mini-card .sticker { font-size: 14px; padding: 6px 8px 5px; left: 6px; bottom: 6px; }
.mini-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 500; line-height: 1.25; margin: 6px 2px 0; }

/* ================= сетка товаров ================= */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.card .ph { display: block; width: 100%; aspect-ratio: 1; background: var(--bg2); position: relative; overflow: hidden; }
.card .ph img, .card .ph .noph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .name { font-size: 14px; font-weight: 500; line-height: 1.25; min-height: 2.5em; color: var(--text); text-decoration: none; }
.card .name > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card.soldout .ph img { filter: grayscale(1); opacity: .6; }
.card.soldout .sticker { background: var(--card); color: var(--hint); }
.noph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 44px; opacity: .5; }
.tag { position: absolute; left: 8px; top: 8px; background: var(--sale); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 10px; }
.tag.out { background: rgba(30, 33, 71, .75); }
.tag.few { background: var(--card); color: var(--text); left: auto; right: 8px; }
.tag.ink { background: var(--ink-chip); color: var(--ink-chip-text); }
.add { margin-top: auto; height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--link); font-weight: 600; font-size: 14px; width: 100%; }
.add:disabled { opacity: .5; cursor: default; }
.stepper { margin-top: auto; display: flex; align-items: center; justify-content: space-between; height: 38px; border-radius: 12px; background: var(--accent); color: var(--accent-text); font-weight: 700; }
.stepper button { width: 40px; height: 38px; font-size: 20px; color: inherit; }

/* Ценник-наклейка — главный характерный элемент */
.sticker {
  position: absolute; left: 8px; bottom: 8px; z-index: 1;
  background: var(--lemon); color: var(--lemon-text);
  font-family: var(--display); font-size: 16px; line-height: 1; white-space: nowrap;
  padding: 8px 11px 7px; border-radius: 12px 12px 12px 4px;
  transform: rotate(-4deg); transform-origin: left bottom;
  box-shadow: 0 2px 0 rgba(30, 33, 71, .18);
}
.sticker s { font-family: var(--font); font-weight: 500; font-size: .72em; opacity: .6; margin-left: 6px; vertical-align: 1px; }
.sticker.big { position: static; display: inline-block; font-size: 24px; padding: 10px 14px 9px; margin: 2px 0 4px; }

/* ================= карточка товара ================= */
.product { display: grid; gap: 10px; }
.gallery-wrap { min-width: 0; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius); background: var(--card); scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img, .gallery .noph { flex: none; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; scroll-snap-align: center; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 8px 0 0; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--sep); transition: width .2s; }
.dots i.on { background: var(--accent); width: 16px; }
.thumbs { display: none; }
.panel { background: var(--card); border-radius: var(--radius); padding: 16px; margin-top: 10px; }
.product .panel { margin-top: 0; }
.panel h1 { font-size: clamp(20px, 5.4vw, 28px); line-height: 1.2; font-family: var(--display); font-weight: 400; margin: 0 0 8px; }
.panel h2 { font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.25; margin: 0 0 10px; }
.panel h3 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.desc { white-space: pre-wrap; margin: 0; }
.was { font-size: 14px; color: var(--hint); text-decoration: line-through; }
.meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.meta span { background: var(--bg2); border-radius: 8px; padding: 3px 8px; font-size: 13px; color: var(--hint); }
.meta span.ok { color: var(--mint); }
.meta span.ink { background: var(--ink-chip); color: var(--ink-chip-text); }
.buy { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.buy .add, .buy .stepper { height: 48px; font-size: 16px; border-radius: 14px; margin: 0; flex: 1; max-width: 320px; }
.buy .add { background: var(--accent); color: var(--accent-text); }
.buy .stepper button { height: 48px; width: 52px; }
.facts { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; font-size: 14px; }
.facts li { display: flex; gap: 10px; }
.facts li span:first-child { flex: none; }

/* ================= корзина и оформление ================= */
.two-col { display: grid; gap: 10px; align-items: start; }
.two-col > * { min-width: 0; }
.two-col .panel:first-child { margin-top: 0; }
.line { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.line + .line { border-top: 1px solid var(--sep); }
.line img, .line .noph { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--bg2); font-size: 28px; flex: none; }
.line .info { flex: 1; min-width: 0; }
.line .info a { color: var(--text); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line .price { font-weight: 700; font-size: 15px; margin-top: 2px; }
.line .stepper { width: 108px; flex: none; margin: 0; }
.sum { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.sum.total { font-family: var(--display); font-weight: 400; font-size: 19px; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--sep); }
.minus { color: var(--mint); font-weight: 600; }
.summary-items { font-size: 14px; margin-bottom: 6px; }
.summary-items .sum span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; color: var(--hint); margin: 0 0 5px 2px; }
.input { width: 100%; min-height: 46px; border-radius: 14px; border: 1px solid var(--sep); background: var(--bg); padding: 10px 12px; outline: none; font-size: 16px; }
.input:focus { border-color: var(--accent); }
.input.invalid { border-color: var(--danger); }
textarea.input { resize: vertical; min-height: 70px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--bg2); padding: 4px; border-radius: 14px; }
.seg button { height: 42px; border-radius: 10px; font-weight: 600; color: var(--hint); }
.seg button.on { background: var(--card); color: var(--text); outline: 1.5px solid var(--sep); }
.note { font-size: 13px; color: var(--hint); margin: 8px 2px 0; }
.err { color: var(--danger); font-size: 14px; margin: 8px 2px 0; }
.err:empty { display: none; }
.city { font-size: 14px; margin: 12px 2px 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 8px; }
.grid4 .field > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid2f { display: grid; grid-template-columns: 1fr; gap: 0 10px; }
.chips.days { padding-top: 0; margin: 0 -2px; flex-wrap: wrap; overflow: visible; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 10px; }
.slots button { height: 44px; border-radius: 14px; border: 1px solid var(--sep); background: var(--bg); font-weight: 600; font-size: 14px; }
.slots button.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.panel.invalid { box-shadow: inset 0 0 0 2px var(--danger); }
.phone-row { display: flex; gap: 8px; }
.phone-row .input { flex: 1; min-width: 0; }
.soft-btn { flex: none; padding: 0 14px; min-height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--link); font-weight: 600; font-size: 14px; white-space: nowrap; }
.soft-btn:disabled { opacity: .6; }
.pay-note { font-size: 14px; line-height: 1.4; background: var(--bg2); border-radius: 12px; padding: 10px 12px; }
.map-link { display: block; margin: 8px 0 2px; padding: 10px 12px; border-radius: 12px; background: var(--bg2); color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; }
.promo-on { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.promo-on .sticker { position: static; font-size: 14px; padding: 7px 10px 6px; }
.link { color: var(--link); font-weight: 600; margin-left: auto; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.4; margin: 14px 0 0; cursor: pointer; padding: 10px; border-radius: 12px; background: var(--bg2); }
.consent input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--accent); }
.consent.invalid { box-shadow: inset 0 0 0 2px var(--danger); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ================= заказ ================= */
.status { display: inline-block; font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--bg2); white-space: nowrap; }
.status.new { background: rgba(245, 166, 35, .18); color: #b06e00; }
.status.confirmed { background: rgba(52, 199, 89, .18); color: #1d8a43; }
.status.ready, .status.delivering { background: rgba(10, 132, 255, .16); color: #2a72cc; }
.status.done { background: var(--bg2); color: var(--hint); }
.status.canceled { background: rgba(255, 59, 48, .15); color: #d03a31; }
:root[data-theme="dark"] .status.new { color: #f5b74a; }
:root[data-theme="dark"] .status.confirmed { color: #4fd17c; }
:root[data-theme="dark"] .status.ready, :root[data-theme="dark"] .status.delivering { color: #6aaeff; }
:root[data-theme="dark"] .status.canceled { color: #ff7d74; }
.thanks { text-align: center; padding: 22px 16px; }
.thanks .big { font-size: 48px; }
.thanks h1 { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 6vw, 30px); margin: 6px 0; }
.steps { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 0; }
.steps li { display: flex; gap: 12px; align-items: flex-start; position: relative; padding: 0 0 14px; color: var(--hint); }
.steps li::before { content: ''; flex: none; width: 14px; height: 14px; border-radius: 7px; background: var(--sep); margin-top: 3px; }
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 6px; top: 18px; bottom: 0; width: 2px; background: var(--sep); }
.steps li.done { color: var(--text); }
.steps li.done::before { background: var(--mint); }
.steps li.now { color: var(--text); font-weight: 600; }
.steps li.now::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.kv { font-size: 14px; margin: 4px 0; }
.copy-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ================= информационные страницы ================= */
.prose { max-width: 760px; }
.prose h2 { font-family: var(--font); font-weight: 700; font-size: 17px; margin: 18px 0 6px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 10px; }
.prose ul { margin: 0 0 10px; padding-left: 20px; }
.prose li { margin: 3px 0; }
.req { display: grid; grid-template-columns: 1fr; gap: 2px 16px; margin: 0; }
.req dt { color: var(--hint); font-size: 13px; margin-top: 8px; }
.req dd { margin: 0; }

/* ================= подвал ================= */
.foot { background: var(--foot); color: var(--foot-text); font-size: 14px; padding: 28px 16px calc(110px + env(safe-area-inset-bottom)); }
.foot-in { max-width: var(--maxw); margin: 0 auto; display: grid; gap: 22px; }
.foot h2 { font-family: var(--display); font-weight: 400; font-size: 18px; color: #fff; margin-bottom: 8px; }
.foot h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #fff; opacity: .7; margin-bottom: 8px; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot .legal { font-size: 12.5px; line-height: 1.5; opacity: .85; border-top: 1px solid rgba(255,255,255,.14); padding-top: 14px; }
.foot .legal p { margin: 0 0 4px; }

/* кнопка внизу экрана на телефоне */
.bottom { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg2) 30%); z-index: 9; }
.btn { width: 100%; max-width: 696px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 16px; border-radius: 16px; background: var(--accent); color: var(--accent-text); font-weight: 600; font-size: 16px; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: var(--card); color: var(--link); }
.btn.small { min-height: 42px; font-size: 14px; border-radius: 12px; }
@media (max-width: 899px) { .desk-only { display: none !important; } }
@media (min-width: 900px) { .mob-only { display: none !important; } }

.empty { text-align: center; padding: 60px 20px; color: var(--hint); }
.empty .big { font-size: 56px; margin-bottom: 8px; }
.empty b { display: block; color: var(--text); font-size: 18px; margin-bottom: 4px; font-family: var(--display); font-weight: 400; }
.empty .btn { max-width: 280px; margin-top: 16px; }
.skeleton { background: linear-gradient(90deg, var(--card), var(--bg2), var(--card)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--card); padding: 10px 16px; border-radius: 14px; font-size: 14px; z-index: 30; max-width: 90vw; text-align: center; box-shadow: 0 6px 24px rgba(0,0,0,.18); }

/* ================= планшет ================= */
@media (min-width: 640px) {
  .perks { grid-template-columns: repeat(3, 1fr); }
  .grid2f { grid-template-columns: 1fr 1fr; }
  .req { grid-template-columns: 220px 1fr; }
  .req dt { margin-top: 0; }
  .foot-in { grid-template-columns: repeat(3, 1fr); }
  .foot .legal { grid-column: 1 / -1; }
  .hero { padding: 26px; }
  .hero-deco { width: 170px; height: 170px; right: -10px; top: -10px; }
}

/* ================= компьютер ================= */
@media (min-width: 900px) {
  body { font-size: 16px; }
  .wrap { padding: 20px 24px 60px; }
  .top-in { padding: 12px 24px; gap: 14px; }
  .logo { flex: none; }
  .logo img { width: 42px; height: 42px; }
  .logo-name { font-size: 22px; }
  .top-search { display: block; flex: 1; max-width: 460px; margin: 0 auto; }
  .top-nav { display: flex; gap: 4px; }
  .top-nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 10px; border-radius: 10px; white-space: nowrap; }
  .top-nav a:hover, .top-nav a.on { background: var(--card); }
  .icon-btn.wide { width: auto; padding: 0 12px 0 10px; gap: 6px; grid-auto-flow: column; }
  .icon-btn.wide .lbl { display: inline; font-weight: 600; font-size: 14px; }
  .icon-btn:hover { box-shadow: 0 0 0 1.5px var(--sep); }
  .back-btn { display: none !important; }
  .bottom { display: none !important; }
  .toast { bottom: 28px; }

  .catalog { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
  /* колонка категорий и фильтров прокручивается вместе со страницей — без своей полосы прокрутки, которая «ловит» колесо мыши */
  .side { display: grid; gap: 12px; align-self: start; }
  .side .panel { margin: 0; padding: 14px; }
  .side h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--hint); margin: 0 0 8px; }
  .cat-list { display: grid; gap: 2px; }
  .cat-list button { text-align: left; padding: 8px 10px; border-radius: 10px; font-weight: 500; display: flex; justify-content: space-between; gap: 8px; }
  .cat-list button:hover { background: var(--bg2); }
  .cat-list button.on { background: var(--ink-chip); color: var(--ink-chip-text); }
  .cat-list button small { color: inherit; opacity: .6; }
  .side .chips { flex-wrap: wrap; overflow: visible; padding: 0 0 8px; }
  .side .chip { padding: 6px 12px; font-size: 13.5px; }

  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .card:hover { box-shadow: 0 10px 30px rgba(30, 33, 71, .10); transform: translateY(-2px); }
  .shelf-row { margin: 0; padding: 0 0 6px; flex-wrap: nowrap; scrollbar-width: thin; }
  .mini-card { width: 168px; }

  .hero { padding: 32px 36px; }
  .hero-deco { width: 220px; height: 220px; right: 10px; top: -6px; }

  .product { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .product-info { position: sticky; top: 84px; display: grid; gap: 12px; }
  .thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
  .thumbs button { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--card); outline: 2px solid transparent; outline-offset: -2px; }
  .thumbs button.on { outline-color: var(--accent); }
  .thumbs img { width: 100%; height: 100%; object-fit: cover; }
  .gallery-wrap .dots { display: none; }

  .two-col { grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; }
  .two-col .sticky { position: sticky; top: 84px; }
  .two-col .panel { margin-top: 0; }
  .two-col .stack { display: grid; gap: 12px; }
  .desk-action { margin-top: 14px; }

  .foot { padding: 40px 24px 40px; }
  .foot-in { max-width: calc(var(--maxw) - 48px); grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 28px; }
  .foot .legal { grid-column: auto; border-top: 0; padding-top: 0; }
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (hover: hover) and (pointer: fine) {
  .chips { flex-wrap: wrap; overflow: visible; }
  .shelf-row { scrollbar-width: thin; }
}
@media (prefers-reduced-motion: reduce) {
  .badge.pop, .skeleton { animation: none; }
  .sticker, .banner-label { transform: none; }
  .card { transition: none; }
}

/* ================= Telegram ================= */
/* внутри Telegram своя кнопка «Назад» и нижняя кнопка — свои прячем */
.tg .back-btn { display: none !important; }
.tg .foot { padding-bottom: 28px; }
/* реквизиты в узкой боковой колонке — подпись над значением */
.two-col .sticky .req { grid-template-columns: 1fr; }
.two-col .sticky .req dt { margin-top: 8px; }

/* ================= онлайн-оплата ================= */
.pay-opts { display: grid; gap: 8px; }
.pay-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--sep); background: var(--bg); }
.pay-opt .ic { font-size: 22px; flex: none; }
.pay-opt b { display: block; font-weight: 600; }
.pay-opt small { display: block; color: var(--hint); font-size: 13px; line-height: 1.3; margin-top: 1px; }
.pay-opt.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
@media (min-width: 640px) { .pay-opts { grid-template-columns: 1fr 1fr; } }
.pay-note.test { background: rgba(245, 166, 35, .16); }
.pay-box { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); font-size: 14px; }
.pay-box b { font-size: 16px; }
.pay-box.ok { background: rgba(31, 163, 131, .14); }
.pay-box.ok b { color: var(--mint); }
.pay-box.wait { background: var(--accent-soft); }
.pay-box.bad { background: rgba(210, 48, 48, .10); }
.pay-box.bad b { color: var(--danger); }
.erip-steps { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 6px; font-size: 15px; }
.big-num { font-family: var(--display); font-weight: 400; font-size: 20px; background: var(--lemon); color: var(--lemon-text); padding: 2px 8px; border-radius: 8px; }
.pay-logos { display: grid; gap: 8px; }
.pay-logos .logos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pay-logos img { height: 30px; width: auto; background: #fff; border-radius: 6px; padding: 4px 6px; }
.pay-logos p { margin: 0; font-size: 12.5px; opacity: .85; }
.pay-logos.light { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--sep); }
.pay-logos.light img { border: 1px solid var(--sep); }
.foot-pay { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.14); padding-top: 14px; }

/* ценник-наклейка повёрнут — отодвигаем его от второй строки названия */
.product-info h1 { margin-bottom: 14px; }
