/* ── Vehicle detail page ─────────────────────────────────────────────────── */

/* Gallery main image */
.gallery-main {
  height: 480px;
}
.gallery-main-wrapper {
  background: #141414;
  cursor: zoom-in;
}
#main-car-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-empty-icon {
  font-size: 5rem;
}

/* Gallery nav buttons */
.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s, color 0.2s;
}
.gallery-btn:hover {
  background: #C9A84C;
  color: #0a0a0a;
}
.gallery-btn-prev { left: 12px; }
.gallery-btn-next { right: 12px; }
body.rtl .gallery-btn-prev { left: auto; right: 12px; }
body.rtl .gallery-btn-next { right: auto; left: 12px; }

/* Gallery image counter */
#gallery-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  pointer-events: none;
  display: none;
}

/* Thumbnail strip */
.thumb-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}
.thumb-item {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.thumb-item.active {
  border-color: #C9A84C;
}
.thumb-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  display: block;
}

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95);
}
#lightbox-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
}
#lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
#lb-prev,
#lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
#lb-prev { left: 16px; }
#lb-next { right: 16px; }
body.rtl #lb-prev { left: auto; right: 16px; }
body.rtl #lb-next { right: auto; left: 16px; }
#lb-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 999px;
  display: none;
}

@media (max-width: 640px) {
  .gallery-main {
    height: 280px;
  }
}
