/* ════════════════════════════════════════════════════════════════
   JAGUAR ELECTRIC INDIA — Detail Page Styles
   ════════════════════════════════════════════════════════════════ */

/* ── Reset for detail page ─────────────────────────────────── */
.detail-back {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--cream);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.back-btn:hover { opacity: 1; }

/* ── Detail Hero ───────────────────────────────────────────── */
.detail-hero {
  position: relative;
  height: 72vh;
  min-height: 480px;
  max-height: 760px;
  overflow: hidden;
}

.detail-hero-img {
  position: absolute;
  inset: 0;
}

.detail-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(8,8,16,0.92) 0%,
    rgba(8,8,16,0.45) 50%,
    rgba(8,8,16,0.15) 100%
  );
}

.detail-hero-content {
  position: absolute;
  bottom: 3rem;
  left: 0;
  right: 0;
  padding: 0 clamp(1.5rem, 6vw, 6rem);
}

.detail-hero-content .hero-eyebrow {
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}

.detail-hero-content .hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--cream);
  margin: 0 0 1.2rem;
}

.detail-hero-content .hero-title em {
  color: var(--gold);
  font-style: italic;
}

.detail-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.dhb {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border: 1px solid rgba(201,169,110,0.4);
  border-radius: 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(240,237,232,0.85);
  letter-spacing: 0.04em;
  background: rgba(201,169,110,0.08);
}

/* ── Gallery ───────────────────────────────────────────────── */
.detail-gallery {
  background: var(--dark);
  padding: 0;
}

.gallery-main {
  position: relative;
  width: 100%;
  height: clamp(320px, 56vw, 700px);
  background: #05050c;
  cursor: pointer;
  overflow: hidden;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-main:hover img { transform: scale(1.02); }

.gal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(8,8,16,0.7);
  border: 1px solid rgba(201,169,110,0.3);
  color: var(--cream);
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s, border-color 0.2s;
  z-index: 2;
}

.gal-nav:hover {
  background: rgba(201,169,110,0.25);
  border-color: var(--gold);
}

.gal-prev { left: 1rem; }
.gal-next { right: 1rem; }

.gal-counter {
  position: absolute;
  bottom: 1rem;
  right: 1.2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: rgba(240,237,232,0.7);
  background: rgba(8,8,16,0.6);
  padding: 0.25rem 0.7rem;
  border-radius: 1rem;
  letter-spacing: 0.06em;
}

.gallery-thumbs {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  background: #05050c;
  padding: 3px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}

.gallery-thumbs::-webkit-scrollbar { height: 3px; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: var(--gold); }

.gal-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 68px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
  border-bottom: 2px solid transparent;
}

.gal-thumb:hover { opacity: 0.8; }
.gal-thumb.active { opacity: 1; border-bottom-color: var(--gold); }

/* ── Content Layout ────────────────────────────────────────── */
.detail-content {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

@media (max-width: 960px) {
  .detail-content {
    grid-template-columns: 1fr;
  }
  .detail-sidebar {
    order: 2;
    position: static;
  }
}

/* ── Main column ───────────────────────────────────────────── */
.detail-main {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.detail-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream);
  margin: 0 0 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(201,169,110,0.2);
}

.detail-description p {
  font-family: 'Inter', sans-serif;
  font-size: 0.97rem;
  line-height: 1.75;
  color: rgba(240,237,232,0.72);
  margin: 0;
}

/* ── Specs Grid ────────────────────────────────────────────── */
.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

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

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  gap: 1rem;
}

.spec-row:nth-child(odd) { background: rgba(255,255,255,0.02); }

.sr-key {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(240,237,232,0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.sr-val {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--cream);
  text-align: right;
}

/* ── Equipment List ────────────────────────────────────────── */
.equip-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 540px) {
  .equip-list { grid-template-columns: 1fr; }
}

.equip-list li {
  font-family: 'Inter', sans-serif;
  font-size: 0.87rem;
  color: rgba(240,237,232,0.72);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.4;
}

.equip-list li::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 0.45rem;
  flex-shrink: 0;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.detail-sidebar {
  position: sticky;
  top: 90px;
}

.sidebar-card {
  background: var(--card);
  border: 1px solid rgba(201,169,110,0.18);
  border-radius: 12px;
  padding: 1.8rem;
  margin-bottom: 1.2rem;
}

.sidebar-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.4rem;
}

.sidebar-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cream);
  margin: 0 0 1.2rem;
  line-height: 1.3;
}

.sidebar-specs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ss-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.ss-item span {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.ss-item small {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(240,237,232,0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
}

.sidebar-note {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: rgba(240,237,232,0.5);
  line-height: 1.55;
  margin: 0 0 1.2rem;
}

.sidebar-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.sidebar-form input,
.sidebar-form textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  padding: 0.7rem 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  resize: none;
}

.sidebar-form input::placeholder,
.sidebar-form textarea::placeholder { color: rgba(240,237,232,0.3); }

.sidebar-form input:focus,
.sidebar-form textarea:focus { border-color: var(--gold); }

.sidebar-success {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: #6fcf97;
  text-align: center;
  padding: 0.6rem 0;
  display: none;
}

.sidebar-success.show { display: block; }

.sidebar-legal {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: rgba(240,237,232,0.3);
  text-align: center;
  margin: 0.5rem 0 0;
}

.sidebar-contact {
  background: var(--card2);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  text-align: center;
}

.sidebar-contact p {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: rgba(240,237,232,0.45);
  margin: 0 0 0.4rem;
}

.sidebar-phone {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--gold);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: block;
}

.sidebar-phone:hover { text-decoration: underline; }

/* ── Lightbox ──────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5,5,10,0.96);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}

.lb-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(201,169,110,0.15);
  border: 1px solid rgba(201,169,110,0.35);
  color: var(--cream);
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lb-close:hover { background: rgba(201,169,110,0.35); }

.lb-prev,
.lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(8,8,16,0.7);
  border: 1px solid rgba(201,169,110,0.3);
  color: var(--cream);
  font-size: 2.2rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s, border-color 0.2s;
}

.lb-prev:hover,
.lb-next:hover {
  background: rgba(201,169,110,0.25);
  border-color: var(--gold);
}

.lb-prev { left: 1.5rem; }
.lb-next { right: 1.5rem; }

.lb-counter {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: rgba(240,237,232,0.55);
  letter-spacing: 0.1em;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .detail-hero { height: 55vh; min-height: 360px; }
  .gallery-main { height: 52vw; min-height: 220px; }
  .gal-thumb { width: 72px; height: 50px; }
  .detail-hero-content { bottom: 1.8rem; }
  .lb-prev { left: 0.5rem; }
  .lb-next { right: 0.5rem; }
}

@media (max-width: 480px) {
  .specs-grid { grid-template-columns: 1fr; }
  .equip-list { grid-template-columns: 1fr; }
  .detail-content { padding: 1.5rem 1rem; }
  .sidebar-card { padding: 1.3rem; }
}

/* ── Light mode overrides ── */
[data-theme="light"] .dhb { color: rgba(10,10,20,0.85); }
[data-theme="light"] .gal-counter { color: rgba(10,10,20,0.7); }
[data-theme="light"] .detail-description p { color: rgba(10,10,20,0.72); }
[data-theme="light"] .sr-key { color: rgba(10,10,20,0.45); }
[data-theme="light"] .equip-list li { color: rgba(10,10,20,0.72); }
[data-theme="light"] .ss-item small { color: rgba(10,10,20,0.45); }
[data-theme="light"] .sidebar-note { color: rgba(10,10,20,0.5); }
[data-theme="light"] .sidebar-legal { color: rgba(10,10,20,0.3); }
[data-theme="light"] .sidebar-contact p { color: rgba(10,10,20,0.45); }
[data-theme="light"] .lb-counter { color: rgba(10,10,20,0.55); }
[data-theme="light"] .sidebar-form textarea::placeholder { color: rgba(10,10,20,0.3); }
[data-theme="light"] .spec-row { border-bottom-color: rgba(0,0,0,0.06); background: transparent; }
[data-theme="light"] .spec-row:nth-child(odd) { background: rgba(0,0,0,0.02); }
[data-theme="light"] .detail-sidebar { background: #fff; border-color: rgba(0,0,0,0.08); }

[data-theme="light"] .back-btn { color: #0a0a14; border-color: rgba(0,0,0,0.15); }
[data-theme="light"] .back-btn:hover { background: rgba(0,0,0,0.05); }
[data-theme="light"] .detail-description { color: #222230; }
[data-theme="light"] .sr-val { color: #0a0a14; }
[data-theme="light"] .detail-title { color: #0a0a14; }
[data-theme="light"] .equip-section h3 { color: #0a0a14; }
[data-theme="light"] .gal-arrow { background: rgba(0,0,0,0.12); color: #0a0a14; }
[data-theme="light"] .gal-arrow:hover { background: rgba(0,0,0,0.2); }

/* ── Light mode: sidebar form fields & placeholders ── */
[data-theme="light"] .sidebar-form input,
[data-theme="light"] .sidebar-form textarea {
  background: #ffffff;
  border: 1.5px solid #c8c4bc;
  color: #0a0a14;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
[data-theme="light"] .sidebar-form input::placeholder,
[data-theme="light"] .sidebar-form textarea::placeholder { color: #999; }
[data-theme="light"] .sidebar-form input:focus,
[data-theme="light"] .sidebar-form textarea:focus {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(154,120,64,.12);
}
[data-theme="light"] .sidebar-card {
  background: #f8f6f2;
  border-color: rgba(0,0,0,.1);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
[data-theme="light"] .sidebar-specs {
  border-bottom-color: rgba(0,0,0,.08);
}

/* ── Light mode: sidebar contact box ── */
[data-theme="light"] .sidebar-contact {
  background: #f0ede8;
  border: 1.5px solid #c8c4bc;
}

/* ═══════════════════════════════════════════════════════════════
   DETAIL PAGE — MOBILE IMPROVEMENTS
   ═══════════════════════════════════════════════════════════════ */
@media(max-width:480px){

  /* Header */
  .site-header.scrolled{padding:0 1rem}
  .detail-back{gap:.5rem}
  .back-btn{font-size:.7rem;padding:.35rem .7rem}
  .header-cta{font-size:.7rem;padding:.5rem .9rem}

  /* Gallery */
  .main-img-wrap{border-radius:8px}
  #main-img{max-height:260px;object-fit:cover}
  .gal-thumbs{gap:.4rem}
  .gal-thumb{width:56px;height:42px}
  .gal-arrow{width:34px;height:34px}

  /* Detail layout */
  .detail-wrapper{padding:1rem 1rem 3rem}
  .detail-title{font-size:1.5rem}
  .dhb{font-size:.7rem}

  /* Specs */
  .specs-grid{grid-template-columns:1fr}
  .spec-row{padding:.55rem .6rem}
  .sr-val{font-size:.85rem}

  /* Sidebar */
  .detail-sidebar{padding:0}
  .sidebar-card{padding:1.2rem}
  .sidebar-title{font-size:1.1rem}
  .sidebar-specs{gap:.6rem}

  /* Form */
  .sidebar-form input,
  .sidebar-form textarea{font-size:.84rem;padding:.6rem .75rem}

  /* Equipment */
  .equip-grid{grid-template-columns:1fr}
  .equip-list li{font-size:.8rem}

  /* Share bar */
  .share-bar{flex-wrap:wrap;gap:.5rem}
  .share-btn{font-size:.68rem;padding:.38rem .7rem}

  /* Contact section */
  .sidebar-contact{padding:1rem}
  .sidebar-phone{font-size:1rem}
}
