/* =========================================================================
   Электроника — стили интернет-магазина.
   Полностью автономный CSS: без внешних шрифтов и картинок.
   ========================================================================= */

/* ------------------------------- Переменные ------------------------------ */
:root {
  /* Цвета */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-active: #1e40af;
  --accent-soft: #e8f0ff;
  --accent-ring: rgba(37, 99, 235, 0.35);
  --ink: #0b1220;
  --dark: #0f172a;
  --text: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --bg: #f4f7fc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --surface-3: #e9eef6;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --success: #15803d;
  --success-soft: #e7f7ed;
  --danger: #dc2626;
  --danger-soft: #feeceb;
  --warning: #b45309;
  --warning-soft: #fff5e5;
  --star: #f59e0b;

  /* Радиусы */
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Тени */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.07);
  --shadow-md: 0 12px 24px -14px rgba(15, 23, 42, 0.3);
  --shadow-lg: 0 26px 48px -22px rgba(15, 23, 42, 0.38);
  --shadow-accent: 0 14px 28px -14px rgba(37, 99, 235, 0.55);

  /* Отступы */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;
  --sp-9: 56px;
  --sp-10: 72px;

  --container: 1200px;
  --header-h: 76px;

  /* Типографика */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tr: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------- База --------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img,
svg { max-width: 100%; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.06rem; }

p { margin: 0 0 var(--sp-3); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--tr);
}

a:hover { color: var(--accent-hover); }

ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 3px solid var(--accent-ring);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

[hidden] { display: none !important; }

/* ------------------------------ Утилиты --------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  transition: top var(--tr);
}

.skip-link:focus { top: 12px; color: #fff; }

.icon {
  flex: 0 0 auto;
  display: block;
}

.art {
  display: block;
  width: 100%;
  height: 100%;
}

/* ------------------------------- Кнопки --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 12px 20px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transition: background var(--tr), color var(--tr), border-color var(--tr),
    transform var(--tr), box-shadow var(--tr);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--primary:active { background: var(--accent-active); }

.btn--outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn--ghost {
  background: var(--surface-2);
  color: var(--text);
}

.btn--ghost:hover { background: var(--surface-3); color: var(--ink); }

.btn--light {
  background: #fff;
  color: var(--ink);
}

.btn--light:hover { background: #eef2ff; }

.btn--sm {
  padding: 9px 14px;
  min-height: 40px;
  font-size: 0.87rem;
}

.btn--lg {
  padding: 15px 26px;
  min-height: 54px;
  font-size: 1rem;
}

.btn--block { width: 100%; }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn.is-added { background: var(--success); border-color: var(--success); color: #fff; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--muted);
  transition: background var(--tr), color var(--tr), border-color var(--tr);
}

.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

.icon-btn--danger:hover {
  background: var(--danger-soft);
  border-color: #f6c7c4;
  color: var(--danger);
}

/* --------------------------- Бейджи и рейтинг --------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  background: var(--dark);
}

.badge--hit { background: #f97316; }
.badge--sale { background: var(--danger); }
.badge--new { background: var(--accent); }
.badge--percent { background: var(--ink); }
.badge--default { background: var(--muted); }

.rating {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.rating__stars {
  position: relative;
  display: inline-flex;
  line-height: 0;
}

.rating__base { display: inline-flex; color: #d7dee9; }

.rating__fill {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  overflow: hidden;
  color: var(--star);
  white-space: nowrap;
}

.rating__value {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--muted);
}

.price {
  font-size: 1.15rem;
  font-weight: 750;
  color: var(--ink);
  white-space: nowrap;
}

.price--old {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted-2);
  text-decoration: line-through;
}

.price--lg { font-size: 1.45rem; }
.price--xl { font-size: clamp(1.6rem, 3vw, 2.1rem); }

/* -------------------------------- Шапка --------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.header {
  position: relative;
  background: var(--surface);
}

.topbar {
  background: var(--dark);
  color: #cbd5e1;
  font-size: 0.82rem;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 38px;
}

.topbar__note {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: #e2e8f0;
}

.topbar__list {
  display: flex;
  gap: var(--sp-5);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--ink);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo:hover { color: var(--ink); }

.logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.logo__text span { color: var(--accent); }

.nav { margin-left: auto; }

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.nav__link {
  display: inline-block;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 550;
  transition: background var(--tr), color var(--tr);
}

.nav__link:hover { background: var(--surface-2); color: var(--accent); }

.nav__link[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.header__search {
  position: relative;
  display: flex;
  align-items: center;
  width: 250px;
  max-width: 100%;
}

.header__search-input {
  width: 100%;
  padding: 11px 44px 11px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface-2);
  font-size: 0.9rem;
  transition: border-color var(--tr), background var(--tr), box-shadow var(--tr);
}

.header__search-input::placeholder { color: var(--muted-2); }

.header__search-input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.header__search-btn {
  position: absolute;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--r-full);
  background: transparent;
  color: var(--muted);
  transition: background var(--tr), color var(--tr);
}

.header__search-btn:hover { background: var(--accent-soft); color: var(--accent); }

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  color: var(--ink);
  background: var(--surface);
  transition: border-color var(--tr), background var(--tr), transform var(--tr);
}

.cart-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

.cart-link__count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
}

.burger__box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}

.burger__box span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--tr), opacity var(--tr);
}

.site-header.is-nav-open .burger__box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header.is-nav-open .burger__box span:nth-child(2) { opacity: 0; }
.site-header.is-nav-open .burger__box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------- Hero --------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  margin: var(--sp-6) 0 var(--sp-9);
  padding: var(--sp-9) 0;
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 82% 18%, rgba(124, 58, 237, 0.55), transparent 55%),
    radial-gradient(circle at 12% 88%, rgba(14, 165, 233, 0.5), transparent 52%),
    linear-gradient(135deg, #0b1220 0%, #16224a 55%, #1e3a8a 100%);
  color: #e2e8f0;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: var(--sp-8);
}

.hero__content { min-width: 0; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 7px 14px;
  margin-bottom: var(--sp-5);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.09);
  color: #e0e7ff;
  font-size: 0.82rem;
  font-weight: 600;
}

.hero__title {
  color: #fff;
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  margin-bottom: var(--sp-4);
}

.hero__title em {
  font-style: normal;
  color: #93c5fd;
}

.hero__text {
  max-width: 52ch;
  color: #cbd5e1;
  font-size: 1.03rem;
  margin-bottom: var(--sp-6);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-7);
}

.hero__search {
  display: flex;
  gap: var(--sp-2);
  max-width: 520px;
  padding: var(--sp-2);
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero__search input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
}

.hero__search input:focus { outline: none; box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.4); }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-7);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero__stat strong {
  display: block;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
}

.hero__stat span { color: #b6c2d6; font-size: 0.84rem; }

.hero__visual {
  position: relative;
  display: grid;
  gap: var(--sp-4);
}

.hero__card {
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.hero__card--main { transform: rotate(-1.4deg); }
.hero__card--float { transform: rotate(1.6deg); margin-left: -6%; }

.hero__card-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
}

.hero__card-body { padding-top: var(--sp-3); }

.hero__card-title {
  display: block;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--sp-2);
}

.hero__card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

/* ------------------------------- Секции --------------------------------- */
.section { margin-bottom: var(--sp-9); }
.section--tight { margin-bottom: var(--sp-7); }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.section__title { margin-bottom: var(--sp-1); }

.section__subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.section__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
}

.section__link:hover .icon { transform: translateX(3px); }
.section__link .icon { transition: transform var(--tr); }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
  margin: var(--sp-6) 0 var(--sp-5);
}

.page-head__text {
  max-width: 60ch;
  margin: var(--sp-2) 0 0;
  color: var(--muted);
}

/* ----------------------------- Категории -------------------------------- */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: var(--sp-4);
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-5) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
}

.cat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}

.cat-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent);
  transition: background var(--tr), color var(--tr);
}

.cat-card:hover .cat-card__icon { background: var(--accent); color: #fff; }

.cat-card__name { font-weight: 700; font-size: 1rem; }
.cat-card__meta { color: var(--muted); font-size: 0.82rem; }
.cat-card__from { color: var(--accent); font-size: 0.86rem; font-weight: 650; margin-top: var(--sp-2); }

/* --------------------------- Карточка товара ---------------------------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: var(--sp-5);
}

.p-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
}

.p-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow-md);
}

.p-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  overflow: hidden;
}

.p-card__media .art { transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1); }
.p-card:hover .p-card__media .art { transform: scale(1.05); }

.p-card__badges {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
}

.p-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
}

.p-card__cat {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.p-card__title {
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
}

.p-card__title a { color: var(--ink); }
.p-card__title a:hover { color: var(--accent); }

.p-card__prices {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: var(--sp-1);
}

.p-card__stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 0.82rem;
  font-weight: 600;
}

.p-card__actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.p-card__actions .btn { flex: 1 1 auto; }

/* ------------------------------- Акции ---------------------------------- */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-5);
}

.deal-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform var(--tr), box-shadow var(--tr);
}

.deal-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.deal-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
}

.deal-card__sticker {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  padding: 8px 14px;
  border-radius: var(--r-full);
  background: var(--danger);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}

.deal-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5);
}

.deal-card__title { font-size: 1.05rem; }
.deal-card__title a { color: var(--ink); }
.deal-card__title a:hover { color: var(--accent); }

.deal-card__note { color: var(--muted); font-size: 0.85rem; margin-bottom: var(--sp-2); }

/* ---------------------------- Преимущества ------------------------------ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--sp-5);
}

.feature {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-6) var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--sp-2);
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent);
}

.feature__title { font-size: 1rem; }
.feature__text { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* ------------------------------ CTA-полоса ------------------------------ */
.cta-band {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-7);
  padding: var(--sp-8);
  border-radius: var(--r-xl);
  background: linear-gradient(120deg, #0b1220, #1e3a8a 70%, #2563eb);
  color: #dbeafe;
  box-shadow: var(--shadow-lg);
}

.cta-band h2 { color: #fff; margin-bottom: var(--sp-3); }
.cta-band p { color: #c7d7f5; max-width: 60ch; }

.cta-band__form {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-2);
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-band__form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 12px 18px;
  border: 0;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.95);
}

.cta-band__form input:focus { outline: none; box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.4); }

.subscribe__note {
  margin: var(--sp-3) 0 0;
  font-size: 0.86rem;
  color: #dbeafe;
}

.subscribe__note.is-error { color: #fecaca; }
.subscribe__note.is-ok { color: #bbf7d0; }

/* --------------------------- Хлебные крошки ----------------------------- */
.breadcrumbs { margin: var(--sp-5) 0; }

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.85rem;
  color: var(--muted);
}

.breadcrumbs__list li { display: flex; align-items: center; gap: var(--sp-2); }

.breadcrumbs__list li + li::before {
  content: "/";
  color: var(--muted-2);
}

.breadcrumbs__list a { color: var(--muted); }
.breadcrumbs__list a:hover { color: var(--accent); }
.breadcrumbs__list [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ------------------------------- Каталог -------------------------------- */
.catalog {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  align-items: start;
  gap: var(--sp-6);
  margin-bottom: var(--sp-9);
}

.catalog__main { min-width: 0; }

.filters {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.filters__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.filters__title { font-size: 1.05rem; }

.filters__group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}

.filters__label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.filters__hint { color: var(--muted); font-size: 0.82rem; }

.filters__toggle { display: none; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.chip {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 550;
  transition: background var(--tr), color var(--tr), border-color var(--tr);
}

.chip:hover { border-color: var(--accent); color: var(--accent); }

.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.price-range {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.price-range input { min-width: 0; }

.catalog__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.catalog__count {
  font-weight: 650;
  color: var(--ink);
  font-size: 0.95rem;
}

.catalog__controls {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 0.94rem;
  transition: border-color var(--tr), box-shadow var(--tr), background var(--tr);
}

.input::placeholder,
.textarea::placeholder { color: var(--muted-2); }

.input:hover,
.select:hover,
.textarea:hover { border-color: var(--border-strong); }

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}

.textarea { min-height: 108px; resize: vertical; }

.select {
  appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% + 1px),
    calc(100% - 14px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.search-field { position: relative; flex: 1 1 240px; }

.search-field .input { padding-left: 42px; }

.search-field__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}

.has-error .input,
.has-error .select,
.has-error .textarea {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.field__error {
  display: block;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 550;
}

.field__hint { color: var(--muted); font-size: 0.8rem; }

.checkbox,
.radio {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--tr), background var(--tr);
}

.checkbox:hover,
.radio:hover { border-color: var(--border-strong); }

.checkbox input,
.radio input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.radio input { border-radius: var(--r-full); }

.checkbox:has(input:checked),
.radio:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.radio__body { display: flex; flex-direction: column; gap: 2px; }
.radio__title { font-weight: 650; font-size: 0.94rem; }
.radio__note { color: var(--muted); font-size: 0.82rem; }
.radio__price { margin-left: auto; font-weight: 700; white-space: nowrap; }

/* ---------------------------- Пустые состояния --------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-9) var(--sp-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
}

.empty-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: var(--sp-2);
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent);
}

.empty-state__title { font-size: 1.25rem; }
.empty-state__text { max-width: 46ch; color: var(--muted); margin: 0; }
.empty-state--wide { padding: var(--sp-10) var(--sp-6); }

/* --------------------------- Страница товара ---------------------------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: start;
  gap: var(--sp-8);
  margin-bottom: var(--sp-9);
}

.gallery {
  display: flex;
  flex-direction: column;
}

.product__gallery,
.product__info { min-width: 0; }

.gallery__main {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  box-shadow: var(--shadow-xs);
}

.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}

.gallery__thumb {
  position: relative;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  transition: border-color var(--tr), transform var(--tr);
}

.gallery__thumb:hover { border-color: var(--accent); transform: translateY(-2px); }
.gallery__thumb.is-active { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }

.gallery__hint { margin-top: var(--sp-3); color: var(--muted); font-size: 0.82rem; }

.product__topline {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}

.product__sku { color: var(--muted); font-size: 0.84rem; }

.product__title { margin-bottom: var(--sp-4); }

.product__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
  font-size: 0.9rem;
  color: var(--muted);
}

.product__reviews { color: var(--muted); }

.product__stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-weight: 650;
}

.product__price-block {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.product__save {
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 0.82rem;
  font-weight: 700;
}

.product__description { color: var(--muted); margin-bottom: var(--sp-6); }

.product__buy {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}

.product__bullets {
  display: grid;
  gap: var(--sp-3);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}

.product__bullet {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--muted);
  font-size: 0.9rem;
}

.product__bullet .icon { color: var(--accent); }

/* Количество */
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface);
  overflow: hidden;
}

.qty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 50px;
  border: 0;
  background: transparent;
  color: var(--ink);
  transition: background var(--tr), color var(--tr);
}

.qty__btn:hover { background: var(--accent-soft); color: var(--accent); }

.qty__input {
  width: 56px;
  height: 50px;
  border: 0;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-weight: 700;
  background: transparent;
  -moz-appearance: textfield;
}

.qty__input::-webkit-outer-spin-button,
.qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.qty__input:focus { outline: none; background: var(--accent-soft); }

.qty--sm .qty__btn { width: 36px; height: 38px; }
.qty--sm .qty__input { width: 46px; height: 38px; font-size: 0.9rem; }

/* Характеристики */
.specs {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.specs__table th,
.specs__table td {
  padding: 14px var(--sp-5);
  text-align: left;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.specs__table th {
  width: 38%;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-2);
}

.specs__table tr:last-child th,
.specs__table tr:last-child td { border-bottom: 0; }

/* ------------------------------- Корзина -------------------------------- */
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
  gap: var(--sp-6);
  margin-bottom: var(--sp-9);
}

.cart-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cart-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.cart-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--tr), border-color var(--tr);
}

.cart-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }

.cart-row__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.cart-row__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cart-row__title {
  color: var(--ink);
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.35;
}

.cart-row__title:hover { color: var(--accent); }

.cart-row__meta { color: var(--muted); font-size: 0.82rem; }

.cart-row__prices {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: 2px;
}

.cart-row__controls {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.cart-row__sum {
  min-width: 108px;
  text-align: right;
  font-weight: 750;
  color: var(--ink);
  white-space: nowrap;
}

.cart-aside {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.summary {
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.summary__title {
  font-size: 1.1rem;
  margin-bottom: var(--sp-4);
}

.summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 9px 0;
  font-size: 0.94rem;
}

.summary__row dt { color: var(--muted); }
.summary__row dd { margin: 0; font-weight: 650; color: var(--ink); white-space: nowrap; }

.summary__row--discount dd { color: var(--success); }

.summary__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

.summary__total dt { font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.summary__total dd { margin: 0; font-size: 1.5rem; font-weight: 800; color: var(--ink); }

.summary__note { color: var(--muted); font-size: 0.82rem; margin-top: var(--sp-3); }

.promo {
  padding: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.promo__form {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.promo__form .input { min-width: 0; }

.promo__message {
  margin-top: var(--sp-3);
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--muted);
}

.promo__message.is-ok { color: var(--success); }
.promo__message.is-error { color: var(--danger); }

.promo__applied {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  padding: 10px var(--sp-4);
  border-radius: var(--r-md);
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.86rem;
  font-weight: 600;
}

.promo__reset {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
  padding: 0;
}

.delivery-options {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}

.checkout {
  padding: var(--sp-6);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.checkout__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
}

.checkout__grid .field--full { grid-column: 1 / -1; }

.checkout__legend {
  display: block;
  margin-bottom: var(--sp-4);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.checkout fieldset {
  margin: 0 0 var(--sp-6);
  padding: 0;
  border: 0;
}

.checkout__submit {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}

.checkout__summary {
  margin-top: var(--sp-4);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 600;
}

.order-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-9) var(--sp-6);
  margin-bottom: var(--sp-9);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.order-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  margin-bottom: var(--sp-2);
  border-radius: var(--r-full);
  background: var(--success-soft);
  color: var(--success);
}

.order-success__info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-4);
  width: 100%;
  max-width: 640px;
  margin: var(--sp-5) 0;
  text-align: left;
}

.order-success__item {
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.order-success__item span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.order-success__item strong { font-size: 1rem; color: var(--ink); }

/* ------------------------------ Уведомления ----------------------------- */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: min(360px, calc(100vw - 40px));
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--ink);
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 550;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.toast__text { line-height: 1.4; }

.toast--success { background: #14532d; }
.toast--info { background: var(--dark); }
.toast.is-hiding { opacity: 0; transform: translateY(8px); transition: opacity var(--tr), transform var(--tr); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* -------------------------------- Подвал -------------------------------- */
.site-footer {
  margin-top: var(--sp-9);
  padding-top: var(--sp-8);
  background: var(--dark);
  color: #94a3b8;
  font-size: 0.9rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: var(--sp-7);
  padding-bottom: var(--sp-8);
}

.footer__col { display: flex; flex-direction: column; gap: var(--sp-3); }

.footer__about p { color: #94a3b8; max-width: 34ch; }

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}

.footer__logo:hover { color: #fff; }

.footer__title {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.footer__list { display: flex; flex-direction: column; gap: 10px; }

.footer__list a { color: #94a3b8; }
.footer__list a:hover { color: #fff; }

.footer__contact {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: #cbd5e1;
}

.footer__contact .icon { color: #60a5fa; }

.socials { display: flex; gap: var(--sp-3); margin-top: var(--sp-2); }

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-full);
  color: #cbd5e1;
  transition: background var(--tr), color var(--tr), border-color var(--tr);
}

.socials a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  padding: var(--sp-5) 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
}

.footer__bottom p { margin: 0; }

.footer__legal { display: flex; gap: var(--sp-5); flex-wrap: wrap; }
.footer__legal a { color: #94a3b8; }
.footer__legal a:hover { color: #fff; }

.footer__note {
  margin: 0;
  padding-bottom: var(--sp-6);
  color: #64748b;
  font-size: 0.78rem;
}

/* --------------------------- Адаптив: 1024px ---------------------------- */
@media (max-width: 1024px) {
  :root { --header-h: 68px; }

  .burger { display: inline-flex; }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    order: 5;
    display: none;
    margin: 0;
    padding: var(--sp-4) var(--sp-5) var(--sp-6);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - var(--header-h) - 38px);
    overflow-y: auto;
  }

  .site-header.is-nav-open .nav { display: block; }

  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }

  .nav__link {
    display: block;
    padding: 13px var(--sp-4);
    border-radius: var(--r-md);
    font-size: 1rem;
  }

  .header__inner { position: relative; flex-wrap: wrap; }

  .header__search {
    order: 4;
    width: 100%;
    margin-bottom: var(--sp-3);
  }

  .cart-link { margin-left: auto; }

  .hero { padding: var(--sp-8) 0; }
  .hero__inner { grid-template-columns: 1fr; gap: var(--sp-7); }
  .hero__visual { max-width: 520px; }
  .hero__card--float { margin-left: 0; }

  .cta-band { grid-template-columns: 1fr; padding: var(--sp-7); }

  .catalog { grid-template-columns: 1fr; }

  .filters {
    position: static;
    top: auto;
  }

  .product { grid-template-columns: 1fr; gap: var(--sp-7); }

  .cart-layout { grid-template-columns: 1fr; }

  .cart-aside { position: static; top: auto; }

  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6); }
}

/* ---------------------------- Адаптив: 768px ---------------------------- */
@media (max-width: 768px) {
  .container { padding: 0 16px; }

  .topbar__list { display: none; }

  .topbar__inner { justify-content: center; }

  .section { margin-bottom: var(--sp-8); }

  .section__head { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }

  .products-grid { grid-template-columns: repeat(auto-fill, minmax(192px, 1fr)); gap: var(--sp-4); }

  .cats-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

  .deals-grid { grid-template-columns: 1fr; }

  .hero__stats { grid-template-columns: 1fr; gap: var(--sp-4); }
  .hero__stat { display: flex; align-items: baseline; gap: var(--sp-3); }
  .hero__stat strong { font-size: 1.3rem; }

  .filters { padding: var(--sp-4); }

  .filters__toggle { display: inline-flex; }

  .filters.is-collapsed > *:not(.filters__head) { display: none; }

  .catalog__toolbar { padding: var(--sp-4); }

  .catalog__controls { width: 100%; }

  .catalog__controls .select { flex: 1 1 100%; }

  .search-field { flex: 1 1 100%; }

  .cart-row {
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: start;
    gap: var(--sp-4);
  }

  .cart-row__controls {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-top: var(--sp-3);
    border-top: 1px solid var(--border);
  }

  .cart-row__sum { min-width: 0; }

  .checkout__grid { grid-template-columns: 1fr; }

  .checkout { padding: var(--sp-5); }

  .footer__grid { grid-template-columns: 1fr; gap: var(--sp-6); }

  .footer__bottom { flex-direction: column; align-items: flex-start; }

  .specs__table th { width: 44%; }

  .toast-stack { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

/* ---------------------------- Адаптив: 480px ---------------------------- */
@media (max-width: 480px) {
  body { font-size: 15px; }

  .container { padding: 0 14px; }

  .products-grid { grid-template-columns: 1fr; }

  .cats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }

  .cat-card { padding: var(--sp-4) var(--sp-3); }
  .cat-card__icon { width: 44px; height: 44px; margin-bottom: var(--sp-3); }

  .hero { margin: var(--sp-5) 0 var(--sp-8); padding: var(--sp-7) 0; border-radius: var(--r-lg); }

  .hero__search,
  .cta-band__form { flex-direction: column; border-radius: var(--r-lg); }

  .hero__search .btn,
  .cta-band__form .btn { width: 100%; }

  .hero__actions .btn { width: 100%; }

  .btn { padding: 11px 16px; }

  /* На узких экранах поиск доступен в каталоге, чтобы шапка не занимала пол-экрана */
  .header__search { display: none; }

  .product__buy { flex-direction: column; align-items: stretch; }
  .product__buy .qty { justify-content: space-between; }
  .product__buy .btn { width: 100%; }

  .gallery__thumbs { gap: var(--sp-2); }

  .cart-row { grid-template-columns: 72px minmax(0, 1fr); }

  .cart-row__controls { flex-wrap: wrap; gap: var(--sp-3); }

  .promo__form { flex-direction: column; }

  .checkout__submit .btn { width: 100%; }

  .order-success { padding: var(--sp-7) var(--sp-4); }

  .specs__table th,
  .specs__table td { padding: 12px var(--sp-4); font-size: 0.88rem; }

  .specs__table th { width: 48%; }

  .toast { font-size: 0.85rem; }
}

/* ---------------------- Настройки предпочтений -------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-contrast: more) {
  :root { --muted: #475569; --border: #94a3b8; }
}
