/* FS Cars — Vehicle detail (premium dealership layout) */
:root {
  --vd-bg: #0a0a0a;
  --vd-surface: #121212;
  --vd-border: rgba(255, 255, 255, 0.12);
  --vd-text: #ffffff;
  --vd-muted: #9aa0b5;
  --vd-accent: #0d6efd;
  --vd-accent-hover: #3d8bfd;
  --vd-radius: 12px;
  --vd-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  --vd-space-1: 8px;
  --vd-space-2: 16px;
  --vd-space-3: 24px;
  --vd-space-4: 32px;
}

body.vehicle-detail-page {
  background-color: var(--vd-bg);
  color: var(--vd-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
}

/* Navbar / footer (kept simple, dark) */
.vehicle-detail-page .navbar {
  background-color: #000;
  padding: 1rem 2rem;
}

.vehicle-detail-page .navbar-brand img {
  height: 72px;
  width: auto;
}

.vehicle-detail-page .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.35);
}

.vehicle-detail-page .navbar-toggler-icon {
  filter: invert(1);
}

.vehicle-detail-page .social-icons a {
  color: var(--vd-accent);
  margin-left: 1rem;
  font-size: 1.4rem;
  text-decoration: none;
  transition: color 0.25s ease;
}

.vehicle-detail-page .social-icons a:hover {
  color: var(--vd-accent-hover);
}

.vehicle-detail-page .footer {
  background: #111;
  padding: 3rem 0 0;
  margin-top: 4rem;
}

.vehicle-detail-page .footer h3 {
  color: var(--vd-accent);
  margin-bottom: 1.25rem;
}

.vehicle-detail-page .footer-privacy-legal {
  text-align: center;
  padding: 1rem 0;
}

.vehicle-detail-page .footer-privacy-legal a {
  color: #bfc6e0;
  text-decoration: none;
}

/* Main layout */
.vd-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--vd-space-3) var(--vd-space-2) var(--vd-space-4);
}

.vd-header {
  margin-bottom: var(--vd-space-3);
}

.vd-title {
  font-size: clamp(1.6rem, 2.4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0 0 var(--vd-space-1);
  text-transform: uppercase;
}

.vd-meta {
  color: var(--vd-muted);
  font-size: 0.95rem;
  margin: 0;
  letter-spacing: 0.02em;
}

.vd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
  gap: var(--vd-space-3);
  align-items: start;
}

/* Gallery */
.vd-gallery {
  min-width: 0;
}

.vd-stage {
  position: relative;
  background: #000;
  border-radius: var(--vd-radius);
  overflow: hidden;
  box-shadow: var(--vd-shadow);
  border: 1px solid var(--vd-border);
  width: 100%;
  /* Height follows each photo via JS (--vd-stage-h) so the frame hugs the image */
  height: var(--vd-stage-h, auto);
  max-height: 640px;
}

.vd-stage [data-vd-stage] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.vd-stage-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background: #000;
  transition: opacity 0.28s ease;
}

.vd-stage-media.is-fading {
  opacity: 0.35;
}

.vd-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.25s ease, transform 0.25s ease;
}

.vd-nav:hover {
  background: rgba(13, 110, 253, 0.85);
  transform: translateY(-50%) scale(1.05);
}

.vd-nav--prev { left: 14px; }
.vd-nav--next { right: 14px; }

.vd-counter {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 2;
}

.vd-thumbs {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: var(--vd-space-2);
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.vehicle-detail-page .vd-thumb {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  position: relative;
  flex: 0 0 96px;
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  height: 64px !important;
  min-height: 64px !important;
  max-height: 64px !important;
  margin: 0;
  padding: 0 !important;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  cursor: pointer;
  opacity: 0.65;
  line-height: 0;
  transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

body.vehicle-detail-page .vd-thumb img,
body.vehicle-detail-page .vd-thumb video {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  pointer-events: none !important;
}

body.vehicle-detail-page .vd-thumb:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

body.vehicle-detail-page .vd-thumb.is-active {
  opacity: 1;
  border-color: transparent;
  box-shadow: inset 0 0 0 2px var(--vd-accent);
}

body.vehicle-detail-page .vd-thumb-video {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
    #1a1a1a;
  color: #fff;
  font-size: 1.1rem;
}

.vd-thumbs {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.vd-thumbs::-webkit-scrollbar {
  display: none;
}

/* Info card */
.vd-card {
  background: var(--vd-surface);
  border: 1px solid var(--vd-border);
  border-radius: var(--vd-radius);
  padding: var(--vd-space-3);
  box-shadow: var(--vd-shadow);
  position: sticky;
  top: 24px;
}

.vd-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 var(--vd-space-2);
  line-height: 1.3;
  text-transform: uppercase;
}

.vd-price {
  color: var(--vd-accent);
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 var(--vd-space-3);
  line-height: 1;
}

.vd-divider {
  border: none;
  border-top: 1px solid var(--vd-border);
  margin: 0 0 var(--vd-space-3);
}

.vd-specs {
  list-style: none;
  margin: 0 0 var(--vd-space-3);
  padding: 0;
  display: grid;
  gap: 12px;
}

.vd-spec {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: 0.95rem;
}

.vd-spec-label {
  color: var(--vd-text);
  font-weight: 700;
}

.vd-spec-value {
  color: rgba(255, 255, 255, 0.88);
  text-align: right;
}

.vd-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.vd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  text-align: center;
}

.vd-btn:hover {
  transform: translateY(-1px);
}

.vd-btn--primary {
  background: #fff;
  color: #111;
}

.vd-btn--primary:hover {
  background: #e8e8e8;
  color: #000;
}

.vd-btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.vd-btn--secondary:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.vd-btn--ghost {
  grid-column: 1 / -1;
  background: transparent;
  color: var(--vd-muted);
  border-color: transparent;
  min-height: 40px;
  font-weight: 500;
}

.vd-btn--ghost:hover {
  color: #fff;
}

/* Mobile */
@media (max-width: 991px) {
  .vd-layout {
    grid-template-columns: 1fr;
  }

  .vd-card {
    position: static;
    order: 2;
  }

  .vd-gallery {
    order: 1;
  }

  .vd-stage {
    max-height: 520px;
  }

  .vd-actions {
    grid-template-columns: 1fr;
  }

  .vd-btn--ghost {
    grid-column: auto;
  }

  .vd-spec {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 575px) {
  .vd-page {
    padding: var(--vd-space-2);
  }

  body.vehicle-detail-page .vd-thumb {
    flex-basis: 78px;
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
  }

  .vd-title {
    font-size: 1.45rem;
  }
}

body.vehicle-detail-page .vd-thumb[style*="background-image"] {
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center center !important;
}