/* ==========================================================================
   AutoGM — магазин запчастей. Тёмная тема, дизайн-токены в :root.
   ========================================================================== */

:root {
  --bg: #0d0d0d;
  --bg-soft: #141414;
  --bg-card: #131313;
  --text: #ffffff;
  --muted: #9a9a9a;
  --muted-dim: #6d6d6d;
  --accent: #b45cf0;        /* неоновый фиолетовый — под подсветку на фото */
  --error: #e8322d;         /* ошибки формы остаются красными */
  --line: rgba(255, 255, 255, .12);
  --line-soft: rgba(255, 255, 255, .07);
  --light: #f2f2f2;

  --container: 1440px;
  --pad: 40px;
  --radius: 18px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

::selection { background: var(--accent); color: #fff; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ============ ШАПКА ============ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 22px 0;
  transition: background .35s var(--ease), padding .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  padding: 14px 0;
  background: rgba(13, 13, 13, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}

.header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
}
.header__inner > .logo { justify-self: start; }
.header__inner > .header__cta,
.header__inner > .burger { justify-self: end; }

.logo {
  position: relative;
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
  white-space: nowrap;
}
.logo__text b { font-weight: 800; }
.logo__dot {
  position: absolute;
  top: -2px;
  right: -8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.logo--sm { font-size: 20px; }

.nav {
  display: flex;
  align-items: center;
  gap: 38px;
}

.nav__link {
  font-size: 14px;
  color: var(--muted);
  transition: color .25s var(--ease);
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__link--cta { display: none; }

.header__cta {
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 500;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--text);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.header__cta:hover { color: var(--accent); border-color: var(--accent); }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  flex-shrink: 0;
}
.burger span {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============ ПЕРВЫЙ ЭКРАН ============ */
.hero {
  position: relative;
  min-height: 100svh;
  padding: 150px 0 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(1200px, 120vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(180, 92, 240, .16) 0%, rgba(180, 92, 240, 0) 62%);
  z-index: -2;
  pointer-events: none;
}

.hero__title {
  position: absolute;
  left: 50%;
  /* Надпись приподнята над крышей машины, но нижняя часть букв по-прежнему
     уходит за кузов. 22% — верх букв примерно на 14% высоты экрана. */
  top: 22%;
  transform: translate(-50%, -50%);
  width: 100%;
  z-index: -1;
  text-align: center;
  /* 8vw подобрано так, чтобы строка «МАГАЗИН ЗАПЧАСТЕЙ» занимала ~88% ширины
     экрана и не обрезалась (в строке ≈11em при этом начертании).
     Верхний предел 132px: дальше надпись растягивалась по всему широкому
     монитору и выглядела громоздко. */
  font-size: clamp(40px, 8vw, 132px);
  font-weight: 300;
  line-height: .92;
  letter-spacing: -.01em;
  white-space: nowrap;
  color: #fff;
  pointer-events: none;
  user-select: none;
}

/* --- слайдер --- */
.slider {
  position: relative;
  width: 100%;
  /* без ограничения машина на широких мониторах занимала весь экран */
  max-width: 1400px;
  margin: -10px auto 0;
}

.slider__track {
  display: flex;
  align-items: center;
  transition: transform .75s var(--ease);
  will-change: transform;
}

.slide {
  flex: 0 0 66%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5%;
  opacity: .25;
  filter: grayscale(.6);
  transition: opacity .6s var(--ease), filter .6s var(--ease), transform .6s var(--ease);
  transform: scale(.86);
}

.slide.is-active {
  opacity: 1;
  filter: none;
  transform: scale(1);
}

.slide__img {
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
}

.slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--light);
  color: #111;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .55);
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.slider__arrow svg { width: 24px; height: 24px; }
.slider__arrow:hover { transform: translateY(-50%) scale(1.09); background: #fff; }
.slider__arrow:active { transform: translateY(-50%) scale(.96); }
.slider__arrow--prev { left: max(3vw, 24px); }
.slider__arrow--next { right: max(3vw, 24px); }

.hero__btn {
  align-self: center;
  margin-top: 18px;
  padding: 15px 34px;
  border-radius: 999px;
  background: var(--light);
  color: #101010;
  font-size: 15px;
  font-weight: 500;
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.hero__btn:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 255, 255, .14);
}

.hero__bottom {
  margin-top: auto;
  padding-top: 42px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.hero__desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 460px;
}

.brands { display: flex; gap: 12px; flex-wrap: wrap; }

.brand {
  padding: 13px 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.brand:hover { color: var(--text); border-color: rgba(255, 255, 255, .35); }
.brand.is-active {
  color: var(--text);
  border-color: var(--text);
  background: rgba(255, 255, 255, .06);
}

/* ============ БЕГУЩАЯ СТРОКА ============ */
.marquee {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 20px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee__track {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  animation: marquee 42s linear infinite;
  will-change: transform;
}
.marquee span {
  font-size: 15px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-dim);
}
.marquee i { color: var(--accent); font-style: normal; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ ОБЩИЕ БЛОКИ СЕКЦИЙ ============ */
.section { padding: 120px 0; }
.section--tight { padding-top: 40px; }

.section__head { max-width: 720px; margin-bottom: 62px; }

.tag {
  display: inline-block;
  margin-bottom: 20px;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.section__title {
  font-size: clamp(34px, 5.2vw, 68px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -.02em;
}

.section__lead {
  margin-top: 22px;
  max-width: 540px;
  font-size: 16px;
  color: var(--muted);
}

/* ============ КАТАЛОГ ============ */
.cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.cat {
  position: relative;
  padding: 34px 30px 30px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-card) 0%, #0f0f0f 100%);
  display: flex;
  flex-direction: column;
  transition: border-color .35s var(--ease), transform .35s var(--ease), background .35s var(--ease);
}
.cat:hover {
  border-color: rgba(255, 255, 255, .22);
  transform: translateY(-6px);
}

.cat__meta {
  position: absolute;
  top: 26px;
  right: 28px;
  text-align: right;
  line-height: 1.35;
}
.cat__num {
  display: block;
  font-size: 13px;
  color: var(--muted-dim);
  letter-spacing: .1em;
}
.cat__count {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cat__icon {
  width: 52px;
  height: 52px;
  margin-bottom: 26px;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--text);
  transition: border-color .35s var(--ease), color .35s var(--ease);
}
.cat__icon svg { width: 26px; height: 26px; }
.cat:hover .cat__icon { border-color: var(--accent); color: var(--accent); }

.cat__title {
  font-size: 21px;
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 12px;
}

.cat__text {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 22px;
}

.cat__list {
  margin-bottom: 26px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.cat__list li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  color: var(--muted-dim);
}
.cat__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.cat__link {
  margin-top: auto;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
/* растягиваем ссылку на всю карточку — кликается любая её часть */
.cat__link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.cat:hover .cat__link { color: var(--accent); }
.cat__link span { transition: transform .3s var(--ease); display: inline-block; }
.cat__link:hover span { transform: translateX(6px); }

/* ============ ТОВАРЫ ============ */
.shop-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.shop-tab {
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.shop-tab i {
  font-style: normal;
  font-size: 12px;
  color: var(--muted-dim);
  font-variant-numeric: tabular-nums;
}
.shop-tab:hover { color: var(--text); border-color: rgba(255, 255, 255, .35); }
.shop-tab.is-active {
  color: var(--text);
  border-color: var(--text);
  background: rgba(255, 255, 255, .06);
}
.shop-tab.is-active i { color: var(--accent); }

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 18px;
}

.pcard {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.pcard:hover { border-color: var(--accent); transform: translateY(-4px); }
.pcard.is-hidden { display: none; }

.pcard__img {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: #f3f3f3;      /* фото товаров сняты на белом — светлая плашка */
  padding: 14px;
}
.pcard__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;  /* убирает белую рамку вокруг предметов */
}
.pcard__nophoto { font-size: 12px; color: #8b8b8b; }

.pcard__body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px 16px 18px;
  flex: 1;
}

.pcard__meta {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-dim);
}

.pcard__name {
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pcard__desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pcard__foot {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pcard__price {
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pcard__btn {
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.pcard:hover .pcard__btn {
  color: #101010;
  background: var(--light);
  border-color: var(--light);
}

/* карточка «не нашли нужный товар» */
.pcard--ask {
  grid-column: span 2;
  justify-content: center;
  gap: 12px;
  padding: 30px 26px;
  border-color: var(--accent);
  background: linear-gradient(160deg, rgba(180, 92, 240, .12), rgba(180, 92, 240, 0) 70%), var(--bg-card);
}
.pcard__ask-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 19px;
}
.pcard__ask-title { font-size: 19px; font-weight: 500; }
.pcard__ask-text { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.pcard__ask-btn {
  margin-top: 6px;
  font-size: 14px;
  color: var(--accent);
  display: inline-flex;
  gap: 8px;
}
.pcard__ask-btn span { transition: transform .3s var(--ease); }
.pcard--ask:hover .pcard__ask-btn span { transform: translateX(6px); }

.shop-more {
  display: block;
  margin: 32px auto 0;
  padding: 14px 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 15px;
  color: var(--text);
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.shop-more:hover { border-color: var(--text); background: rgba(255, 255, 255, .05); }
.shop-more[hidden] { display: none; }

@media (max-width: 640px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pcard--ask { grid-column: span 2; }
  .pcard__body { padding: 12px 12px 14px; }
  .pcard__name { font-size: 13px; }
  .pcard__foot { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ============ ПОПУЛЯРНЫЕ БРЕНДЫ ============ */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.brand-tile {
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: 20px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--bg-card);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .04em;
  text-align: center;
  color: var(--muted);
  transition: color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.brand-tile:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.brand-grid__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
  font-size: 15px;
  color: var(--muted);
  transition: color .25s var(--ease);
}
.brand-grid__cta span { transition: transform .3s var(--ease); }
.brand-grid__cta:hover { color: var(--text); }
.brand-grid__cta:hover span { transform: translateX(6px); }

@media (max-width: 640px) {
  .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .brand-tile { min-height: 78px; font-size: 14px; padding: 16px 10px; }
}

/* ============ ЦИФРЫ + ПРЕИМУЩЕСТВА ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 46px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 100px;
}
.stat b {
  display: block;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 300;
  letter-spacing: -.02em;
  line-height: 1;
  margin-bottom: 12px;
}
.stat span { font-size: 14px; color: var(--muted); }

.about {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 60px;
}

.feats { display: grid; grid-template-columns: 1fr 1fr; gap: 34px 40px; }
.feats h4 {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.feats p { font-size: 14px; color: var(--muted); }

/* ============ КАК ЗАКАЗАТЬ ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.step {
  padding: 30px 26px 34px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: var(--bg-soft);
  transition: border-color .35s var(--ease);
}
.step:hover { border-color: rgba(255, 255, 255, .2); }
.step b {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: 24px;
}
.step h4 { font-size: 18px; font-weight: 500; margin-bottom: 10px; }
.step p { font-size: 14px; color: var(--muted); }

/* ============ ЗАЯВКА ============ */
.order__inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 70px;
  align-items: start;
}

.order__contacts {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.order__phone {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 300;
  letter-spacing: -.01em;
  transition: color .25s var(--ease);
}
.order__phone:hover { color: var(--accent); }
.order__mail { font-size: 15px; color: var(--muted); }
.order__mail:hover { color: var(--text); }

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 40px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.field { display: flex; flex-direction: column; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 9px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f0f0f;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder,
.field textarea::placeholder { color: #5a5a5a; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, .45);
  background: #121212;
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.field select option { background: #101010; color: #fff; }

.field.has-error input,
.field.has-error textarea { border-color: var(--error); }

.err {
  min-height: 0;
  font-size: 12px;
  color: var(--error);
  margin-top: 6px;
  display: none;
}
.field.has-error .err { display: block; }

/* поле-ловушка: невидимо для людей, его заполняют только боты */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.check {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.btn {
  padding: 16px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: transform .25s var(--ease), background .25s var(--ease), opacity .25s var(--ease);
}
.btn--light { background: var(--light); color: #101010; }
.btn--light:hover { background: #fff; transform: translateY(-2px); }
.btn[disabled] { opacity: .6; pointer-events: none; }

.form__note {
  font-size: 14px;
  color: var(--muted);
  min-height: 20px;
}
.form__note.is-ok { color: #57c98a; }
.form__note.is-bad { color: var(--error); }

/* ============ СОЦСЕТИ ============ */
.socials {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.soc {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 28px 26px 26px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color .3s var(--ease), transform .3s var(--ease), background .3s var(--ease);
}
.soc:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  background: linear-gradient(160deg, rgba(180, 92, 240, .1), rgba(180, 92, 240, 0) 65%), var(--bg-card);
}

.soc__icon {
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  border-radius: 13px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--text);
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.soc__icon svg { width: 22px; height: 22px; }
.soc:hover .soc__icon { color: var(--accent); border-color: var(--accent); }

.soc__name { font-size: 18px; font-weight: 500; }
.soc__handle { font-size: 14px; color: var(--muted); }

@media (max-width: 900px) {
  .socials { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .soc { padding: 20px 18px; }
  .soc__name { font-size: 16px; }
  .soc__handle { font-size: 13px; }
}

/* ============ КОРЗИНА ============ */
.cart__empty {
  padding: 34px 30px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

.cart__list { display: flex; flex-direction: column; gap: 12px; }

.citem {
  display: grid;
  grid-template-columns: 76px 1fr auto auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--bg-card);
}

.citem__img {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  background: #f3f3f3;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.citem__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; padding: 6px; }
.citem__img span { font-size: 10px; color: #8b8b8b; text-align: center; }

.citem__name { font-size: 14.5px; line-height: 1.35; }
.citem__meta { display: block; margin-top: 4px; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-dim); }

.citem__qty { display: flex; align-items: center; gap: 4px; }
.citem__qty button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.citem__qty button:hover { color: var(--text); border-color: var(--text); }
.citem__qty b { min-width: 26px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }

.citem__price { min-width: 96px; text-align: right; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.citem__price small { display: block; font-size: 11px; color: var(--muted-dim); }

.citem__del {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--muted-dim);
  font-size: 18px;
  line-height: 1;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.citem__del:hover { color: var(--error); background: rgba(232, 50, 45, .1); }

.cart__foot {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cart__total { display: flex; align-items: baseline; gap: 12px; }
.cart__total span { font-size: 14px; color: var(--muted); }
.cart__total b { font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cart__total i { font-style: normal; font-size: 13px; color: var(--muted-dim); }

.cart__actions { display: flex; align-items: center; gap: 14px; }
.cart__clear { font-size: 14px; color: var(--muted); transition: color .2s var(--ease); }
.cart__clear:hover { color: var(--error); }
.cart__order { white-space: nowrap; }

/* строка в форме: сколько товаров уйдёт вместе с заявкой */
.form__cart {
  margin: -4px 0 2px;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: rgba(180, 92, 240, .1);
  font-size: 13.5px;
  color: var(--text);
}
.form__cart a { color: var(--accent); border-bottom: 1px solid currentColor; }

/* плавающая кнопка корзины */
.cartfab {
  position: fixed;
  right: 26px;
  bottom: 84px;
  z-index: 90;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(180, 92, 240, .35);
  transition: transform .25s var(--ease);
}
.cartfab svg { width: 24px; height: 24px; }
.cartfab:hover { transform: scale(1.07); }
.cartfab[hidden] { display: none; }
.cartfab.is-pop { animation: cartpop .4s var(--ease); }
@keyframes cartpop { 40% { transform: scale(1.18); } }

.cartfab__count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--text);
  color: #101010;
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

/* всплывающая панель корзины: показывается на месте, страницу не листает */
.cartdrawer {
  position: fixed;
  right: 26px;
  bottom: 150px;
  z-index: 95;
  width: min(380px, calc(100vw - 32px));
  max-height: min(62vh, 560px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(18, 18, 18, .97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  opacity: 0;
  transform: translateY(14px) scale(.98);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.cartdrawer.is-on { opacity: 1; transform: none; }
.cartdrawer[hidden] { display: none; }

.cartdrawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
  font-weight: 500;
}
.cartdrawer__head span { color: var(--accent); }
.cartdrawer__close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.cartdrawer__close:hover { color: var(--text); background: rgba(255, 255, 255, .08); }

.cartdrawer__list {
  padding: 14px;
  overflow-y: auto;
  gap: 8px;
}

.cartdrawer__foot {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 10px;
}
.cartdrawer__total { display: flex; align-items: baseline; justify-content: space-between; }
.cartdrawer__total span { font-size: 13px; color: var(--muted); }
.cartdrawer__total b { font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cartdrawer__order { text-align: center; padding: 13px 20px; font-size: 14px; }
.cartdrawer__more {
  font-size: 13px;
  color: var(--muted);
  padding: 4px;
  transition: color .2s var(--ease);
}
.cartdrawer__more:hover { color: var(--text); }

/* компактная строка внутри панели */
.citem--sm {
  grid-template-columns: 46px 1fr auto auto;
  gap: 10px;
  padding: 8px;
  border-radius: 11px;
}
.citem--sm .citem__img { width: 46px; height: 46px; border-radius: 8px; }
.citem--sm .citem__name { font-size: 12.5px; }
.citem--sm .citem__price { min-width: 74px; font-size: 13px; }
.citem--sm .citem__price small { display: none; }
.citem--sm .citem__qty button { width: 24px; height: 24px; font-size: 14px; }
.citem--sm .citem__qty b { min-width: 20px; font-size: 13px; }
.citem--sm .citem__del { width: 24px; height: 24px; font-size: 15px; }

@media (max-width: 640px) {
  .cartdrawer {
    right: 12px;
    left: 12px;
    bottom: 140px;
    width: auto;
    max-height: 58vh;
  }
  .citem--sm {
    grid-template-columns: 46px 1fr auto;
    grid-template-areas: "img name del" "img qty price";
  }
}

/* всплывающее подтверждение «добавлено» */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  z-index: 120;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--light);
  color: #101010;
  font-size: 14px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* товар уже в корзине — карточка это показывает */
.pcard.is-incart { border-color: var(--accent); }
.pcard.is-incart .pcard__btn {
  color: #101010;
  background: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 640px) {
  .citem {
    grid-template-columns: 60px 1fr auto;
    grid-template-areas: "img name del" "img qty price";
    gap: 10px 12px;
    padding: 12px;
  }
  .citem__img { width: 60px; height: 60px; grid-area: img; align-self: start; }
  .citem__name { grid-area: name; font-size: 13.5px; }
  .citem__qty { grid-area: qty; }
  .citem__price { grid-area: price; min-width: 0; font-size: 14px; }
  .citem__del { grid-area: del; justify-self: end; }

  .cart__foot { flex-direction: column; align-items: stretch; }
  .cart__actions { justify-content: space-between; }
  .cartfab { right: 16px; bottom: 76px; }
}

/* ============ КОНТАКТЫ ============ */
.contacts {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 50px;
  align-items: start;
}

.contacts__info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px 30px;
}
.cinfo span {
  display: block;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: 12px;
}
.cinfo p { font-size: 16px; line-height: 1.5; }
.cinfo a:hover { color: var(--accent); }

.map {
  height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--bg-soft);
}
.map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) invert(.92) contrast(.88);
}

/* ============ ПОДВАЛ ============ */
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 56px 0 34px;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  padding-bottom: 36px;
}
.footer__nav { display: flex; gap: 30px; flex-wrap: wrap; }
.footer__nav a {
  font-size: 14px;
  color: var(--muted);
  transition: color .25s var(--ease);
}
.footer__nav a:hover { color: var(--text); }
.footer__addr { font-size: 14px; color: var(--muted); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--muted-dim);
}

/* ============ КНОПКА НАВЕРХ ============ */
.up {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(20, 20, 20, .85);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 18px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s, border-color .25s var(--ease);
}
.up.is-visible { opacity: 1; visibility: visible; transform: none; }
.up:hover { border-color: var(--text); }

/* ============ АНИМАЦИЯ ПОЯВЛЕНИЯ ============ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ============ АДАПТИВ ============ */
@media (max-width: 1280px) {
  :root { --pad: 28px; }
  .nav { gap: 26px; }
  .header__cta { font-size: 16px; }
}

@media (max-width: 1100px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .order__inner { grid-template-columns: 1fr; gap: 44px; }
  .contacts { grid-template-columns: 1fr; }
  .slide { flex: 0 0 78%; }
}

@media (max-width: 900px) {
  .header__cta { display: none; }
  .burger { display: block; }

  .header__inner { grid-template-columns: 1fr auto; }

  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    background: rgba(10, 10, 10, .97);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s var(--ease), visibility .35s;
  }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav__link { font-size: 20px; color: var(--text); }
  .nav__link--cta {
    display: block;
    margin-top: 10px;
    padding: 13px 30px;
    border-radius: 999px;
    background: var(--light);
    color: #101010;
  }
  .nav__link--cta::after { display: none; }

  .section { padding: 84px 0; }
  .stats { grid-template-columns: 1fr 1fr; gap: 34px 20px; margin-bottom: 70px; }
  .feats { grid-template-columns: 1fr; gap: 26px; }
  .contacts__info { gap: 26px; }
  .map { height: 340px; }
  .form { padding: 28px 22px; }
  .hero__bottom { flex-direction: column; align-items: flex-start; gap: 26px; }
  .slider__arrow { width: 48px; height: 48px; }
  .slider__arrow svg { width: 20px; height: 20px; }
}

@media (max-width: 640px) {
  :root { --pad: 20px; }

  .hero { padding-top: 120px; min-height: auto; }
  .hero__title {
    position: static;
    transform: none;
    margin-bottom: 6px;
    white-space: normal;
    font-size: clamp(38px, 13vw, 64px);
    line-height: 1;
  }
  .hero__title span { display: block; }
  .slider { max-width: none; }
  .slide { flex: 0 0 100%; padding: 0; }
  .slider__arrow--prev { left: 6px; }
  .slider__arrow--next { right: 6px; }
  .hero__desc { font-size: 13.5px; }
  .brand { padding: 11px 22px; font-size: 13px; }

  .cats, .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .form { grid-template-columns: 1fr; }
  .contacts__info { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer__nav { gap: 14px 22px; }
  .up { right: 16px; bottom: 16px; }
}

/* ============ ТЕЛЕФОНЫ: отдельная отделка ============ */
@media (max-width: 640px) {
  /* iOS увеличивает страницу при касании поля со шрифтом меньше 16px
     и обратно не отматывает — поэтому здесь ровно 16 */
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
    padding: 15px 14px;
  }

  /* пальцем труднее попасть, чем курсором: увеличиваем цели нажатия */
  .cat__link,
  .brand-grid__cta,
  .footer__nav a { padding-block: 6px; }

  .check { padding-block: 6px; }

  /* ссылки-контакты: пальцу нужна цель повыше строки текста */
  .order__mail,
  .cinfo a { display: inline-block; padding-block: 7px; }
  .check input { width: 20px; height: 20px; }

  /* убираем серую вспышку при касании — она выглядит как сбой */
  a, button { -webkit-tap-highlight-color: rgba(180, 92, 240, .18); }

  /* карта на телефоне ниже, иначе занимает пол-экрана */
  .map { height: 260px; }
  .map--static { padding: 28px 18px; }
}

/* вырезы и скруглённые углы современных телефонов */
@supports (padding: env(safe-area-inset-left)) {
  .container {
    padding-left: calc(var(--pad) + env(safe-area-inset-left));
    padding-right: calc(var(--pad) + env(safe-area-inset-right));
  }
  .up { bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* ============ ПОСТРАНИЧНЫЙ РЕЖИМ НА ТЕЛЕФОНЕ ============ */
/* На компьютере сайт остаётся одной длинной страницей: переключатель скрыт,
   все разделы видны. На телефоне страница делится на три экрана. */
.mpages,
.mnext { display: none; }

@media (max-width: 900px) {
  /* На телефоне шапка не меняет высоту при прокрутке: иначе щель между ней
     и панелью разделов то появляется, то исчезает, и сквозь неё видна
     полоска фотографии — те самые «разрезы». Фиксируем 72 px и делаем фон
     непрозрачным, чтобы шапка с панелью читались одной сплошной полосой. */
  .header,
  .header.is-scrolled {
    padding: 14px 0;
    background: rgba(13, 13, 13, .94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: transparent;
  }

  .mpages {
    display: block;
    position: sticky;
    /* ровно высота шапки — ни щели, ни нахлёста */
    margin-top: 72px;
    top: 72px;
    z-index: 60;
    padding: 10px 0;
    background: rgba(13, 13, 13, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line-soft);
  }
  .mpages__inner { display: flex; gap: 8px; }

  .mpage-btn {
    flex: 1;
    padding: 11px 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
    color: var(--muted);
    transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
  }
  .mpage-btn.is-active {
    color: var(--text);
    border-color: var(--accent);
    background: rgba(180, 92, 240, .14);
  }

  /* показываем только разделы активного экрана */
  [data-mpage] { display: none; }
  [data-mpage].is-mpage-on { display: block; }

  .mnext { display: block; padding: 0 0 60px; }
  .mnext__btn {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 15px;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
  .mnext__btn span { transition: transform .3s var(--ease); }
  .mnext__btn:active span { transform: translateX(5px); }

  /* первый экран на телефоне ниже: он больше не занимает всю высоту */
  .hero { padding-top: 28px; }
}

/* меню-бургер: 100dvh учитывает адресную строку браузера, иначе нижние
   пункты уезжают под неё; прокрутка — на случай мелких экранов */
@media (max-width: 900px) {
  .nav {
    inset: 0 0 auto 0;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    padding: 100px 24px calc(40px + env(safe-area-inset-bottom));
    justify-content: flex-start;
  }
  .nav__link { flex-shrink: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
