/* ─────────────────────────────────────────
   MotorVault — car_detail.css
   Place at: static/css/car_detail.css
   ───────────────────────────────────────── */

/* ── RESET & TOKENS ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:           #0d0d0d;
  --bg-2:         #111111;
  --surface:      #181818;
  --surface-2:    #1f1f1f;
  --border:       rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --border-focus: rgba(232, 200, 74, 0.50);
  --text:         #f0ede8;
  --text-muted:   #6a6764;
  --text-sub:     #9b9895;
  --accent:       #e8c84a;
  --accent-dim:   rgba(232, 200, 74, 0.10);
  --green:        #3ecf7a;
  --green-dim:    rgba(62, 207, 122, 0.12);
  --red:          #e05252;
  --red-dim:      rgba(224, 82, 82, 0.12);
  --blue:         #5b8dee;
  --radius:       10px;
  --radius-lg:    14px;
  --font-disp:    'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --ease:         cubic-bezier(.4, 0, .2, 1);
}

html, body { min-height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
img { display: block; max-width: 100%; }

/* ─────────────── NAV ─────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 5vw;
  height: 60px;
  background: rgba(13, 13, 13, 0.90);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--font-disp);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--text);
  flex-shrink: 0;
}
.logo span { color: var(--accent); }

.nav__links {
  display: flex;
  gap: 1.75rem;
  margin-right: auto;
}

.nav__links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }

.nav__actions { display: flex; gap: 0.75rem; }

/* ─────────────── BREADCRUMB ─────────────── */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 5vw;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.breadcrumb a { transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span:last-child { color: var(--text-sub); }

/* ─────────────── PAGE WRAP ─────────────── */

.page-wrap {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 5vw 4rem;
  align-items: start;
}

.col-left  { display: flex; flex-direction: column; gap: 1.5rem; }
.col-right { position: sticky; top: 76px; }

/* ─────────────── GALLERY ─────────────── */

.gallery { display: flex; flex-direction: column; gap: 0.75rem; }

.gallery__main {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gallery__main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.15s ease;
}

.gallery__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 13px;
}

/* Arrows */
.gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  z-index: 5;
}

.gallery__arrow:hover {
  background: rgba(0,0,0,0.8);
  transform: translateY(-50%) scale(1.08);
}

.gallery__arrow--prev { left: 12px; }
.gallery__arrow--next { right: 12px; }

.gallery__arrow svg { width: 16px; height: 16px; }

/* Counter */
.gallery__counter {
  position: absolute;
  bottom: 12px;
  right: 14px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  padding: 2px 10px;
  border-radius: 100px;
  pointer-events: none;
}

/* Status badge */
.gallery__status {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px 4px 8px;
  border-radius: 100px;
}

.gallery__status--green {
  background: rgba(62, 207, 122, 0.18);
  color: var(--green);
  border: 1px solid rgba(62, 207, 122, 0.3);
}

.gallery__status--red {
  background: rgba(224, 82, 82, 0.18);
  color: var(--red);
  border: 1px solid rgba(224, 82, 82, 0.3);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.gallery__status--green .status-dot {
  background: var(--green);
  animation: pulseGreen 2s infinite;
}

.gallery__status--red .status-dot {
  background: var(--red);
  animation: pulseRed 2s infinite;
}

/* Thumbnails */
.gallery__thumbs {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.gallery__thumb {
  flex-shrink: 0;
  width: 80px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
  background: none;
  padding: 0;
}

.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.gallery__thumb:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.gallery__thumb:hover img { transform: scale(1.06); }

.gallery__thumb--active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(232,200,74,0.2);
}

.thumb-main-tag {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 700;
  background: var(--accent);
  color: #0d0d0d;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

/* ─────────────── CARD ─────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card__header {
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border);
}

.card__title {
  font-family: var(--font-disp);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
}

/* ─────────────── SPECS GRID ─────────────── */

.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: background 0.2s;
}

.spec-item:nth-child(even) { border-right: none; }
.spec-item:nth-last-child(-n+2) { border-bottom: none; }

.spec-item:hover { background: rgba(255,255,255,0.02); }

.spec-item__icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.spec-item__icon svg { width: 15px; height: 15px; }

.spec-item__label {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1px;
}

.spec-item__value {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

/* ─────────────── SELLER CARD ─────────────── */

.seller-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
}

.seller-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1.5px solid rgba(232,200,74,0.3);
  color: var(--accent);
  font-family: var(--font-disp);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.seller-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.seller-info strong { font-size: 14px; font-weight: 500; }
.seller-info span   { font-size: 12px; color: var(--text-muted); }

.seller-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(62,207,122,0.2);
  padding: 3px 10px;
  border-radius: 100px;
  flex-shrink: 0;
}

/* ─────────────── RIGHT PANEL ─────────────── */

.sticky-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Title block */
.detail-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.fuel-badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
}

.fuel-badge--petrol   { background: rgba(255,140,50,0.12);  color: #ff8c32; border: 1px solid rgba(255,140,50,0.25); }
.fuel-badge--diesel   { background: rgba(91,141,238,0.12);  color: var(--blue); border: 1px solid rgba(91,141,238,0.25); }
.fuel-badge--electric { background: rgba(62,207,122,0.12);  color: var(--green); border: 1px solid rgba(62,207,122,0.25); }
.fuel-badge--hybrid   { background: rgba(150,100,230,0.12); color: #9664e6; border: 1px solid rgba(150,100,230,0.25); }
.fuel-badge--cng      { background: rgba(50,180,200,0.12);  color: #32b4c8; border: 1px solid rgba(50,180,200,0.25); }

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid rgba(62,207,122,0.25);
  padding: 3px 10px;
  border-radius: 100px;
}

.detail-title {
  font-family: var(--font-disp);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.04em;
  line-height: 1.05;
  margin-bottom: 0.35rem;
}

.detail-variant {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.detail-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-muted);
}

.detail-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Price block */
.price-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.25rem;
  position: relative;
  overflow: hidden;
}

.price-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at left, rgba(232,200,74,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.price-block__main { display: flex; flex-direction: column; gap: 2px; }

.price-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.price-value {
  font-family: var(--font-disp);
  font-size: 2.2rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  line-height: 1;
}

.price-lakh {
  font-size: 12px;
  color: var(--text-muted);
  align-self: flex-end;
}

/* Pending notice */
.pending-notice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(224,82,82,0.08);
  border: 1px solid rgba(224,82,82,0.2);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
}

.pending-notice svg { color: var(--red); flex-shrink: 0; }

/* Divider */
.panel-divider {
  height: 1px;
  background: var(--border);
}

/* Quick stats */
.quick-stats {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quick-stat {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 12.5px;
  color: var(--text-muted);
}

.quick-stat svg { color: var(--accent); flex-shrink: 0; }

/* Share row */
.share-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.share-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  text-decoration: none;
}

.share-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

/* ─────────────── BUTTONS ─────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: #0d0d0d;
}
.btn--primary:hover { background: #f5d76a; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(232,200,74,0.2); }

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-sub);
}
.btn--ghost:hover { border-color: var(--border-hover); color: var(--text); }

.btn--wishlisted {
  border-color: rgba(224,82,82,0.3);
  color: var(--red);
}

.btn--full { width: 100%; }
.btn--lg   { padding: 0.8rem 1.4rem; font-size: 14.5px; }
.btn--sm   { padding: 0.4rem 0.9rem; font-size: 12px; }

/* ─────────────── SIMILAR SECTION ─────────────── */

.similar-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5vw 5rem;
}

.similar-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.eyebrow {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.similar-title {
  font-family: var(--font-disp);
  font-size: 1.8rem;
  letter-spacing: 0.04em;
}

.similar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}

.similar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: block;
}

.similar-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.similar-card__img-wrap {
  height: 140px;
  overflow: hidden;
  background: var(--bg);
}

.similar-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.similar-card:hover .similar-card__img-wrap img { transform: scale(1.05); }

.similar-card__placeholder {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.similar-card__body { padding: 0.9rem 1rem; }

.similar-card__meta {
  display: flex;
  gap: 0.75rem;
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.similar-card__name {
  font-family: var(--font-disp);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.similar-card__price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-disp);
  letter-spacing: 0.03em;
}

/* ─────────────── ANIMATIONS ─────────────── */

@keyframes pulseGreen {
  0%   { box-shadow: 0 0 0 0 rgba(62, 207, 122, 0.6); }
  70%  { box-shadow: 0 0 0 5px rgba(62, 207, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 122, 0); }
}

@keyframes pulseRed {
  0%   { box-shadow: 0 0 0 0 rgba(224, 82, 82, 0.6); }
  70%  { box-shadow: 0 0 0 5px rgba(224, 82, 82, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 82, 82, 0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────── RESPONSIVE ─────────────── */

@media (max-width: 900px) {
  .page-wrap {
    grid-template-columns: 1fr;
  }

  .col-right {
    position: static;
    order: -1;
  }
}

@media (max-width: 600px) {
  .nav__links  { display: none; }
  .nav__actions .btn--ghost { display: none; }

  .specs-grid { grid-template-columns: 1fr; }
  .spec-item { border-right: none; }
  .spec-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .spec-item:last-child { border-bottom: none; }

  .gallery__thumb { width: 64px; height: 46px; }

  .similar-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}