/* --- Extra stijlen voor individuele auto showroom pagina's (cars.css) --- */
.back-link {
  display: inline-block;
  color: #888;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 20px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #b01426;
}

.car-detail-section {
  background: #141414;
  border: 1px solid #252525;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 30px;
  margin-top: 20px;
  align-items: start;
  /* Zet de uitlijning van de grid-items op de bovenkant */
}

.car-detail-img {
  position: relative;
  width: 100%;
  height: 100%;
  /* Laat de afbeelding de volledige hoogte van de kolom opvullen */
  min-height: 350px;
  /* Zorgt dat hij op kleinere schermen wel hoog genoeg blijft */
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}

.car-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Vult het kader netjes op zonder vervorming */
}

.car-detail-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* Laat de inhoud bovenaan starten */
  height: 100%;
}

.car-detail-info h2 {
  color: #fff;
  font-family: "LemonMilk", sans-serif;
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.car-specs {
  background: #181818;
  border: 1px solid #222;
  padding: 15px;
  border-radius: 4px;
  margin: 20px 0;
}

.spec-item {
  color: #ccc;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.spec-item:last-child {
  margin-bottom: 0;
}

.spec-item strong {
  color: #fff;
}

@media (max-width: 900px) {
  .car-detail-section {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .car-detail-img {
    height: 250px;
    min-height: 0;
  }
}

/* Strakke rode downloadknop met wit lettertype en icoon */
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: #d01a2f;
  /* V1M Rood */
  color: #ffffff !important;
  /* Witte tekst */
  padding: 14px 24px;
  border-radius: 4px;
  font-family: "LemonMilk", sans-serif;
  /* Jouw huisstijl lettertype */
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
  width: auto;
  /* Zorgt dat het een compact knopje wordt i.p.v. heel de breedte */
  margin-top: 15px;
  box-sizing: border-box;
}

.btn-action:hover {
  background-color: #b01426;
  transform: translateY(-2px);
}

.btn-action:active {
  transform: translateY(0);
}

/* Formaat en animatie van het download-icoontje naast de tekst */
.download-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.btn-action:hover .download-icon {
  transform: translateY(2px);
  /* Subtiel animatie-effecttje naar beneden bij hover */
}

.btn-action.is-unavailable {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.download-status {
  margin: 8px 0 0;
  color: #d01a2f;
  font-size: 0.8rem;
}

/* --- Galerij & Slider in de showroom --- */
.car-detail-img {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 350px;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.gallery-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.gallery-img.active {
  opacity: 1;
}

.gallery-thumbnails {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 3;
  display: flex;
  gap: 6px;
  max-width: calc(100% - 24px);
  padding: 0;
  overflow-x: auto;
  transform: translateX(-50%);
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.gallery-thumbnails::-webkit-scrollbar {
  display: none;
}

.gallery-thumbnail {
  width: 52px;
  height: 36px;
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 2px;
  background: #111;
  cursor: pointer;
}

.gallery-thumbnail.active {
  border-color: #d01a2f;
}

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

.gallery-counter,
.gallery-status {
  position: absolute;
  z-index: 3;
  color: #fff;
  background: rgba(0, 0, 0, 0.78);
  border-radius: 3px;
  font-size: 0.75rem;
  padding: 5px 8px;
}

.gallery-counter {
  top: 10px;
  left: 10px;
}

.gallery-status {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Slider pijltjes op de afbeelding */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 1.2rem;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 2;
  border-radius: 3px;
  transition: background 0.2s;
}

.slider-btn:hover {
  background: #b01426;
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

/* Subtiele tekst "Klik om te vergroten" */
.zoom-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.8;
}

/* --- Lightbox Popup Stijlen --- */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  padding: 60px 20px 20px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.95);
  touch-action: pan-y;
}

.lightbox-content {
  margin: 0;
  display: block;
  max-width: 85vw;
  max-height: calc(100vh - 80px);
  border-radius: 4px;
  object-fit: contain;
  touch-action: none;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.lightbox-close:hover {
  color: #b01426;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 16px 20px;
  font-size: 24px;
  border: none;
  cursor: pointer;
  z-index: 10;
  border-radius: 4px;
  transition: background 0.2s;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-btn:hover {
  background: #b01426;
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

@media (max-width: 600px) {
  .car-detail-section {
    padding: 12px;
    gap: 16px;
  }

  .car-detail-img {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .gallery-img {
    object-fit: contain;
  }

  .gallery-thumbnails {
    bottom: 8px;
    max-width: calc(100% - 16px);
  }

  .gallery-thumbnail {
    width: 44px;
    height: 32px;
  }

  .slider-btn {
    padding: 9px 11px;
  }

  .lightbox {
    padding-top: 48px;
  }

  .lightbox-content {
    max-width: 94%;
    max-height: 72vh;
  }

  .lightbox-close {
    top: 8px;
    right: 16px;
    font-size: 34px;
  }

  .lightbox-btn {
    display: none;
  }
}

.content-page h1 {
  font-family: "LemonMilk", sans-serif;
  color: #d01a2f;
  font-size: 2rem;
  margin-bottom: 20px;
}

/* --- Terug naar garage knop styling (exact zoals driver-profile) --- */
.back-section {
  max-width: 1200px;
  margin: 30px auto 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: flex-start;
}

.back-section .btn-back,
.back-section a[class*="btn-back"] {
  display: inline-block;
  background-color: #d01a2f !important;
  color: #fff !important;
  padding: 12px 24px;
  text-decoration: none;
  font-family: "LemonMilk", sans-serif;
  font-weight: bold;
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-top: 10px;
  transition: background 0.3s;
  border: none;
  text-align: center;
}

.back-section .btn-back:hover,
.back-section a[class*="btn-back"]:hover {
  background-color: #b01426 !important;
}
