/* ============================================================
   АМПЕРМАГ — стили сайта.
   Фирменные цвета из логотипа: чёрный #0D0D0D, жёлтый #FFC933,
   белый #FFFFFF. Наклонные «плашки» (параллелограммы) — фирменный
   мотив логотипа, реализован через clip-path.
   ============================================================ */

:root {
  color-scheme: light; /* страница светлая: не даём тёмной теме ОС красить поля и курсор */
  --black: #0d0d0d;
  --ink: #171717;
  --yellow: #ffc933;
  --yellow-dark: #f0b41f;
  --bg: #f5f5f2;
  --card: #ffffff;
  --line: #e7e7e1;
  --muted: #6e6e68;
  --danger: #d63a3a;
  --green: #2f9e63;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(13, 13, 13, .10);
  --header-h: 72px;
  --clip: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  --font-head: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Montserrat', 'Segoe UI', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; caret-color: var(--ink); }

/* Тёмный указатель мыши над полями в форме классического I-beam:
   системный белый вариант невидим на белом фоне полей. */
input, textarea {
  cursor: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='16' viewBox='0 0 10 16'%3E%3Cpath d='M2 2h6M2 14h6M5 2v12' fill='none' stroke='%23171717' stroke-width='1.2' stroke-linecap='square'/%3E%3C/svg%3E") 5 8, text;
}

section { scroll-margin-top: 128px; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

[hidden] { display: none !important; }

.link-btn {
  margin-top: 18px;
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  font-size: 13.5px;
}
.link-btn:hover { color: var(--ink); }

.bolt { color: var(--yellow); flex: none; }

/* ---------- Кнопки (параллелограммы) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  clip-path: var(--clip);
  transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }

.btn--yellow { background: var(--yellow); color: var(--black); }
.btn--yellow:hover { background: var(--yellow-dark); box-shadow: 0 8px 22px rgba(255, 201, 51, .45); }

.btn--black { background: var(--black); color: #fff; }
.btn--black:hover { background: var(--yellow); color: var(--black); }

.btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--yellow); color: var(--yellow); }

.btn--sm { padding: 9px 18px; font-size: 13px; }
.btn--wide { width: 100%; }

/* Жёлтая «бирка» как в логотипе */
.tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--yellow);
  color: var(--black);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  clip-path: var(--clip);
}

/* ---------- Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  transition: box-shadow .2s ease;
}
.header.is-scrolled { box-shadow: 0 4px 18px rgba(13, 13, 13, .12); }

.header__row {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: var(--header-h);
}

.logo { flex: none; display: block; line-height: 0; }
.logo img { height: 54px; width: auto; }

.nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav a {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.nav a:hover { border-color: var(--yellow); }

.header__actions { display: flex; align-items: center; gap: 16px; }

.phone {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .03em;
  white-space: nowrap;
}
.phone:hover { color: var(--yellow-dark); }

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  background: var(--black);
  color: #fff;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  clip-path: var(--clip);
  transition: background .15s ease, color .15s ease;
}
.cart-btn:hover { background: var(--yellow); color: var(--black); }
.cart-btn .bolt { color: var(--yellow); }
.cart-btn:hover .bolt { color: var(--black); }

/* счётчик лежит снаружи кнопки, иначе её clip-path обрежет кружок */
.cart-wrap { position: relative; flex: none; }

.cart-count {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 2;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.burger span { width: 24px; height: 3px; background: var(--black); transition: transform .2s ease, opacity .2s ease; }
.burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Бегущая строка ---------- */
.ticker {
  overflow: hidden;
  background: var(--yellow);
  border-top: 2px solid var(--black);
  padding: 7px 0;
}
.ticker__track {
  display: flex;
  gap: 44px;
  width: max-content;
  animation: ticker 30s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--black);
  white-space: nowrap;
}
.ticker__item .bolt { color: var(--black); }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--black);
  color: #fff;
  overflow: hidden;
}

.hero__grid, .hero__stats { position: relative; z-index: 1; }

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 680px);
  gap: 40px;
  align-items: center;
  padding-top: 66px;
  padding-bottom: 58px;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: .01em;
  text-transform: uppercase;
  margin: 18px 0 16px;
}
.hero h1 .accent { color: var(--yellow); }

.hero__lead {
  max-width: 560px;
  font-size: 16px;
  color: #c9c9c4;
  margin-bottom: 28px;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, .14);
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.hero__stat {
  background: var(--black);
  padding: 20px 18px 22px;
}
.hero__stat b {
  display: block;
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 700;
  color: var(--yellow);
  line-height: 1.1;
}
.hero__stat span { font-size: 13px; color: #b9b9b3; }

/* ---------- Секции ---------- */
.section { padding: 64px 0 72px; }
.section--tight { padding-top: 8px; }

.section__head { margin-bottom: 34px; }
.section__head h2 {
  font-family: var(--font-head);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-top: 12px;
}
.section__head p { color: var(--muted); max-width: 640px; margin-top: 8px; }

/* ---------- Управление каталогом ---------- */
.catalog-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.search {
  position: relative;
  flex: 1 1 260px;
  max-width: 360px;
}
.search input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color .15s ease;
}
.search input:focus { border-color: var(--yellow-dark); outline: none; }
.search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }

/* ---------- Подбор по параметрам ---------- */
.param-filter { margin-bottom: 14px; }
.param-filter__used {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 14px;
  font-size: 14px;
  color: #55554f;
  cursor: pointer;
  user-select: none;
}
.param-filter__used input { width: 17px; height: 17px; margin: 0; accent-color: var(--black); cursor: pointer; }
.param-filter__toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: border-color .15s ease;
}
.param-filter__toggle:hover { border-color: var(--yellow-dark); }
.param-filter__toggle svg { transition: transform .18s ease; }
.param-filter__toggle.is-open { background: var(--black); border-color: var(--black); color: #fff; }
.param-filter__toggle.is-open svg { transform: rotate(180deg); }

.param-filter__panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-top: 12px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.param-filter__field { display: grid; gap: 5px; }
.param-filter__field > span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.param-filter__field select,
.param-filter__field input {
  padding: 9px 12px;
  min-width: 118px;
  border: 2px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-size: 14px;
}
.param-filter__field select:focus,
.param-filter__field input:focus { border-color: var(--yellow-dark); outline: none; }
.param-filter__range { display: flex; align-items: center; gap: 7px; }
.param-filter__range i { color: var(--muted); font-style: normal; }
.param-filter__range input { min-width: 0; width: 88px; }
.param-filter__reset {
  margin-left: auto;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.param-filter__reset:hover { color: var(--danger); }
.param-filter__hint {
  display: inline-block;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.chip {
  padding: 8px 16px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--yellow-dark); }
.chip--active { background: var(--black); border-color: var(--black); color: #fff; }

.sort {
  margin-left: auto;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  font-size: 13px;
}

/* ---------- Карточки товаров ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 22px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card__top { position: relative; background: #f4f4f0; }
/* фиксированная зона картинки: карточки в ряду одной высоты, изображение вписано и по центру */
.card__img {
  height: 210px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card__img svg { width: 100%; height: 100%; }
.card__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.badge {
  padding: 4px 11px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
}
.badge--yellow { background: var(--yellow); color: var(--black); }
.badge--black { background: var(--black); color: var(--yellow); }
/* Б/У — контурная прямоугольная метка, чтобы отличалась от жёлтых/чёрных промо-бейджей */
.badge--used {
  background: var(--card);
  color: var(--black);
  clip-path: none;
  border-radius: 4px;
  border: 1.5px solid var(--black);
}

.stock {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.stock--in { background: #e0f2e9; color: var(--green); }
.stock--order { background: #f3e8cf; color: #9a7b1c; }

.card__body, .card__brand, .card__name, .card__specs, .card__bottom { padding: 0 18px; }
.card__brand {
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.card__name {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .02em;
  margin: 2px 0 10px;
  min-height: 56px; /* две строки — чипсы и цены у карточек на одной высоте */
}

.card__specs { display: flex; flex-wrap: wrap; gap: 6px; }
.card__specs li {
  padding: 3px 10px;
  background: var(--bg);
  border-radius: 999px;
  font-size: 12px;
  color: #55554f;
}

/* описание товара на карточке: максимум три строки, чтобы сетка оставалась ровной */
.card__desc {
  padding: 0 18px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  padding-bottom: 16px;
}
.card__prices { display: flex; flex-direction: column; line-height: 1.15; }
.card__old { font-size: 13px; color: var(--danger); }
.card__price {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .02em;
}

/* ---------- Степпер количества ---------- */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--black);
  padding: 4px 6px;
  clip-path: var(--clip);
}
.stepper__btn {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: 6px;
  transition: background .12s ease, color .12s ease;
}
.stepper__btn:hover { background: var(--yellow); color: var(--black); }
.stepper__num {
  min-width: 22px;
  text-align: center;
  color: var(--yellow);
  font-weight: 700;
  font-size: 15px;
}
.stepper--sm { padding: 3px 5px; }
.stepper--sm .stepper__btn { width: 22px; height: 22px; font-size: 14px; }
.stepper--sm .stepper__num { min-width: 18px; font-size: 13px; }

/* ---------- Пустые состояния ---------- */
.empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 56px 20px;
  background: var(--card);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
}
.empty p { font-family: var(--font-head); font-size: 20px; letter-spacing: .03em; }
.empty__sub { font-family: var(--font-body) !important; font-size: 14px !important; color: var(--muted); }
.empty--drawer { border: none; padding: 40px 12px; background: transparent; }

/* ---------- Пагинация каталога ---------- */
.pager {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
}
.pager__info { font-size: 14px; color: var(--muted); }
.pager__pages { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pager__btn {
  min-width: 42px; height: 42px; padding: 0 13px;
  background: var(--card); color: var(--black);
  border: 2px solid var(--line); border-radius: 10px;
  font: 600 15px var(--font-head); cursor: pointer;
}
.pager__btn:hover:not(:disabled) { border-color: var(--yellow); background: #fff8e0; }
.pager__btn--active { background: var(--black); color: #fff; border-color: var(--black); }
.pager__btn--active:hover { border-color: var(--black); background: var(--black); }
.pager__btn:disabled { opacity: .35; cursor: default; }
.pager__dots { align-self: center; color: var(--muted); }

/* ---------- Как заказать ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.step {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
}
.step__num {
  display: inline-block;
  padding: 5px 14px;
  background: var(--yellow);
  clip-path: var(--clip);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
}
.step h3 {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin: 14px 0 8px;
}
.step p { font-size: 14px; color: var(--muted); }

/* ---------- Trade-in баннер ---------- */
.tradein { padding: 0 0 64px; }
.tradein__in {
  position: relative;
  background: var(--yellow);
  clip-path: polygon(0 0, 100% 24px, 100% 100%, 0 calc(100% - 24px));
  padding: 40px 48px;
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.tradein__in > svg { flex: none; }
.tradein h3 {
  font-family: var(--font-head);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
}
.tradein p { color: #4d3d00; max-width: 520px; margin-top: 6px; }
.tradein .btn { margin-left: auto; background: var(--black); color: #fff; }
.tradein .btn:hover { background: #fff; color: var(--black); }

/* ---------- Доставка и оплата ---------- */
.feat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feat__card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.feat__card .bolt { color: var(--yellow-dark); margin-bottom: 14px; }
.feat__card .bolt svg { box-sizing: content-box; background: var(--black); padding: 11px; border-radius: 10px; }
.feat__card h3 { font-family: var(--font-head); font-size: 18px; font-weight: 600; text-transform: uppercase; margin-bottom: 8px; }
.feat__card p, .feat__card li { font-size: 14px; color: var(--muted); }
.feat__card ul { display: grid; gap: 5px; }

/* ---------- Контакты ---------- */
.contacts { background: var(--black); color: #fff; padding: 68px 0 72px; }
.contacts__grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 46px; align-items: start; }
.contacts h2 {
  font-family: var(--font-head);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 12px;
}
.contacts__phone {
  display: inline-block;
  font-family: var(--font-head);
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 700;
  color: var(--yellow);
  margin: 16px 0 10px;
  letter-spacing: .02em;
}
.contacts__phone:hover { color: #fff; }

.contacts [data-shop="phones"] {
  display: grid;
  gap: 0;
  margin: 10px 0 14px;
}
.contacts [data-shop="phones"] .contacts__phone { margin: 4px 0; }

.contacts__card dd a { color: #e8e8e3; text-decoration: underline; text-underline-offset: 3px; }
.contacts__card dd a:hover { color: var(--yellow); }
.contacts p { color: #c9c9c4; }
.contacts__note { max-width: 480px; }

.contacts__card {
  background: #171717;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  padding: 28px 26px;
}
.contacts__card dl { display: grid; gap: 16px; }
.contacts__card dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 3px;
}
.contacts__card dd { color: #e8e8e3; }

/* ---------- Подвал ---------- */
.footer { background: var(--black); color: #8e8e88; border-top: 1px solid #232323; padding: 30px 0 34px; }
.footer__row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
}
.footer__logo {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--yellow);
}
.footer__row nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer__row nav a:hover { color: #fff; }
.footer__row .spacer { flex: 1; }

/* ---------- Шторка корзины ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 13, 13, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
  z-index: 90;
}
.overlay.is-visible { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(430px, 100%);
  background: #fff;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform .26s ease;
  box-shadow: -18px 0 44px rgba(0, 0, 0, .25);
}
.drawer.is-open { transform: translateX(0); }

.drawer__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: var(--black);
  color: #fff;
}
.drawer__head h2 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.drawer__head .bolt { color: var(--yellow); }
.drawer__close {
  margin-left: auto;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.drawer__close:hover { background: var(--yellow); color: var(--black); }

.drawer__items { flex: 1; overflow-y: auto; padding: 10px 22px; }

.cart-row {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.cart-row__img {
  flex: none;
  width: 74px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f0;
  border-radius: 9px;
}
.cart-row__img svg { width: 90%; height: auto; }
.cart-row__img img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; }
.cart-row__info { flex: 1; min-width: 0; }
.cart-row__name { font-family: var(--font-head); font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.cart-row__spec { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.cart-row__ctrl { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cart-row__sum { font-size: 14px; }
.cart-row__del {
  align-self: flex-start;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b3b3ac;
  border-radius: 7px;
  transition: color .15s ease, background .15s ease;
}
.cart-row__del:hover { color: var(--danger); background: #fdeaea; }

.drawer__foot { padding: 18px 22px 22px; border-top: 2px solid var(--black); background: #fff; }
.drawer__free {
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 12px;
}

.tradein-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff7df;
  border: 1.5px solid #f0df9a;
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 14px;
  cursor: pointer;
  font-size: 13.5px;
}
.tradein-check input { margin-top: 2px; accent-color: #b78c00; }
.tradein-check b { font-weight: 700; }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 5px;
}
.cart-total-row--disc b { color: var(--green); }
.cart-total-row--sum {
  font-family: var(--font-head);
  font-size: 22px;
  color: var(--ink);
  margin: 8px 0 16px;
}
.cart-total-row--sum b { letter-spacing: .02em; }

/* ---------- Модалка оформления ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__box {
  width: min(760px, 100%);
  max-height: 92dvh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 28px 30px 30px;
  transform: translateY(14px) scale(.98);
  transition: transform .22s ease;
}
.modal.is-open .modal__box { transform: none; }

.modal__head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.modal__head h2 {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.checkout-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 26px; }

.field { margin-bottom: 15px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input[type="text"], .field input[type="tel"], .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s ease;
}
.field input:focus, .field textarea:focus { border-color: var(--yellow-dark); outline: none; }
.field input.is-error, .field textarea.is-error { border-color: var(--danger); }
.field textarea { resize: vertical; min-height: 74px; }

.radio-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-card {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color .15s ease, background .15s ease;
}
.radio-card input { accent-color: var(--black); margin-top: 3px; }
.radio-card:has(input:checked) { border-color: var(--black); background: #fffbe8; }
.radio-card b { display: block; font-weight: 700; }

.agree { display: flex; gap: 9px; font-size: 12.5px; color: var(--muted); margin: 4px 0 18px; }
.agree input { accent-color: var(--black); }

.summary {
  background: var(--bg);
  border-radius: 12px;
  padding: 20px;
  align-self: start;
}
.summary h3 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.sum-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 13.5px;
  padding: 5px 0;
}
.sum-row em { font-style: normal; color: var(--muted); }
.sum-row--disc b { color: var(--green); }
.sum-row--total {
  border-top: 2px solid var(--black);
  margin-top: 8px;
  padding-top: 10px;
  font-family: var(--font-head);
  font-size: 19px;
}
.sum-row--total span { text-transform: uppercase; letter-spacing: .04em; }

/* Экран успеха */
.success { text-align: center; padding: 22px 6px 8px; }
.success__icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}
.success h3 {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.success p { color: var(--muted); margin: 8px 0 22px; }
.success__num { color: var(--ink); font-weight: 700; }
.success__status {
  font-size: 14px;
  font-weight: 600;
  margin: -6px 0 20px;
  min-height: 20px;
}
.success__status--ok { color: var(--green); }
.success__status--err { color: var(--danger); }
.success__actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.success details { margin-top: 22px; text-align: left; font-size: 13px; color: var(--muted); }
.success details summary { cursor: pointer; text-align: center; font-weight: 600; }
.success pre {
  white-space: pre-wrap;
  background: var(--bg);
  border-radius: 10px;
  padding: 14px;
  margin-top: 10px;
  font-family: Consolas, monospace;
  font-size: 12.5px;
}

/* ---------- Тост ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 90px);
  background: var(--black);
  color: #fff;
  padding: 12px 24px;
  clip-path: var(--clip);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  z-index: 130;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast::before { content: '⚡ '; color: var(--yellow); }

/* ---------- Адаптив ---------- */
@media (max-width: 1000px) {
  .nav { display: none; }
  .burger { display: flex; }
  .header__row { gap: 14px; }
  .phone { margin-left: auto; }
  .nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px 20px 18px;
    box-shadow: 0 16px 26px rgba(0, 0, 0, .14);
  }
  .nav.is-open a { padding: 10px 0; width: 100%; border-bottom: 1px solid var(--line); }

  .hero__grid { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 44px; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .steps, .feat { grid-template-columns: repeat(2, 1fr); }
  .contacts__grid { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .logo img { height: 42px; }
  .cart-btn__label { display: none; }
  .sort { margin-left: 0; }
  .steps, .feat { grid-template-columns: 1fr; }
  .tradein__in { padding: 30px 26px; }
  .tradein .btn { margin-left: 0; }
  .modal__box { padding: 20px 18px 24px; }
  .radio-row { grid-template-columns: 1fr; }
}

/* ---------- Страница товара ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted currentColor; }
.crumbs a:hover { color: var(--black); border-bottom-color: var(--black); }
.crumbs b { color: var(--black); font-weight: 600; }

.product { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px; align-items: start; }
.product__img { background: #f4f4f0; border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; padding: 28px; overflow: hidden; }
.product__img img { display: block; width: 100%; max-height: 460px; object-fit: contain; }
.product__img svg { width: 100%; height: auto; max-height: 460px; }
.product__badges { display: flex; gap: 8px; margin-bottom: 12px; }
.product__brand { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.product__name { font-family: var(--font-head); font-size: clamp(26px, 4vw, 38px); line-height: 1.12; margin: 4px 0 0; }
.product__desc {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: #4a4a44;
  white-space: pre-line;
}
.product__params { margin-top: 20px; border-top: 1px solid var(--line); }
.product__params > div { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.product__params > div span { color: var(--muted); }
.product__params > div b { font-weight: 600; text-align: right; }
.product__buy { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 24px; }
.product__prices { display: flex; align-items: baseline; gap: 12px; }
.product__price { font-family: var(--font-head); font-size: 34px; font-weight: 700; }
.product__old { color: var(--muted); font-size: 18px; }
.product__note { margin-top: 16px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.product__cart-link { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--black); }
.product__strip { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.product__strip > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 5px; background: var(--card); }
.product__strip b { font-size: 14px; }
.product__strip span { font-size: 13px; line-height: 1.45; color: var(--muted); }

.card { cursor: pointer; }

@media (max-width: 1000px) {
  .product { grid-template-columns: 1fr; gap: 22px; }
  .product__strip { grid-template-columns: 1fr; }
}
