/* Current Vehicles page -- grid (reuses .car-grid/.car-card from components.css),
   quick-view overlay, photo lightbox, and shortlist. Page-scoped, only loaded
   from current-vehicles.html, matching the find-a-car.css precedent. */

/* ── Grid card additions ───────────────────────────────────────────── */

.vehicle-card {
  position: relative;
  cursor: pointer;
}

.vehicle-card:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.vehicle-card__teaser {
  display: block;
  margin-top: 4px;
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Shortlist heart button ────────────────────────────────────────── */

.vehicle-shortlist-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(18, 22, 30, 0.55);
  color: var(--color-white);
  border: none;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.vehicle-shortlist-btn:hover {
  background: var(--color-primary);
}

.vehicle-shortlist-btn.is-active {
  color: var(--color-primary-light);
}

.vehicle-card .vehicle-shortlist-btn {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 2;
}

.vehicle-card__price {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 2;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-base);
  padding: 4px var(--space-3);
  border-radius: var(--radius-sm);
}

/* ── Vehicle quick-view / full-story overlay ───────────────────────── */

.vehicle-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.vehicle-overlay.is-open {
  visibility: visible;
  opacity: 1;
}

.vehicle-overlay__scrim {
  position: absolute;
  inset: 0;
  background: rgba(18, 22, 30, 0.75);
}

.vehicle-overlay__panel {
  position: relative;
  z-index: 1;
  background: var(--color-white);
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transform: translateY(24px);
  transition: transform var(--transition-base);
}

.vehicle-overlay.is-open .vehicle-overlay__panel {
  transform: translateY(0);
}

.vehicle-overlay__panel--compact {
  max-width: 480px;
}

@media (min-width: 768px) {
  .vehicle-overlay {
    align-items: center;
    padding: var(--space-8);
  }
  .vehicle-overlay__panel {
    border-radius: var(--radius-sm);
    max-height: 88vh;
  }
}

/* More room on desktop for the (now always-visible) full story. */
@media (min-width: 1024px) {
  .vehicle-overlay__panel {
    max-width: 860px;
  }
}

.vehicle-overlay__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(18, 22, 30, 0.08);
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.vehicle-overlay .vehicle-shortlist-btn {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  z-index: 2;
}

.vehicle-overlay__hero {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.vehicle-overlay__body {
  padding: var(--space-6) var(--space-6) var(--space-8);
}

.vehicle-overlay__body h2 {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  color: var(--color-dark);
  margin-bottom: var(--space-2);
}

.vehicle-overlay__teaser {
  color: var(--color-text-muted);
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.vehicle-spec-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
}

.vehicle-spec {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vehicle-spec span {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-muted);
}

.vehicle-spec strong {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--color-dark);
}

.vehicle-overlay__full {
  margin-top: var(--space-6);
  border-top: 1px solid var(--color-border-light);
  padding-top: var(--space-6);
}

.vehicle-overlay__full h3 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-dark);
  margin: var(--space-6) 0 var(--space-3);
}

.vehicle-worklist {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
  display: grid;
  gap: 6px;
}

.vehicle-worklist li {
  position: relative;
  padding-left: 1.4em;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.vehicle-worklist li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

.vehicle-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.vehicle-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.vehicle-gallery img:hover {
  transform: scale(1.04);
}

@media (max-width: 480px) {
  .vehicle-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

.vehicle-quote {
  border-left: 4px solid var(--color-primary);
  background: var(--color-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-4) var(--space-5);
  margin: var(--space-6) 0;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-dark);
}

.vehicle-quote cite {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.vehicle-overlay__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-6);
}

/* ── Photo lightbox ────────────────────────────────────────────────── */

.vehicle-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 12, 16, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.vehicle-lightbox.is-open {
  visibility: visible;
  opacity: 1;
}

.vehicle-lightbox__img {
  max-width: 92vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.vehicle-lightbox__close,
.vehicle-lightbox__back {
  position: absolute;
  background: none;
  border: none;
  color: var(--color-white);
  cursor: pointer;
}

.vehicle-lightbox__close {
  top: var(--space-5);
  right: var(--space-5);
  font-size: 2rem;
  line-height: 1;
}

.vehicle-lightbox__back {
  top: var(--space-5);
  left: var(--space-5);
  font-weight: 700;
  font-size: var(--text-sm);
}

.vehicle-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--color-white);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  font-size: 1.8rem;
  cursor: pointer;
}

.vehicle-lightbox__nav:hover {
  background: var(--color-primary);
}

.vehicle-lightbox__nav--prev { left: var(--space-4); }
.vehicle-lightbox__nav--next { right: var(--space-4); }

.vehicle-lightbox__count {
  position: absolute;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
}

@media (max-width: 640px) {
  .vehicle-lightbox__nav {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }
}

/* ── Shortlist pill + panel ────────────────────────────────────────── */

.shortlist-pill {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 150;
  background: var(--color-dark);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-full);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  transition: transform var(--transition-fast);
}

.shortlist-pill:hover {
  transform: translateY(-2px);
}

.vehicle-shortlist-empty {
  color: var(--color-text-muted);
  padding: var(--space-6) 0;
  text-align: center;
}

.vehicle-shortlist-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
}

.vehicle-shortlist-row img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.vehicle-shortlist-row__info {
  flex: 1;
  min-width: 0;
}

.vehicle-shortlist-row__title {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-dark);
}

.vehicle-shortlist-row__meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.vehicle-shortlist-row__remove {
  background: none;
  border: none;
  color: var(--color-text-light);
  font-size: 1.3rem;
  cursor: pointer;
  padding: var(--space-2);
}

.vehicle-shortlist-row__remove:hover {
  color: var(--color-error);
}
