/* ===== Design tokens ===== */
:root {
  --white: #ffffff;
  --bg: #f7f8fa;
  --bg-soft: #f0f2f5;
  --ink: #14161a;
  --ink-2: #43474e;
  --ink-3: #878d97;
  --line: #e7e9ee;
  --line-2: #eef0f4;

  --red: #9e1b22;        /* muted deep red */
  --red-bright: #b8232b;
  --red-soft: #fbeced;
  --red-dark: #7c1419;

  --metal-1: #f4f6f9;
  --metal-2: #c9ced8;
  --metal-3: #8d949f;
  --metal-4: #5a606b;

  --radius: 16px;
  --radius-lg: 24px;
  --radius-sm: 10px;

  --shadow-sm: 0 2px 8px rgba(20, 22, 26, .05);
  --shadow: 0 8px 30px rgba(20, 22, 26, .07);
  --shadow-lg: 0 24px 60px rgba(20, 22, 26, .12);
  --shadow-red: 0 10px 24px rgba(158, 27, 34, .25);

  --maxw: 1280px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img, svg { display: block; }

/* ---- Mobile-only elements hidden on desktop ---- */
.burger { display: none; }
.bottomnav { display: none; }
.drawer { display: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 15px;
  padding: 14px 26px; border-radius: 999px;
  transition: all .35s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary {
  background: var(--red); color: #fff;
  box-shadow: var(--shadow-red);
}
.btn--primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(158,27,34,.32); }
.btn--ghost {
  background: var(--white); color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn--wide { padding: 16px 40px; }

/* ===== Topbar ===== */
.topbar {
  background: var(--ink);
  color: rgba(255,255,255,.78);
  font-size: 13px;
}
.topbar__inner { display: flex; justify-content: space-between; align-items: center; height: 40px; }
.topbar__links { display: flex; gap: 26px; }
.topbar__links a { transition: color .25s; }
.topbar__links a:hover { color: #fff; }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 28px; height: 78px; }

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo__mark { width: 30px; height: 30px; color: var(--red); }
.logo__text { font-weight: 800; font-size: 23px; letter-spacing: -0.04em; }
.logo__accent { color: var(--red); }

/* Search */
.search {
  flex: 1; display: flex; align-items: center;
  background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 4px 4px 4px 6px;
  transition: border-color .25s, box-shadow .25s;
}
.search:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.search__cat {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; color: var(--ink);
  padding: 10px 16px; border-radius: 11px;
  transition: background .2s;
}
.search__cat:hover { background: rgba(0,0,0,.04); }
.search__cat svg { width: 18px; height: 18px; }
.search__input {
  flex: 1; border: none; background: transparent; outline: none;
  font-size: 15px; color: var(--ink); padding: 0 12px;
}
.search__input::placeholder { color: var(--ink-3); }
.search__btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--red); color: #fff; font-weight: 600; font-size: 14px;
  padding: 11px 22px; border-radius: 11px;
  transition: background .25s;
}
.search__btn svg { width: 17px; height: 17px; }
.search__btn:hover { background: var(--red-dark); }

/* Actions */
.actions { display: flex; gap: 6px; flex-shrink: 0; }
.action {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: 12px;
  font-size: 12px; color: var(--ink-2); font-weight: 500;
  position: relative; transition: background .2s, color .2s;
}
.action svg { width: 23px; height: 23px; }
.action:hover { background: var(--bg); color: var(--ink); }
.action--cart:hover { color: var(--red); }
.cart-badge {
  position: absolute; top: 2px; right: 8px;
  background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px; transform: scale(0); transition: transform .3s var(--ease);
}
.cart-badge.show { transform: scale(1); }

/* Category nav */
.catnav { border-top: 1px solid var(--line-2); }
.catnav__inner { display: flex; gap: 4px; height: 52px; align-items: center; overflow-x: auto; }
.catnav__item, .catnav__sale {
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  padding: 8px 16px; border-radius: 10px; white-space: nowrap;
  transition: background .2s, color .2s;
}
.catnav__item:hover { background: var(--bg); color: var(--ink); }
.catnav__item.is-active { color: var(--ink); font-weight: 600; }
.catnav__sale { color: var(--red); font-weight: 600; margin-left: auto; }
.catnav__sale:hover { background: var(--red-soft); }

/* ===== Catalog mega-menu (anchored to search bar) ===== */
.searchwrap { flex: 1; display: flex; max-width: 720px; }
.catmenu { position: relative; flex: 1; display: flex; }
.catmenu .search { width: 100%; }

/* the "Каталог" button inside the search bar */
.search__cat {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; color: var(--ink);
  padding: 10px 14px; border-radius: 11px;
  transition: background .2s, color .2s;
}
.search__cat:hover { background: rgba(0,0,0,.04); }
.search__cat svg:first-child { width: 18px; height: 18px; }
.catmenu__chev { width: 15px; height: 15px; color: var(--ink-3); transition: transform .3s var(--ease); }
.catmenu.is-open .search__cat { color: var(--red); }
.catmenu.is-open .catmenu__chev { transform: rotate(180deg); color: var(--red); }

.mega-backdrop {
  position: fixed; inset: 0; top: 0; z-index: 90;
  background: transparent;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.mega-backdrop.show { opacity: 1; visibility: visible; }

.megamenu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 95;
  width: min(960px, calc(100vw - 64px));
  background: #fff; border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
  overflow: hidden;
}
.catmenu.is-open .megamenu { opacity: 1; visibility: visible; transform: translateY(0); }
.megamenu__inner { display: grid; grid-template-columns: 248px 1fr; padding: 0; max-width: none; }
.megamenu__rail { background: var(--bg); padding: 12px; border-right: 1px solid var(--line); }
.mega-cat {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 14px; border-radius: 11px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  text-align: left; transition: background .18s, color .18s;
}
.mega-cat svg { width: 20px; height: 20px; color: var(--ink-3); flex-shrink: 0; }
.mega-cat__arrow { margin-left: auto; width: 16px !important; height: 16px !important; opacity: 0; transition: opacity .18s, transform .18s; }
.mega-cat:hover, .mega-cat.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.mega-cat:hover svg, .mega-cat.is-active svg { color: var(--red); }
.mega-cat.is-active .mega-cat__arrow { opacity: 1; transform: translateX(2px); }

.megamenu__panels { padding: 24px 28px; }
.mega-panel { display: none; }
.mega-panel.is-active { display: block; animation: fadeUp .35s var(--ease) both; }
.mega-panel__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.mega-panel__title { font-size: 18px; font-weight: 700; }
.mega-panel__all { font-size: 13px; font-weight: 600; color: var(--red); }
.mega-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 28px; }
.mega-col h5 { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .04em; }
.mega-col a { display: block; font-size: 14px; color: var(--ink-2); padding: 5px 0; transition: color .15s, padding .15s; }
.mega-col a:hover { color: var(--red); padding-left: 4px; }
.mega-col a .tag { font-size: 10px; font-weight: 700; color: #fff; background: var(--red); padding: 1px 6px; border-radius: 6px; margin-left: 6px; vertical-align: middle; }

/* ===== Hero ===== */
.hero {
  background:
    radial-gradient(1200px 600px at 75% 30%, rgba(158,27,34,.04), transparent 60%),
    linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
  overflow: hidden;
}
.hero__inner {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px;
  align-items: center; padding: 64px 32px 80px;
}
.hero__eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--red);
  background: var(--red-soft); padding: 7px 14px; border-radius: 999px;
}
.hero__title {
  font-size: clamp(40px, 5.2vw, 68px); font-weight: 800;
  letter-spacing: -0.035em; line-height: 1.02; margin: 22px 0 20px;
}
.hero__text { font-size: 18px; color: var(--ink-2); max-width: 460px; margin-bottom: 32px; }
.hero__actions { display: flex; gap: 14px; margin-bottom: 46px; }
.hero__stats { display: flex; gap: 44px; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.stat span { font-size: 13px; color: var(--ink-3); }

.hero__visual { position: relative; display: flex; align-items: center; justify-content: center; min-height: 480px; }
.hero__glow {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.9) 0%, rgba(240,242,245,.4) 45%, transparent 70%);
  filter: blur(10px);
}
.hero__wheel {
  position: relative; width: 460px; height: 460px;
  filter: drop-shadow(0 40px 50px rgba(20,22,26,.25));
  animation: spin 32s linear infinite;
}
.hero__wheel:hover { animation-play-state: paused; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero__shadow {
  position: absolute; bottom: 28px; width: 360px; height: 44px;
  background: radial-gradient(ellipse, rgba(20,22,26,.22), transparent 70%);
  filter: blur(14px); border-radius: 50%;
}
.hero__price-tag {
  position: absolute; top: 40px; right: 12px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 16px 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: flex-start;
}
.hero__price-label { font-size: 12px; color: var(--ink-3); }
.hero__price-value { font-size: 26px; font-weight: 800; color: var(--red); letter-spacing: -0.03em; }
.hero__price-unit { font-size: 12px; color: var(--ink-3); }

/* ===== Trust strip ===== */
.trust { background: var(--white); border-bottom: 1px solid var(--line); }
.trust__inner {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding: 32px;
}
.trust__item { display: flex; align-items: center; gap: 14px; }
.trust__item svg { width: 30px; height: 30px; color: var(--red); flex-shrink: 0; }
.trust__item strong { display: block; font-size: 15px; font-weight: 600; }
.trust__item span { font-size: 13px; color: var(--ink-3); }

/* ===== Catalog ===== */
.catalog { padding: 72px 0 80px; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 20px; margin-bottom: 36px;
}
.section-head__eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--red);
}
.section-head__title { font-size: clamp(30px, 3.5vw, 42px); font-weight: 800; letter-spacing: -0.03em; margin-top: 6px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  padding: 10px 18px; border-radius: 999px;
  background: var(--bg); border: 1.5px solid transparent;
  transition: all .25s var(--ease);
}
.chip:hover { background: var(--bg-soft); }
.chip.is-active { background: var(--ink); color: #fff; }

/* Grid */
.grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
  animation: fadeUp .5s var(--ease) both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card__media {
  position: relative; aspect-ratio: 1/1;
  background: linear-gradient(160deg, var(--metal-1), var(--bg-soft));
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.card__wheel { width: 86%; height: 86%; transition: transform .6s var(--ease); filter: drop-shadow(0 14px 18px rgba(20,22,26,.18)); display: flex; align-items: center; justify-content: center; }
.wheel-img { width: 100%; height: 100%; object-fit: contain; }
.card:hover .card__wheel { transform: rotate(110deg) scale(1.04); }
.card__badge {
  position: absolute; top: 14px; left: 14px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  padding: 5px 11px; border-radius: 999px;
}
.card__badge--new { background: var(--ink); color: #fff; }
.card__badge--sale { background: var(--red); color: #fff; }
.card__badge--hit { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.card__fav {
  position: absolute; top: 12px; right: 12px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.9); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); transition: transform .2s, color .2s;
  color: var(--ink-3);
}
.card__fav svg { width: 18px; height: 18px; }
.card__fav:hover { transform: scale(1.1); color: var(--red); }
.card__fav.is-active { color: var(--red); }
.card__fav.is-active svg path { fill: var(--red); }

.card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card__brand { font-size: 12px; color: var(--ink-3); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.card__name { font-size: 16px; font-weight: 600; margin: 4px 0 8px; line-height: 1.3; }
.card__specs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.card__spec { font-size: 12px; color: var(--ink-2); background: var(--bg); padding: 4px 9px; border-radius: 7px; }
.card__rating { display: flex; align-items: center; gap: 7px; margin-bottom: 14px; }
.stars { display: flex; gap: 2px; }
.stars svg { width: 15px; height: 15px; }
.star-full { color: #f5a623; }
.star-empty { color: var(--line); }
.card__reviews { font-size: 12px; color: var(--ink-3); }

.card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card__price { display: flex; flex-direction: column; }
.card__price-old { font-size: 13px; color: var(--ink-3); text-decoration: line-through; }
.card__price-now { font-size: 21px; font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; }
.card__cart {
  display: flex; align-items: center; gap: 7px;
  background: var(--red-soft); color: var(--red);
  font-weight: 600; font-size: 14px;
  padding: 11px 16px; border-radius: 12px;
  transition: all .3s var(--ease);
}
.card__cart svg { width: 18px; height: 18px; }
.card__cart:hover { background: var(--red); color: #fff; box-shadow: var(--shadow-red); }
.card__cart.added { background: var(--red); color: #fff; }

.catalog__more { text-align: center; margin-top: 48px; }

/* ===== CTA banner ===== */
.cta-banner { padding: 0 0 80px; }
.cta-banner__inner {
  display: grid; grid-template-columns: 1.2fr 1fr; align-items: center;
  background: linear-gradient(135deg, var(--ink) 0%, #20242b 100%);
  border-radius: var(--radius-lg); overflow: hidden; position: relative;
  padding: 56px 56px 56px 64px;
}
.cta-banner__inner::before {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(158,27,34,.35), transparent 70%);
}
.cta-banner__eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: #ff8a8f;
}
.cta-banner__text h2 { color: #fff; font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.03em; margin: 10px 0 14px; line-height: 1.1; }
.cta-banner__text p { color: rgba(255,255,255,.65); font-size: 16px; max-width: 440px; margin-bottom: 28px; }
.cta-banner__visual { position: relative; display: flex; justify-content: center; }
.cta-banner__wheel {
  width: 280px; height: 280px; position: relative; z-index: 1;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.5));
  animation: spin 40s linear infinite;
}

/* ===== Footer ===== */
.footer { background: var(--bg); border-top: 1px solid var(--line); }
.footer__inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding: 56px 32px 40px;
}
.footer__brand .logo--footer { margin-bottom: 16px; }
.footer__brand p { font-size: 14px; color: var(--ink-3); max-width: 320px; }
.footer__col h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.footer__col a { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 10px; transition: color .2s; }
.footer__col a:hover { color: var(--red); }
.footer__bottom { border-top: 1px solid var(--line); }
.footer__bottom-inner { display: flex; justify-content: space-between; align-items: center; padding: 20px 32px; font-size: 13px; color: var(--ink-3); }
.footer__legal { display: flex; gap: 22px; }
.footer__legal a:hover { color: var(--ink); }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(120px);
  background: var(--ink); color: #fff;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px; border-radius: 14px;
  font-weight: 500; font-size: 15px; z-index: 200;
  box-shadow: var(--shadow-lg); transition: transform .45s var(--ease); opacity: 0;
}
.toast svg { width: 22px; height: 22px; color: #5fd07a; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; min-height: 380px; }
  .hero__wheel { width: 340px; height: 340px; }
  .trust__inner { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Tablet ---- */
@media (max-width: 900px) {
  .actions .action span { display: none; }
  .topbar__links { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .cta-banner__inner { grid-template-columns: 1fr; padding: 40px; }
  .cta-banner__visual { display: none; }
  .hero__stats { gap: 28px; }
}

/* ============================================================
   MOBILE  (≤ 768px) — compact header + drawer + bottom nav
   ============================================================ */
@media (max-width: 768px) {
  .container { padding: 0 28px; }

  /* topbar slimmer */
  .topbar__inner { height: 36px; justify-content: center; }
  .topbar__inner > span { font-size: 12px; text-align: center; }

  /* header: single row [logo ... cart burger] */
  .header__inner {
    flex-wrap: nowrap;
    height: 64px;
    gap: 12px;
    padding: 0;
  }
  .logo { order: 1; flex-shrink: 0; margin-left: 6px; }
  .logo__mark { width: 28px; height: 28px; }
  .logo__text { font-size: 20px; }

  /* hide desktop search & actions on mobile */
  .searchwrap { display: none; }
  .actions { display: none; }

  /* show burger */
  .burger {
    display: flex; flex-direction: column; justify-content: center;
    align-items: center; gap: 6px;
    width: 44px; height: 44px;
    margin-left: auto;
    margin-right: 6px;
    order: 2;
    border-radius: 12px;
    background: var(--bg);
    flex-shrink: 0;
    transition: background .2s;
  }
  .burger:hover { background: var(--bg-soft); }
  .burger span {
    display: block; width: 22px; height: 2px;
    background: var(--ink); border-radius: 2px;
    transition: transform .3s var(--ease), opacity .2s;
    transform-origin: center;
  }
  .burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* ---- Drawer (mobile menu) ---- */
  .drawer {
    display: block;
    position: fixed; inset: 0; z-index: 400;
    visibility: hidden; pointer-events: none;
  }
  .drawer.is-open { visibility: visible; pointer-events: auto; }
  .drawer__backdrop {
    position: absolute; inset: 0;
    background: rgba(20,22,26,.55);
    opacity: 0; transition: opacity .3s;
  }
  .drawer.is-open .drawer__backdrop { opacity: 1; }
  .drawer__panel {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: min(86vw, 340px);
    background: var(--white);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform .35s var(--ease);
    box-shadow: -10px 0 40px rgba(20,22,26,.18);
    padding-bottom: env(safe-area-inset-bottom, 0);
    overflow: hidden;
  }
  .drawer.is-open .drawer__panel { transform: translateX(0); }
  .drawer__top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
  }
  .drawer__title { font-size: 18px; font-weight: 700; }
  .drawer__close {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg); color: var(--ink);
    transition: background .2s;
  }
  .drawer__close:hover { background: var(--bg-soft); }
  .drawer__close svg { width: 18px; height: 18px; }
  .drawer__nav {
    flex: 1 1 0; min-height: 0; overflow-y: auto;
    padding: 8px 12px;
    -webkit-overflow-scrolling: touch;
  }
  .drawer__link {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 12px;
    font-size: 15px; font-weight: 500; color: var(--ink);
    border-radius: 12px;
    transition: background .2s, color .2s;
  }
  .drawer__link svg { width: 22px; height: 22px; color: var(--ink-2); flex-shrink: 0; }
  .drawer__link:hover, .drawer__link:active { background: var(--bg); color: var(--red); }
  .drawer__link:hover svg, .drawer__link:active svg { color: var(--red); }
  .drawer__divider {
    height: 1px; background: var(--line);
    margin: 8px 12px;
  }
  .drawer__foot {
    padding: 16px 20px;
    border-top: 1px solid var(--line);
    background: var(--bg);
    flex-shrink: 0;
  }
  .drawer__phone {
    display: block;
    font-size: 18px; font-weight: 700; color: var(--ink);
    margin-bottom: 4px;
  }
  .drawer__hint { font-size: 12px; color: var(--ink-3); }

  /* ---- Full-screen mega menu (catalog) ---- */
  .megamenu {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100dvh;
    border-radius: 0; border: none;
    transform: translateY(100%);
    transition: transform .35s var(--ease);
    opacity: 1; visibility: visible;
    display: flex; flex-direction: column;
    z-index: 300;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .catmenu.is-open .megamenu { transform: translateY(0); opacity: 1; visibility: visible; }
  .megamenu__topbar {
    display: flex; align-items: center; justify-content: space-between;
    height: 56px; padding: 0 20px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
  }
  .megamenu__title { font-size: 18px; font-weight: 700; }
  .megamenu__close {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg); color: var(--ink);
  }
  .megamenu__close svg { width: 18px; height: 18px; }
  .megamenu__inner {
    grid-template-columns: 1fr;
    flex: 1; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .megamenu__rail {
    border-right: none; border-bottom: 1px solid var(--line);
    padding: 8px; display: flex; gap: 6px;
    overflow-x: auto; flex-wrap: nowrap;
  }
  .mega-cat {
    flex-direction: column; gap: 6px; width: auto;
    min-width: 78px; padding: 10px 8px; text-align: center;
    font-size: 11px; line-height: 1.2;
  }
  .mega-cat span { white-space: nowrap; }
  .mega-cat__arrow { display: none; }
  .megamenu__panels { padding: 18px 20px 32px; }
  .mega-cols { grid-template-columns: 1fr 1fr; gap: 18px 16px; }

  /* hero */
  .hero__inner { padding: 32px 16px 44px; gap: 20px; }
  .hero__visual { min-height: 260px; }
  .hero__wheel { width: 240px; height: 240px; }
  .hero__title { margin: 14px 0 12px; }
  .hero__text { font-size: 15px; margin-bottom: 22px; }
  .hero__actions { flex-direction: column; gap: 10px; margin-bottom: 28px; }
  .hero__actions .btn { width: 100%; justify-content: center; padding: 13px 22px; }
  .hero__price-tag { top: 4px; right: 0; padding: 10px 14px; border-radius: 14px; }
  .hero__price-value { font-size: 20px; }
  .hero__stats { gap: 18px; flex-wrap: wrap; }
  .stat strong { font-size: 20px; }
  .stat span { font-size: 12px; }

  /* trust */
  .trust__inner { grid-template-columns: 1fr; gap: 14px; padding: 22px 16px; }
  .trust__item { padding: 4px 0; }
  .trust__item svg { width: 26px; height: 26px; }

  /* catalog */
  .catalog { padding: 44px 0 52px; }
  .section-head { margin-bottom: 22px; flex-direction: column; align-items: flex-start; gap: 14px; }
  .section-head__title { font-size: 26px; }
  .filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; -webkit-overflow-scrolling: touch; gap: 6px; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; padding: 9px 14px; font-size: 13px; }
  .grid { gap: 12px; }
  .card__body { padding: 12px; }
  .card__name { font-size: 14px; }
  .card__brand { font-size: 11px; }
  .card__cart span { display: none; }
  .card__cart { padding: 9px 11px; }
  .card__cart svg { width: 16px; height: 16px; }
  .card__price-now { font-size: 17px; }
  .card__price-old { font-size: 12px; }
  .card__fav { width: 34px; height: 34px; top: 10px; right: 10px; }
  .card__fav svg { width: 16px; height: 16px; }
  .card__badge { top: 10px; left: 10px; font-size: 10px; padding: 4px 9px; }
  .catalog__more { margin-top: 36px; }
  .catalog__more .btn { width: 100%; }

  /* CTA */
  .cta-banner { padding: 0 0 52px; }
  .cta-banner__inner { padding: 28px 20px; border-radius: 18px; }
  .cta-banner__text h2 { font-size: 24px; }
  .cta-banner__text p { font-size: 14px; margin-bottom: 22px; }
  .cta-banner__text .btn { width: 100%; justify-content: center; }

  /* footer */
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 24px 16px; padding: 36px 16px 28px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__brand p { font-size: 13px; }
  .footer__col h4 { font-size: 13px; margin-bottom: 12px; }
  .footer__col a { font-size: 13px; margin-bottom: 8px; }
  .footer__bottom-inner { flex-direction: column; gap: 8px; text-align: center; padding: 16px; font-size: 12px; }
  .footer__legal { gap: 16px; }

  /* toast */
  .toast {
    left: 16px; right: 16px; bottom: 90px;
    transform: translateY(120px); width: auto;
    padding: 12px 18px; font-size: 14px;
  }
  .toast.show { transform: translateY(0); }

  /* bottom navigation */
  .bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 250;
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: rgba(255,255,255,.96);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0));
  }
  .bottomnav__item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px;
    padding: 6px 2px;
    font-size: 10px; font-weight: 500; color: var(--ink-3);
    background: none; border: none;
    border-radius: 10px;
    transition: color .2s, background .2s;
    position: relative;
  }
  .bottomnav__item svg { width: 22px; height: 22px; }
  .bottomnav__item.is-active { color: var(--red); }
  .bottomnav__item:active { background: var(--bg); }
  .bottomnav__item--cart { color: var(--ink); }
  .cart-badge--bottom {
    top: 0; right: 50%; transform: translateX(calc(50% - 8px)) scale(0);
    transform-origin: center;
  }
  .cart-badge--bottom.show { transform: translateX(calc(50% - 8px)) scale(1); }

  /* add bottom padding so content isn't hidden behind bottomnav */
  body { padding-bottom: 64px; }
}

/* ---- Small phones (≤ 420px) ---- */
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card__media { padding: 12px; }
  .card__specs { gap: 4px; }
  .card__spec { font-size: 11px; padding: 3px 7px; }
  .card__rating { gap: 5px; }
  .card__reviews { font-size: 11px; }
  .mega-cols { grid-template-columns: 1fr; }
  .hero__title { font-size: 30px; }
  .hero__price-tag { padding: 8px 12px; }
  .hero__price-value { font-size: 18px; }
  .hero__stats { gap: 14px; }
  .stat strong { font-size: 18px; }
  .bottomnav__item { font-size: 9px; }
  .bottomnav__item svg { width: 20px; height: 20px; }
}
