/* ============================================================
   DriveSelect — Car Detail Page Styles
   css/car.css
   ============================================================ */

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb {
  padding: var(--space-5) 0 var(--space-6);
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  list-style: none;
}

.breadcrumb a {
  font-size: var(--text-sm);
  color: var(--ink-500);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb i {
  font-size: 12px;
  color: var(--ink-300);
}

.breadcrumb li:last-child {
  font-size: var(--text-sm);
  color: var(--ink-900);
  font-weight: 500;
}

/* ── Loading ──────────────────────────────────────────────── */
.loading-full {
  text-align: center;
  padding: var(--space-16);
  color: var(--ink-300);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

/* ── Detail grid layout ───────────────────────────────────── */
.car-detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-16);
  align-items: start;
}

/* ── Gallery ──────────────────────────────────────────────── */
.car-gallery {
  position: sticky;
  top: 80px;
}

.gallery-main {
  background: var(--surface-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  margin-bottom: var(--space-3);
  aspect-ratio: 4 / 4;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  display: block;
  transition: transform 0.4s var(--ease);
}

.gallery-badges {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.gallery-thumbs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.gallery-thumb {
  width: 80px;
  height: 60px;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--dur-fast);
  background: var(--surface-2);
  padding: 0;
}

.gallery-thumb.is-active {
  border-color: var(--brand);
}

.gallery-thumb:hover {
  border-color: var(--brand-mid);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-placeholder--lg {
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-300);
  font-size: 64px;
  background: var(--surface-2);
  border-radius: var(--r-lg);
}

/* ── Info panel ───────────────────────────────────────────── */
.car-info-panel {
  padding-bottom: var(--space-8);
}

.car-badges-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.car-title {
  font-family: var(--ff-display);
  font-size: clamp(var(--text-xl), 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-900);
  line-height: 1.05;
  margin-bottom: var(--space-2);
}

.car-subtitle {
  font-size: var(--text-sm);
  color: var(--ink-500);
  margin-bottom: var(--space-5);
  text-transform: capitalize;
}

.car-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.car-price {
  font-family: var(--ff-display);
  font-size: 30px;
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.03em;
}

.car-negotiable {
  font-size: var(--text-xs);
  font-weight: 500;
  background: var(--success-bg);
  color: var(--success);
  padding: 3px 10px;
  border-radius: var(--r-full);
}

/* Specs grid */
.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.spec-item {
  background: var(--surface-1);
  border: var(--border-light);
  border-radius: var(--r-md);
  padding: var(--space-3) var(--space-4);
  display: grid;
  grid-template-columns: 20px 1fr;
  grid-template-rows: auto auto;
  gap: 0 var(--space-2);
  align-items: start;
}

.spec-icon {
  grid-row: 1 / 3;
  color: var(--brand);
  font-size: 16px;
  margin-top: 2px;
}

.spec-label {
  font-size: var(--text-xs);
  color: var(--ink-300);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spec-value {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-900);
}

/* Description */
.car-description {
  font-size: var(--text-base);
  color: var(--ink-500);
  line-height: 1.75;
  margin-bottom: var(--space-6);
}

/* Features */
.car-features {
  margin-bottom: var(--space-6);
}

.features-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-900);
  margin-bottom: var(--space-3);
}

.features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--ink-700);
}

.feature-item i {
  color: var(--success);
  flex-shrink: 0;
  margin-top: 2px;
}

/* CTA row */
.car-cta-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

/* Share bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding-top: var(--space-5);
  border-top: var(--border-light);
  margin-bottom: var(--space-4);
}

.share-label {
  font-size: var(--text-xs);
  color: var(--ink-300);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--r-md);
  border: var(--border-mid);
  background: transparent;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink-700);
  cursor: pointer;
  transition: background var(--dur-fast);
}

.share-btn:hover {
  background: var(--surface-2);
}

/* URL display */
.url-display {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  color: var(--ink-500);
}

.url-display code {
  font-family: monospace;
  font-size: var(--text-xs);
  color: var(--ink-700);
  word-break: break-all;
}

/* Related section */
.related-section {
  padding-bottom: var(--space-16);
}

.related-section .section-title {
  margin-bottom: var(--space-6);
}

/* Not found */
.not-found {
  text-align: center;
  padding: var(--space-20);
  color: var(--ink-300);
}

.not-found i {
  font-size: 48px;
  display: block;
  margin-bottom: var(--space-4);
}

.not-found h2 {
  font-size: var(--text-lg);
  color: var(--ink-700);
  margin-bottom: var(--space-3);
}

.not-found p {
  font-size: var(--text-base);
  color: var(--ink-500);
  margin-bottom: var(--space-6);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .car-detail-grid {
    grid-template-columns: 1fr;
  }

  .car-gallery {
    position: static;
  }

  .features-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .specs-grid {
    /* grid-template-columns: 1fr; */
  }

  .car-cta-row .btn {
    width: 100%;
    justify-content: center;
  }
}