/* ============ Токены ============ */
:root {
  --red: #e30613;
  --red-dark: #b8040f;
  --red-soft: #fdecee;
  --ink: #1b1d22;
  --ink-2: #4a4f5a;
  --muted: #8a909c;
  --line: #e7e9ee;
  --bg: #ffffff;
  --bg-2: #f5f6f8;
  --green: #1f9d55;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(20, 24, 35, .08);
  --shadow-lg: 0 24px 60px rgba(20, 24, 35, .16);
  --container: 1320px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ============ Кнопки ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .1s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); color: #fff; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--red); color: var(--red); }
.btn--light { background: #fff; color: var(--red); }
.btn--light:hover { background: var(--red-soft); }
.btn--lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--icon { width: 44px; padding: 0; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; border-bottom: 1px dashed currentColor; }
.link-more { color: var(--red); font-weight: 700; }

/* ============ Шапка ============ */
.header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 var(--line); }
.topbar { background: var(--bg-2); font-size: 13px; color: var(--ink-2); }
.topbar__inner { display: flex; gap: 24px; align-items: center; min-height: 36px; }
.topbar__phone { font-weight: 800; color: var(--ink); margin-left: auto; }
.mainbar__inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); flex-shrink: 0; }
.logo__mark { width: 38px; height: 38px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 20px; }
.logo--light { color: #fff; }

.nav { display: flex; align-items: stretch; gap: 4px; align-self: stretch; }
.nav__item { display: flex; }
.nav__link { display: flex; align-items: center; gap: 8px; padding: 0 14px; font-weight: 600; color: var(--ink-2); }
.nav__link--catalog { color: #fff; background: var(--red); border-radius: 999px; margin: 14px 0; padding: 0 20px; }
.nav__link--catalog:hover { color: #fff; background: var(--red-dark); }
.nav__icon { width: 16px; height: 2px; background: currentColor; position: relative; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }

.search { flex: 1; display: flex; max-width: 460px; margin-left: auto; position: relative; }
.search input { width: 100%; height: 44px; border: 1.5px solid var(--line); border-radius: 999px; padding: 0 48px 0 18px; background: var(--bg-2); outline: none; transition: border-color .2s, background .2s; }
.search input:focus { border-color: var(--red); background: #fff; }
.search button { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--ink-2); }

.cart-btn { position: relative; display: flex; align-items: center; gap: 10px; font-weight: 700; flex-shrink: 0; }
.cart-btn__count { position: absolute; left: 14px; top: -8px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; display: grid; place-items: center; padding: 0 5px; }
.cart-btn.is-bump { animation: bump .4s; }
@keyframes bump { 50% { transform: scale(1.15); } }

.burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.burger span, .burger span::before, .burger span::after { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); content: ""; transition: .2s; }
.burger span { top: 21px; }
.burger span::before { top: -7px; left: 0; }
.burger span::after { top: 7px; left: 0; }

/* ============ Мега-меню (как на thermex.ru) ============ */
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; box-shadow: var(--shadow-lg); border-top: 1px solid var(--line);
  padding: 28px 0 32px; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility 0s .2s;
  max-height: calc(100vh - 120px); overflow-y: auto;
}
.nav__item--mega.is-open .mega,
.nav__item--mega:focus-within .mega { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s; }
.nav__item--mega.is-open > .nav__link--catalog::after {
  content: ""; position: absolute; bottom: -14px; left: 50%; margin-left: -8px;
  border: 8px solid transparent; border-bottom-color: #fff;
}
.nav__link--catalog { position: relative; }
.mega__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px 16px; }
.mega__tile { position: relative; border-radius: var(--radius); }
.mega__link { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 10px 16px; border-radius: var(--radius); transition: background .2s; }
.mega__img { width: 100%; aspect-ratio: 1; max-height: 150px; display: grid; place-items: center; }
.mega__img img { max-height: 140px; object-fit: contain; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.mega__name { margin-top: 12px; font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--ink); }
.mega__tile:hover .mega__link { background: var(--bg-2); }
.mega__tile:hover .mega__img img { transform: scale(1.08) translateY(-4px); }
.mega__tile:hover .mega__name { color: var(--red); }
/* Всплывающий список серий поверх картинки */
.mega__series {
  position: absolute; left: 8px; right: 8px; top: 8px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .96); box-shadow: var(--shadow); backdrop-filter: blur(6px);
  font-size: 13px; opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity .2s .15s, transform .2s .15s;
}
.mega__series a { padding: 2px 0; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mega__series a:hover { color: var(--red); }
.mega__all { color: var(--red) !important; font-weight: 700; margin-top: 4px; }
.mega__tile:hover .mega__series { opacity: 1; transform: none; pointer-events: auto; }

/* ============ Главная ============ */
.hero { background: linear-gradient(120deg, #fff 0%, #fff4f4 55%, #ffe3e5 100%); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; padding: 64px 16px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red); margin-bottom: 14px; }
.eyebrow--light { color: #ffd2d5; }
.hero__title { font-size: clamp(30px, 4.2vw, 52px); font-weight: 800; letter-spacing: -.02em; }
.hero__lead { font-size: 18px; color: var(--ink-2); max-width: 560px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero__perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hero__perks li { background: #fff; border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); color: var(--ink-2); }
.hero__perks b { display: block; font-size: 26px; color: var(--red); font-weight: 800; }

.section { padding: 56px 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section__title { font-size: clamp(24px, 3vw, 34px); font-weight: 800; margin: 0; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: box-shadow .25s, border-color .25s, transform .25s; }
.cat-tile:hover { box-shadow: var(--shadow); border-color: transparent; transform: translateY(-3px); }
.cat-tile__img { height: 140px; display: grid; place-items: center; }
.cat-tile__img img { max-height: 140px; object-fit: contain; }
.cat-tile__name { margin-top: 12px; font-weight: 600; line-height: 1.35; }

.section--promo { background: var(--red); color: #fff; }
.promo { display: grid; grid-template-columns: 1fr 1.5fr; gap: 32px; align-items: center; }
.promo__title { font-size: clamp(26px, 3vw, 38px); font-weight: 800; }
.promo p { opacity: .9; max-width: 440px; margin-bottom: 24px; }
.promo__products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.promo__item { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; transition: transform .25s; }
.promo__item:hover { transform: translateY(-4px); color: var(--ink); }
.promo__item img { height: 150px; object-fit: contain; margin: 0 auto 8px; }
.promo__item span { font-size: 14px; font-weight: 600; }
.promo__item b { color: var(--red); font-size: 18px; }

/* ============ Карточка товара ============ */
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .25s, border-color .25s; }
.card:hover { box-shadow: var(--shadow); border-color: transparent; }
.card__img { position: relative; display: grid; place-items: center; aspect-ratio: 1; padding: 18px; background: #fff; }
.card__img img { max-height: 100%; width: auto; object-fit: contain; transition: transform .35s; }
.card:hover .card__img img { transform: scale(1.05); }
.card__badges { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.badge--sale { background: var(--red); color: #fff; }
.badge--hit { background: #ffb800; color: #3a2a00; }
.badge--new { background: var(--green); color: #fff; }
.badge--lg { position: absolute; left: 16px; top: 16px; font-size: 15px; padding: 6px 12px; }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 0 16px 16px; gap: 4px; }
.card__series { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.card__name { font-weight: 700; line-height: 1.35; min-height: 2.7em; }
.card__stock { font-size: 13px; color: var(--green); }
.card__stock::before { content: "●"; margin-right: 5px; font-size: 10px; vertical-align: 1px; }
.card__stock--out { color: var(--muted); }
.card__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }

.price { display: flex; flex-direction: column; }
.price__now { font-size: 21px; font-weight: 800; color: var(--red); line-height: 1.1; }
.price__old { font-size: 14px; color: var(--muted); text-decoration: line-through; }
.price--lg { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.price--lg .price__now { font-size: 36px; }
.price--lg .price__old { font-size: 18px; }
.price__save { background: var(--red-soft); color: var(--red); font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 999px; }

/* ============ Листинг ============ */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 18px 0 0; margin: 0; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 8px; }
.page-title { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; margin: 14px 0 20px; letter-spacing: -.01em; }
.page-title small { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 12px; letter-spacing: 0; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip { padding: 8px 16px; border-radius: 999px; background: var(--bg-2); font-weight: 600; font-size: 14px; transition: background .2s, color .2s; }
.chip:hover { background: var(--red-soft); }
.chip--active { background: var(--ink); color: #fff; }
.chip--active:hover { background: var(--ink); color: #fff; }

.listing { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.filters { position: sticky; top: 130px; background: var(--bg-2); border-radius: var(--radius); padding: 20px; }
.filters__form { display: grid; gap: 16px; }
.filters__title { font-weight: 800; font-size: 18px; display: flex; justify-content: space-between; }
.filters__close { display: none; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; }
.filters fieldset { border: 0; padding: 0; margin: 0; }
.filters legend { font-weight: 700; margin-bottom: 8px; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.range input, .field input, .field textarea, .field select { width: 100%; height: 44px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 0 12px; background: #fff; outline: none; }
.field textarea { height: auto; padding: 10px 12px; }
.range input:focus, .field input:focus, .field textarea:focus { border-color: var(--red); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-bottom: 16px; }
.toolbar__filters { display: none; margin-right: auto; }
.sort select { border: 1.5px solid var(--line); border-radius: 999px; height: 40px; padding: 0 14px; background: #fff; margin-left: 6px; }
.empty { padding: 48px; text-align: center; background: var(--bg-2); border-radius: var(--radius); color: var(--ink-2); }
.empty a { color: var(--red); font-weight: 700; }
.pager { display: flex; justify-content: center; gap: 6px; margin: 32px 0 0; }
.pager a, .pager__current { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); font-weight: 700; }
.pager__current { background: var(--red); color: #fff; border-color: var(--red); }
.text-block { margin: 40px 0; color: var(--ink-2); max-width: 900px; }

/* ============ Страница товара ============ */
.pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; margin: 20px 0 48px; }
.gallery { display: grid; gap: 12px; align-content: start; }
.gallery__main { position: relative; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; display: grid; place-items: center; padding: 32px; background: #fff; }
.gallery__main img { max-height: 100%; width: auto; object-fit: contain; }
.gallery__thumbs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery__thumb { flex: 0 0 80px; height: 80px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 6px; cursor: pointer; }
.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery__thumb.is-active { border-color: var(--red); }
.pdp__series { color: var(--red); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.pdp__title { font-size: clamp(26px, 3vw, 36px); font-weight: 800; margin: 6px 0 10px; }
.pdp__meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.pdp__lead { color: var(--ink-2); }
.key-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 8px; }
.key-specs div { background: var(--bg-2); border-radius: var(--radius-sm); padding: 10px 14px; }
.key-specs dt { font-size: 12px; color: var(--muted); }
.key-specs dd { margin: 2px 0 0; font-weight: 700; }
.buybox { margin-top: 24px; padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: 16px; }
.buybox__form { display: flex; gap: 12px; }
.buybox__form .btn { flex: 1; }
.buybox__perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; height: 52px; }
.qty button { width: 42px; height: 100%; border: 0; background: none; font-size: 20px; cursor: pointer; }
.qty input { width: 44px; border: 0; text-align: center; font-weight: 700; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pdp-section { margin: 48px 0; }
.pdp-section h2 { font-size: 26px; font-weight: 800; }
.specs { columns: 2; column-gap: 48px; margin: 0; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); break-inside: avoid; }
.specs dt { color: var(--ink-2); }
.specs dd { margin: 0; font-weight: 600; text-align: right; }
.docs { display: flex; gap: 12px; flex-wrap: wrap; }
.doc { padding: 14px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; }

/* ============ Корзина и оформление ============ */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; margin-bottom: 56px; }
.cart-list { display: grid; gap: 12px; }
.cart-row { display: grid; grid-template-columns: 96px 1fr auto 120px 40px; gap: 18px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); transition: opacity .25s; }
.cart-row.is-removing { opacity: 0; }
.cart-row__img img { width: 96px; height: 96px; object-fit: contain; }
.cart-row__name { font-weight: 700; }
.cart-row__sum { font-weight: 800; font-size: 18px; text-align: right; }
.cart-row__remove { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg-2); cursor: pointer; font-size: 20px; }
.cart-row__remove:hover { background: var(--red-soft); color: var(--red); }
.cart-row .qty { height: 42px; }
.summary { position: sticky; top: 130px; background: var(--bg-2); border-radius: var(--radius); padding: 24px; display: grid; gap: 12px; }
.summary__title { font-weight: 800; font-size: 18px; }
.summary__row, .summary__item { display: flex; justify-content: space-between; gap: 12px; }
.summary__item { font-size: 14px; color: var(--ink-2); }
.summary__row--total { font-size: 20px; padding-top: 12px; border-top: 1px solid var(--line); }
.summary__row--total b { color: var(--red); }
.checkout { display: grid; gap: 20px; }
.checkout__group { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0; display: grid; gap: 14px; }
.checkout__group legend { font-weight: 800; font-size: 18px; padding: 0 8px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; font-size: 14px; }
.field span { font-weight: 600; }
.field small { color: var(--red); }
.field--error input { border-color: var(--red); }
.radio-cards > div { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-cards label { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.radio-cards label:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.radio-cards input { accent-color: var(--red); }
.alert { background: var(--red-soft); color: var(--red); padding: 12px 16px; border-radius: var(--radius-sm); }
.done { text-align: center; padding: 72px 16px; }
.done__icon { width: 80px; height: 80px; margin: 0 auto; border-radius: 50%; background: var(--green); color: #fff; font-size: 40px; display: grid; place-items: center; }
.info-block { margin: 56px 0; }
.info-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.info-cols > div { background: var(--bg-2); border-radius: var(--radius); padding: 20px; }

/* ============ Подвал, модалки, тосты ============ */
.footer { background: #17191e; color: #c9ccd3; margin-top: 64px; padding-top: 48px; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.footer__title { color: #fff; font-weight: 700; margin-bottom: 12px; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.footer__muted { font-size: 14px; color: #8d929c; }
.footer__phone { font-size: 20px; font-weight: 800; color: #fff; }
.footer__bottom { border-top: 1px solid #2a2d34; margin-top: 32px; padding: 20px 16px; font-size: 13px; color: #6f7480; }

.modal { border: 0; border-radius: var(--radius); padding: 0; width: min(420px, calc(100% - 32px)); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(10, 12, 18, .5); backdrop-filter: blur(2px); }
.modal__body { padding: 28px; display: grid; gap: 14px; position: relative; }
.modal__title { font-size: 22px; font-weight: 800; }
.modal__close { position: absolute; right: 12px; top: 10px; border: 0; background: none; font-size: 28px; cursor: pointer; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 200%); visibility: hidden; background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 999px; box-shadow: var(--shadow-lg); z-index: 100; transition: transform .3s, visibility 0s .3s; max-width: calc(100% - 32px); }
.toast.is-show { transform: translate(-50%, 0); visibility: visible; transition: transform .3s; }
.toast a { color: #ff9aa1; font-weight: 700; margin-left: 10px; }

/* ============ Адаптив ============ */
@media (max-width: 1200px) {
  .mega__grid { grid-template-columns: repeat(4, 1fr); }
  .topbar__hours { display: none; }
}
@media (max-width: 980px) {
  .burger { display: block; }
  .mainbar__inner { gap: 12px; flex-wrap: wrap; min-height: 64px; }
  .search { order: 5; max-width: none; flex-basis: 100%; margin: 0 0 12px; }
  .cart-btn { margin-left: auto; }
  .cart-btn__total { display: none; }
  .nav {
    position: fixed; inset: 0 auto 0 0; width: min(360px, 88vw); z-index: 60;
    background: #fff; flex-direction: column; gap: 0; padding: 72px 0 24px; overflow-y: auto;
    transform: translateX(-100%); transition: transform .3s; box-shadow: var(--shadow-lg);
  }
  .nav.is-open { transform: none; }
  .nav__item { flex-direction: column; }
  .nav__link { padding: 14px 20px; border-bottom: 1px solid var(--line); }
  .nav__link--catalog { margin: 0 16px 8px; border-radius: 999px; justify-content: center; padding: 14px; }
  .nav__item--mega.is-open > .nav__link--catalog::after { display: none; }
  .mega { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0; max-height: none; border: 0; }
  .mega .container { padding: 0; }
  .mega__grid { grid-template-columns: 1fr; gap: 0; }
  .mega__link { flex-direction: row; text-align: left; gap: 12px; padding: 8px 20px; border-radius: 0; }
  .mega__img { width: 44px; height: 44px; }
  .mega__img img { max-height: 44px; }
  .mega__name { margin: 0; font-size: 14px; }
  .mega__series { display: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(10,12,18,.45); z-index: 55; }
  .hero__inner, .promo, .pdp { grid-template-columns: 1fr; }
  .hero__inner { padding: 40px 16px; }
  .hero__perks { grid-template-columns: repeat(3, 1fr); }
  .listing { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0; z-index: 70; border-radius: 0; overflow-y: auto; transform: translateX(-100%); transition: transform .3s; }
  .filters.is-open { transform: none; }
  .filters__close, .toolbar__filters { display: inline-flex; }
  .cart-layout { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .pdp { gap: 24px; }
}
@media (max-width: 640px) {
  .topbar__inner { gap: 12px; justify-content: space-between; }
  .topbar__phone { margin-left: 0; }
  .logo__text { font-size: 17px; }
  .hero__perks { grid-template-columns: 1fr; }
  .promo__products { grid-template-columns: 1fr 1fr; }
  .promo__item:nth-child(3) { display: none; }
  .grid-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card__body { padding: 0 12px 12px; }
  .card__name { font-size: 14px; }
  .price__now { font-size: 17px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-tile__img { height: 100px; }
  .cat-tile__img img { max-height: 100px; }
  .key-specs { grid-template-columns: 1fr; }
  .specs { columns: 1; }
  .buybox { padding: 18px; }
  .cart-row { grid-template-columns: 72px 1fr 36px; grid-template-areas: "img info rm" "img qty sum"; gap: 8px 12px; }
  .cart-row__img { grid-area: img; } .cart-row__img img { width: 72px; height: 72px; }
  .cart-row__info { grid-area: info; } .cart-row .qty { grid-area: qty; justify-self: start; }
  .cart-row__sum { grid-area: sum; } .cart-row > form:last-child { grid-area: rm; }
  .footer__grid { grid-template-columns: 1fr; }
  .page-title small { display: block; margin: 6px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
