/* AUTOBRIDGE — витрина автосалона. Тёмная showroom-эстетика. */

:root {
  --bg: #0a0b0d;
  --surface: #121419;
  --surface-2: #171a20;
  --surface-3: #1d2128;
  --line: #262b33;
  --line-soft: #1c2027;
  --text: #f3f5f8;
  --muted: #98a1ae;
  --muted-2: #6d7683;
  --accent: #ff5c2b;
  --accent-soft: rgba(255, 92, 43, 0.12);
  --ok: #2ecc71;
  --wait: #f5b93b;
  --order: #5b8cff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.85);
  --maxw: 1280px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
section[id], main[id] { scroll-margin-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Manrope", "Inter", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(10, 11, 13, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header__in {
  display: flex; align-items: center; gap: 28px;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; font-family: "Manrope", sans-serif; font-weight: 800; font-size: 19px; letter-spacing: 0.02em; }
.logo__mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #ff9346);
  display: grid; place-items: center; font-size: 15px; color: #12080a;
}
.logo small { display: block; font-family: "Inter", sans-serif; font-size: 10.5px; font-weight: 500; color: var(--muted-2); letter-spacing: 0.04em; text-transform: uppercase; margin-top: 1px; }
.nav { display: flex; gap: 22px; font-size: 14px; color: var(--muted); margin-left: 8px; }
.nav a:hover { color: var(--text); }
.header__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header__phone { font-weight: 700; font-size: 15px; white-space: nowrap; }
.header__phone span { display: block; font-size: 11px; font-weight: 500; color: var(--muted-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 11px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -12px var(--accent); }
.btn--accent:hover { background: #ff6f43; }
.btn--ghost { border-color: var(--line); background: var(--surface-2); color: var(--text); }
.btn--ghost:hover { border-color: #39404b; background: var(--surface-3); }
.btn--wa { background: #22b355; color: #fff; }
.btn--wa:hover { background: #27c65e; }
.btn--tg { background: #2c9fd8; color: #fff; }
.btn--tg:hover { background: #33aee9; }
.btn--sm { padding: 8px 14px; font-size: 13px; border-radius: 9px; }
.btn--block { width: 100%; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 74px 0 56px;
  border-bottom: 1px solid var(--line-soft);
}
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 620px;
  background: radial-gradient(60% 60% at 22% 30%, rgba(255, 92, 43, 0.16), transparent 70%),
              radial-gradient(48% 52% at 80% 12%, rgba(91, 140, 255, 0.13), transparent 70%);
  pointer-events: none;
}
.hero__grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px); background-size: 64px 64px; opacity: 0.35; mask-image: linear-gradient(180deg, #000, transparent 75%); }
.hero__in { position: relative; }
.hero h1 { font-size: clamp(34px, 5.2vw, 60px); max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__lead { color: var(--muted); font-size: 17px; max-width: 56ch; margin: 20px 0 0; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero__stats { display: flex; gap: 44px; flex-wrap: wrap; margin-top: 44px; }
.stat b { display: block; font-family: "Manrope", sans-serif; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.stat span { font-size: 13px; color: var(--muted-2); }

/* ---------- filters ---------- */
.catalog { padding: 46px 0 80px; }
.section-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); }
.section-head p { color: var(--muted); margin: 6px 0 0; font-size: 14.5px; }
.counter { margin-left: auto; color: var(--muted); font-size: 14px; }
.counter b { color: var(--text); }

.filters {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 24px;
}
.filters__row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tabs { display: flex; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 12px; border: 1px solid var(--line-soft); }
.tab {
  padding: 8px 14px; border-radius: 9px; border: 0; background: transparent;
  color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.is-on { background: var(--accent); color: #fff; }
.tab.is-on .tab__n { color: rgba(255,255,255,.75); }
.tab__n { color: var(--muted-2); font-weight: 600; }

.field { position: relative; }
.field select, .field input {
  appearance: none; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 11px; padding: 10px 34px 10px 13px; font-size: 13.5px; min-width: 140px;
  outline: none; transition: border-color .2s;
}
.field input { padding-right: 13px; }
.field select:focus, .field input:focus { border-color: #3a414d; }
.field::after { content: "▾"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); font-size: 11px; pointer-events: none; }
.field--input::after { content: none; }
.field--search input { min-width: 230px; }
.filters__reset { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 13.5px; cursor: pointer; text-decoration: underline dotted; }
.filters__reset:hover { color: var(--accent); }

/* ---------- grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(304px, 1fr)); gap: 20px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-4px); border-color: #333a45; box-shadow: var(--shadow); }
.card__media { position: relative; aspect-ratio: 4 / 3; background: #0e1013; overflow: hidden; cursor: pointer; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s ease, transform .5s ease; }
.card:hover .card__media img { transform: scale(1.035); }
.card__dots { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; gap: 4px; }
.card__dots i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.28); transition: background .2s; }
.card__dots i.is-on { background: #fff; }
.badge {
  position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: rgba(10, 11, 13, 0.72); backdrop-filter: blur(6px); letter-spacing: .01em;
}
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { color: #4ade80; }
.badge--wait { color: var(--wait); }
.badge--order { color: #85a9ff; }
.badge--sold { color: #ff7676; }
.badge--hot { left: auto; right: 12px; background: var(--accent); color: #fff; }

.card__body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card__title { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.card__title h3 { font-size: 17.5px; }
.card__title span { color: var(--muted-2); font-size: 13.5px; white-space: nowrap; }
.card__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card__price b { font-family: "Manrope", sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.card__price s { color: var(--muted-2); font-size: 13.5px; }
.card__price em { font-style: normal; font-size: 12px; color: var(--muted-2); flex-basis: 100%; margin-top: -3px; }
.specs { display: flex; flex-wrap: wrap; gap: 6px; }
.spec { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 7px; padding: 4px 9px; }
.card__foot { margin-top: auto; display: flex; gap: 8px; }
.card__foot .btn { flex: 1; }
.card__eta { font-size: 12.5px; color: var(--muted-2); display: flex; align-items: center; gap: 7px; }
.card__eta::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 2px solid var(--accent); flex: none; }
.card__eta b { color: var(--muted); font-weight: 600; }

.empty { text-align: center; padding: 70px 20px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty b { display: block; font-size: 18px; color: var(--text); margin-bottom: 6px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.is-open { display: block; }
.modal__bd { position: absolute; inset: 0; background: rgba(4, 5, 7, 0.78); backdrop-filter: blur(6px); }
.modal__win {
  position: relative; max-width: 1080px; margin: 40px auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  max-height: calc(100vh - 80px); overflow-y: auto; box-shadow: var(--shadow);
}
.modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 5; width: 36px; height: 36px;
  border-radius: 50%; border: 0; background: rgba(10,11,13,.7); color: #fff; font-size: 18px; cursor: pointer;
  backdrop-filter: blur(6px);
}
.modal__close:hover { background: var(--accent); }
.detail { display: grid; grid-template-columns: 1.25fr 1fr; }
.detail__media { background: #0d0f12; padding: 18px; }
.detail__hero { border-radius: 14px; overflow: hidden; aspect-ratio: 4/3; background: #0a0b0d; }
.detail__hero img { width: 100%; height: 100%; object-fit: cover; }
.detail__thumbs { display: flex; gap: 8px; margin-top: 10px; }
.detail__thumbs img { width: 78px; height: 58px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: .5; border: 1px solid transparent; }
.detail__thumbs img.is-on, .detail__thumbs img:hover { opacity: 1; border-color: var(--accent); }
.detail__side { padding: 26px 26px 30px; border-left: 1px solid var(--line-soft); }
.detail__side h2 { font-size: 26px; }
.detail__sub { color: var(--muted); font-size: 14px; margin: 6px 0 16px; }
.detail__price { font-family: "Manrope", sans-serif; font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }
.detail__price s { font-size: 15px; color: var(--muted-2); font-weight: 500; margin-left: 10px; }
.detail__note { font-size: 12.5px; color: var(--muted-2); margin-top: 4px; }
.tbl { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 13.5px; }
.tbl td { padding: 8px 0; border-bottom: 1px dashed var(--line-soft); vertical-align: top; }
.tbl td:first-child { color: var(--muted-2); width: 46%; }
.tbl tr:last-child td { border-bottom: 0; }
.calc { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 6px 0 18px; }
.calc h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); font-weight: 700; margin-bottom: 10px; }
.calc__row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; color: var(--muted); }
.calc__row b { color: var(--text); font-weight: 600; }
.calc__total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-size: 15px; color: var(--text); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 18px; }
.chip { font-size: 12px; padding: 5px 10px; border-radius: 8px; background: var(--accent-soft); color: #ffb495; border: 1px solid rgba(255,92,43,.2); }
.detail__desc { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.detail__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.detail__actions .btn--accent { grid-column: 1 / -1; }

/* ---------- steps / trust ---------- */
.band { padding: 70px 0; border-top: 1px solid var(--line-soft); }
.band--soft { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; margin-top: 30px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step b { display: block; font-family: "Manrope", sans-serif; font-size: 13px; color: var(--accent); margin-bottom: 10px; letter-spacing: .1em; }
.step h4 { font-size: 16px; margin-bottom: 7px; }
.step p { color: var(--muted); font-size: 13.5px; margin: 0; }

/* ---------- lead form ---------- */
.lead { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.lead__form { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.lead h2 { font-size: clamp(24px, 3vw, 34px); }
.lead p { color: var(--muted); }
.f-row { display: grid; gap: 10px; margin-bottom: 12px; }
.f-row--2 { grid-template-columns: 1fr 1fr; }
.inp {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px;
  padding: 12px 14px; font-size: 14px; outline: none; transition: border-color .2s;
}
.inp:focus { border-color: var(--accent); }
textarea.inp { min-height: 88px; resize: vertical; }
.f-hint { font-size: 12px; color: var(--muted-2); margin-top: 10px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line-soft); padding: 40px 0 60px; color: var(--muted); font-size: 13.5px; }
.footer__in { display: flex; gap: 30px; flex-wrap: wrap; justify-content: space-between; }
.footer a:hover { color: var(--accent); }
.footer__admin { color: var(--muted-2); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--surface-3); border: 1px solid var(--line); color: var(--text);
  padding: 12px 18px; border-radius: 12px; font-size: 14px; z-index: 200;
  opacity: 0; pointer-events: none; transition: all .25s ease; box-shadow: var(--shadow);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- demo strip ---------- */
.demobar {
  background: linear-gradient(90deg, rgba(255,92,43,.16), rgba(91,140,255,.12));
  border-bottom: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted);
}
.demobar__in { display: flex; gap: 14px; align-items: center; justify-content: center; padding: 8px 0; flex-wrap: wrap; }
.demobar b { color: var(--text); }
.demobar a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 980px) {
  .detail { grid-template-columns: 1fr; }
  .detail__side { border-left: 0; border-top: 1px solid var(--line-soft); }
  .lead { grid-template-columns: 1fr; gap: 24px; }
  .nav { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 46px 0 38px; }
  .hero__stats { gap: 26px; }
  .stat b { font-size: 24px; }
  .header__phone { display: none; }
  .grid { grid-template-columns: 1fr; }
  .modal__win { margin: 0; border-radius: 0; max-height: 100vh; min-height: 100vh; }
  .f-row--2 { grid-template-columns: 1fr; }
  .filters__row { gap: 8px; }
  .field select, .field input, .field--search input { min-width: 0; width: 100%; }
  .field { flex: 1 1 46%; }
  .tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; white-space: nowrap; }
}
