/* ==========================================================================
   EL AUTO — components.css
   Кнопки, hero, карточки, списки, таблицы, формы, FAQ, cookie, карта
   ========================================================================== */

/* --- Кнопки -------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--c-white);
  --btn-bd: var(--c-line);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  font-size: 15px; font-weight: 600; letter-spacing: .01em; line-height: 1;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-bd); border-radius: var(--r);
  cursor: pointer; text-align: center; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn--primary { --btn-bg: var(--c-red); --btn-bd: var(--c-red); --btn-fg: #fff; }
.btn--primary:hover { --btn-bg: var(--c-red-hi); --btn-bd: var(--c-red-hi); }
.btn--ghost:hover { --btn-bd: rgba(255,255,255,.32); --btn-bg: rgba(255,255,255,.04); }
.btn--tg { --btn-bd: var(--c-line); }
.btn--tg:hover { --btn-bd: var(--c-teal); --btn-fg: var(--c-teal); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
.btn--wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.arrowlink {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; color: var(--c-white);
  padding-bottom: 4px; border-bottom: 1px solid var(--c-line);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.arrowlink svg { width: 14px; height: 14px; transition: transform .24s var(--ease); }
.arrowlink:hover { border-bottom-color: var(--c-red); }
.arrowlink:hover svg { transform: translateX(4px); }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--c-line-soft);
  background: var(--c-bg);
}
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--c-bg) 18%, rgba(10,10,11,.72) 52%, rgba(10,10,11,.35) 100%),
    linear-gradient(0deg, var(--c-bg) 2%, transparent 45%);
}
.hero__grid-lines {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: linear-gradient(90deg, var(--c-line-soft) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  opacity: .5;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.hero__inner {
  position: relative; z-index: 2;
  padding-block: clamp(64px, 8vw, 132px) clamp(56px, 6vw, 104px);
}
.hero__content { max-width: 900px; }
.hero__eyebrow { margin-bottom: 26px; }
.hero h1 { margin-bottom: 26px; }
.hero h1 em { font-style: normal; color: var(--c-red); }
.hero__sub { max-width: 66ch; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.55; }
.hero__actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 38px;
}
.hero__facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap); margin-top: clamp(48px, 5vw, 80px);
  border-top: 1px solid var(--c-line); padding-top: 28px;
}
.hero__fact dt { font-size: clamp(24px, 2.4vw, 34px); font-weight: 700; color: var(--c-white); letter-spacing: -.02em; }
.hero__fact dd { margin: 8px 0 0; font-size: 14px; color: var(--c-muted); max-width: 26ch; }

/* --- Внутренний заголовок страницы --------------------------------------- */
.pagehead {
  border-bottom: 1px solid var(--c-line-soft);
  padding-block: clamp(28px, 3vw, 44px) clamp(40px, 4.5vw, 72px);
  background: var(--c-bg);
  position: relative; overflow: hidden;
}
.pagehead__inner { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 40px; align-items: end; }
.pagehead h1 { margin-top: 22px; max-width: 20ch; }
.pagehead__sub { margin-top: 22px; max-width: 68ch; }
.pagehead__aside { flex: none; }
.pagehead__price {
  border: 1px solid var(--c-line); border-radius: var(--r-lg);
  padding: 20px 24px; min-width: 210px; background: var(--c-surface);
}
.pagehead__price span {
  display: block; font-size: var(--fs-label); letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-muted); margin-bottom: 8px;
}
.pagehead__price strong { font-size: 28px; font-weight: 700; color: var(--c-white); letter-spacing: -.02em; }

/* --- Хлебные крошки ------------------------------------------------------ */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--c-muted); }
.crumbs li { display: flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: '/'; color: rgba(255,255,255,.22); }
.crumbs a:hover { color: var(--c-white); }
.crumbs [aria-current] { color: var(--c-text-2); }

/* --- Список брендов (строками, не карточками) ---------------------------- */
.brandlist { border-top: 1px solid var(--c-line); }
.brandrow {
  display: grid; grid-template-columns: 56px minmax(0, 3fr) minmax(0, 4fr) 42px;
  align-items: center; gap: 24px;
  padding: 30px 16px 30px 8px; border-bottom: 1px solid var(--c-line);
  transition: background-color .22s var(--ease), padding-left .22s var(--ease);
  position: relative;
}
.brandrow::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: -1px; width: 2px;
  background: var(--c-red); transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform .26s var(--ease);
}
.brandrow:hover { background: var(--c-bg-alt); padding-left: 20px; }
.brandrow:hover::before { transform: scaleY(1); }
.brandrow__idx { font-size: 13px; font-weight: 600; color: var(--c-muted); letter-spacing: .06em; }
.brandrow__name { font-size: clamp(22px, 2.2vw, 32px); font-weight: 700; color: var(--c-white); letter-spacing: -.02em; line-height: 1.15; }
.brandrow__models { font-size: 15px; color: var(--c-muted); }
.brandrow__go {
  width: 42px; height: 42px; border: 1px solid var(--c-line); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--c-text-2);
  transition: border-color .2s var(--ease), color .2s var(--ease), background-color .2s var(--ease);
}
.brandrow__go svg { width: 14px; height: 14px; }
.brandrow:hover .brandrow__go { border-color: var(--c-red); background: var(--c-red); color: #fff; }

/* --- Услуги: сетка с разделителями --------------------------------------- */
.services {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--c-line); border-left: 1px solid var(--c-line);
}
.svc {
  border-right: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line);
  padding: 32px 28px 30px; display: flex; flex-direction: column; min-height: 246px;
  transition: background-color .22s var(--ease);
  position: relative;
}
.svc:hover { background: var(--c-bg-alt); }
.svc__idx {
  font-size: 12px; font-weight: 600; color: var(--c-muted); letter-spacing: .08em; margin-bottom: 26px;
}
.svc__ic { width: 26px; height: 26px; color: var(--c-red); margin-bottom: 20px; }
.svc h3 { font-size: 20px; margin-bottom: 12px; }
.svc p { font-size: 15px; color: var(--c-muted); margin: 0; }
.svc__foot {
  margin-top: auto; padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.svc__price { font-size: 14px; font-weight: 600; color: var(--c-text-2); }
.svc__go { font-size: 14px; font-weight: 600; color: var(--c-white); display: inline-flex; align-items: center; gap: 8px; }
.svc__go svg { width: 13px; height: 13px; transition: transform .22s var(--ease); }
.svc:hover .svc__go svg { transform: translateX(4px); }
.svc__link { position: absolute; inset: 0; }

/* --- Универсальные плитки (модели, статьи) -------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 1px; background: var(--c-line); border: 1px solid var(--c-line); }
.tile {
  background: var(--c-bg); padding: 26px 24px; display: flex; flex-direction: column; gap: 10px;
  transition: background-color .2s var(--ease);
}
.tile:hover { background: var(--c-bg-alt); }
.tile__kicker { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }
.tile h3 { font-size: 21px; }
.tile p { font-size: 14px; color: var(--c-muted); margin: 0; }
.tile__go { margin-top: auto; padding-top: 16px; font-size: 14px; font-weight: 600; color: var(--c-white); display: inline-flex; gap: 8px; align-items: center; }
.tile__go svg { width: 13px; height: 13px; transition: transform .22s var(--ease); }
.tile:hover .tile__go svg { transform: translateX(4px); }

/* --- Список пунктов работ ------------------------------------------------ */
.worklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 var(--gap); border-top: 1px solid var(--c-line); }
.worklist li {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 0; border-bottom: 1px solid var(--c-line-soft); font-size: 16px; color: var(--c-text-2);
}
.worklist li::before {
  content: ''; flex: none; width: 6px; height: 6px; margin-top: 9px;
  background: var(--c-red); transform: rotate(45deg);
}

/* --- Этапы работы -------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--gap); }
.step { border-top: 1px solid var(--c-line); padding-top: 22px; }
.step__n { font-size: 13px; font-weight: 700; color: var(--c-red); letter-spacing: .08em; }
.step h3 { font-size: 19px; margin: 14px 0 10px; }
.step p { font-size: 15px; color: var(--c-muted); margin: 0; }

/* --- Изображения / плейсхолдеры ------------------------------------------ */
.media { position: relative; overflow: hidden; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--3x2 { aspect-ratio: 3 / 2; }
.ph {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.018) 0 2px, transparent 2px 7px),
    linear-gradient(160deg, #17191D 0%, #0D0E10 100%);
}
.ph__mark { width: 30px; height: 30px; opacity: .5; color: var(--c-red); }
.ph__txt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.34); }

/* --- Таблица цен --------------------------------------------------------- */
.ptable { border-top: 1px solid var(--c-line); }
.ptable th, .ptable td { text-align: left; padding: 20px 16px; border-bottom: 1px solid var(--c-line-soft); vertical-align: top; }
.ptable thead th {
  font-size: var(--fs-label); font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-muted); padding-block: 14px; border-bottom-color: var(--c-line);
}
.ptable tbody tr { transition: background-color .18s var(--ease); }
.ptable tbody tr:hover { background: var(--c-bg-alt); }
.ptable td:first-child { padding-left: 8px; }
.ptable .ptable__name { color: var(--c-white); font-weight: 600; font-size: 17px; }
.ptable .ptable__desc { display: block; font-size: 14px; color: var(--c-muted); font-weight: 400; margin-top: 5px; max-width: 62ch; }
.ptable .ptable__price { white-space: nowrap; font-weight: 700; color: var(--c-white); font-size: 18px; text-align: right; }
.ptable th:last-child { text-align: right; }
.ptable__note { margin-top: 22px; font-size: 14px; color: var(--c-muted); max-width: 82ch; }

/* --- Спецификации / характеристики --------------------------------------- */
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 var(--gap); }
.specs div { padding: 16px 0; border-bottom: 1px solid var(--c-line-soft); }
.specs dt { font-size: 13px; color: var(--c-muted); letter-spacing: .04em; }
.specs dd { margin: 6px 0 0; font-size: 17px; color: var(--c-white); font-weight: 600; }

/* --- FAQ ----------------------------------------------------------------- */
.faq { border-top: 1px solid var(--c-line); }
.faq__item { border-bottom: 1px solid var(--c-line); }
.faq__q {
  width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding: 26px 8px 26px 0; text-align: left;
  font-size: clamp(17px, 1.35vw, 20px); font-weight: 600; color: var(--c-white); line-height: 1.35;
}
.faq__q:hover { color: var(--c-red-hi); }
.faq__sign { position: relative; width: 14px; height: 14px; flex: none; margin-top: 6px; }
.faq__sign::before, .faq__sign::after {
  content: ''; position: absolute; background: var(--c-red); transition: transform .24s var(--ease);
}
.faq__sign::before { left: 0; top: 6px; width: 14px; height: 1.5px; }
.faq__sign::after { left: 6px; top: 0; width: 1.5px; height: 14px; }
.faq__q[aria-expanded="true"] .faq__sign::after { transform: scaleY(0); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.faq__a > div { overflow: hidden; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a p { padding: 0 60px 28px 0; margin: 0; max-width: 84ch; color: var(--c-text-2); }

/* --- Блок призыва -------------------------------------------------------- */
.cta {
  border: 1px solid var(--c-line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--c-surface) 0%, var(--c-bg-alt) 100%);
  padding: clamp(32px, 4vw, 60px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: clamp(32px, 4vw, 64px);
  align-items: start;
}
.cta__text h2 { margin-bottom: 18px; }
.cta__text p { color: var(--c-text-2); max-width: 46ch; }
.cta__chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--c-line); border-radius: 100px; padding: 8px 15px;
  font-size: 13px; color: var(--c-text-2);
}
.chip svg { width: 13px; height: 13px; color: var(--c-red); }

/* --- Форма --------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.field input {
  height: 54px; padding: 0 16px; background: var(--c-bg);
  border: 1px solid var(--c-line); border-radius: var(--r); color: var(--c-white);
  transition: border-color .18s var(--ease);
  width: 100%;
}
.field input::placeholder { color: rgba(255,255,255,.26); }
.field input:hover { border-color: rgba(255,255,255,.2); }
.field input:focus { border-color: var(--c-teal); outline: none; }
.field input[aria-invalid="true"] { border-color: var(--c-red); }
.field__err { font-size: 13px; color: var(--c-red-hi); min-height: 0; text-transform: none; letter-spacing: 0; }
.field--hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 20px; height: 20px; margin-top: 2px;
  border: 1px solid var(--c-line); border-radius: var(--r); background: var(--c-bg);
  transition: background-color .16s var(--ease), border-color .16s var(--ease);
}
.check input:checked { background: var(--c-red); border-color: var(--c-red); }
.check input:checked::after {
  content: ''; display: block; width: 5px; height: 9px; margin: 3px auto 0;
  border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
.check span { font-size: 13px; line-height: 1.5; color: var(--c-muted); }
.check a { color: var(--c-text-2); border-bottom: 1px solid var(--c-line); }
.check a:hover { color: var(--c-white); border-bottom-color: var(--c-red); }

.form__status { font-size: 15px; line-height: 1.5; padding: 14px 16px; border-radius: var(--r); display: none; }
.form__status.is-ok { display: block; background: rgba(68, 207, 206, .1); border: 1px solid rgba(68, 207, 206, .35); color: #BEF1F0; }
.form__status.is-err { display: block; background: var(--c-red-dim); border: 1px solid rgba(220, 42, 43, .4); color: #F6B9B9; }

/* --- Контакты и карта ---------------------------------------------------- */
.contactgrid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(28px, 3.5vw, 64px); align-items: start; }
.cinfo dt { font-size: var(--fs-label); letter-spacing: .12em; text-transform: uppercase; color: var(--c-muted); }
.cinfo dd { margin: 8px 0 26px; font-size: 17px; color: var(--c-text-2); }
.cinfo dd a { color: var(--c-white); }
.cinfo dd a:hover { color: var(--c-red-hi); }
.cinfo .big { font-size: 26px; font-weight: 700; color: var(--c-white); letter-spacing: -.02em; }
.mapbox {
  position: relative; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  overflow: hidden; background: var(--c-surface); min-height: 420px;
}
.mapbox iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; filter: grayscale(.25) contrast(1.05); }
.mapbox__stub {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; text-align: center; padding: 32px;
  background: linear-gradient(160deg, #16181C, #0C0D0F);
}

/* --- Мобильная нижняя панель --------------------------------------------- */
.mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; display: none;
  background: rgba(12, 12, 13, .95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--c-line);
  padding-bottom: env(safe-area-inset-bottom);
}
.mbar__inner { display: grid; grid-template-columns: repeat(3, 1fr); }
.mbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 11px 4px 12px; font-size: 11.5px; font-weight: 600; color: var(--c-text-2);
  border-right: 1px solid var(--c-line-soft); min-height: 60px;
}
.mbar a:last-child { border-right: 0; }
.mbar a svg { width: 19px; height: 19px; }
.mbar a.is-accent { color: #fff; background: var(--c-red); }
.mbar a.is-accent svg { color: #fff; }

/* --- Cookie banner ------------------------------------------------------- */
.cookie {
  position: fixed; z-index: 120; left: 24px; right: 24px; bottom: 24px;
  max-width: 700px; margin-inline: auto;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg);
  padding: 24px 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  display: none; transform: translateY(14px); opacity: 0;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.cookie.is-shown { display: block; transform: translateY(0); opacity: 1; }
.cookie p { font-size: 14.5px; line-height: 1.55; color: var(--c-text-2); margin: 0 0 18px; }
.cookie p a { color: var(--c-white); border-bottom: 1px solid var(--c-red); }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie__prefs { display: none; margin: 4px 0 20px; border-top: 1px solid var(--c-line-soft); padding-top: 18px; }
.cookie__prefs.is-shown { display: block; }
.cookie__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--c-line-soft); }
.cookie__row:last-child { border-bottom: 0; }
.cookie__row .cookie__h { font-size: 15px; font-weight: 600; color: var(--c-white); margin-bottom: 5px; }
.cookie__row p { font-size: 13px; margin: 0; color: var(--c-muted); max-width: 52ch; }
.cookie__lock { font-size: 12px; color: var(--c-muted); white-space: nowrap; padding-top: 4px; }
.switch { position: relative; flex: none; width: 46px; height: 26px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch span {
  position: absolute; inset: 0; background: var(--c-surface-2); border: 1px solid var(--c-line);
  border-radius: 100px; transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.switch span::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  background: var(--c-muted); border-radius: 50%; transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.switch input:checked + span { background: var(--c-red-dim); border-color: var(--c-red); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--c-red); }

/* --- Внутренняя перелинковка --------------------------------------------- */
.linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 var(--gap); }
.linkgrid a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 0; border-bottom: 1px solid var(--c-line-soft); font-size: 15px; color: var(--c-text-2);
  transition: color .18s var(--ease), padding-left .18s var(--ease);
}
.linkgrid a:hover { color: var(--c-white); padding-left: 8px; }
.linkgrid a svg { width: 12px; height: 12px; color: var(--c-red); flex: none; }

/* --- Заметка / выноска --------------------------------------------------- */
.note {
  border-left: 2px solid var(--c-red); padding: 4px 0 4px 22px;
  font-size: 15px; color: var(--c-text-2); max-width: 78ch;
}

/* --- Статьи -------------------------------------------------------------- */
.article__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--c-muted); margin-top: 20px; }
.article__body { max-width: 780px; }
