/* ==========================================================================
   ION-SERVICE — новый дизайн (v2)
   Тёмный премиум-герой, красный акцент, карточки и прайс-таблицы
   ========================================================================== */

:root {
  --red: #e10600;
  --red-2: #ff2f2f;
  --red-3: #a80400;
  --red-soft: rgba(225, 6, 0, .08);

  --ink: #0b0e14;
  --ink-2: #12161f;
  --ink-3: #1b2231;

  --text: #101828;
  --muted: #667085;
  --line: #e7eaf0;
  --bg: #f7f8fb;
  --card: #fff;

  /* поверхности светлой темы */
  --surface: #fff;              /* карточки, поля, выпадашки */
  --surface-2: #fbfbfd;         /* раскрытый прайс модели */
  --header-bg: rgba(255, 255, 255, .88);
  --search-bg: rgba(255, 255, 255, .94);
  --ph: linear-gradient(160deg, #f4f5f8, #eceef3);   /* подложка под фото товара (светлая в обеих темах) */
  --photo-bg: linear-gradient(160deg, #fff, #f2f4f8);
  --shadow-col: rgba(16, 24, 40, .08);
  --shadow-lg-col: rgba(16, 24, 40, .16);
  color-scheme: light;

  --r: 20px;
  --r-sm: 14px;
  --r-xs: 10px;
  --shadow: 0 10px 30px var(--shadow-col);
  --shadow-lg: 0 26px 60px var(--shadow-lg-col);
  --wrap: 1200px;
  --head-h: 76px;
}

/* ---------- тёмная тема (по переключателю) ---------- */
:root[data-theme="dark"] {
  --text: #eaf0f7;
  --muted: #98a2b3;
  --line: #232a37;
  --bg: #0b0e14;
  --card: #12161f;
  --surface: #12161f;
  --surface-2: #171d28;
  --header-bg: rgba(11, 14, 20, .9);
  --search-bg: rgba(18, 22, 31, .94);
  --red-soft: rgba(225, 6, 0, .18);
  --shadow-col: rgba(0, 0, 0, .5);
  --shadow-lg-col: rgba(0, 0, 0, .62);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* iOS: не раздувать шрифт при повороте и не подсвечивать тапы синим */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  /* анкеры не заезжают под липкую шапку (важно для аккордеонов на iPhone) */
  scroll-padding-top: calc(var(--head-h) + 14px);
}
:target { scroll-margin-top: calc(var(--head-h) + 14px); }

body {
  margin: 0;
  transition: background .25s ease, color .25s ease;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;   /* Safari: hidden ломает position: sticky у шапки */
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: clamp(30px, 4.4vw, 56px); }
h2 { font-size: clamp(25px, 3vw, 40px); }
h3 { font-size: clamp(19px, 2vw, 24px); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(48px, 6vw, 84px) 0; }
.section--tight { padding: clamp(36px, 4vw, 56px) 0; }
.section--white { background: var(--surface); }
.section--dark { background: var(--ink); color: #fff; }
.center { text-align: center; }

.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.lead { font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); max-width: 62ch; }
.section--dark .lead { color: rgba(255, 255, 255, .72); }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-weight: 700; font-size: 15px; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

.btn--primary {
  background: linear-gradient(135deg, var(--red-2), var(--red));
  color: #fff;
  box-shadow: 0 12px 26px rgba(225, 6, 0, .28);
}
.btn--primary:hover { box-shadow: 0 18px 34px rgba(225, 6, 0, .34); }

.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--red); color: var(--red); }

.btn--glass { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(8px); }
.btn--glass:hover { background: rgba(255, 255, 255, .18); }

.btn--max {
  background: linear-gradient(135deg, #471aff 0%, #6e1aff 45%, #00bfff 100%);
  color: #fff; box-shadow: 0 12px 26px rgba(71, 26, 255, .3);
}
.btn--max:hover { box-shadow: 0 18px 34px rgba(71, 26, 255, .4); }
.btn--max:active { transform: translateY(1px); }
/* официальный знак МАКСа (из брендбука): белый, поэтому ставится на градиент */
.i-max {
  display: inline-block; flex: 0 0 auto; width: 19px; height: 19px;
  background: url('../img/max-mark.png') center / contain no-repeat;
}
.btn--tg { background: #2aabee; color: #fff; }
.btn--sm { height: 42px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.btn--block { width: 100%; }

/* ---------- шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 200;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.header.is-scrolled { box-shadow: 0 10px 30px rgba(16, 24, 40, .07); }
.header__inner { display: flex; align-items: center; gap: 22px; height: var(--head-h); transition: height .2s ease; }
.header.is-scrolled .header__inner { height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.logo img { height: 42px; width: auto; }
.logo__tag { font-size: 11px; line-height: 1.2; color: var(--muted); font-weight: 600; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 12px;
  font-weight: 600; font-size: 15px; color: var(--text);
  transition: background .16s ease, color .16s ease;
}
.nav__link:hover { background: var(--red-soft); color: var(--red); }
.nav__link.is-active { color: var(--red); }
.nav__item { position: relative; }
.nav__item:hover > .nav__link { background: var(--red-soft); color: var(--red); }
.nav__drop {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav__item:hover .nav__drop { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__drop a { display: block; padding: 9px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--text); }
.nav__drop a:hover { background: var(--red-soft); color: var(--red); }

.header__actions { display: flex; align-items: center; gap: 12px; }
.header__phone { display: flex; flex-direction: column; line-height: 1.15; }
.header__phone b { font-size: 16px; font-weight: 800; }
.header__phone span { font-size: 11px; color: var(--muted); }
.burger {
  display: none; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); position: relative;
}
.burger i, .burger i::before, .burger i::after {
  position: absolute; left: 50%; width: 20px; height: 2px; background: var(--text); border-radius: 2px;
  transform: translateX(-50%); transition: .2s;
}
.burger i { top: 50%; margin-top: -1px; }
.burger i::before { content: ''; top: -6px; }
.burger i::after { content: ''; top: 6px; }
.burger.is-open i { background: transparent; }
.burger.is-open i::before { top: 0; transform: rotate(45deg); }
.burger.is-open i::after { top: 0; transform: rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: var(--head-h) 0 0; z-index: 190;
  background: var(--surface); padding: 18px 20px calc(40px + env(safe-area-inset-bottom));
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  transform: translateX(100%); transition: transform .26s ease;
}
.mobile-nav.is-open { transform: translateX(0); }
.mnav { display: flex; flex-direction: column; gap: 22px; padding-bottom: 8px; }
.mnav__title {
  display: block; margin: 0 4px 8px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.mnav__group { display: flex; flex-direction: column; }
.mnav__row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 6px; border-bottom: 1px solid var(--line);
  font-weight: 700; font-size: 16.5px; color: var(--text);
  transition: background .15s ease;
}
.mnav__row:last-child { border-bottom: 0; }
.mnav__row:active { background: var(--red-soft); }
.mnav__tile {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--red-soft); color: var(--red);
}
.mnav__tile svg { width: 22px; height: 22px; }
.mnav__row b { flex: 1 1 auto; font-weight: 700; }
.mnav__chev { flex: 0 0 auto; color: var(--muted); opacity: .5; }
.mnav__chev svg { display: block; width: 16px; height: 16px; }
.mnav__actions { display: flex; flex-direction: column; gap: 10px; }
.mnav__foot { font-size: 13.5px; line-height: 1.6; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
.mnav__foot p { margin: 0 0 8px; }
.mnav__foot b { color: var(--text); }

/* появление строк при открытии меню */
.mobile-nav.is-open .mnav__group { animation: mnavIn .3s ease both; }
.mobile-nav.is-open .mnav__group:nth-child(2) { animation-delay: .05s; }
.mobile-nav.is-open .mnav__actions { animation: mnavIn .3s ease .1s both; }
.mobile-nav.is-open .mnav__foot { animation: mnavIn .3s ease .14s both; }
@keyframes mnavIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .mobile-nav.is-open .mnav__group,
  .mobile-nav.is-open .mnav__actions,
  .mobile-nav.is-open .mnav__foot { animation: none; }
}

/* ---------- герой ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 520px at 78% 18%, rgba(225, 6, 0, .38), transparent 62%),
    radial-gradient(700px 420px at 12% 92%, rgba(225, 6, 0, .16), transparent 60%),
    linear-gradient(160deg, #0b0e14 0%, #12161f 55%, #0b0e14 100%);
  color: #fff;
  padding: clamp(44px, 6vw, 86px) 0 clamp(56px, 7vw, 104px);
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(70% 60% at 60% 40%, #000 0%, transparent 100%);
}
.hero__grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--red-2); }
.hero__lead { font-size: clamp(16px, 1.5vw, 20px); color: rgba(255, 255, 255, .74); max-width: 54ch; margin-bottom: 26px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, .92);
}
.chip svg { width: 16px; height: 16px; color: var(--red-2); }

.hero__media { position: relative; display: flex; align-items: center; justify-content: center; }
.hero__glow {
  position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(225, 6, 0, .55), transparent 68%);
  filter: blur(28px); top: 6%;
}
.hero__phone {
  position: relative; width: auto; height: min(520px, 56vh); height: min(520px, 56svh);
  max-width: 100%; z-index: 2;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .45));
  animation: float 6s ease-in-out infinite, impact .5s ease-out 1.85s;
}
@keyframes float { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-14px) } }
/* лёгкий толчок в момент удара — за миг до появления трещин */
@keyframes impact {
  0%, 100% { transform: translateY(0) rotate(0deg) }
  22%      { transform: translateY(-2px) rotate(-.7deg) }
  48%      { transform: translateY(1px) rotate(.6deg) }
  74%      { transform: translateY(0) rotate(-.25deg) }
}
/* слой трещин: точно по коробке телефона, проявляется через 2 с */
.hero__crack {
  position: absolute; inset: 0; margin: auto;
  height: min(520px, 56vh); height: min(520px, 56svh); width: auto; max-width: 100%; z-index: 3;
  opacity: 0; pointer-events: none;
  animation: float 6s ease-in-out infinite, crackIn .85s ease-out 2s forwards;
}
@keyframes crackIn {
  0%   { opacity: 0;   filter: blur(8px) brightness(1.9) }
  55%  { opacity: .92; filter: blur(0)   brightness(1.35) }
  100% { opacity: 1;   filter: blur(0)   brightness(1) }
}

.float-card {
  position: absolute; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 16px;
  background: rgba(11, 14, 20, .72); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(12px); box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
  font-size: 13.5px; font-weight: 700; color: #fff;
  z-index: 3;
  animation: float 7s ease-in-out infinite;
}
.float-card small { display: block; font-weight: 600; font-size: 11.5px; color: rgba(255, 255, 255, .7); }
.float-card--1 { left: -33%; top: 7%; animation-delay: .6s; }
.float-card--2 { right: -14%; bottom: 26%; animation-delay: 1.4s; }
.float-card__dot { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, var(--red-2), var(--red)); }
.float-card__dot svg { width: 18px; height: 18px; color: #fff; }

.hero--page { padding-bottom: clamp(40px, 5vw, 72px); }
.hero--page .hero__grid { grid-template-columns: 1.15fr .85fr; }
.breadcrumbs { font-size: 13px; color: rgba(255, 255, 255, .55); margin-bottom: 16px; }
.breadcrumbs a:hover { color: #fff; }

/* полоса фактов под героем */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: -42px; position: relative; z-index: 5; }
.fact {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px; box-shadow: var(--shadow); text-align: center;
}
.fact b { display: block; font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; color: var(--red); }
.fact span { font-size: 13.5px; color: var(--muted); }

/* ---------- карточки устройств/моделей ---------- */
.grid { display: grid; gap: 20px; align-items: start; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(225, 6, 0, .35); }

.device {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 26px 20px 22px; gap: 14px;
}
.device__img { height: 150px; display: grid; place-items: center; }
.device__img img { max-height: 150px; object-fit: contain; transition: transform .25s ease; }
.device:hover .device__img img { transform: scale(1.06); }
.device h3 { margin: 0; font-size: 19px; }
.device__from { color: var(--muted); font-size: 14px; }
.device__from b { color: var(--red); font-weight: 800; font-size: 17px; }
.device__more { color: var(--red); font-weight: 700; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.device__more svg { width: 17px; height: 17px; flex: 0 0 auto; transition: transform .2s ease; }
.device:hover .device__more svg { transform: translateX(3px); }

/* карточка модели с прайсом */
.model { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.model__top { display: flex; gap: 14px; align-items: center; padding: 18px 18px 0; }
.model__img { width: 76px; height: 76px; flex: 0 0 auto; border-radius: var(--r-sm); background: var(--ph); display: grid; place-items: center; overflow: hidden; }
.model__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.model__meta { min-width: 0; }
.model__meta h3 { margin: 0 0 2px; font-size: 17.5px; line-height: 1.25; }
.model__meta span { font-size: 13px; color: var(--muted); display: block; }
.model__foot { padding: 16px 18px 18px; }
.model__foot .btn { width: 100%; }
.model.is-open .model__toggle { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.model__body { border-top: 1px solid var(--line); background: var(--surface-2); display: none; }
.model.is-open .model__body { display: block; }
.model.is-open { border-color: rgba(225, 6, 0, .35); box-shadow: var(--shadow-lg); }

.ptable { width: 100%; border-collapse: collapse; }
.ptable td { padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: middle; }
.ptable tr:last-child td { border-bottom: 0; }
.ptable tr:hover td { background: var(--surface); }
.ptable td:last-child { text-align: right; white-space: nowrap; font-weight: 800; color: var(--red); font-size: 16px; }
.ptable .old { display: block; font-weight: 600; font-size: 13px; color: var(--muted); text-decoration: line-through; }

/* поиск по моделям */
.searchbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px; }
.searchbar__field { position: relative; flex: 1 1 320px; }
.searchbar__field svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.searchbar input {
  width: 100%; height: 52px; padding: 0 18px 0 46px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  font: inherit; font-size: 16px; outline: none; transition: border-color .18s, box-shadow .18s;
  -webkit-appearance: none; appearance: none;
}
.searchbar input:focus { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.searchbar__count { font-size: 14px; color: var(--muted); }
.empty { display: none; padding: 30px; text-align: center; color: var(--muted); }

/* ---------- шаги ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding: 26px 22px 22px; }
.step__num {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red-2), var(--red)); color: #fff; font-weight: 800; font-size: 18px;
  margin-bottom: 14px; box-shadow: 0 10px 22px rgba(225, 6, 0, .28);
}
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- блок про сервис ---------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
.split__media { position: relative; }
.split__media img { border-radius: var(--r); }
.split__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.split__stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; }
.split__stats b { display: block; color: var(--red); font-size: 24px; font-weight: 800; }
.split__stats span { font-size: 13px; color: var(--muted); }

.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.photo-grid img {
  width: 100%; aspect-ratio: 1; object-fit: contain; padding: 16px;
  background: linear-gradient(160deg, #fff, #f2f4f8);
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.photo-grid img:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-lg); }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; border-radius: 26px; padding: clamp(28px, 4vw, 52px);
  background:
    radial-gradient(700px 380px at 82% 20%, rgba(225, 6, 0, .42), transparent 62%),
    linear-gradient(140deg, #0b0e14, #1b2231);
  color: #fff;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .74); }
.cta__row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 22px; }
.cta__phone { font-size: clamp(24px, 3vw, 36px); font-weight: 800; letter-spacing: -.02em; }
.cta__phone a:hover { color: var(--red-2); }

/* ---------- контакты ---------- */
.branch { padding: 0; overflow: hidden; }
.branch__head { padding: 24px; border-bottom: 1px solid var(--line); }
.branch__head h3 { margin: 0 0 6px; font-size: 20px; }
.branch__head span { color: var(--red); font-weight: 700; font-size: 14px; }
.branch__body { padding: 22px 24px; }
.branch__row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.branch__row:last-of-type { border-bottom: 0; }
.branch__row svg { width: 18px; height: 18px; color: var(--red); flex: 0 0 auto; margin-top: 3px; }
.branch__row b { font-weight: 700; }
.branch__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.branch__map { height: 260px; }
.branch__map iframe { width: 100%; height: 100%; border: 0; display: block; filter: grayscale(.2); }

/* один адрес: карточка в две колонки — информация слева, карта справа */
.branch--wide { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.branch--wide .branch__head { grid-column: 1 / -1; }
.branch--wide .branch__body { padding: 26px 28px; }
.branch--wide .branch__row { padding: 13px 0; font-size: 15.5px; }
.branch--wide .branch__map { height: auto; min-height: 340px; }
.branch--wide:hover { transform: none; box-shadow: var(--shadow); }

/* ---------- подвал ---------- */
.footer { background: var(--ink); color: rgba(255, 255, 255, .72); padding: 58px 0 26px; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 30px; }
.footer h4 { color: #fff; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; }
.footer a { color: rgba(255, 255, 255, .72); }
.footer a:hover { color: var(--red-2); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 9px; font-size: 14.5px; }
.footer__logo { height: 44px; margin-bottom: 16px; }
.footer__phone { font-size: 20px; font-weight: 800; color: #fff; display: block; margin-bottom: 4px; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 12.5px; color: rgba(255, 255, 255, .5); }
.footer__legal { font-size: 12px; line-height: 1.6; color: rgba(255, 255, 255, .42); margin-top: 14px; }

/* ---------- плавающие элементы ---------- */
.totop {
  position: fixed; right: 20px; bottom: 22px; z-index: 150;
  width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
  display: grid; place-items: center; opacity: 0; visibility: hidden; transition: .22s;
}
.totop.is-visible { opacity: 1; visibility: visible; }
.totop:hover { color: var(--red); border-color: var(--red); }


/* ---------- анимация появления ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- страница под паролем ---------- */
.notice { max-width: 560px; margin: 0 auto; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 40px 28px; box-shadow: var(--shadow); }
.notice__icon { width: 62px; height: 62px; border-radius: 18px; margin: 0 auto 18px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); }
.notice__icon svg { width: 30px; height: 30px; }

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .burger { display: block; }
  .header__actions { margin-left: auto; }
  .header__phone { display: none; }
  .hero__grid, .hero--page .hero__grid, .split { grid-template-columns: 1fr; }
  .hero__media { order: -1; margin-bottom: 8px; }
  .hero__phone { height: min(440px, 50vh); height: min(440px, 50svh); }
  .hero__crack { height: min(440px, 50vh); height: min(440px, 50svh); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}
/* ---------- мобильная версия: усиленный акцент ---------- */
@media (max-width: 900px) {
  .hero__phone { animation: none; }
  .hero__crack { animation: crackIn .8s ease-out 2s forwards; }
  .float-card { animation: none; }
  .hero::after { display: none; }
  .branch--wide { grid-template-columns: 1fr; }
  .branch--wide .branch__map { height: 260px; min-height: 0; }
}
@media (max-width: 720px) {
  .float-card { display: none; }
}

@media (max-width: 720px) {
  :root { --head-h: 64px; }
  .wrap { padding: 0 16px; }
  .section { padding: 40px 0; }

  /* шапка: компактно, кнопка звонка всегда под рукой */
  .header__actions .btn span:not(.i-max) { display: none; }
  .header__actions .btn { padding: 0 14px; }
  .logo img { height: 36px; }
  .logo__tag { display: none; }

  /* герой: фото меньше, заголовок крупнее, кнопки на всю ширину */
  .hero { padding: 22px 0 46px; }
  .hero__grid { gap: 22px; }
  .hero h1 { font-size: clamp(26px, 8vw, 34px); }
  .hero__lead { font-size: 15.5px; margin-bottom: 18px; }
  .hero__phone { height: min(340px, 44vh); height: min(340px, 44svh); }
  .hero__crack { height: min(340px, 44vh); height: min(340px, 44svh); }
  .hero__cta { gap: 9px; margin-bottom: 18px; }
  .hero__cta .btn { width: 100%; height: 54px; font-size: 16px; }
  .hero__trust { gap: 7px; }
  .chip { font-size: 12.5px; padding: 8px 12px; }

  /* факты: компактная сетка 2x2 */
  .facts { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: -22px; }
  .fact { padding: 14px 10px; border-radius: 16px; }
  .fact b { font-size: 21px; }
  .fact span { font-size: 12px; }

  /* карточки устройств — компактными рядами */
  .grid { gap: 12px; }
  .grid--3, .grid--2, .grid--4 { grid-template-columns: 1fr; }
  .device {
    display: grid; grid-template-columns: 64px minmax(0, 1fr) auto;
    grid-template-rows: auto auto; align-items: center;
    column-gap: 12px; row-gap: 1px; text-align: left; padding: 12px 14px;
  }
  .device:hover { transform: none; }
  .device__img { grid-column: 1; grid-row: 1 / span 2; height: 64px; width: 64px; flex: 0 0 auto; }
  .device__img img { max-height: 64px; }
  .device h3 {
    grid-column: 2; grid-row: 1; margin: 0; font-size: 16.5px; line-height: 1.25;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .device__from { grid-column: 2; grid-row: 2; font-size: 13px; white-space: nowrap; color: var(--muted); }
  .device__from b { font-size: 15px; }
  .device__more { grid-column: 3; grid-row: 1 / span 2; font-size: 14px; }

  /* прайс: поиск залипает под шапкой, карточки «раскрываются» тапом */
  .searchbar { position: sticky; top: var(--head-h); z-index: 30; background: var(--bg); padding: 10px 0; margin-bottom: 12px; }
  .searchbar input { height: 50px; }
  .searchbar__count { font-size: 13px; }
  .model { cursor: pointer; }
  .model__top { padding: 14px; gap: 12px; }
  .model__img { width: 64px; height: 64px; }
  .model__meta h3 { font-size: 16.5px; }
  .model__foot { padding: 12px 14px 14px; }
  .model__foot .btn { height: 48px; font-size: 15px; }
  .ptable td { padding: 12px 14px; font-size: 14.5px; line-height: 1.4; }
  .ptable td:last-child { font-size: 16px; }
  .ptable tr:hover td { background: transparent; }

  /* блоки-карточки и шаги */
  .step { padding: 18px 16px; }
  .step__num { width: 40px; height: 40px; border-radius: 12px; font-size: 16px; margin-bottom: 10px; }
  .split { gap: 26px; }
  .split__stats { grid-template-columns: 1fr; gap: 10px; }
  .photo-grid { gap: 10px; }
  .cta { border-radius: 20px; padding: 24px 18px; }
  .cta__row { gap: 10px; }
  .cta__row .btn { flex: 1 1 100%; }
  .cta__phone { font-size: 26px; }
  .branch__head, .branch__body { padding: 18px; }
  .branch__map { height: 210px; }

  /* подвал и плавающие элементы */
  .footer { padding: 40px 0 22px; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .footer__phone { font-size: 19px; }
  .footer__bottom { font-size: 12px; }
  .totop { bottom: calc(16px + env(safe-area-inset-bottom)); left: max(14px, env(safe-area-inset-left)); right: auto; width: 48px; height: 48px; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 420px) {
  .hero__phone { height: min(290px, 40vh); height: min(290px, 40svh); }
  .hero__crack { height: min(290px, 40vh); height: min(290px, 40svh); }
  .header__actions .btn { height: 42px; }
  .fab__label { font-size: 13.5px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__phone { animation: none; }
  .hero__crack { animation: none; opacity: 1; filter: none; }
}


/* ==========================================================================
   Переключатель светлой/тёмной темы (тумблер в стиле iOS)
   ========================================================================== */
.theme-btn {
  display: inline-flex; align-items: center; gap: 9px;
  height: 42px; padding: 0 12px 0 11px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--muted);
  transition: color .18s ease, border-color .18s ease;
}
.theme-btn:hover { border-color: var(--red); color: var(--red); }
.theme-btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.theme-btn .t-sun { opacity: 1; color: #f0a500; }
.theme-btn .t-moon { opacity: .45; }
:root[data-theme="dark"] .theme-btn .t-sun { opacity: .45; color: currentColor; }
:root[data-theme="dark"] .theme-btn .t-moon { opacity: 1; color: #7cb3ff; }

.switch {
  position: relative; flex: 0 0 auto;
  width: 46px; height: 26px; border-radius: 999px;
  background: #d2d8e0; transition: background .22s ease;
}
.theme-btn[aria-pressed="true"] .switch,
:root[data-theme="dark"] .theme-btn .switch { background: var(--red); }
.switch__knob {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(16, 24, 40, .3);
  transition: transform .22s cubic-bezier(.4, .1, .2, 1);
}
.theme-btn[aria-pressed="true"] .switch__knob,
:root[data-theme="dark"] .theme-btn .switch__knob { transform: translateX(20px); }

/* логотип: в тёмной теме показываем белую версию */
.logo__img--light { display: none !important; }
:root[data-theme="dark"] .logo__img--dark { display: none !important; }
:root[data-theme="dark"] .logo__img--light { display: block !important; }

/* подложка под фото товара и плитки остаются светлыми в обеих темах —
   «фотоплашка» как в магазинах Apple; тёмный текст на них читаемый */
:root[data-theme="dark"] .model__img,
:root[data-theme="dark"] .photo-grid img { box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }

/* в тёмной теме hero и футер уже тёмные — разделяем их тонкой линией */
:root[data-theme="dark"] .section--white + .section--white { border-top: 1px solid var(--line); }

@media (max-width: 980px) {
  .theme-btn { height: 38px; padding: 0 8px; }
  .theme-btn .t-sun, .theme-btn .t-moon { display: none; }
}

/* ==========================================================================
   Новые блоки: вопросы-ответы, перелинковка услуг, скрытый текст для скринридеров
   ========================================================================== */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.faq { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq__item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0 20px; transition: border-color .18s ease, box-shadow .18s ease;
}
.faq__item[open] { border-color: rgba(225, 6, 0, .35); box-shadow: var(--shadow); }
.faq__item summary {
  list-style: none; cursor: pointer; padding: 18px 0;
  font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 12px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ''; margin-left: auto; width: 10px; height: 10px; flex: 0 0 auto;
  border-right: 2.4px solid var(--red); border-bottom: 2.4px solid var(--red);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s ease;
}
.faq__item[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq__a { padding: 0 0 18px; color: var(--muted); font-size: 15.5px; }
.faq__a p { margin: 0; }

.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related__item {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 20px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.related__item:hover { transform: translateY(-4px); border-color: rgba(225, 6, 0, .35); box-shadow: var(--shadow); }
.related__item b { font-size: 17px; }
.related__item span { color: var(--muted); font-size: 14px; }

.theme-btn--wide { width: 100%; justify-content: center; margin-top: 18px; height: 46px; }
.theme-btn__label { font-weight: 600; }

@media (max-width: 860px) {
  .related { grid-template-columns: 1fr; }
}


/* ==========================================================================
   Safari на iPhone (iOS): поведение тапа, вырезы экрана, липкая шапка
   ========================================================================== */

/* 1. Подъём карточек при наведении отключаем на сенсорных экранах:
   иначе после тапа карточка «залипает» приподнятой до следующего касания. */
@media (hover: none) {
  .card:hover, .related__item:hover, .device:hover, .model:hover, .faq__item:hover {
    transform: none; border-color: var(--line);
  }
  .card:hover { box-shadow: var(--shadow); }
  .related__item:hover { box-shadow: none; }
  .device:hover .device__img img { transform: none; }
  .btn--primary:hover { box-shadow: 0 12px 26px rgba(225, 6, 0, .28); }
  .faq__item[open] { border-color: rgba(225, 6, 0, .35); }
}

/* 2. Вырезы экрана (Dynamic Island / чёлка) в горизонтальной ориентации:
   контент не заезжает под скругления, шапка учитывает верхний вырез. */
@supports (padding: max(0px)) {
  .wrap {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .header { padding-top: env(safe-area-inset-top); }
  .mobile-nav { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
  .fab { right: max(14px, env(safe-area-inset-right)); }
}

/* 3. Мобильная шапка: плотнее фон и меньше размытие — на iPhone размытие
   поверх липкого элемента вызывает подтормаживание при скролле. */
@media (max-width: 900px) {
  .header { -webkit-backdrop-filter: saturate(160%) blur(8px); backdrop-filter: saturate(160%) blur(8px); }
}

/* 4. Кнопки и переключатели: палец должен попадать без промаха (>=44px) */
@media (max-width: 980px) {
  .theme-btn { height: 44px; min-width: 64px; justify-content: center; padding: 0 10px; }
  .burger { width: 44px; height: 44px; }
  .mnav__row { padding: 11px 6px; }
  .mnav__tile { width: 48px; height: 48px; border-radius: 15px; }
}

/* 5. Мелочи iOS: картинки не «перетаскиваются», текст не выделяется случайным тапом
   на кнопках, анимация не гоняется на слабом устройстве. */
.btn, .theme-btn, .burger, .totop, .model__toggle, .faq__item summary {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
img, svg { -webkit-user-drag: none; }
.cta__row .btn, .hero__cta .btn { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }

/* 6. Экономия на мобильном: тяжёлые тени и большие размытия отключаем ниже 720px,
   оставляя лёгкую тень — на iPhone это заметно плавнее при скролле прайса. */
@media (max-width: 720px) {
  .hero__glow { filter: blur(18px); }
  .card, .fact, .related__item, .faq__item, .photo-grid img { box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
  :root[data-theme="dark"] .card, :root[data-theme="dark"] .fact,
  :root[data-theme="dark"] .related__item, :root[data-theme="dark"] .faq__item {
    box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  }
}

/* 7. Safari не поддерживает некоторые современные функции — на всякий случай
   оставляем читаемым содержимое аккордеонов прайса при отключённом JS. */
.no-js .model__body { display: block; }

/* 8. Кнопка звонка в шапке на телефоне — палец должен попадать (44px) */
@media (max-width: 720px) {
  .header__actions .btn, .header__actions .btn--sm { height: 44px; min-width: 44px; }
  .header__actions { gap: 8px; }
}

/* 9. Телефон: шапка плотнее (даже если Safari не применил размытие, текст под ней не просвечивает),
   герой остаётся тёмным — крупные красные градиенты на узком экране уводили его в бордовый. */
@media (max-width: 720px) {
  :root { --header-bg: rgba(255, 255, 255, .96); }
  :root[data-theme="dark"] { --header-bg: rgba(11, 14, 20, .96); }
  .hero {
    background:
      radial-gradient(420px 300px at 72% 10%, rgba(225, 6, 0, .34), transparent 62%),
      radial-gradient(320px 240px at 12% 96%, rgba(225, 6, 0, .14), transparent 60%),
      linear-gradient(165deg, #0b0e14 0%, #12161f 55%, #0b0e14 100%);
  }
  .hero__glow { width: 58%; opacity: .7; top: 2%; }
}

/* Кнопка МАКСа в липкой панели и в шапке — знак выравниваем по центру с текстом */
.mnav__actions .btn--max { justify-content: center; }

/* ==========================================================================
   Строка «скопировать номер» и всплывающая подсказка
   ========================================================================== */
.copy-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  margin-top: 12px; padding: 12px 14px;
  border: 1px dashed var(--line); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--muted);
  font-size: 14px; font-weight: 600; line-height: 1.35;
  transition: border-color .18s ease, color .18s ease;
}
.copy-row svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--red); }
.copy-row b { color: var(--text); }
.copy-row:active { border-style: solid; border-color: var(--red); }
.copy-row.is-copied { border-style: solid; border-color: var(--red); color: var(--text); }
.copy-row.is-copied svg { color: var(--red); }

.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px); z-index: 300;
  max-width: min(92vw, 430px); padding: 13px 18px; border-radius: 14px;
  background: rgba(11, 14, 20, .96); color: #fff;
  font-size: 14.5px; font-weight: 600; line-height: 1.4; text-align: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .38);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ==========================================================================
   «Посмотреть цены» — тумблер как в настройках Apple (подпись слева, переключатель справа)
   ========================================================================== */
.model__switch {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 50px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--text);
  font-weight: 700; font-size: 15px; text-align: left; cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.model__switch-label { flex: 1 1 auto; }
.model__switch .switch { margin-left: auto; }
.model__switch:active { border-color: rgba(225, 6, 0, .35); }
.model.is-open .model__switch { border-color: rgba(225, 6, 0, .35); background: var(--red-soft); }

/* включённое состояние — фирменный красный, как у тумблера темы */
.model.is-open .model__switch .switch { background: var(--red); }
.model.is-open .model__switch .switch__knob { transform: translateX(20px); }

/* в раскрытой карточке строка тумблера сливается с прайсом */
.model.is-open .model__foot { padding-bottom: 14px; }
.model__switch:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ==========================================================================
   Шапка: своя, более широкая сетка (как на сайте Apple) + пороги по ширине,
   чтобы номер телефона, меню и кнопка всегда стояли в одну строку и по краю
   ========================================================================== */
.header .wrap { max-width: 1320px; }
.header__actions { flex: 0 0 auto; }
.header__phone b { white-space: nowrap; }
.nav__link { white-space: nowrap; }

@media (min-width: 1081px) and (max-width: 1400px) {
  .logo__tag { display: none; }              /* подпись у логотипа убираем, места мало */
}
@media (max-width: 1260px) {
  .theme-btn .t-sun, .theme-btn .t-moon { display: none; }
  .theme-btn { padding: 0 10px; }
  .header__phone span { display: none; }     /* «Савёловский · ежедневно» прячем */
  .header__inner { gap: 16px; }
}
@media (max-width: 1140px) {
  .header__phone { display: none; }          /* номер остаётся в кнопке и на страницах */
}

/* ==========================================================================
   Круглая кнопка «связаться» слева внизу: один тап — и раскрываются три способа связи
   ========================================================================== */
.fab {
  position: fixed; right: max(14px, env(safe-area-inset-right));
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 165; display: none;
}
.fab.is-visible { display: block; }

.fab__main {
  position: relative; width: 58px; height: 58px; padding: 0;
  border: 0; border-radius: 50%; color: #fff;
  background: linear-gradient(135deg, var(--red-2), var(--red));
  box-shadow: 0 14px 30px rgba(225, 6, 0, .42);
  display: grid; place-items: center;
  transition: transform .18s ease, box-shadow .18s ease;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.fab__main:active { transform: scale(.94); }
.fab__main svg { width: 26px; height: 26px; }
.fab__phone, .fab__x { display: grid; place-items: center; transition: opacity .2s ease, transform .22s ease; }
.fab__x { position: absolute; inset: 0; opacity: 0; transform: rotate(-45deg) scale(.7); }
.fab.is-open .fab__phone { opacity: 0; transform: rotate(45deg) scale(.7); }
.fab.is-open .fab__x { opacity: 1; transform: none; }

/* всплывающие способы связи */
.fab__items {
  position: absolute; right: 0; bottom: 72px;
  display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 10px;
}
.fab__item {
  display: flex; flex-direction: row-reverse; align-items: center; gap: 10px;
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.94);
  transition: opacity .2s ease, transform .24s cubic-bezier(.4, .1, .2, 1), visibility .2s;
}
.fab.is-open .fab__item { opacity: 1; visibility: visible; transform: none; }
.fab.is-open .fab__item:nth-child(1) { transition-delay: .02s; }
.fab.is-open .fab__item:nth-child(2) { transition-delay: .07s; }
.fab.is-open .fab__item:nth-child(3) { transition-delay: .12s; }

.fab__ic {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 10px 22px rgba(16, 24, 40, .3);
}
.fab__ic svg { width: 21px; height: 21px; }
.fab__ic--call { background: linear-gradient(135deg, var(--red-2), var(--red)); }
.fab__ic--max { background: linear-gradient(135deg, #471aff, #6e1aff 45%, #00bfff); }
.fab__ic--max .i-max { width: 21px; height: 21px; }
.fab__ic--tg { background: #2aabee; }

.fab__label {
  padding: 9px 14px; border-radius: 999px;
  background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 700; white-space: nowrap;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
@media (prefers-reduced-motion: reduce) {
  .fab__item, .fab__phone, .fab__x, .fab__main { transition: none; }
}

/* затемнение фона, когда меню связи раскрыто (только визуально, закрывается тапом мимо) */
.fab::before {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background: rgba(11, 14, 20, .38);
  opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s;
}
.fab.is-open::before { opacity: 1; visibility: visible; }

/* На телефоне в баннере главной кнопки связи не нужны: звонок остаётся в шапке,
   а все способы связи — в круглой кнопке внизу справа */
@media (max-width: 720px) {
  .hero--home .hero__cta { display: none; }
  .hero--home .hero__lead { margin-bottom: 18px; }
}

/* ==========================================================================
   v3 — свежие фото и «дорогие» детали:
   свечения и сетка в герое, окно расчёта, блоки «Работы» и «Запчасти»
   ========================================================================== */

/* ---------- фон героя: мягкие свечения + тонкая сетка ---------- */
.hero { position: relative; overflow: hidden; }
.hero__aurora { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero__aurora span { position: absolute; display: block; border-radius: 50%; filter: blur(64px); }
.hero__aurora span:nth-child(1) {
  width: 46vw; height: 46vw; left: -10vw; top: -16vw;
  background: radial-gradient(circle at 45% 45%, rgba(225, 6, 0, .5), transparent 68%);
  animation: auroraA 20s ease-in-out infinite;
}
.hero__aurora span:nth-child(2) {
  width: 38vw; height: 38vw; right: 4vw; top: 4vw;
  background: radial-gradient(circle at 55% 45%, rgba(255, 47, 47, .38), transparent 70%);
  animation: auroraB 26s ease-in-out infinite;
}
.hero__aurora span:nth-child(3) {
  width: 30vw; height: 30vw; left: 32vw; bottom: -14vw;
  background: radial-gradient(circle at 50% 50%, rgba(120, 20, 255, .26), transparent 70%);
  animation: auroraC 32s ease-in-out infinite;
}
@keyframes auroraA { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(4vw, 3vw, 0) scale(1.14); } }
@keyframes auroraB { 0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); } 50% { transform: translate3d(-3vw, 2vw, 0) scale(1); } }
@keyframes auroraC { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(2vw, -3vw, 0) scale(1.1); } }
.hero__lines {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .4;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(120% 78% at 62% 28%, #000 18%, transparent 72%);
  mask-image: radial-gradient(120% 78% at 62% 28%, #000 18%, transparent 72%);
}
@media (max-width: 900px) {
  .hero__aurora span { filter: blur(46px); }
  .hero__aurora span:nth-child(1) { width: 74vw; height: 74vw; }
  .hero__aurora span:nth-child(2) { width: 60vw; height: 60vw; }
  .hero__aurora span:nth-child(3) { display: none; }
  .hero__lines { display: none; }
}
@media (prefers-reduced-motion: reduce) { .hero__aurora span { animation: none; } }

/* ---------- плавающее окно «рассчитать стоимость» ---------- */
.calc {
  position: relative; z-index: 3; max-width: 720px; margin: 0 0 22px; padding: 16px 16px 14px;
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .46), inset 0 1px 0 rgba(255, 255, 255, .12);
  animation: calcFloat 8s ease-in-out infinite;
}
@keyframes calcFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.calc__head { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; color: #fff; }
.calc__ico {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--red-2), var(--red)); box-shadow: 0 10px 24px rgba(225, 6, 0, .45);
}
.calc__ico svg { width: 20px; height: 20px; color: #fff; }
.calc__head b { display: block; font-size: 15.5px; letter-spacing: -.01em; }
.calc__head small { color: rgba(255, 255, 255, .62); font-size: 12.5px; }
.calc__row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.calc__field { display: block; min-width: 0; }
.calc__field > span {
  display: block; margin-bottom: 5px; font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: rgba(255, 255, 255, .58);
}
.calc__field select {
  width: 100%; height: 46px; padding: 0 34px 0 12px; border-radius: 12px;
  font: inherit; font-size: 15px; font-weight: 600; color: #fff;
  background: rgba(16, 20, 28, .88) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 18px 18px;
  border: 1px solid rgba(255, 255, 255, .18); -webkit-appearance: none; appearance: none;
  text-overflow: ellipsis;
}
.calc__field select:focus-visible { outline: 2px solid rgba(255, 47, 47, .7); outline-offset: 1px; }
.calc__go { height: 46px; white-space: nowrap; }
.calc__hint { margin: 11px 0 0; font-size: 12.5px; color: rgba(255, 255, 255, .55); }
.calc__row.is-flash { animation: calcFlash 1.1s ease; }
@keyframes calcFlash { 0%, 100% { box-shadow: none; } 35% { box-shadow: 0 0 0 3px rgba(255, 47, 47, .55); border-radius: 14px; } }
@media (max-width: 760px) {
  .calc { animation: none; padding: 15px; margin-bottom: 18px; }
  .calc__row { grid-template-columns: 1fr 1fr; }
  .calc__go { grid-column: 1 / -1; }
  .calc__head small { display: none; }
}

/* ---------- блок «Наши работы» ---------- */
.works { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.work {
  margin: 0; overflow: hidden; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.work img {
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  background: var(--photo-bg);
}
.work figcaption { display: grid; gap: 5px; padding: 14px 16px 16px; }
.work__tag {
  justify-self: start; padding: 4px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase; color: var(--red); background: var(--red-soft);
}
.work b { font-size: 15.5px; }
.work small { color: var(--muted); font-size: 13px; }
@media (hover: hover) {
  .work:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(225, 6, 0, .3); }
}
@media (max-width: 1080px) { .works { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .works { grid-template-columns: 1fr; } .work img { aspect-ratio: 4 / 3; } }

/* ---------- блок «Оригинальные запчасти» ---------- */
.parts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.part { margin: 0; }
.part__img {
  display: grid; place-items: center; padding: 12px; border-radius: var(--r);
  background: var(--photo-bg); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.part__img img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; mix-blend-mode: multiply; }
.part figcaption { display: grid; gap: 3px; padding: 12px 4px 0; }
.part b { font-size: 15px; }
.part small { color: var(--muted); font-size: 12.5px; }
.parts__note {
  display: flex; align-items: center; justify-content: center; gap: 9px; max-width: 76ch;
  margin: 26px auto 0; color: var(--muted); font-size: 13.5px; text-align: left;
}
.parts__note svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--red); }
@media (hover: hover) { .part:hover .part__img { transform: translateY(-5px); box-shadow: var(--shadow-lg); } }
@media (max-width: 1080px) { .parts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .parts { gap: 12px; } .part b { font-size: 14px; } .part small { font-size: 12px; } }

/* ---------- шаги: номер + иконка, акцентная полоса ---------- */
.step { position: relative; overflow: hidden; }
.step::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--red), rgba(225, 6, 0, 0));
}
.step__ico {
  position: absolute; top: 24px; right: 22px; width: 40px; height: 40px; border-radius: 13px;
  display: grid; place-items: center; background: var(--red-soft);
}
.step__ico svg { width: 21px; height: 21px; color: var(--red); }
@media (max-width: 520px) { .step__ico { width: 34px; height: 34px; top: 20px; right: 18px; } .step__ico svg { width: 18px; height: 18px; } }

/* ---------- плитки устройств: подсветка под рендером ---------- */
.device__img { position: relative; }
.device__img::after {
  content: ""; position: absolute; inset: auto 12% -10px; height: 26px; border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(225, 6, 0, .34), transparent 70%);
  opacity: 0; transition: opacity .3s ease;
}
.device:hover .device__img::after { opacity: 1; }

/* заметная пометка «новое» для свежих моделей в прайсе */
.model__meta h3 .fresh {
  display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: linear-gradient(135deg, var(--red-2), var(--red)); vertical-align: middle;
}

/* правки v3 после просмотра: шире колонка с окном расчёта и текст в герое
   ВАЖНО: только для широких экранов — иначе перебивает мобильное правило
   `.hero__grid { grid-template-columns: 1fr }` из медиа-запроса ниже. */
@media (min-width: 901px) {
  .hero--home .hero__grid { grid-template-columns: 1.12fr .88fr; }
  .calc__row { grid-template-columns: 1fr 1.3fr auto; }
  .calc__field select { font-size: 14.5px; }
}
@media (min-width: 761px) and (max-width: 1180px) {
  .calc__row { grid-template-columns: 1fr 1fr; }
  .calc__go { grid-column: 1 / -1; }
}

/* цена выбранной модели в окне расчёта + переносы заголовка героя */
.calc__price {
  display: inline-block; margin: 0 8px 0 0; padding: 4px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--red-2), var(--red));
}
.hero h1 { text-wrap: balance; }

/* мелочи для телефона: селекты в столбик, цена отдельной строкой */
@media (max-width: 560px) {
  .calc__row { grid-template-columns: 1fr; }
  .calc__price { display: block; width: max-content; margin: 0 0 7px; }
}

/* ---------- блок «Отзывы на Яндекс Картах» ---------- */
.reviews-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 26px;
  flex-wrap: wrap; margin-bottom: 26px;
}
.reviews-head > div:first-child { flex: 1 1 420px; }
.reviews-head .lead { max-width: 62ch; }
#reviews { scroll-margin-top: calc(var(--head-h) + 18px); }
.rating-card {
  display: flex; align-items: center; gap: 20px; padding: 18px 22px; flex: 0 0 auto;
  border-radius: var(--r); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.rating-card__score { display: grid; gap: 2px; }
.rating-card__value { font-size: 42px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.rating-card__stars { color: #f2a516; font-size: 17px; letter-spacing: 3px; line-height: 1; }
.rating-card__meta { color: var(--muted); font-size: 12.5px; }
.rating-card .btn { white-space: nowrap; }

.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.review {
  display: flex; flex-direction: column; gap: 11px; padding: 20px 20px 18px;
  border-radius: var(--r); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: inherit; text-decoration: none;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.review:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--red-2); }
.review__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review__stars { color: #f2a516; font-size: 14px; letter-spacing: 2px; line-height: 1; }
.review__src {
  font-size: 11px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.review__text { flex: 1 1 auto; font-size: 14.5px; line-height: 1.5; color: var(--text); }
.review__who { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.review__who b { color: var(--text); font-weight: 600; font-size: 13.5px; }
.review__more { display: inline-flex; align-items: center; gap: 7px; color: var(--red); font-weight: 600; font-size: 12.5px; }
.review__more svg { width: 15px; height: 15px; transition: transform .25s ease; }
.review:hover .review__more svg { transform: translateX(3px); }
.reviews-note { max-width: 78ch; margin: 24px auto 0; text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 1080px) { .reviews { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .reviews { grid-template-columns: 1fr; }
  .rating-card { width: 100%; flex-direction: column; align-items: stretch; gap: 14px; }
  .rating-card .btn { width: 100%; justify-content: center; }
  .rating-card__value { font-size: 34px; }
  .reviews-head { margin-bottom: 20px; }
}
