/* Global Motors — лёгкие стили без внешних зависимостей */
:root {
  --dark: #0d1b2a;
  --dark2: #1b263b;
  --accent: #e63946;
  --accent-h: #c92f3c;
  --text: #1b2430;
  --muted: #6b7685;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --border: #e2e7ee;
  --radius: 12px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--dark);
  color: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  flex-shrink: 0;
}
.logo img {
  display: block;
  height: 44px;
  width: auto;
  max-width: min(180px, 42vw);
}

.nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.nav a {
  color: #cfd8e3;
  text-decoration: none;
  font-size: 0.95rem;
}
.nav a:hover { color: #fff; }

.lang-switch {
  margin-left: auto;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.lang-btn {
  background: transparent;
  border: 1px solid #3b4a61;
  color: #cfd8e3;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  text-transform: uppercase;
}
.lang-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  text-align: center;
  padding: 88px 0;
  background: var(--dark) url("../img/hero.jpg") center / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    135deg,
    rgba(13, 27, 42, 0.82) 0%,
    rgba(27, 38, 59, 0.72) 45%,
    rgba(13, 27, 42, 0.88) 100%
  );
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  margin-bottom: 14px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}
.hero p {
  color: #e8edf3;
  max-width: 640px;
  margin: 0 auto 26px;
  font-size: 1.05rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
  font-weight: 600;
  font-size: 1.1rem;
  color: #fff;
  margin: 0 auto;
  max-width: 640px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.hero-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 28px auto 0;
  max-width: 720px;
  text-align: left;
  counter-reset: step;
}
.hero-steps li {
  counter-increment: step;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 12px 12px 36px;
  font-size: 0.9rem;
  position: relative;
}
.hero-steps li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  font-weight: 700;
  color: #fff;
}

.section-lead {
  color: var(--muted);
  margin: -8px 0 22px;
  max-width: 640px;
  font-size: 0.95rem;
}

.service-list {
  list-style: disc;
  padding-left: 1.2em;
  font-size: 0.92rem;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.service-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}

.service-tagline {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

.service-price {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0;
}

.service-note {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 10px 0 10px 1.2em;
  max-width: 36em;
}

.footer-link {
  color: #cfd8e3;
  text-decoration: none;
}
.footer-link:hover { color: #fff; }

.btn {
  display: inline-block;
  border: none;
  border-radius: var(--radius);
  padding: 13px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); }

/* ---------- Секции ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.section h2 {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  margin-bottom: 24px;
}

/* ---------- Фильтры ---------- */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.filter-btn {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text);
}
.filter-btn.active {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}

.catalog-empty {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 12px 0 4px;
}

/* ---------- Карточки ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(13, 27, 42, 0.12);
}

.card-photo {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #e8edf3, #d3dce6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
}
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}
.badge-available { background: #2a9d4e; }
.badge-sold { background: #6b7685; }
.badge-parts { background: #e08a00; }

.card-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card-title { font-size: 1.08rem; font-weight: 700; }
.card-price { font-size: 1.15rem; font-weight: 800; color: var(--accent); }
.card-specs {
  list-style: none;
  font-size: 0.88rem;
  color: var(--muted);
  display: grid;
  gap: 2px;
}
.card-note { font-size: 0.85rem; color: var(--muted); flex: 1; }
.card .btn {
  padding: 10px 16px;
  font-size: 0.92rem;
  text-align: center;
}

.card.is-sold .card-photo { filter: grayscale(0.7); }

.card-clickable {
  cursor: pointer;
  text-align: left;
}

.card-clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card-body--compact {
  padding: 14px 16px;
}

.card-body--compact .card-title {
  margin: 0;
}

.card-body--catalog {
  padding: 14px 16px 16px;
  gap: 6px;
}

.card-body--catalog .card-title {
  font-size: 1.05rem;
  line-height: 1.25;
}

.card-vin {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  word-break: break-all;
}

.card-auction-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

.card-auction-link {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 24px;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  padding: 2px 4px;
  margin: 0 -4px;
  transition: background 0.15s;
}

.card-auction-link:hover {
  background: rgba(13, 27, 42, 0.06);
}

.card-auction-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-auction-logo {
  display: block;
  width: auto;
  height: 24px;
  max-width: 110px;
  object-fit: contain;
}

.card-lot {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.card-auction {
  display: flex;
  align-items: center;
  min-height: 24px;
}

.card-auction img {
  display: block;
  width: auto;
  height: 24px;
  max-width: 100%;
}

.card-body--catalog .card-price {
  font-size: 1.12rem;
  margin-top: 2px;
}

/* ---------- Альбом (popup) ---------- */
body.album-open {
  overflow: hidden;
}

.album-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 16px;
}

.album-modal[hidden] {
  display: none;
}

.album-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 24, 0.82);
}

.album-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: calc(100vh - 32px);
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 16px 20px;
  display: grid;
  gap: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.album-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.album-title {
  font-size: 1.05rem;
  padding-right: 36px;
}

.album-stage {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.album-stage img {
  width: 100%;
  max-height: min(70vh, 620px);
  object-fit: contain;
  background: #f4f6f9;
  border-radius: 8px;
}

.album-nav {
  border: 1px solid var(--border);
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.album-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.album-counter {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Услуги ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.service {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
}
.service-body {
  flex: 1;
  padding: 22px 20px 18px;
}
.service-footer {
  border-top: 1px solid var(--border);
  background: #f4f6f9;
  padding: 14px 16px;
  display: flex;
  justify-content: center;
}
.service-price-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  width: 100%;
  max-width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background 0.15s;
}
.service-price-badge:hover {
  background: rgba(13, 27, 42, 0.05);
}
.service-price-badge:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.service-price-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--muted);
}
.service-price-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.service-price-from {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}
.service-price-amount {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.service-price-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0.72;
}
.service-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  color: var(--accent);
}
.service-icon svg {
  width: 100%;
  height: 100%;
}
.service h3 { font-size: 1.05rem; margin-bottom: 6px; }
.service-body .service-subtitle { margin-bottom: 8px; }
.service-body .service-tagline { margin-top: 0; }

/* ---------- Калькулятор ---------- */
.calc-note { color: var(--muted); margin: -12px 0 20px; font-size: 0.92rem; }

.calc-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  max-width: 640px;
}
.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
.calc-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}
select, input, textarea {
  font: inherit;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  width: 100%;
}
select:focus, input:focus, textarea:focus {
  outline: 2px solid var(--dark2);
  border-color: transparent;
}

.calc-result {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
}
.calc-result .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.calc-result .total {
  font-weight: 800;
  font-size: 1.1rem;
  border-top: 1px dashed var(--border);
  padding-top: 8px;
  margin-top: 4px;
  color: var(--accent);
}

.calc-fld { display: block; font-weight: 600; font-size: 0.9rem; margin: 14px 0 6px; }
.calc-hint { color: var(--muted); font-size: 0.8rem; margin: 6px 2px 0; }

.calc-types {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.calc-dests {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.type-btn {
  position: relative;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 10px 6px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}
.type-btn.active { border-color: var(--accent); background: #fdf0f1; color: var(--accent-h); }
.type-btn.suggested { box-shadow: 0 0 0 2px #2a9d4e; }
.type-btn.suggested.active { border-color: #2a9d4e; background: #eef8f0; color: #1a6b34; }
.type-btn .badge-hint {
  position: absolute; top: -9px; right: 6px; font-style: normal;
  background: #2a9d4e; color: #fff; font-size: 0.62rem; font-weight: 700;
  padding: 1px 7px; border-radius: 999px;
}

.calc-ev { display: flex; align-items: center; gap: 8px; margin: 16px 0; font-size: 0.92rem; }
.calc-ev input { width: 18px; height: 18px; accent-color: var(--accent); }

.calc-box input[type="number"] {
  font: inherit; width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
}
.calc-result .sec {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); margin: 14px 0 6px; padding-top: 8px; border-top: 1px solid var(--border);
}
.calc-result .sec:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.calc-result .row.sub span:first-child { padding-left: 12px; font-size: 0.88rem; }
.calc-result .fx { color: var(--muted); font-size: 0.78rem; margin-top: 10px; }
.calc-go { width: 100%; }

.calc-result .veh { font-weight: 700; margin-bottom: 2px; }
.calc-result .veh-sub { color: var(--muted); font-size: 0.85rem; margin-bottom: 12px; }
.calc-result .warn {
  background: #fff7e6; border: 1px solid #f0d9a8; color: #7a5b13;
  border-radius: 10px; padding: 10px 12px; font-size: 0.88rem; margin-bottom: 12px;
}
.calc-result .warn a { color: #7a5b13; }
.calc-result .hint-ok { color: #2a9d4e; font-size: 0.85rem; margin-bottom: 12px; }

.calc-error {
  margin-top: 16px; border: 1px solid #f3c8cc; background: #fdf4f4;
  color: #8d2730; font-size: 0.95rem; border-radius: 10px; padding: 12px 14px;
}
.calc-error b { display: block; margin-bottom: 4px; }
.calc-disclaimer { color: var(--muted); font-size: 0.8rem; margin-top: 14px; }
.calc-customs-note {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 4px 0 0 12px;
  font-style: italic;
}

@media (max-width: 640px) {
  .calc-types { grid-template-columns: repeat(2, 1fr); }
  .calc-dests { grid-template-columns: 1fr; }
}

/* ---------- Контакты ---------- */
.contact-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 32px;
  max-width: 560px;
}

.contact-block {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.contact-block h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.contact-block p {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.contact-block p:last-child {
  margin-bottom: 0;
}

.contact-company {
  font-weight: 600;
  color: var(--text);
}

.contact-link {
  color: var(--accent);
  text-decoration: none;
}

.contact-link:hover {
  color: var(--accent-h);
  text-decoration: underline;
}

.contact-form-title {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

/* ---------- Форма ---------- */
.order-form {
  max-width: 560px;
  display: grid;
  gap: 12px;
}
.form-ok {
  color: #2a9d4e;
  font-weight: 600;
}

/* ---------- Подвал ---------- */
.footer {
  background: var(--dark);
  color: #9fb0c3;
  padding: 32px 0;
  font-size: 0.9rem;
}
.footer .container { display: grid; gap: 6px; }
.footer .logo img {
  height: 36px;
  max-width: 140px;
}

/* ---------- Мобильные ---------- */
@media (max-width: 640px) {
  .header-inner { gap: 10px; }
  .logo img { height: 36px; max-width: 150px; }
  .nav { order: 3; width: 100%; justify-content: space-between; gap: 8px; }
  .hero { padding: 48px 0; }
  .calc-row { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
}
