/* =========================================================
   Корни — маркетплейс. Дизайн-токены
   ========================================================= */
:root {
  --brand: #0d6b47;
  --brand-600: #0a5a3b;
  --brand-50: #e8f4ee;
  --brand-100: #cfe8db;
  --accent: #ffcf3d;          /* жёлтый акцент для мелочей: бейджи в шапке */
  --sale: #e5174d;
  --sale-50: #fde8ee;
  --star: #f5a623;
  --warn: #c26a00;

  --ink: #16181d;
  --ink-2: #3d424d;
  --muted: #7a808c;
  --line: #e7e8ec;
  --bg: #f4f5f7;
  --card: #ffffff;
  --tile: #f2f3f5;            /* фон под фото товара */

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --shadow: 0 1px 2px rgb(16 24 40 / .06), 0 4px 16px rgb(16 24 40 / .06);
  --shadow-lg: 0 12px 40px rgb(16 24 40 / .16);

  --wrap: 1440px;
  --gutter: clamp(16px, 2.4vw, 32px);
  --hdr-h: 64px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body {
  margin: 0;
  font: 400 15px/1.45 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0 0 .75em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.warn { color: var(--warn); }
.danger { color: var(--sale); }
.center { text-align: center; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.link { color: var(--brand); font-weight: 500; }
.link:hover { text-decoration: underline; }

.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--r);
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: background-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.btn .i { width: 20px; height: 20px; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-600); }
.btn--ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
.btn--muted, .btn:disabled { background: var(--tile); color: var(--muted); cursor: default; }
.btn--block { width: 100%; }
.btn--lg { height: 52px; font-size: 16px; border-radius: 14px; }
.btn.is-disabled { pointer-events: none; opacity: .45; }

.linkbtn { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.linkbtn .i { width: 18px; height: 18px; }
.linkbtn:hover { color: var(--ink); }
.linkbtn.is-on { color: var(--sale); }
.linkbtn.is-on .i { fill: currentColor; }
.linkbtn--danger:hover { color: var(--sale); }

.iconbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--ink-2); }
.iconbtn:hover { background: var(--tile); color: var(--ink); }
.iconbtn .i { width: 20px; height: 20px; }

.input {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; padding: 10px 14px; resize: vertical; }
select.input { padding-right: 36px; appearance: none; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%237a808c' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center; }
.input:hover { border-color: #cfd2d8; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.input.is-invalid { border-color: var(--sale); }
.input--sm { height: 34px; font-size: 13px; padding: 0 30px 0 10px; border-radius: var(--r-sm); background-position: right 6px center; }

.field { margin-bottom: 16px; }
.field__label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field__err { margin: 6px 0 0; color: var(--sale); font-size: 13px; }
.field__hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: 14px; }
.check input, .check--plain input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); flex: none; }
.check small { margin-left: auto; color: var(--muted); }
.check--plain { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }

.switch { display: flex; align-items: center; gap: 12px; padding: 7px 0; cursor: pointer; font-size: 14px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { position: relative; width: 38px; height: 22px; border-radius: 22px; background: #d6d9df; transition: background .2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform .2s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.badge {
  position: absolute; top: -4px; right: 50%; transform: translateX(22px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--sale); color: #fff; font: 700 11px/18px var(--font); text-align: center;
}
.badge--inline { position: static; transform: none; margin-left: 6px; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--tile); font-size: 12px; font-weight: 500; color: var(--ink-2); }
.pill--sale { background: var(--sale); color: #fff; font-weight: 700; }

.alert { padding: 12px 14px; border-radius: var(--r); font-size: 14px; }
.alert--error { background: var(--sale-50); color: #a1103a; }
.notice { padding: 12px 16px; border-radius: var(--r); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.notice a { color: var(--brand); font-weight: 500; }

/* ---------- цены и рейтинг ---------- */
.price { font-weight: 700; font-size: 20px; letter-spacing: -.02em; white-space: nowrap; }
.price--sale { color: var(--sale); }
.price--xl { font-size: 32px; }
.price-old { color: var(--muted); font-size: 13px; white-space: nowrap; }
.sale-badge {
  position: absolute; left: 10px; bottom: 10px;
  padding: 2px 6px; border-radius: 6px;
  background: var(--sale); color: #fff; font-size: 12px; font-weight: 700;
}
.sale-badge--lg { left: 16px; top: 16px; bottom: auto; font-size: 14px; padding: 4px 8px; }

.stars {
  --r: 0%;
  display: inline-block; width: 88px; height: 16px; flex: none;
  background: linear-gradient(90deg, var(--star) var(--r), #dcdfe4 var(--r));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17.6' height='16' viewBox='0 0 22 20'%3E%3Cpath d='M11 1l2.9 6 6.6.9-4.8 4.6 1.2 6.5L11 15.9 5.1 19l1.2-6.5L1.5 7.9 8.1 7z'/%3E%3C/svg%3E") repeat-x left / 17.6px 16px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17.6' height='16' viewBox='0 0 22 20'%3E%3Cpath d='M11 1l2.9 6 6.6.9-4.8 4.6 1.2 6.5L11 15.9 5.1 19l1.2-6.5L1.5 7.9 8.1 7z'/%3E%3C/svg%3E") repeat-x left / 17.6px 16px;
}

/* =========================================================
   Шапка
   ========================================================= */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--brand); color: #fff; }
.hdr__top { display: flex; align-items: center; gap: 24px; height: 32px; font-size: 13px; color: rgb(255 255 255 / .82); }
.hdr__city { display: inline-flex; align-items: center; gap: 4px; }
.hdr__city .i { width: 16px; height: 16px; }
.hdr__links { display: flex; gap: 20px; margin-left: auto; }
.hdr__links a:hover { color: #fff; }
.hdr__admin { color: var(--accent); font-weight: 600; }
.hdr__main { display: flex; align-items: center; gap: 16px; height: var(--hdr-h); padding-bottom: 8px; }

.logo { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 26px; letter-spacing: -.04em; color: #fff; flex: none; }
.logo__mark { width: 30px; height: 30px; stroke-width: 2.2; color: var(--accent); }
.logo--dark { color: var(--brand); }
.logo--dark .logo__mark { color: var(--brand); }
.logo--light small { margin-left: 4px; font-size: 12px; font-weight: 500; letter-spacing: 0; opacity: .6; align-self: flex-end; margin-bottom: 4px; }

.catbtn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 12px;
  border-radius: var(--r); background: rgb(255 255 255 / .14); color: #fff; font-weight: 600; flex: none;
}
.catbtn:hover { background: rgb(255 255 255 / .22); }
.catbtn__icon { display: grid; }
.catbtn__icon .i { grid-area: 1 / 1; width: 22px; height: 22px; transition: opacity .15s, transform .15s; }
.catbtn__icon .i:last-child { opacity: 0; transform: rotate(-45deg); }
.catbtn[aria-expanded="true"] .catbtn__icon .i:first-child { opacity: 0; transform: rotate(45deg); }
.catbtn[aria-expanded="true"] .catbtn__icon .i:last-child { opacity: 1; transform: none; }

.search { position: relative; flex: 1; display: flex; height: 44px; background: #fff; border-radius: var(--r); color: var(--ink); }
.search__input { flex: 1; min-width: 0; border: 0; background: none; padding: 0 8px 0 16px; font-size: 15px; outline: none; }
.search__input::-webkit-search-cancel-button { display: none; }
.search__input::placeholder { color: var(--muted); }
.search__clear { width: 36px; display: grid; place-items: center; color: var(--muted); }
.search__clear .i { width: 18px; height: 18px; }
.search__btn { width: 56px; margin: 4px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.search__btn:hover { background: var(--brand-600); }
.search__btn .i { width: 22px; height: 22px; }
.search:focus-within { box-shadow: 0 0 0 3px rgb(255 207 61 / .55); }

.hdr__nav { display: flex; gap: 4px; flex: none; }
.hnav { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; padding: 4px 6px; border-radius: 10px; font-size: 12px; color: rgb(255 255 255 / .9); }
.hnav:hover { background: rgb(255 255 255 / .1); color: #fff; }
.hnav .badge { right: 50%; top: 0; }

/* подсказки поиска */
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  max-height: min(70vh, 640px); overflow: auto;
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 8px;
}
.suggest__group + .suggest__group { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.suggest__title { display: flex; justify-content: space-between; padding: 6px 10px; font-size: 12px; color: var(--muted); }
.suggest__title button { color: var(--brand); font-size: 12px; }
.sug {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 8px 10px; border-radius: 10px; text-align: left; font-size: 15px;
}
.sug .i { width: 18px; height: 18px; color: var(--muted); }
.sug mark { background: none; color: inherit; font-weight: 700; }
.sug small { margin-left: auto; color: var(--muted); font-size: 13px; }
.sug.is-active, .sug:hover { background: var(--tile); }
.sug--product img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: var(--tile); mix-blend-mode: multiply; flex: none; }
.sug--product span { display: flex; flex-direction: column; min-width: 0; }
.sug--product span em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug--product b { font-size: 14px; }
.suggest__fix { padding: 8px 10px; font-size: 13px; color: var(--muted); }
.suggest__fix b { color: var(--ink); }

/* мега-меню */
.megamenu { position: absolute; left: 0; right: 0; top: 100%; background: #fff; color: var(--ink); box-shadow: var(--shadow-lg); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.megamenu__inner { display: grid; grid-template-columns: 280px 1fr; gap: 32px; padding-block: 20px 28px; min-height: 380px; }
.megamenu__roots { list-style: none; margin: 0; padding: 0; border-right: 1px solid var(--line); padding-right: 12px; }
.megamenu__roots a { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; font-weight: 500; }
.megamenu__roots a .i { width: 18px; height: 18px; color: var(--muted); }
.megamenu__roots a.is-active, .megamenu__roots a:hover { background: var(--brand-50); color: var(--brand); }
.megamenu__title { display: inline-flex; align-items: center; gap: 4px; font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.megamenu__title .i { width: 20px; height: 20px; }
.megamenu__panel ul { list-style: none; margin: 0; padding: 0; columns: 3 200px; column-gap: 32px; }
.megamenu__panel li { padding: 6px 0; break-inside: avoid; }
.megamenu__panel li a:hover { color: var(--brand); }
.megamenu__panel small { color: var(--muted); }

/* =========================================================
   Общие блоки страниц
   ========================================================= */
.main { min-height: 60vh; padding-block: 20px 56px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.crumbs > * + *::before { content: "/"; margin-right: 6px; color: #c4c8cf; }
.crumbs a:hover { color: var(--ink); }
.page-title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -.02em; }
.listing-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.listing-head__count { color: var(--muted); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 36px 0 14px; }
.sec-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.sec-head--sm { margin: 0 0 12px; }
.sec-head--sm h2 { font-size: 18px; font-weight: 700; }
.sec-head__more { display: inline-flex; align-items: center; color: var(--brand); font-weight: 600; font-size: 14px; }
.sec-head__more .i { width: 18px; height: 18px; }
.panel { background: var(--card); border-radius: var(--r-lg); padding: 20px; margin-bottom: 16px; }
.panel h2 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.more { display: flex; justify-content: center; margin-top: 24px; }
.more .btn { min-width: 240px; }

.empty { max-width: 520px; margin: 40px auto; text-align: center; }
.empty h1, .empty h2 { font-size: 22px; margin-bottom: 8px; }
.empty p { color: var(--muted); }
.empty .btn { margin-top: 8px; }
.empty__icon { width: 56px; height: 56px; color: #c4c8cf; margin: 0 auto 16px; stroke-width: 1.4; }
.empty--small { margin: 24px auto; }
.empty__code { display: block; font-size: 96px; font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--brand-100); margin-bottom: 12px; }
.empty__search { display: flex; gap: 8px; margin: 20px 0 16px; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)) 16px; padding: 2px var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--card); font-size: 14px; font-weight: 500; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--line); }
.chip small { color: var(--muted); font-weight: 400; }
.chip:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
.chip.is-on { background: var(--ink); color: #fff; box-shadow: none; }
.chip.is-on small { color: rgb(255 255 255 / .7); }
.chip--back .i { width: 16px; height: 16px; margin-left: -4px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.tabs__item { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 10px; font-weight: 500; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.tabs__item small { color: var(--muted); }
.tabs__item:hover { background: var(--card); }
.tabs__item.is-active { background: var(--ink); color: #fff; }
.tabs__item.is-active small { color: rgb(255 255 255 / .65); }

.status { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--tile); color: var(--ink-2); }
.status--new { background: #e8effe; color: #2450c4; }
.status--processing { background: #fff3d6; color: #8a5a00; }
.status--shipped { background: #efe7fd; color: #6234c2; }
.status--ready { background: var(--brand-50); color: var(--brand); }
.status--done { background: #eef0f2; color: #4b515c; }
.status--cancelled { background: var(--sale-50); color: #b0123f; }

/* =========================================================
   Карточка товара и сетки
   ========================================================= */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 28px 16px; }
.card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.card__media {
  position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden;
  background: var(--tile);
}
.card__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10%;
  mix-blend-mode: multiply; transition: opacity .25s, transform .3s;
}
.card__alt { opacity: 0; }
@media (hover: hover) {
  .card:hover .card__media img:first-child:not(:only-of-type) { opacity: 0; }
  .card:hover .card__alt { opacity: 1; }
  .card:hover .card__media img:only-of-type { transform: scale(1.03); }
}
.card--out .card__media img { opacity: .55; }
.fav {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  color: #8b909a; transition: color .15s, transform .15s;
}
.fav .i { width: 24px; height: 24px; filter: drop-shadow(0 1px 1px rgb(255 255 255 / .9)); }
.fav:hover { color: var(--sale); }
.fav.is-on { color: var(--sale); }
.fav.is-on .i { fill: currentColor; }
.fav.is-pop { animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(1.25); } }

.card__body { display: flex; flex-direction: column; flex: 1; padding: 10px 2px 0; }
.card__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
.card__title { margin: 4px 0 6px; font-size: 14px; line-height: 1.35; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__title:hover { color: var(--ink); }
.card__brand { color: var(--ink); font-weight: 600; }
.card__brand::after { content: " / "; color: var(--muted); font-weight: 400; }
.card__meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.rate { display: inline-flex; align-items: center; gap: 3px; color: var(--ink); font-weight: 500; }
.rate .i { width: 15px; height: 15px; color: var(--star); }
.card__buy { margin-top: auto; }
.card__buy .btn { height: 40px; font-size: 14px; }

.buy .qty {
  display: flex; align-items: center; justify-content: space-between; height: 40px;
  background: var(--brand-50); border-radius: var(--r); color: var(--brand);
}
.qty button { display: grid; place-items: center; width: 44px; height: 100%; border-radius: var(--r); color: var(--brand); }
.qty button:hover { background: var(--brand-100); }
.qty button .i { width: 20px; height: 20px; stroke-width: 2.2; }
.qty__val { display: flex; flex-direction: column; align-items: center; line-height: 1.1; font-size: 15px; }
.qty__val small { font-size: 11px; color: var(--brand); opacity: .8; }
.buy--lg .btn { height: 52px; font-size: 16px; border-radius: 14px; }
.buy--lg .qty { height: 52px; border-radius: 14px; }
.buy--lg .qty button { width: 56px; border-radius: 14px; }

/* горизонтальная карусель */
.carousel { position: relative; }
.carousel__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 16px) / 6); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; }
.carousel__nav, .promo__nav {
  position: absolute; top: 34%; z-index: 3; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); color: var(--ink);
  transition: opacity .2s;
}
.carousel__nav:disabled { opacity: 0; pointer-events: none; }
.carousel__nav--prev { left: -18px; }
.carousel__nav--next { right: -18px; }

/* =========================================================
   Главная
   ========================================================= */
.promo { position: relative; border-radius: var(--r-xl); overflow: hidden; }
.promo__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.promo__track::-webkit-scrollbar { display: none; }
.promo__slide {
  flex: 0 0 100%; scroll-snap-align: start; position: relative; display: flex; align-items: center;
  min-height: clamp(220px, 26vw, 340px); padding: clamp(24px, 4vw, 56px); overflow: hidden;
}
.promo__slide--green { background: #0f5a3d; color: #fff; }
.promo__slide--sand { background: #f1e3c8; color: #3b2a12; }
.promo__slide--plum { background: #3b1f3c; color: #fff; }
.promo__text { position: relative; z-index: 1; max-width: 460px; }
.promo__text h2 { font-size: clamp(26px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.03em; margin-bottom: 10px; }
.promo__text p { font-size: clamp(15px, 1.4vw, 18px); opacity: .85; }
.promo__cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; height: 44px; padding: 0 18px; border-radius: var(--r); background: #fff; color: var(--ink); font-weight: 600; }
.promo__cta .i { width: 18px; height: 18px; }
.promo__slide img {
  position: absolute; right: clamp(-40px, 2vw, 60px); top: 50%; transform: translateY(-50%) rotate(-6deg);
  height: 125%; width: auto; max-width: 60%; object-fit: contain; filter: drop-shadow(0 24px 30px rgb(0 0 0 / .25));
}
.promo__slide--sand img { mix-blend-mode: multiply; filter: none; }
.promo__nav { top: 50%; transform: translateY(-50%); opacity: 0; }
.promo:hover .promo__nav { opacity: 1; }
.promo__nav--prev { left: 16px; }
.promo__nav--next { right: 16px; }
.promo__dots { position: absolute; left: clamp(24px, 4vw, 56px); bottom: 18px; display: flex; gap: 6px; }
.promo__dots button { width: 8px; height: 8px; border-radius: 4px; background: currentColor; opacity: .35; color: #fff; transition: width .25s, opacity .25s; }
.promo__dots button.is-active { width: 24px; opacity: 1; }

.tiles { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; margin: 20px 0 8px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 13px; font-weight: 500; }
.tile__img { width: 100%; aspect-ratio: 1; border-radius: var(--r-lg); background: var(--card); display: grid; place-items: center; overflow: hidden; transition: box-shadow .2s; }
.tile__img img { width: 78%; height: 78%; object-fit: contain; mix-blend-mode: multiply; transition: transform .3s; }
.tile:hover .tile__img { box-shadow: var(--shadow); }
.tile:hover .tile__img img { transform: scale(1.06); }

.perks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.perks li { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--card); }
.perks .i { width: 28px; height: 28px; color: var(--brand); }
.perks b { display: block; font-size: 15px; }
.perks span { font-size: 13px; color: var(--muted); }

/* =========================================================
   Каталог и выдача
   ========================================================= */
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.catalog__group { background: var(--card); border-radius: var(--r-lg); padding: 16px; }
.catalog__head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.catalog__head img { width: 64px; height: 64px; border-radius: 14px; background: var(--tile); object-fit: contain; padding: 6px; mix-blend-mode: multiply; }
.catalog__head b { display: block; font-size: 18px; }
.catalog__head small { color: var(--muted); }
.catalog__head:hover b { color: var(--brand); }
.catalog__group ul { list-style: none; margin: 0; padding: 0; }
.catalog__group li { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.catalog__group li a:hover { color: var(--brand); }
.catalog__group li small { color: var(--muted); }

.listing { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.filters { position: sticky; top: calc(var(--hdr-h) + 48px); max-height: calc(100vh - var(--hdr-h) - 64px); overflow: auto; scrollbar-width: thin; }
.filters form { background: var(--card); border-radius: var(--r-lg); padding: 16px; }
.filters__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.filters__top h2 { font-size: 18px; }
.filters__top .iconbtn { display: none; }
.fgroup { border: 0; margin: 0; padding: 14px 0; border-top: 1px solid var(--line); }
.filters__top + .fgroup { border-top: 0; }
.fgroup legend { padding: 0; margin-bottom: 10px; font-weight: 600; font-size: 15px; float: left; width: 100%; }
.fgroup legend + * { clear: both; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-range input { height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); width: 100%; }
.price-range input:focus { outline: none; border-color: var(--brand); background: #fff; }
.fgroup__search { width: 100%; height: 36px; padding: 0 10px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.checks .is-extra { display: none; }
.checks.is-open .is-extra { display: flex; }
.fgroup .linkbtn { color: var(--brand); margin-top: 4px; }
.filters__actions { display: grid; gap: 8px; margin-top: 8px; }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar__filters { display: none; position: relative; }
.sort { margin-left: auto; }
.sort select {
  height: 40px; padding: 0 36px 0 14px; border: 0; border-radius: 10px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2316181d' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none; font-weight: 500; cursor: pointer;
}
.grid--listing { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

/* =========================================================
   Страница товара
   ========================================================= */
.pdp { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 360px; gap: 32px; align-items: start; margin-top: 8px; }
.gallery { display: flex; gap: 12px; position: sticky; top: calc(var(--hdr-h) + 52px); }
.gallery__thumbs { display: flex; flex-direction: column; gap: 8px; flex: none; }
.gallery__thumbs button { width: 64px; height: 80px; border-radius: 10px; background: var(--tile); overflow: hidden; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s; }
.gallery__thumbs button.is-active { box-shadow: inset 0 0 0 2px var(--brand); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: contain; padding: 6px; mix-blend-mode: multiply; }
.gallery__main { position: relative; flex: 1; min-width: 0; border-radius: var(--r-xl); background: var(--tile); overflow: hidden; }
.gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track img { flex: 0 0 100%; aspect-ratio: 4 / 5; object-fit: contain; padding: 8%; mix-blend-mode: multiply; scroll-snap-align: start; }

.pdp__brand { display: inline-block; color: var(--brand); font-weight: 600; margin-bottom: 6px; }
.pdp__title { font-size: clamp(22px, 2vw, 28px); font-weight: 700; letter-spacing: -.02em; margin-bottom: 12px; }
.pdp__rating { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; margin-bottom: 20px; }
.pdp__rating span { color: var(--muted); }
.pdp__rating:hover span:first-of-type { color: var(--brand); }

.specs { margin: 0; display: grid; gap: 10px; }
.specs div { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.specs dt { color: var(--muted); flex: none; }
.specs dd { margin: 0; }
.specs div { background-image: radial-gradient(circle, #cfd2d8 1px, transparent 1.2px); background-size: 6px 3px; background-repeat: repeat-x; background-position: 0 calc(100% - 4px); }
.specs dt, .specs dd { background: var(--bg); }
.specs dt { padding-right: 6px; }
.specs dd { padding-left: 6px; margin-left: auto; text-align: right; }
.specs--short { margin-bottom: 12px; }

.buybox { position: sticky; top: calc(var(--hdr-h) + 52px); display: grid; gap: 12px; }
.buybox__card { background: var(--card); border-radius: var(--r-xl); padding: 20px; box-shadow: var(--shadow); }
.buybox__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 16px; }
.buybox__price .price-old { font-size: 16px; }
.buybox__price .pill--sale { align-self: center; }
.buybox__actions { display: flex; gap: 8px; }
.buybox__actions > :first-child { flex: 1; }
.fav--box { position: static; width: 52px; height: 52px; border-radius: 14px; background: var(--tile); flex: none; }
.fav--box .i { filter: none; }
.buybox__stock { margin: 12px 0 0; font-size: 14px; color: var(--brand); font-weight: 500; }
.buybox__perks { list-style: none; margin: 0; padding: 16px 20px; background: var(--card); border-radius: var(--r-xl); display: grid; gap: 14px; }
.buybox__perks li { display: flex; gap: 12px; font-size: 13px; }
.buybox__perks .i { color: var(--brand); width: 22px; height: 22px; }
.buybox__perks b { display: block; font-size: 14px; }
.buybox__perks span { color: var(--muted); }

.pdp-section { margin-top: 40px; }
.pdp-section > h2 { font-size: 24px; font-weight: 800; margin-bottom: 16px; }
.pdp-section > h2 small { color: var(--muted); font-weight: 500; font-size: 18px; margin-left: 4px; }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: var(--card); border-radius: var(--r-xl); padding: 24px; }
.about__text { font-size: 15px; line-height: 1.6; max-width: 65ch; }
.about .specs dt, .about .specs dd { background: var(--card); }

.reviews { display: grid; grid-template-columns: 320px 1fr; gap: 32px; align-items: start; }
.reviews__summary { position: sticky; top: calc(var(--hdr-h) + 52px); background: var(--card); border-radius: var(--r-xl); padding: 20px; }
.reviews__score { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 12px; margin-bottom: 16px; }
.reviews__score b { grid-row: span 2; font-size: 44px; font-weight: 800; letter-spacing: -.03em; }
.reviews__score span { font-size: 13px; color: var(--muted); }
.reviews__dist { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.reviews__dist li { display: grid; grid-template-columns: 12px 1fr 28px; align-items: center; gap: 10px; font-size: 13px; }
.reviews__dist i { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--star) var(--w), var(--tile) var(--w)); }
.reviews__dist small { color: var(--muted); text-align: right; }
.review-form { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.review-form h3 { font-size: 16px; }
.review-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); resize: vertical; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { position: absolute; opacity: 0; }
.star-input label { cursor: pointer; color: #dcdfe4; }
.star-input label .i { width: 30px; height: 30px; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--star); }
.star-input input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 4px; }
.reviews__list { display: grid; gap: 12px; }
.review { background: var(--card); border-radius: var(--r-lg); padding: 16px 20px; }
.review header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review header div { display: flex; flex-direction: column; margin-right: auto; }
.review header b { font-size: 14px; }
.review time { font-size: 12px; color: var(--muted); }
.review p { margin: 0; font-size: 15px; }
.reviews__list .is-extra { display: none; }
.reviews__list.is-open .is-extra { display: block; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-weight: 700; flex: none; }
.avatar--lg { width: 52px; height: 52px; font-size: 20px; }

/* =========================================================
   Корзина и оформление
   ========================================================= */
.cart, .checkout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.cart__list { background: var(--card); border-radius: var(--r-xl); padding: 8px 20px; }
.cart__bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cart-row { display: grid; grid-template-columns: 24px 96px 1fr 150px 140px; gap: 16px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-row.is-out { opacity: .6; }
.cart-row.is-removing { opacity: 0; transform: translateX(-8px); transition: opacity .2s, transform .2s; }
.cart-row__check { padding-top: 38px; }
.cart-row__img { aspect-ratio: 4 / 5; border-radius: var(--r); background: var(--tile); overflow: hidden; }
.cart-row__img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; mix-blend-mode: multiply; }
.cart-row__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-row__title { font-weight: 500; }
.cart-row__title:hover { color: var(--brand); }
.cart-row__tools { display: flex; gap: 16px; margin-top: auto; padding-top: 8px; }
.cart-row__price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.cart-row__price .price { font-size: 18px; }

.summary { position: sticky; top: calc(var(--hdr-h) + 52px); }
.summary__card { background: var(--card); border-radius: var(--r-xl); padding: 20px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.summary__hint { margin: 0; text-align: center; }
.summary__rows { margin: 0; display: grid; gap: 8px; font-size: 14px; }
.summary__rows div { display: flex; justify-content: space-between; gap: 12px; }
.summary__rows dt { color: var(--ink-2); }
.summary__rows dd { margin: 0; white-space: nowrap; }
.summary__disc dd { color: var(--sale); }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px solid var(--line); font-size: 18px; font-weight: 700; }
.summary__total b { font-size: 24px; letter-spacing: -.02em; }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.options--3 { grid-template-columns: repeat(3, 1fr); }
.option input { position: absolute; opacity: 0; }
.option__body {
  display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: center; height: 100%;
  padding: 14px 16px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow .15s, background .15s;
}
.option__body .i { grid-row: span 2; color: var(--brand); }
.option__body small { color: var(--muted); font-size: 13px; }
.option__body > b:only-child { grid-column: 1 / -1; font-weight: 500; }
.option input:checked + .option__body { box-shadow: inset 0 0 0 2px var(--brand); background: var(--brand-50); }
.option input:focus-visible + .option__body { outline: 2px solid var(--brand); outline-offset: 2px; }
.points { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.point input { position: absolute; opacity: 0; }
.point span { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; padding: 10px 12px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; font-size: 14px; }
.point .i { width: 18px; height: 18px; color: var(--muted); grid-row: span 2; margin-top: 1px; }
.point small { color: var(--muted); font-size: 12px; }
.point input:checked + span { box-shadow: inset 0 0 0 2px var(--brand); background: var(--brand-50); }
.point input:checked + span .i { color: var(--brand); }
.point input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.mini-items { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.mini-items li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; }
.mini-items img { width: 56px; height: 64px; object-fit: contain; border-radius: 10px; background: var(--tile); padding: 4px; mix-blend-mode: multiply; }
.mini-items span { display: flex; flex-direction: column; font-size: 14px; min-width: 0; }
.mini-items a:hover { color: var(--brand); }

/* =========================================================
   Вход и личный кабинет
   ========================================================= */
.auth { max-width: 420px; margin: 24px auto; background: var(--card); border-radius: var(--r-xl); padding: 32px; box-shadow: var(--shadow); }
.auth h1 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.auth > .muted { margin-bottom: 20px; font-size: 14px; }
.auth .alert { margin-bottom: 16px; }
.auth__alt { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.auth__alt a { color: var(--brand); font-weight: 600; }

.account { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.acc-nav { position: sticky; top: calc(var(--hdr-h) + 52px); background: var(--card); border-radius: var(--r-xl); padding: 12px; }
.acc-nav__user { display: flex; align-items: center; gap: 12px; padding: 8px 8px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.acc-nav__user div { display: flex; flex-direction: column; min-width: 0; }
.acc-nav__user small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.acc-nav nav { display: grid; gap: 2px; }
.acc-nav a, .acc-nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.acc-nav .i { width: 20px; height: 20px; color: var(--muted); }
.acc-nav a:hover, .acc-nav button:hover { background: var(--tile); }
.acc-nav a.is-active { background: var(--brand-50); color: var(--brand); }
.acc-nav a.is-active .i { color: var(--brand); }
.account__main { min-width: 0; }
.account__main > .page-title { margin-bottom: 16px; }

.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--muted); }
a.stat:hover { box-shadow: var(--shadow); }

.kv { margin: 0 0 12px; display: grid; gap: 10px; }
.kv div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.kv--stack div { grid-template-columns: 1fr; gap: 2px; }

.order-list { display: grid; gap: 12px; }
.order-card { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); background: var(--card); transition: box-shadow .15s; }
.order-card:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
.order-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.order-card__head div { display: flex; flex-direction: column; }
.order-card__items { display: flex; gap: 8px; }
.order-card__items img { width: 56px; height: 68px; object-fit: contain; border-radius: 10px; background: var(--tile); padding: 4px; mix-blend-mode: multiply; }
.order-card__more { display: grid; place-items: center; width: 56px; height: 68px; border-radius: 10px; background: var(--tile); font-weight: 600; color: var(--muted); }

.timeline { list-style: none; margin: 20px 0 24px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: s; }
.timeline li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; font-size: 13px; color: var(--muted); }
.timeline li::before { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.timeline li:first-child::before { display: none; }
.timeline li.is-done::before { background: var(--brand); }
.timeline__dot { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); }
.timeline__dot .i { width: 16px; height: 16px; stroke-width: 2.6; opacity: 0; color: #fff; }
.timeline .is-done { color: var(--ink); }
.timeline .is-done .timeline__dot { background: var(--brand); box-shadow: none; }
.timeline .is-done .timeline__dot .i { opacity: 1; }
.timeline .is-current b { color: var(--brand); }
.timeline small { color: var(--muted); font-size: 11px; }
.order-detail { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.order-detail form { margin-top: 12px; }

/* =========================================================
   Подвал, таб-бар, уведомления
   ========================================================= */
.ftr { background: var(--card); padding: 40px 0 24px; border-top: 1px solid var(--line); }
.ftr__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.ftr h3 { font-size: 14px; margin-bottom: 12px; }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.ftr ul a:hover { color: var(--brand); }
.ftr__about { margin-top: 12px; max-width: 320px; font-size: 14px; color: var(--muted); }
.ftr__bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

.tabbar { display: none; }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast {
  padding: 12px 16px; border-radius: var(--r); background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--shadow-lg);
  animation: toast-in .25s ease both; pointer-events: auto;
}
.toast--error { background: #b0123f; }
.toast a { color: var(--accent); font-weight: 600; margin-left: 6px; }
.toast.is-hiding { animation: toast-out .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

.backdrop { position: fixed; inset: 0; z-index: 40; background: rgb(16 24 40 / .35); }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 1280px) {
  .pdp { grid-template-columns: minmax(0, 1fr) 340px; }
  .gallery { grid-row: span 2; }
  .pdp__info { grid-column: 2; }
  .buybox { grid-column: 2; position: static; }
  .carousel__track { grid-auto-columns: calc((100% - 4 * 16px) / 5); }
}
@media (max-width: 1100px) {
  .hnav span { display: none; }
  .hnav { min-width: 44px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .carousel__track { grid-auto-columns: calc((100% - 3 * 16px) / 4); }
  .ftr__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  :root { --hdr-h: 56px; }
  .hdr__top { display: none; }
  .hdr__main { gap: 10px; height: auto; padding-block: 10px; flex-wrap: wrap; }
  .logo { font-size: 22px; }
  .catbtn { display: none; }
  .hdr__nav { display: none; }
  .search { order: 3; flex-basis: 100%; height: 42px; }
  .megamenu { display: none !important; }

  .listing { grid-template-columns: 1fr; }
  .filters {
    position: fixed; inset: 0 0 0 auto; z-index: 70; width: min(380px, 100%); max-height: none; height: 100%;
    background: var(--card); transform: translateX(100%); transition: transform .25s ease; top: 0;
  }
  .filters.is-open { transform: none; box-shadow: var(--shadow-lg); }
  .filters form { border-radius: 0; min-height: 100%; display: flex; flex-direction: column; }
  .filters__top .iconbtn { display: inline-grid; }
  .filters__actions { position: sticky; bottom: 0; margin-top: auto; padding-top: 12px; background: var(--card); }
  .toolbar__filters { display: inline-flex; }

  .pdp { grid-template-columns: 1fr; gap: 20px; }
  .gallery { position: static; grid-row: auto; }
  .gallery__thumbs { display: none; }
  .pdp__info, .buybox { grid-column: auto; }
  .about, .reviews { grid-template-columns: 1fr; gap: 20px; }
  .reviews__summary { position: static; }

  .cart, .checkout, .order-detail { grid-template-columns: 1fr; }
  .summary { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); top: auto; z-index: 5; }
  .account { grid-template-columns: 1fr; }
  .acc-nav { position: static; }
  .acc-nav nav { grid-auto-flow: column; overflow-x: auto; grid-auto-columns: max-content; scrollbar-width: none; }
  .acc-nav__user { border: 0; padding-bottom: 8px; margin: 0; }
  .stat-tiles { grid-template-columns: 1fr 1fr; }
  .perks { grid-template-columns: 1fr; }
  .perks li:nth-child(n+2) { display: none; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgb(255 255 255 / .96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); }
  .tabbar a.is-active { color: var(--brand); }
  .tabbar .badge { top: -2px; transform: translateX(20px); }
  .main { padding-bottom: 96px; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .carousel__nav { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .grid, .grid--listing { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 10px; }
  .carousel__track { grid-auto-columns: 42%; gap: 10px; }
  .price { font-size: 17px; }
  .card__media { border-radius: 14px; }
  .card__title { font-size: 13px; }
  .tiles { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .tile { font-size: 12px; }
  .promo { border-radius: var(--r-lg); margin-inline: calc(-1 * var(--gutter) / 2); }
  .promo__slide { min-height: 200px; align-items: flex-start; }
  .promo__slide img { max-width: 48%; height: 100%; right: -10px; }
  .promo__text { max-width: 62%; }
  .promo__text p { display: none; }
  .fields-2, .options, .options--3, .points { grid-template-columns: 1fr; }
  .cart__list { padding: 4px 12px; }
  .cart-row { grid-template-columns: 20px 72px 1fr; gap: 10px 12px; }
  .cart-row__check { padding-top: 28px; grid-row: span 3; }
  .cart-row__img { grid-row: span 3; }
  .cart-row__qty { grid-column: 3; }
  .cart-row__price { grid-column: 3; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 8px; text-align: left; }
  .cart-row__price small { display: none; }
  .cart-row__qty .qty { height: 36px; max-width: 150px; }
  .kv div { grid-template-columns: 1fr; gap: 2px; }
  .timeline { grid-template-columns: 1fr; gap: 14px; }
  .timeline li { flex-direction: row; text-align: left; gap: 10px; }
  .timeline li::before { top: auto; bottom: 50%; left: 13px; right: auto; width: 2px; height: calc(100% + 14px); }
  .auth { padding: 24px 20px; margin: 8px auto; }
  .sec-head h2 { font-size: 20px; }
  .ftr__grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
