@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --bg: #0c0c0d;
  --surface: #161616;
  --surface-2: #1f1f1f;
  --line: #2b2b2b;
  --text: #f3f1ee;
  --text-muted: #999999;
  --accent: #e5342a; /* фирменный красный, как на витринах детейлинг-мастерских */
  --accent-2: #4fa8c9; /* холодный тон стекла — используется в демо тонировки */
  --danger: #e5342a;
  --radius: 10px;
  --font-display: "Oswald", sans-serif;
  --font-body: "Manrope", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

img, svg { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(16, 19, 23, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.logo span { color: var(--accent); }

.main-nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text-muted);
}

.main-nav a { transition: color 0.15s ease; }
.main-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 16px; }

.cart-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px;
}

.cart-button:hover { border-color: var(--accent); }

.cart-count {
  background: var(--accent);
  color: #1a1305;
  font-weight: 700;
  font-size: 12px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* ---------- Hero (полноэкранное видео) ---------- */

.hero-video {
  position: relative;
  height: 86vh;
  min-height: 520px;
  max-height: 780px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-video-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0c0c0d;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 12, 13, 0.35) 0%, rgba(12, 12, 13, 0.55) 55%, rgba(12, 12, 13, 0.95) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: 72px;
}

.hero-logo {
  height: 96px;
  width: auto;
  margin: 0 0 20px;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5));
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1.05;
  font-weight: 600;
  margin: 0 0 20px;
  text-transform: uppercase;
  max-width: 16ch;
}

.hero-content p.lead {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 46ch;
  margin: 0 0 32px;
}

.hero-actions { display: flex; align-items: center; }

.scroll-hint {
  position: absolute;
  z-index: 2;
  right: 28px;
  bottom: 28px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 16px;
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
}

.btn-primary { background: var(--accent); color: #1a1305; }
.btn-primary:hover { filter: brightness(1.08); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
  margin-left: 12px;
}
.btn-secondary:hover { border-color: var(--text-muted); }

/* --- VLT demo (signature element) --- */

.vlt-demo {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}

.vlt-demo-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.vlt-demo-value {
  color: var(--accent);
  font-weight: 500;
}

.window-frame {
  position: relative;
  height: 210px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #a9d4e6 0%, #7fb9d1 100%);
  border: 6px solid #2a323c;
}

.window-tint-overlay {
  position: absolute;
  inset: 0;
  background: #05070a;
  opacity: 0.35; /* JS меняет это значение */
  transition: opacity 0.15s ease;
}

.window-frame .car-silhouette {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  opacity: 0.9;
}

.vlt-slider-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.vlt-slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}

.vlt-caption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.finish-swatches {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.swatch {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
}

.swatch-surface { height: 110px; }

.swatch-gloss .swatch-surface {
  background-image: url('/img/finish-gloss.jpg'),
    linear-gradient(135deg, #3a3a3a 0%, #7a7a7a 30%, #262626 55%, #5c5c5c 80%, #2b2b2b 100%);
  background-size: cover, cover;
  background-position: center, center;
}

.swatch-satin .swatch-surface {
  background-image: url('/img/finish-satin.jpg'),
    linear-gradient(135deg, #333333 0%, #3f3f3f 100%);
  background-size: cover, cover;
  background-position: center, center;
}

.swatch span {
  display: block;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
}

/* ---------- About / features ---------- */

.about {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.about h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 32px;
  margin: 0 0 20px;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-list li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  color: var(--text);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Gallery ---------- */

.gallery {
  padding: 56px 0 72px;
  border-bottom: 1px solid var(--line);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.gallery-tile {
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Contact / messengers ---------- */

.contact {
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.contact h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 30px;
  margin: 0 0 14px;
}

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

.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.contact-btn:hover { border-color: var(--accent); background: var(--surface-2); }

/* ---------- Categories ---------- */

.categories {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-heading h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 26px;
  margin: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.category-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.category-card:hover {
  border-color: var(--accent-2);
  transform: translateY(-2px);
}

.category-card .icon { color: var(--accent-2); margin-bottom: 16px; }
.category-card h3 { font-family: var(--font-display); text-transform: uppercase; margin: 0 0 8px; font-size: 18px; }
.category-card p { color: var(--text-muted); font-size: 14px; margin: 0; }

/* ---------- Catalog ---------- */

.catalog { padding: 56px 0 72px; }

.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.filter-tabs button {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-muted);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
}

.filter-tabs button.active {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface-2);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card .tag-row { display: flex; flex-wrap: wrap; gap: 6px; }

.product-card .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}

.product-card .category-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.product-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  margin: 0;
  text-transform: uppercase;
}

.product-card p.desc {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
  flex: 1;
}

.spec-row {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.spec-row b { color: var(--text); font-weight: 500; }

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.price {
  font-family: var(--font-display);
  font-size: 21px;
}

.price small { font-family: var(--font-body); color: var(--text-muted); font-size: 12px; display: block; }

.add-to-cart {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
}

.add-to-cart:hover { border-color: var(--accent); }

.add-to-cart:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: var(--text-muted);
}
.add-to-cart:disabled:hover { border-color: var(--line); }

/* ---------- Cart drawer ---------- */

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 8, 0.6);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 92vw;
  background: var(--surface);
  border-left: 1px solid var(--line);
  z-index: 61;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.cart-drawer-header h3 { font-family: var(--font-display); text-transform: uppercase; margin: 0; }

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
}

.cart-items { flex: 1; overflow-y: auto; padding: 12px 24px; }

.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item-name { font-size: 14px; font-weight: 600; }
.cart-item-unit { font-size: 12px; color: var(--text-muted); }

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-control button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
}

.remove-link {
  font-size: 12px;
  color: var(--danger);
  background: none;
  border: none;
  padding: 0;
  margin-top: 8px;
}

.cart-drawer-footer {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--line);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 16px;
}

.cart-empty { color: var(--text-muted); font-size: 14px; padding: 40px 0; text-align: center; }

/* ---------- Checkout modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 8, 0.7);
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 480px;
  width: 100%;
  padding: 28px;
  max-height: 88vh;
  overflow-y: auto;
}

.modal h3 { font-family: var(--font-display); text-transform: uppercase; margin-top: 0; }

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field input, .field textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.field input:focus, .field textarea:focus {
  outline: 2px solid var(--accent-2);
  outline-offset: 1px;
}

.payment-options { display: flex; gap: 10px; margin-bottom: 20px; }

.payment-option {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
}

.payment-option input { display: none; }

.payment-option.selected { border-color: var(--accent); background: var(--surface-2); }

.order-result { font-size: 14px; line-height: 1.6; }
.order-result .ok { color: var(--accent-2); font-weight: 600; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .main-nav { display: none; }
  .hero-content h1 { font-size: 32px; max-width: none; }
  .hero-logo { height: 64px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid, .product-grid { grid-template-columns: 1fr; }
  .cart-drawer { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
