/* =========================================================
   SOLANA — интернет-магазин косметики
   Палитра: беж, шампань, сливочное масло + акцент — тёплая терракота («солнечная глина»).
   Тема: по умолчанию повторяет тему устройства (prefers-color-scheme).
   ========================================================= */

:root {
  --bg: #FBF7F0;
  --bg-2: #F4ECDF;
  --surface: #FFFDF9;
  --champagne: #F0E3CD;
  --butter: #F8EDC6;
  --line: #EADFCF;
  --text: #2E2925;
  --muted: #857A6F;
  --faint: #B1A597;
  --accent: #A85F41;
  --accent-hover: #934F35;
  --accent-ink: #FFFFFF;
  --accent-text: #9A5539;
  --accent-soft: #F5E3D8;
  --toast-accent: #F2B596;
  --rose: #F5DCD6;
  --rose-ink: #9A4B41;
  --butter-ink: #7A5B14;
  --star: #DDB05C;
  --overlay: rgba(46, 41, 37, .42);
  --shadow: 0 1px 2px rgba(80, 60, 30, .05), 0 10px 28px rgba(80, 60, 30, .08);
  --shadow-lg: 0 24px 64px rgba(60, 40, 20, .2);
  --radius: 18px;
  --radius-lg: 26px;
  --font-head: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #191714;
    --bg-2: #221F1B;
    --surface: #27231F;
    --champagne: #352D24;
    --butter: #3A3222;
    --line: #38312A;
    --text: #F2EBE1;
    --muted: #A99E92;
    --faint: #756B61;
    --accent: #E3A07F;
    --accent-hover: #ECB497;
    --accent-ink: #2A160D;
    --accent-text: #EBAA88;
    --accent-soft: #3A2A22;
    --toast-accent: #9A5539;
    --rose: #432B28;
    --rose-ink: #F0B9AF;
    --butter-ink: #F1D893;
    --star: #E4BC6C;
    --overlay: rgba(0, 0, 0, .6);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #191714;
  --bg-2: #221F1B;
  --surface: #27231F;
  --champagne: #352D24;
  --butter: #3A3222;
  --line: #38312A;
  --text: #F2EBE1;
  --muted: #A99E92;
  --faint: #756B61;
  --accent: #E3A07F;
  --accent-hover: #ECB497;
  --accent-ink: #2A160D;
  --accent-text: #EBAA88;
  --accent-soft: #3A2A22;
  --toast-accent: #9A5539;
  --rose: #432B28;
  --rose-ink: #F0B9AF;
  --butter-ink: #F1D893;
  --star: #E4BC6C;
  --overlay: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 130px; scrollbar-gutter: stable; }
@media (min-width: 1024px) { html { scroll-padding-top: 150px; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: calc(68px + env(safe-area-inset-bottom));
  transition: background-color .3s, color .3s;
}
@media (min-width: 1024px) { body { padding-bottom: 0; } }
body.is-locked { overflow: hidden; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -.005em; }
p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 28px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.kicker { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 6px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px; border-radius: 999px;
  font-weight: 700; font-size: 14.5px; letter-spacing: .01em; white-space: nowrap;
  transition: background-color .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn--ghost { border: 1px solid var(--line); background: var(--surface); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--block { width: 100%; }
.btn .ic { width: 20px; height: 20px; }

.icon-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; transition: background-color .2s, color .2s; }
.icon-btn:hover { background: var(--bg-2); }
.icon-btn--line { border: 1px solid var(--line); background: var(--surface); }
.icon-btn--line:hover { border-color: var(--accent); background: var(--surface); }

.count {
  position: absolute; top: 2px; right: 0;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  font: 800 10.5px/1 var(--font-body);
  box-shadow: 0 0 0 2px var(--bg);
}
.count.is-bump { animation: bump .45s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }

.link-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 14px; color: var(--accent-text); }
.link-more .ic { width: 18px; height: 18px; transition: transform .2s; }
.link-more:hover .ic { transform: translateX(3px); }

/* ---------- Верхняя плашка ---------- */
.topbar { background: var(--champagne); font-size: 12.5px; }
.topbar__in { display: flex; justify-content: center; align-items: center; gap: 36px; min-height: 34px; white-space: nowrap; overflow: hidden; }
.topbar__in span:not(:first-child) { display: none; }
.topbar b { color: var(--accent-text); letter-spacing: .04em; }
@media (min-width: 900px) { .topbar__in span { display: inline !important; } }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s, background-color .3s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px rgba(60, 40, 20, .05); }
.header__in {
  display: grid; align-items: center;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "burger logo actions" "search search search";
  gap: 8px 6px; padding-top: 8px; padding-bottom: 10px;
}
.burger { grid-area: burger; margin-left: -8px; }
.logo { grid-area: logo; display: inline-flex; flex-direction: column; line-height: 1; justify-self: start; }
.logo__word { position: relative; font-family: var(--font-head); font-size: 30px; font-weight: 700; letter-spacing: .16em; padding-right: 4px; }
.logo__word i { position: absolute; top: 2px; right: -6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.logo__sub { font-size: 9.5px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.catalog-btn { display: none; grid-area: catalog; }
.header__actions { grid-area: actions; display: flex; align-items: center; gap: 2px; margin-right: -8px; }
.hide-mobile { display: none; }

.search { grid-area: search; position: relative; }
.search input {
  width: 100%; height: 44px; padding: 0 16px 0 44px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 14.5px; outline: none; transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search__ic { position: absolute; left: 15px; top: 11px; width: 21px; height: 21px; color: var(--muted); pointer-events: none; }

.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 70;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 8px; max-height: 70vh; overflow-y: auto;
}
.sg { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 8px; border-radius: 14px; text-align: left; }
.sg:hover, .sg:focus-visible { background: var(--bg-2); outline: none; }
.sg img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: var(--bg-2); }
.sg span { font-size: 13.5px; line-height: 1.3; min-width: 0; }
.sg b { display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2px; }
.sg em { font-style: normal; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.sg-all { width: 100%; padding: 12px; margin-top: 4px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 14px; }
.sg-empty { padding: 18px; color: var(--muted); text-align: center; font-size: 14px; }

.catnav { border-top: 1px solid var(--line); max-height: 48px; overflow: hidden; transition: max-height .3s ease; }
.catnav__in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 4px; padding-bottom: 4px; }
.catnav__in::-webkit-scrollbar { display: none; }
.catnav button { flex: none; padding: 9px 12px; font-size: 14px; font-weight: 600; border-radius: 999px; white-space: nowrap; transition: color .2s, background-color .2s; }
.catnav button:hover { background: var(--bg-2); }
.catnav button.is-accent { color: var(--accent-text); }
@media (max-width: 1023px) { .header.is-scrolled .catnav { max-height: 0; border-top-color: transparent; } }

@media (min-width: 1024px) {
  .header__in {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "logo catalog search actions";
    gap: 22px; padding-top: 14px; padding-bottom: 14px;
  }
  .burger { display: none; }
  .catalog-btn { display: inline-flex; }
  .hide-mobile { display: grid; }
  .logo__word { font-size: 34px; }
  .search input { height: 48px; }
  .search__ic { top: 13px; }
  .catnav__in { justify-content: center; gap: 10px; }
}

/* ---------- Секции ---------- */
.section { padding-top: 36px; padding-bottom: 8px; }
@media (min-width: 768px) { .section { padding-top: 60px; } }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section__head h2 { font-size: clamp(28px, 3.6vw, 44px); }
.count-label { font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0; vertical-align: middle; margin-left: 6px; }
.row-nav { display: none; gap: 8px; }
@media (min-width: 1024px) { .row-nav { display: flex; } }

/* ---------- Баннеры ---------- */
.hero { padding-top: 14px; }
@media (min-width: 768px) { .hero { padding-top: 22px; } }
.hero__wrap { position: relative; }
.hero__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius-lg); overscroll-behavior-x: contain; }
.hero__track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; grid-template-columns: 1fr; overflow: hidden; }
.slide--1 { background: var(--butter); }
.slide--2 { background: var(--champagne); }
.slide--3 { background: var(--accent-soft); }
.slide__media { order: -1; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.slide__media img { width: 100%; height: 100%; object-fit: cover; }
.slide__text { display: flex; flex-direction: column; gap: 10px; padding: 22px 20px 26px; }
.slide__title { font-size: clamp(32px, 5.2vw, 64px); line-height: 1; }
.slide__lead { color: var(--muted); font-size: 15px; max-width: 30em; }
.slide__lead b { color: var(--accent-text); }
.slide__text .btn { margin-top: 6px; }
@media (min-width: 768px) {
  .slide { grid-template-columns: 1.05fr 1fr; min-height: 400px; }
  .slide__media { order: 2; aspect-ratio: auto; position: relative; }
  .slide__media img { position: absolute; inset: 0; }
  .slide__text { justify-content: center; padding: 48px 44px; gap: 14px; }
  .slide__lead { font-size: 16.5px; }
}
@media (min-width: 1200px) { .slide { min-height: 460px; } .slide__text { padding: 56px 72px; } }
.hero__arrow { display: none; position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); place-items: center; transition: transform .2s; }
.hero__arrow:hover { transform: scale(1.06); }
.hero__arrow--prev { left: -20px; }
.hero__arrow--next { right: -20px; }
@media (min-width: 1024px) { .hero__arrow { display: grid; } }
.hero__dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.hero__dots button { width: 8px; height: 8px; border-radius: 4px; background: var(--line); transition: width .3s, background-color .3s; }
.hero__dots button.is-active { width: 28px; background: var(--accent); }

/* ---------- Категории ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
@media (min-width: 768px) { .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; } }
.tile { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.tile__img { width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); padding: 5px; transition: border-color .25s, transform .25s; }
.tile__img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.tile:hover .tile__img { border-color: var(--accent); transform: translateY(-3px); }
.tile__name { font-weight: 700; font-size: 13.5px; line-height: 1.25; margin-top: 6px; }
.tile__count { font-size: 12px; color: var(--muted); }
@media (min-width: 768px) { .tile__name { font-size: 15px; } }

/* ---------- Карточка товара ---------- */
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; scroll-snap-align: start;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.card__media { position: relative; aspect-ratio: 1; background: var(--bg-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card__media img { transform: scale(1.05); }
.card__badges { position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; line-height: 1.3; }
.badge--hit { background: var(--butter); color: var(--butter-ink); }
.badge--new { background: var(--accent-soft); color: var(--accent-text); }
.badge--sale { background: var(--rose); color: var(--rose-ink); }
.fav-btn {
  position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted);
  background: var(--surface); background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: color .2s, transform .2s;
}
.fav-btn .ic { width: 20px; height: 20px; }
.fav-btn:hover { color: var(--accent-text); transform: scale(1.08); }
.fav-btn.is-active { color: var(--accent-text); }
.fav-btn.is-active .ic { fill: currentColor; }
.card__quick {
  position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 9px; border-radius: 999px; text-align: center;
  background: var(--surface); background: color-mix(in srgb, var(--surface) 90%, transparent);
  font-size: 13px; font-weight: 700; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s;
}
.card:hover .card__quick { opacity: 1; transform: none; }
@media (hover: none) { .card__quick { display: none; } }
.card__body { display: flex; flex-direction: column; gap: 3px; flex: 1; padding: 11px 12px 12px; }
@media (min-width: 640px) { .card__body { padding: 14px 16px 16px; } }
.card__brand { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__name { font: 500 14px/1.35 var(--font-body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.card__type { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__rating { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.card__bottom { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 7px; min-width: 0; }
.price b { font-size: 16.5px; font-weight: 800; white-space: nowrap; }
.price s { font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.price__from { font-size: 12px; color: var(--muted); margin-right: -3px; }
.btn-cart { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); transition: background-color .2s, transform .15s; }
.btn-cart .ic { width: 20px; height: 20px; }
.btn-cart:hover { background: var(--accent-hover); transform: scale(1.06); }
.btn-cart.is-added { background: var(--text); color: var(--bg); }

.stars {
  --pct: calc(var(--r) * 20%);
  display: inline-block; flex: none; width: 70px; height: 13px;
  background: linear-gradient(90deg, var(--star) var(--pct), var(--line) var(--pct));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 23'%3E%3Cpath d='M12 .5l3.2 7 7.6.8-5.7 5.1 1.6 7.5L12 17l-6.7 3.9 1.6-7.5L1.2 8.3l7.6-.8z'/%3E%3C/svg%3E") repeat-x 0 0 / 14px 13px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 23'%3E%3Cpath d='M12 .5l3.2 7 7.6.8-5.7 5.1 1.6 7.5L12 17l-6.7 3.9 1.6-7.5L1.2 8.3l7.6-.8z'/%3E%3C/svg%3E") repeat-x 0 0 / 14px 13px;
}

/* ---------- Горизонтальные ленты ---------- */
.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  padding: 4px 16px 10px; margin: -4px -16px 0; scroll-padding: 0 16px;
}
.row::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .row { grid-auto-columns: 31%; gap: 16px; } }
@media (min-width: 768px) { .row { padding: 4px 28px 12px; margin: -4px -28px 0; scroll-padding: 0 28px; } }
@media (min-width: 1024px) { .row { grid-auto-columns: calc((100% - 64px) / 5); gap: 16px; } }

/* ---------- Промо ---------- */
.promos { display: grid; gap: 14px; }
@media (min-width: 768px) { .promos { grid-template-columns: 1fr 1fr; gap: 20px; } }
.promo { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 210px; border-radius: var(--radius-lg); overflow: hidden; }
.promo--champagne { background: var(--champagne); }
.promo--sky { background: var(--accent-soft); }
.promo__text { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 22px 18px 22px 22px; }
.promo__text h3 { font-size: clamp(24px, 2.6vw, 34px); }
.promo__text p { color: var(--muted); font-size: 14px; }
.promo__text .link-more { margin-top: 6px; }
.promo__media { overflow: hidden; background: var(--bg-2); }
.promo__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.promo:hover .promo__media img { transform: scale(1.04); }
@media (min-width: 1024px) { .promo { min-height: 260px; } .promo__text { padding: 32px 28px 32px 36px; } }

/* ---------- Бренды ---------- */
.brands { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-pill { padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-family: var(--font-head); font-size: 19px; font-weight: 600; line-height: 1.2; transition: border-color .2s, color .2s, transform .2s; }
.brand-pill:hover { border-color: var(--accent); color: var(--accent-text); transform: translateY(-2px); }
@media (min-width: 1024px) { .brand-pill { font-size: 22px; padding: 12px 24px; } }

/* ---------- Каталог ---------- */
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .chips { flex-wrap: wrap; margin: 0; padding: 0; } }
.chip { flex: none; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background-color .2s, border-color .2s, color .2s; }
.chip:hover { border-color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.filters__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 768px) { .filters__row { display: flex; } }
.select {
  -webkit-appearance: none; appearance: none; height: 42px; min-width: 0; width: 100%; padding: 0 36px 0 16px;
  border-radius: 999px; border: 1px solid var(--line); background-color: var(--surface); font-size: 13.5px; font-weight: 600; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23958A7F' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 14px;
}
@media (min-width: 768px) { .select { width: auto; } }
.select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 700; }
.tag .ic { width: 16px; height: 16px; }
.tag--reset { background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding-left: 6px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.more { display: flex; justify-content: center; margin-top: 24px; }
.empty { grid-column: 1 / -1; }

/* ---------- Состояния (пусто/успех) ---------- */
.state { display: grid; justify-items: center; gap: 10px; padding: 40px 12px; text-align: center; }
.state h3 { font-size: 28px; }
.state p { color: var(--muted); max-width: 32em; }
.state .btn { margin-top: 8px; }
.state__icon { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 4px; }
.state__icon .ic { width: 38px; height: 38px; }
.note { font-size: 12.5px; color: var(--muted); background: var(--bg-2); padding: 10px 14px; border-radius: 12px; }

/* ---------- Преимущества / рассылка ---------- */
.benefits { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .benefits { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .benefits { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.benefit { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.benefit__ic { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.benefit b { display: block; font-size: 15px; margin-bottom: 2px; }
.benefit p { font-size: 13px; color: var(--muted); }
.newsletter { display: grid; gap: 18px; padding: 28px 20px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--butter), var(--champagne)); }
.newsletter h2 { font-size: clamp(26px, 3.2vw, 40px); margin-bottom: 6px; }
.newsletter p { color: var(--muted); }
.newsletter__form { display: grid; gap: 10px; }
@media (min-width: 768px) {
  .newsletter { grid-template-columns: 1.2fr 1fr; align-items: center; padding: 44px; gap: 32px; }
  .newsletter__form { grid-template-columns: 1fr auto; }
}

/* ---------- Поля ввода ---------- */
.input {
  width: 100%; height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input--area { height: auto; padding: 12px 16px; resize: vertical; min-height: 76px; }
.newsletter .input { border-radius: 999px; padding: 0 20px; }

/* ---------- Футер ---------- */
.footer { margin-top: 64px; background: var(--bg-2); border-top: 1px solid var(--line); }
.footer__in { display: grid; gap: 28px; padding-top: 40px; padding-bottom: 28px; grid-template-columns: 1fr 1fr; }
.footer__brand { grid-column: 1 / -1; display: grid; gap: 12px; }
.footer__brand p { color: var(--muted); font-size: 14px; max-width: 26em; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 14px; }
.footer__col > div { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer__col h4 { font-family: var(--font-body); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.footer__col button { text-align: left; transition: color .2s; }
.footer__col button:hover { color: var(--accent-text); }
.footer__bottom { padding-top: 18px; padding-bottom: 24px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
@media (min-width: 768px) {
  .footer__in { grid-template-columns: 1.4fr 1fr 1fr 1fr; padding-top: 56px; }
  .footer__brand { grid-column: auto; }
}
@media (max-width: 479px) { .footer__col:last-child { grid-column: 1 / -1; } }

/* ---------- Нижняя навигация (телефон) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: var(--surface); background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar > button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; font-size: 11px; font-weight: 600; color: var(--muted); }
.tabbar > button:hover, .tabbar > button:active { color: var(--accent-text); }
.tabbar__ic { position: relative; display: grid; place-items: center; width: 32px; height: 28px; }
.tabbar .count { top: -3px; right: -6px; }
@media (min-width: 1024px) { .tabbar { display: none; } }

/* ---------- Слои: затемнение, модалка, шторки ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: var(--overlay); opacity: 0; pointer-events: none; transition: opacity .3s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.overlay.is-open { opacity: 1; pointer-events: auto; }
.layer { position: fixed; z-index: 90; visibility: hidden; transition: transform .38s cubic-bezier(.2, .8, .2, 1), opacity .3s, visibility 0s linear .38s; }
.layer.is-open { visibility: visible; transition-delay: 0s; }

.drawer { top: 0; right: 0; bottom: 0; width: min(440px, 100%); display: flex; flex-direction: column; background: var(--bg); box-shadow: var(--shadow-lg); transform: translateX(100%); }
.drawer.is-open { transform: none; }
.drawer--left { left: 0; right: auto; width: min(380px, 92%); transform: translateX(-100%); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 28px; }
.drawer__head sup { font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--accent-text); }
.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 24px; }
.drawer__foot { padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }

.modal { inset: 0; display: grid; place-items: center; padding: 24px; pointer-events: none; opacity: 0; }
.modal.is-open { opacity: 1; }
.modal__box {
  position: relative; width: min(1100px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-radius: 28px; box-shadow: var(--shadow-lg);
  pointer-events: auto; transform: translateY(24px) scale(.98); transition: transform .38s cubic-bezier(.2, .8, .2, 1);
}
.modal.is-open .modal__box { transform: none; }
.modal__bar { position: sticky; top: 0; height: 0; z-index: 5; display: flex; justify-content: flex-end; }
.modal__close { margin: 12px 12px 0 0; background: var(--surface); box-shadow: var(--shadow); }
.modal__close:hover { background: var(--surface); transform: rotate(90deg); transition: transform .3s; }
@media (max-width: 767px) {
  .modal { padding: 0; place-items: end stretch; }
  .modal__box { width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 24px 24px 0 0; transform: translateY(100%); }
}

/* ---------- Содержимое карточки ---------- */
.pm { display: grid; gap: 22px; padding: 16px 16px 28px; }
@media (min-width: 860px) { .pm { grid-template-columns: 1.02fr 1fr; gap: 44px; padding: 36px 40px 40px; } }
.pm__gallery { min-width: 0; }
@media (min-width: 860px) { .pm__gallery { position: sticky; top: 24px; align-self: start; } }
.pm__main { position: relative; aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: var(--bg-2); }
.pm__main img { width: 100%; height: 100%; object-fit: cover; animation: fade .35s ease; }
.pm__main .card__badges { top: 14px; left: 14px; }
@keyframes fade { from { opacity: .3; } to { opacity: 1; } }
.pm__thumbs { display: flex; gap: 10px; margin-top: 12px; }
.pm__thumb { width: 68px; height: 68px; border-radius: 14px; overflow: hidden; border: 2px solid transparent; opacity: .65; transition: opacity .2s, border-color .2s; background: var(--bg-2); }
.pm__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pm__thumb:hover { opacity: 1; }
.pm__thumb.is-active { border-color: var(--accent); opacity: 1; }
.pm__info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pm__brand { align-self: flex-start; font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }
.pm__name { font-size: clamp(30px, 3.4vw, 44px); padding-right: 40px; }
.pm__type { color: var(--muted); font-size: 14px; }
.pm__rating { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.pm__rating b { color: var(--text); }
.pm__price { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; }
.pm__price b { font-size: 30px; font-weight: 800; }
.pm__price s { font-size: 16px; color: var(--faint); }
.pm__label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.vols { display: flex; flex-wrap: wrap; gap: 8px; }
.vol { padding: 9px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; font-size: 14px; font-weight: 700; transition: border-color .2s, background-color .2s; }
.vol small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.vol:hover { border-color: var(--accent); }
.vol.is-active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.buy { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.buy .btn { flex: 1; min-width: 0; }
.fav-btn--lg { position: static; flex: none; width: 48px; height: 48px; border: 1px solid var(--line); background: var(--surface); }
.fav-btn--lg .ic { width: 22px; height: 22px; }
.qty { display: inline-flex; align-items: center; flex: none; height: 48px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.qty button { width: 40px; height: 100%; display: grid; place-items: center; border-radius: 999px; transition: color .2s; }
.qty button:hover:not(:disabled) { color: var(--accent-text); }
.qty button:disabled { opacity: .35; cursor: default; }
.qty button .ic { width: 18px; height: 18px; }
.qty output { min-width: 24px; text-align: center; font-weight: 800; }
.qty--sm { height: 36px; }
.qty--sm button { width: 32px; }
.perks { list-style: none; margin: 8px 0 4px; padding: 14px 16px; display: grid; gap: 10px; border-radius: 16px; background: var(--bg-2); font-size: 13.5px; }
.perks li { display: flex; align-items: center; gap: 10px; }
.perks .ic { width: 20px; height: 20px; color: var(--accent-text); }
.acc { border-top: 1px solid var(--line); }
.acc:last-of-type { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 0; font-weight: 700; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '+'; font-size: 22px; font-weight: 400; line-height: 1; color: var(--accent-text); transition: transform .25s; }
.acc[open] summary::after { transform: rotate(45deg); }
.acc p { padding-bottom: 16px; color: var(--muted); font-size: 14.5px; }
.specs { margin: 0 0 16px; display: grid; gap: 8px; font-size: 14px; }
.specs div { display: grid; grid-template-columns: 42% 1fr; gap: 12px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.pm__related { grid-column: 1 / -1; min-width: 0; }
.pm__related h3 { font-size: 28px; margin-bottom: 14px; }
.pm__related .row { margin: -4px -16px 0; padding: 4px 16px 10px; }
@media (min-width: 640px) { .pm__related .row { grid-auto-columns: 31%; } }
@media (min-width: 860px) { .pm__related .row { margin: -4px 0 0; padding: 4px 0 10px; grid-auto-columns: calc((100% - 48px) / 4); } }

/* ---------- Корзина ---------- */
.ship { padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; }
.ship b { color: var(--accent-text); }
.ship__bar { height: 6px; margin-top: 8px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.ship__bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .4s ease; }
.ship--ok { display: flex; align-items: center; gap: 8px; }
.ship--ok .ic { color: var(--accent-text); width: 20px; height: 20px; }
.cart-list { list-style: none; margin: 4px 0 0; padding: 0; }
.ci { display: grid; grid-template-columns: 80px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); animation: fade .3s ease; }
.ci__img { width: 80px; height: 80px; border-radius: 14px; overflow: hidden; background: var(--bg-2); }
.ci__img img { width: 100%; height: 100%; object-fit: cover; }
.ci__info { min-width: 0; display: flex; flex-direction: column; }
.ci__top { display: flex; justify-content: space-between; gap: 8px; }
.ci__brand { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ci__name { display: block; text-align: left; font-size: 14px; font-weight: 500; line-height: 1.3; }
.ci__name:hover { color: var(--accent-text); }
.ci__meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ci__remove { flex: none; width: 32px; height: 32px; margin: -4px -6px 0 0; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.ci__remove:hover { color: var(--rose-ink); background: var(--rose); }
.ci__remove .ic { width: 18px; height: 18px; }
.ci__bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.ci__price { text-align: right; line-height: 1.2; }
.ci__price b { display: block; font-weight: 800; white-space: nowrap; }
.ci__price s { font-size: 12px; color: var(--faint); white-space: nowrap; }
.promo-form { display: flex; gap: 8px; margin-top: 18px; }
.promo-form .input { height: 46px; }
.promo-form .btn { height: 46px; padding: 0 18px; }
.promo-hint { margin-top: 8px; font-size: 13px; color: var(--muted); }
.promo-hint button { color: var(--accent-text); font-weight: 800; text-decoration: underline dotted; text-underline-offset: 3px; }
.promo-hint.is-error { color: var(--rose-ink); }
.promo-ok { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); font-size: 13.5px; }
.promo-ok .ic { color: var(--accent-text); width: 20px; height: 20px; }
.promo-ok span { flex: 1; }
.promo-ok button { color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.summary { margin: 0 0 14px; display: grid; gap: 6px; font-size: 14px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
.summary .is-save dd { color: var(--accent-text); }
.summary__total { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 18px; }
.summary__total dt { color: var(--text); font-weight: 700; }
.summary__total dd { font-weight: 800; }
.summary--plain { width: 100%; max-width: 360px; text-align: left; margin: 8px 0; }

.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; font-size: 14px; font-weight: 700; color: var(--accent-text); }
.back .ic { width: 18px; height: 18px; }
.form { display: grid; gap: 14px; }
.form__title { font-size: 22px; margin-top: 8px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.field i { font-style: normal; font-weight: 500; color: var(--muted); }
.field__err { display: none; color: var(--rose-ink); font-weight: 600; font-size: 12.5px; }
.field.is-error .input { border-color: var(--rose-ink); }
.field.is-error .field__err { display: block; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .2s, background-color .2s; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt input { width: 18px; height: 18px; accent-color: var(--accent-text); flex: none; margin: 0; }
.opt b { display: block; font-size: 14px; }
.opt small { display: block; font-size: 12.5px; color: var(--muted); }

/* ---------- Меню ---------- */
.menu__title { font-size: 22px; margin: 6px 0 10px; }
.menu__title:not(:first-child) { margin-top: 26px; }
.menu__list { display: grid; gap: 4px; }
.menu__item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 8px; border-radius: 16px; text-align: left; font-weight: 700; font-size: 15px; transition: background-color .2s; }
.menu__item:hover { background: var(--bg-2); }
.menu__item img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--bg-2); }
.menu__item span { flex: 1; }
.menu__item small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.menu__item .ic { color: var(--faint); width: 18px; height: 18px; }
.menu__item.is-accent { color: var(--accent-text); }
.menu__badge { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.menu__badge .ic { color: inherit; width: 22px; height: 22px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-2); }
.seg button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 4px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--muted); transition: background-color .2s, color .2s; }
.seg button .ic { width: 17px; height: 17px; }
.seg button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.menu__note { margin-top: 10px; font-size: 12.5px; color: var(--muted); }

/* ---------- Уведомления ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 120;
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); width: max-content;
  padding: 12px 14px 12px 16px; border-radius: 16px; background: var(--text); color: var(--bg);
  font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transform: translate(-50%, 16px); transition: opacity .25s, transform .3s cubic-bezier(.2, .8, .2, 1);
}
.toast.is-show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.toast .ic { width: 20px; height: 20px; color: var(--toast-accent); }
.toast button { color: var(--toast-accent); font-weight: 800; white-space: nowrap; margin-left: 4px; }
@media (min-width: 1024px) { .toast { bottom: 28px; } }
