/* SellFiesta — витрина.
 *
 * Палитра взята у существующего магазина, чтобы покупатель не увидел
 * чужой сайт: тёплая бумага и фиолетовый акцент. Акцент используется
 * скупо — на действиях и цене со скидкой; всё остальное держат
 * фотографии и воздух.
 *
 * Мобильный вид первый: в каталог заходят с телефона из TikTok.
 */

:root {
  --paper: #f7f4ef;
  --surface: #fffdfa;
  --surface-2: #f1ece4;
  --ink: #16130f;
  --ink-soft: #3d3730;
  --muted: #6e655c;
  --line: #e6dfd5;
  --line-soft: #efe9e0;

  --accent: #6a1fe0;
  --accent-hover: #5a17c4;
  --accent-soft: #f0e8ff;
  --accent-ink: #ffffff;

  --warn: #b23a1f;
  --ok: #2f6f4f;
  --ok-soft: #e6f2ea;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(22, 19, 15, .05), 0 10px 30px rgba(22, 19, 15, .06);
  --shadow-sm: 0 1px 2px rgba(22, 19, 15, .06);

  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: "Unbounded", var(--sans);

  --header-h: 60px;
}

/* Тёмная тема больше не включается сама по настройке телефона: владелец
 * выбрал светлую как лицо магазина — на ней фотографии товара выглядят
 * так, как выглядят. Кто хочет тёмную, включает её кнопкой в шапке, и
 * выбор запоминается. Поэтому здесь `[data-theme="dark"]`, а не
 * `prefers-color-scheme`. */
@media (prefers-color-scheme: dark) {
  :root[data-theme="__nikogda__"] {
    --paper: #17151a;
    --surface: #1f1c22;
    --surface-2: #262229;
    --ink: #f3efe9;
    --ink-soft: #d8d2ca;
    --muted: #a9a19a;
    --line: #2e2a33;
    --line-soft: #272430;

    --accent: #c9a6ff;
    --accent-hover: #dcc4ff;
    --accent-soft: #2a2136;
    --accent-ink: #1a1420;

    --warn: #e8836a;
    --ok: #63c08f;
    --ok-soft: #163024;

    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .3);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

:root[data-theme="dark"] {
  --paper: #17151a;
  --surface: #1f1c22;
  --surface-2: #262229;
  --ink: #f3efe9;
  --ink-soft: #d8d2ca;
  --muted: #a9a19a;
  --line: #2e2a33;
  --line-soft: #272430;
  --accent: #c9a6ff;
  --accent-hover: #dcc4ff;
  --accent-soft: #2a2136;
  --accent-ink: #1a1420;
  --warn: #e8836a;
  --ok: #63c08f;
  --ok-soft: #163024;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── шапка ───────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header__bar {
  height: var(--header-h);
  display: flex; align-items: center; gap: 14px;
}
.logo {
  font-family: var(--display);
  font-weight: 700; font-size: 17px; letter-spacing: -.02em;
  white-space: nowrap;
}
.logo em { font-style: normal; color: var(--accent); }

.nav { display: none; gap: 4px; margin-left: 10px; }
@media (min-width: 900px) { .nav { display: flex; } }
.nav a {
  padding: 7px 12px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
  color: var(--ink-soft); transition: background .16s, color .16s;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.on { background: var(--ink); color: var(--paper); }

.header__right { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.iconbtn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 999px; background: none;
  cursor: pointer; position: relative; transition: background .16s;
}
.iconbtn:hover { background: var(--surface-2); }
.iconbtn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }

.badge {
  position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
}

.langs { display: flex; gap: 2px; font-size: 12.5px; font-weight: 600; }
.langs a {
  padding: 5px 8px; border-radius: 6px; color: var(--muted);
}
.langs a.on { color: var(--ink); background: var(--surface-2); }

/* поиск в шапке */
.searchbar { flex: 1; max-width: 380px; display: none; }
@media (min-width: 760px) { .searchbar { display: block; } }
.searchbar input {
  width: 100%; height: 38px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); font-size: 14.5px;
}
.searchbar input::placeholder { color: var(--muted); }

/* полоса категорий на телефоне */
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px;
  border-bottom: 1px solid var(--line); scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .chips { display: none; } }
.chips a {
  flex: none; padding: 7px 14px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 13.5px; font-weight: 500; background: var(--surface);
  white-space: nowrap;
}
.chips a.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── типографика ─────────────────────────────────────────── */
h1, h2, h3 { margin: 0; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.1; }
h2 { font-size: clamp(1.15rem, 3vw, 1.5rem); line-height: 1.2; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 12px; }

.section { padding: 34px 0; }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.section__head h2 { font-family: var(--display); font-weight: 600; }
.section__head a { font-size: 14px; color: var(--muted); font-weight: 500; }
.section__head a:hover { color: var(--accent); }

/* ── главная ─────────────────────────────────────────────── */
/* Большого первого экрана здесь нет нарочно: магазин открывается
   товарами. Осталась узкая служебная полоса — соцсети и индивидуальный
   заказ, — и она не должна отнимать высоту у витрины. */
.utility { border-bottom: 1px solid var(--line); background: var(--surface); }
.utility__bar { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; }
@media (min-width: 720px) { .utility__bar { padding: 10px 28px; } }

/* Порядок на телефоне: поиск → индивидуальный заказ → соцсети.
   На большом экране поиск живёт в шапке, соцсети уходят влево. */
.utility__search { order: 1; position: relative; }
.usercall { order: 2; }
.socials { order: 3; }

.utility__search svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 1.7;
  pointer-events: none;
}
.utility__search input {
  width: 100%; height: 44px; padding: 0 14px 0 38px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--ink);
}
.utility__search input::placeholder { color: var(--muted); }

/* На телефоне это одна строка: заголовок и стрелка. Пояснение ждёт на той
   стороне, куда ведёт кнопка, — три строки текста здесь отняли бы у
   витрины пол-экрана. На большом экране места хватает, там наоборот. */
.usercall {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  padding: 9px 10px 9px 14px; border-radius: var(--radius);
  border: 1px solid var(--accent); background: var(--accent-soft); color: var(--ink);
}
.usercall:hover { border-color: var(--accent-hover); }
.usercall__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.usercall__text b { font-size: 14.5px; font-weight: 700; }
.usercall__text span { display: none; font-size: 13px; color: var(--ink-soft); }
/* На телефоне вместо кнопки стрелка: строка целиком и есть ссылка, а
   «Užsakyti individualiai» рядом с тем же заголовком занимало полполосы
   и переносило его на вторую строку. */
.usercall::after {
  content: "→"; flex: none; margin-right: 4px;
  font-size: 17px; font-weight: 700; color: var(--accent);
}
.usercall__btn {
  flex: none; display: none; align-items: center; height: 34px; padding: 0 14px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}

.socials { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.socials__title {
  display: none;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin-right: 4px;
}
.socials a {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  color: var(--ink-soft); font-size: 13px; font-weight: 500;
  transition: border-color .16s, color .16s;
}
.socials a:hover { border-color: var(--accent); color: var(--accent); }
.socials svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.6; }

@media (min-width: 760px) {
  .utility__bar { flex-direction: row; align-items: center; gap: 18px; }
  .utility__search { display: none; }
  .socials { order: 1; }
  .usercall { order: 2; margin-left: auto; padding: 6px 6px 6px 14px; gap: 12px; }
  .socials__title { display: inline; }
  .usercall::after { display: none; }
  .usercall__btn { display: inline-flex; }
  /* В одну строку: полоса служебная и высоту у витрины отнимать не
     должна. Заголовок убираем — его же слово стоит на кнопке. Но только
     если пояснение вписано: пустая кнопка без подписи хуже двух строк. */
  .usercall__text span { display: block; font-size: 13.5px; }
  .usercall__text:has(span) b { display: none; }
}

.section--tight { padding: 26px 0 6px; }
.section__intro { color: var(--muted); font-size: 14.5px; margin: 0; }
.section__head h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 3.4vw, 1.75rem); }

/* Новинки: на телефоне лента вбок, на большом экране обычная сетка.
   Восемь карточек в столбик оттолкнули бы каталог за третий экран. */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 46%;
  gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px; margin: 0 -16px; padding-inline: 16px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 620px) {
  .rail {
    grid-auto-flow: row; grid-template-columns: repeat(3, 1fr);
    gap: 22px 18px; overflow: visible; margin: 0; padding-inline: 0;
  }
}
@media (min-width: 980px) { .rail { grid-template-columns: repeat(4, 1fr); } }

/* Переключатель разделов над каталогом. */
.tabs {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px 18px; padding: 0 16px 2px;
}
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .tabs { margin: 0 0 20px; padding: 0 0 2px; flex-wrap: wrap; } }
.tabs a {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-soft); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.tabs a:hover { border-color: var(--ink); color: var(--ink); }
.tabs a.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tabs a i { font-style: normal; font-size: 12px; opacity: .6; font-variant-numeric: tabular-nums; }

/* ── кнопки ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  transition: background .16s, transform .1s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn--ghost { background: none; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--ink); }
.btn--block { width: 100%; }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }

/* ── сетка товаров ───────────────────────────────────────── */
.grid {
  display: grid; gap: 14px 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 22px 18px; } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card { position: relative; }
.card__media {
  position: relative; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--radius); background: var(--surface-2);
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}
@media (hover: hover) and (pointer: fine) {
  .card:hover .card__media img { transform: scale(1.045); }
}
.card__body { padding: 10px 2px 0; }
.card__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;
}
.card__price { margin-top: 4px; display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.card__price b { font-size: 15px; font-weight: 700; }
.card__price s { font-size: 13px; color: var(--muted); }
.card__sizes { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.card__sizes span {
  font-size: 11px; font-weight: 600; padding: 2px 6px;
  border: 1px solid var(--line); border-radius: 4px; color: var(--muted);
}

.flag {
  position: absolute; top: 9px; left: 9px; z-index: 2;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  background: var(--ink); color: var(--paper);
}
.flag--sale { background: var(--accent); color: var(--accent-ink); }
.flag--defect { background: var(--warn); color: #fff; }
.flag--out { background: color-mix(in srgb, var(--ink) 70%, transparent); }

/* ── каталог ─────────────────────────────────────────────── */
.catalog { display: grid; gap: 24px; }
@media (min-width: 980px) { .catalog { grid-template-columns: 232px 1fr; gap: 36px; } }

.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.toolbar__count { font-size: 14px; color: var(--muted); }
.toolbar select, .filters select {
  height: 38px; padding: 0 32px 0 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
  font-size: 14px; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}

.filters { align-self: start; }
@media (max-width: 979px) {
  .filters {
    position: fixed; inset: 0; z-index: 90; background: var(--paper);
    padding: 16px; overflow-y: auto; display: none;
  }
  .filters.open { display: block; }
  .filters__close { display: flex; }
}
@media (min-width: 980px) {
  .filters { position: sticky; top: calc(var(--header-h) + 16px); }
  .filters__close, .filters__open { display: none !important; }
}
.filters__close {
  align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.fgroup { padding: 14px 0; border-bottom: 1px solid var(--line); }
.fgroup:last-of-type { border-bottom: 0; }
.fgroup h3 {
  font-size: 12px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px; font-weight: 600;
}
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.sizes label { cursor: pointer; }
.sizes input { position: absolute; opacity: 0; pointer-events: none; }
.sizes span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 36px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 13.5px; font-weight: 600;
  transition: border-color .14s, background .14s;
}
.sizes input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sizes input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.prices { display: flex; align-items: center; gap: 8px; }
.prices input {
  width: 100%; height: 38px; padding: 0 10px; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-variant-numeric: tabular-nums;
}
.check { display: flex; align-items: center; gap: 9px; font-size: 14.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ── страница входа ──────────────────────────────────────── */
.signin {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin-top: 26px; padding: 24px 20px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.signin__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; max-width: 300px; height: 46px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font-size: 15px; font-weight: 600;
}
.signin__btn:hover { border-color: var(--ink); }
.signin__btn svg { width: 19px; height: 19px; }
.signin__or {
  font-size: 12.5px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .08em;
}
.signin__tg { min-height: 46px; display: flex; align-items: center; }
.signin__hint {
  margin: 0; font-size: 12.5px; color: var(--muted); text-align: center;
  max-width: 34ch;
}

/* ── профиль покупателя ──────────────────────────────────── */
.pill--ok { border-color: var(--ok); color: var(--ok); }

.orders { display: flex; flex-direction: column; }
.orders__row {
  display: grid; gap: 4px 14px; padding: 12px 0;
  border-bottom: 1px solid var(--line-soft); color: var(--ink);
  grid-template-columns: 1fr auto;
  grid-template-areas: "no sum" "when when" "state state";
}
@media (min-width: 700px) {
  .orders__row {
    align-items: center; grid-template-columns: 150px 110px 1fr auto;
    grid-template-areas: "no when state sum";
  }
}
.orders__row:last-child { border-bottom: 0; }
.orders__row:hover { color: var(--accent); }
.orders__no { grid-area: no; font-weight: 600; font-variant-numeric: tabular-nums; }
.orders__when { grid-area: when; font-size: 13px; color: var(--muted); }
.orders__state { grid-area: state; display: flex; gap: 6px; flex-wrap: wrap; }
.orders__sum { grid-area: sum; font-weight: 700; font-variant-numeric: tabular-nums; }

.acc-form { display: flex; flex-direction: column; gap: 4px; }
.acc-form input, .acc-form select {
  height: 44px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
  font: inherit; margin-bottom: 10px;
}
.ident { display: flex; gap: 6px; flex-wrap: wrap; }

/* Ссылка, которая нужна, но не должна звать. */
/* Предложение войти над формой оформления. Тон приглушённый нарочно:
   это подсказка, а не условие покупки. */
.ident__why { margin: 12px 0 10px; font-size: 13.5px; color: var(--muted); max-width: 52ch; }

.signedin {
  margin: 0 0 18px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--muted); font-size: 13.5px;
}
.signedin a { color: var(--accent); font-weight: 600; text-decoration: underline; }

.quietlink { margin: 26px 0 0; font-size: 13px; }
.quietlink a { color: var(--muted); text-decoration: underline; }
.quietlink a:hover { color: var(--ink); }

/* ── товар партнёра ──────────────────────────────────────── */
/* Продаём не мы — и это должно быть видно сразу, а не мелким шрифтом
   внизу: у покупателя договор не с нами и деньги идут не нам. */
.byseller {
  display: flex; flex-direction: column; gap: 6px; margin-top: 22px;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface-2);
}
.byseller > b { font-size: 15.5px; }
.byseller__iv { font-size: 12.5px; color: var(--muted); }
.byseller p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.byseller__own { color: var(--muted) !important; font-style: italic; }
.byseller__acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.flag--partner { background: var(--ink-soft); color: var(--paper); }

/* ── как платим ──────────────────────────────────────────── */
/* Не переключатель: способ один и задан в настройках. Переключатель с
   единственным пунктом обманывает глаз — человек ищет второй. */
.payway {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; border: 1px solid var(--accent);
  border-radius: var(--radius); background: var(--accent-soft);
}
.payway > b { font-size: 15px; }
.payway > span { font-size: 13.5px; color: var(--ink-soft); }
.payway__methods { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.payway__label {
  font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin-right: 2px;
}
.payway__chip {
  padding: 3px 9px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-size: 12.5px; font-weight: 500;
}
.payway__hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* ── панель и сообщение ──────────────────────────────────── */
/* Страница возврата и подобные ей: тот же прямоугольник, что у итога
   корзины. Отдельный класс, потому что `.card` в витрине — это карточка
   товара, а не панель. */
.panel {
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.panel h2 { font-size: 1.05rem; margin: 0 0 12px; }
.msg {
  padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: 14.5px; margin: 18px 0;
}
.msg--ok { border-color: var(--ok); color: var(--ok); background: none; }
.msg--warn { border-color: var(--warn); color: var(--warn); background: none; }

.field-block { display: block; font-weight: 600; margin-bottom: 6px; }
.textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--ink);
  font: inherit; resize: vertical;
}
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; }
.choice small { color: var(--muted); }

.empty { padding: 60px 0; text-align: center; color: var(--muted); }
.empty h2 { color: var(--ink); margin-bottom: 8px; }

.pager { display: flex; justify-content: center; gap: 6px; margin-top: 34px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; background: var(--surface);
}
.pager .on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── карточка товара ─────────────────────────────────────── */
.product { display: grid; gap: 26px; padding: 22px 0 50px; }
@media (min-width: 900px) { .product { grid-template-columns: 1.15fr 1fr; gap: 48px; } }

.gallery__main {
  aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line-soft);
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumbs button {
  flex: none; width: 66px; height: 66px; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
}
.gallery__thumbs button[aria-current="true"] { border-color: var(--ink); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pinfo__cat { font-size: 13px; color: var(--muted); }
.pinfo h1 { margin: 6px 0 14px; font-size: clamp(1.4rem, 4vw, 2rem); }
.pinfo__price { display: flex; align-items: baseline; gap: 12px; font-variant-numeric: tabular-nums; }
.pinfo__price b { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
.pinfo__price s { color: var(--muted); font-size: 1.05rem; }
.pinfo__price .off {
  font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}

.stock { margin-top: 12px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock--in { color: var(--ok); }
.stock--few { color: var(--warn); }
.stock--out { color: var(--muted); }

.picker { margin-top: 22px; }
.picker h3 { font-size: 13px; font-weight: 600; margin-bottom: 9px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 40px; height: 44px; background: none; border: 0; cursor: pointer; font-size: 18px; }
.qty button:hover { background: var(--surface-2); }
.qty input {
  width: 44px; height: 44px; border: 0; text-align: center; background: none;
  color: var(--ink); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.buyrow { display: flex; gap: 10px; margin-top: 18px; align-items: center; }
.buyrow .btn { flex: 1; height: 50px; }

.acc { margin-top: 26px; border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary {
  padding: 15px 0; cursor: pointer; font-weight: 600; font-size: 15px;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 19px; color: var(--muted); font-weight: 400; }
.acc details[open] summary::after { content: "−"; }
.acc .body { padding: 0 0 16px; color: var(--ink-soft); font-size: 14.5px; white-space: pre-line; }
.acc dl { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.acc dt { color: var(--muted); }
.acc dd { margin: 0; }

.notice {
  margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
  font-size: 14px; color: var(--ink);
}

/* ── корзина и оформление ────────────────────────────────── */
.page { padding: 26px 0 60px; }
.page > h1 { margin-bottom: 22px; font-family: var(--display); font-weight: 600; }

.cols { display: grid; gap: 26px; }
@media (min-width: 900px) { .cols { grid-template-columns: 1fr 340px; gap: 40px; align-items: start; } }

.lines { border-top: 1px solid var(--line); }
.line {
  display: grid; grid-template-columns: 76px 1fr auto; gap: 14px;
  padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start;
}
.line__img { width: 76px; height: 76px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.line__img img { width: 100%; height: 100%; object-fit: cover; }
.line__name { font-weight: 600; font-size: 15px; }
.line__meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.line__price { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line__ctl { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.line__ctl form { display: inline-flex; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline; }
.linkbtn:hover { color: var(--warn); }

.summary {
  padding: 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
@media (min-width: 900px) { .summary { position: sticky; top: calc(var(--header-h) + 20px); } }
.summary__row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: 14.5px; }
.summary__row span:last-child { font-variant-numeric: tabular-nums; }
.summary__total {
  margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: baseline;
  font-weight: 700; font-size: 1.15rem;
}
.summary .btn { margin-top: 16px; }
.summary__note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: 15px; font-family: inherit;
}
.field textarea { height: auto; padding: 12px 14px; min-height: 88px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
/* Выбор файла рисует браузер, и высота у него своя: 46 пикселей режут
   кнопку «Обзор» пополам. */
.field input[type="file"] { height: auto; padding: 10px 12px; font-size: 13.5px; }
.field__note { font-size: 12.5px; color: var(--muted); }
.fieldset { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.fieldset > h2 { font-size: 1rem; margin-bottom: 14px; }
.row2 { display: grid; gap: 16px; }

/* способы доставки */
.ways { display: grid; gap: 8px; }
.way {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer; transition: border-color .14s;
}
.way:hover { border-color: var(--muted); }
.way.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.way input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.way__body b { display: block; font-size: 14.5px; font-weight: 600; }
.way__body small { color: var(--muted); font-size: 12.5px; }
.way__price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 620px) { .row2 { grid-template-columns: 1fr 1fr; } }

.alert {
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px;
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 34%, transparent);
}

/* ── заказ ───────────────────────────────────────────────── */
.done { text-align: center; padding: 36px 0 10px; }
.done .mark {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
  font-size: 26px;
}
.done h1 { font-family: var(--display); font-weight: 600; }
.done p { color: var(--muted); margin-top: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.pill {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 13.5px; font-weight: 600;
}
.pill b { font-variant-numeric: tabular-nums; }

/* «Следите за нами» на странице оплаченного заказа. Тон приглушённый
   нарочно: человек пришёл сюда за номером заказа, а не за нами. */
.follow {
  margin-top: 34px; padding: 20px 22px;
  display: grid; gap: 16px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.follow h2 { font-size: 1.05rem; margin: 0; }
.follow p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.follow__note { font-size: 13px; }
.follow__links { display: flex; flex-wrap: wrap; gap: 8px; }
.follow__links a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13.5px; font-weight: 600; background: var(--surface-2);
}
.follow__links a:hover { border-color: var(--accent); color: var(--accent); }
.follow__links svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.6; }

@media (min-width: 720px) {
  .follow { grid-template-columns: 1fr auto; gap: 24px; }
  .follow__links { justify-content: flex-end; }
}

/* ── текстовые страницы ──────────────────────────────────── */
.prose { max-width: 68ch; }
.prose h2 { margin: 26px 0 10px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose dl { display: grid; grid-template-columns: minmax(140px, auto) 1fr; gap: 8px 20px; }
.prose dt { color: var(--muted); }
.prose dd { margin: 0; }

/* ── подвал ──────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 34px 0 40px; background: var(--surface); }
.footer__grid { display: grid; gap: 26px; }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; } }
.footer h3 { font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer a { font-size: 14.5px; color: var(--ink-soft); }
.footer a:hover { color: var(--accent); }
.footer__legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* ── cookie ──────────────────────────────────────────────── */
.cookie {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 95;
  max-width: 520px; margin: 0 auto; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
}
.cookie h3 { font-size: 15px; margin-bottom: 6px; }
.cookie p { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.cookie__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── служебное ───────────────────────────────────────────── */
.envbar {
  background: var(--accent); color: var(--accent-ink);
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  text-align: center; padding: 5px 10px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Вход в админку с витрины. Виден только вошедшему — цветом отделён от
   покупательских кнопок, чтобы не нажать его вместо корзины. */
.iconbtn--admin { color: var(--accent); }
.iconbtn--admin:hover { color: var(--accent); opacity: .8; }

/* Почему в корзине не сто. Молчаливая поправка хуже отказа: покупатель
   считает, что взял сто, и узнаёт правду на странице оплаты. */
.qtynote {
  margin: 8px 0 0; font-size: 13px; color: var(--warn);
}


/* ── переключатель темы ─────────────────────────────────────
 *
 * Кнопка одна, а не две: показывает ту тему, в которую перейдёшь, а не
 * ту, в которой сидишь. Два состояния в одном месте путают — человек
 * жмёт «солнце» и ждёт светлую, а она и так светлая.
 */
.themebtn svg { display: none; }
:root:not([data-theme="dark"]) .themebtn .themebtn__moon { display: block; }
:root[data-theme="dark"] .themebtn .themebtn__sun { display: block; }

/* ── счётчик до оплаты картой ────────────────────────────────
 *
 * Не баннер и не наклейка «акция»: спокойная строка в общем ритме
 * витрины. Цифры набраны табличными — иначе каждую секунду прыгает
 * ширина, и глаз цепляется за дёрганье вместо срока.
 */
.countdown {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 16px 20px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.countdown__text { display: flex; flex-direction: column; gap: 3px; }
.countdown__text b { font-size: 15.5px; color: var(--ink); }
.countdown__text span { font-size: 13.5px; color: var(--muted); }

.countdown__clock {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-left: auto;
}

.countdown__label {
  font-size: 12.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.countdown__value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 16px;
  color: var(--accent);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .countdown__clock { margin-left: 0; }
  .countdown__value { font-size: 15px; }
}

/* Цена доставки во время акции. Зачёркнутая старая рядом с «бесплатно»:
   одно слово «Nemokamai» читается как «доставки нет», а не как подарок. */
.was {
  color: var(--muted);
  text-decoration-thickness: 1.5px;
  margin-right: 6px;
  font-weight: 400;
}

.gift { color: var(--ok); }

.summary__gift {
  font-size: 12.5px;
  color: var(--ok);
  margin: -4px 0 10px;
}

/* Полоса акции стоит на месте отсчёта до карт и выглядит так же, только
   зелёная: это подарок, а не срок. */
.countdown--gift {
  background: var(--ok-soft);
  border-color: var(--ok);
}

.countdown--gift .countdown__text b { color: var(--ok); }

/* ── отзывы ─────────────────────────────────────────────────
   Звёзды — не картинки: символ масштабируется вместе с текстом и не
   грузится отдельным файлом, а Gmail и медленный интернет тут ни при чём
   только потому, что это витрина, а не письмо. */
.stars { display: inline-flex; gap: 2px; border: 0; padding: 0; margin: 0; }

.stars--show i {
  font-style: normal;
  color: var(--line);
  font-size: 15px;
  line-height: 1;
}

.stars--show i.on { color: #e8a33d; }

/* Форма отзыва — панель, а не голый текст на странице. Раньше здесь
   стоял класс .card, но в этом файле он означает карточку товара и
   формы не касается: рамки не было вовсе. */
.review__form {
  display: grid; gap: 14px;
  padding: 20px 22px; margin-bottom: 18px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.review__for { font-size: 1.05rem; margin: 0; }

/* Выбор оценки: радиокнопки в обратном порядке, чтобы подсвечивались
   звёзды слева от наведённой. Без сценария — он может не загрузиться. */
.review__form .stars { flex-direction: row-reverse; justify-content: flex-end; }
.review__form .stars input { position: absolute; opacity: 0; pointer-events: none; }

.review__form .stars label {
  font-size: 30px;
  line-height: 1;
  color: var(--line);
  cursor: pointer;
  padding: 0 2px;
}

.review__form .stars label:hover,
.review__form .stars label:hover ~ label,
.review__form .stars input:checked ~ label { color: #e8a33d; }

.review__form .stars legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; }

.review { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.review:last-child { border-bottom: 0; }
.review p { margin: 8px 0 0; color: var(--ink-soft); line-height: 1.55; }

.review__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review__top b { font-size: 14px; }
.review__top small { color: var(--muted); font-size: 12px; }

.review__reply {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.review__what { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--muted); }

/* Снимки покупателя — полосой одинаковых квадратов. Фотографии приходят
   разной формы, и показанные как есть они читаются как беспорядок; кадр
   по центру честнее подписи «фото 1». */
.review__photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.review__photos a {
  display: block; width: 84px; height: 84px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}
.review__photos a:hover { border-color: var(--accent); }
.review__photos img { width: 100%; height: 100%; object-fit: cover; display: block; }

.reviews { margin-top: 28px; }
.reviews__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.reviews__score { display: flex; align-items: center; gap: 8px; }
.reviews__score b { font-size: 17px; }
.reviews__score small { color: var(--muted); }

/* На главной — плитками: шесть отзывов подряд одной колонкой читать
   никто не станет. */
.reviews__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

/* Плитка отзыва. Нижней черты, как в списке под товаром, здесь быть не
   должно: плитки стоят рядом, и черта под каждой читается как обрыв.
   Раньше вместо рамки стоял класс .card, но в этом файле он означает
   карточку товара — рамки не было вовсе. */
.reviews__grid .review {
  padding: 16px 18px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
}

.section--tint { background: var(--surface-2); }

/* ── метка распродажи ───────────────────────────────────────
   Огонь мельче заголовка и без движения: это знак, а не картинка. Цифра
   рядом — то, что убеждает; слово «распродажа» без неё ничего не
   обещает. */
.hot { font-size: .8em; margin-right: 2px; }

.hot__cut {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

/* Замеры на странице товара */
.measure { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.measure th, .measure td { padding: 6px 10px; text-align: left; border-bottom: 1px solid rgba(0,0,0,.08); white-space: nowrap; }
.measure th { font-weight: 600; }
