/* ===========================
   CAR DETAIL PAGE
=========================== */
.car-page { background: var(--white); }
.car-page #header { background: rgba(10,9,7,.94); backdrop-filter: blur(12px); }

/* ── HERO ── */
.car-hero {
  position: relative;
  height: 88vh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
}

.car-hero-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  transition: transform 8s linear;
}
.car-hero-img.loaded { transform: scale(1); }

.car-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,9,7,.15) 0%,
    rgba(10,9,7,.08) 30%,
    rgba(10,9,7,.75) 100%
  );
}

.car-hero-content {
  position: relative;
  z-index: 1;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  padding: 0 64px 80px;
}

.car-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(247,244,240,.6);
  margin-bottom: 40px;
  transition: color var(--transition);
}
.car-back:hover { color: var(--white); }
.car-back svg { transition: transform var(--transition); }
.car-back:hover svg { transform: translateX(-4px); }

.car-hero-make {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp .7s .2s var(--ease) forwards;
}

.car-hero-title {
  font-size: clamp(44px, 6vw, 80px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 14px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .8s .35s var(--ease) forwards;
}

.car-hero-year {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  color: rgba(247,244,240,.55);
  opacity: 0;
  animation: fadeUp .8s .5s var(--ease) forwards;
}

/* ── FICHA ── */
.car-ficha { padding: 100px 64px; }

.car-ficha-inner {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 100px;
  align-items: start;
}

.ficha-title {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--black);
  margin-bottom: 24px;
}

.ficha-text {
  font-size: 16px;
  color: var(--mid);
  line-height: 1.82;
}
.ficha-text p { margin-bottom: 18px; }
.ficha-text p:last-child { margin-bottom: 0; }

.specs-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(10,9,7,.08);
}

.specs-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.specs-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(10,9,7,.06);
  font-size: 14px;
}

.specs-list li .spec-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mid);
  flex-shrink: 0;
}

.specs-list li .spec-value {
  color: var(--black);
  font-weight: 500;
  text-align: right;
}

/* ── GALLERY ── */
.car-gallery {
  padding: 0 64px 100px;
  background: var(--white);
}

.car-gallery-inner { max-width: 1500px; margin: 0 auto; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 4px;
}

.gallery-item {
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item:first-child {
  grid-column: span 2;
  grid-row: span 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s var(--ease);
  aspect-ratio: 4/3;
}

.gallery-item:first-child img { aspect-ratio: 16/9; }

.gallery-item-overlay {
  position: absolute; inset: 0;
  background: rgba(10,9,7,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.gallery-item-overlay svg {
  opacity: 0;
  transform: scale(.8);
  transition: opacity var(--transition), transform var(--transition);
  color: var(--white);
}

.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:hover .gallery-item-overlay { background: rgba(10,9,7,.3); }
.gallery-item:hover .gallery-item-overlay svg { opacity: 1; transform: scale(1); }

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed; inset: 0;
  z-index: 300;
  background: rgba(10,9,7,.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.lightbox.open { opacity: 1; pointer-events: all; }

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  transform: scale(.96);
  transition: transform var(--transition);
}
.lightbox.open .lightbox-img { transform: scale(1); }

.lightbox-close {
  position: absolute; top: 24px; right: 32px;
  font-size: 22px; color: rgba(247,244,240,.5);
  transition: color var(--transition), transform var(--transition);
}
.lightbox-close:hover { color: var(--white); transform: rotate(90deg); }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  font-size: 28px; color: rgba(247,244,240,.4);
  padding: 16px 20px;
  transition: color var(--transition);
}
.lightbox-prev:hover, .lightbox-next:hover { color: var(--white); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-counter {
  position: absolute; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(247,244,240,.35);
}

/* ── RESTAURACIÓN ── */
.car-restoration {
  background: var(--dark);
  padding: 100px 64px;
}

.car-restoration-inner { max-width: 1500px; margin: 0 auto; }

.resto-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 48px;
}
.resto-head-left .section-tag { text-align: left; }
.resto-head-left .section-title { text-align: left; margin-bottom: 0; }

.resto-desc {
  font-family: var(--font-serif);
  font-size: 19px;
  font-style: italic;
  font-weight: 300;
  color: rgba(247,244,240,.6);
  line-height: 1.75;
}

.resto-carousel { position: relative; }

.resto-track-wrap {
  overflow: hidden;
}

.resto-track {
  display: flex;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}

.resto-slide {
  min-width: 100%;
  height: 600px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.resto-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.15);
  color: var(--white);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.resto-arrow:hover { background: rgba(201,169,110,.75); border-color: transparent; }
.resto-prev { left: 24px; }
.resto-next { right: 24px; }

.resto-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.resto-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(247,244,240,.22);
  cursor: pointer;
  transition: background .25s, transform .25s;
}
.resto-dot.active {
  background: var(--gold);
  transform: scale(1.35);
}

/* ── OTROS COCHES ── */
.car-others { padding: 100px 64px; background: var(--white); }
.car-others-inner { max-width: 1500px; margin: 0 auto; }

.others-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}

.other-card {
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.other-card-img {
  aspect-ratio: 3/2;
  background-size: cover;
  background-position: center;
  transition: transform .6s var(--ease);
}

.other-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(10,9,7,.75) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.other-card:hover .other-card-img { transform: scale(1.06); }

.other-card-make {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 3px;
}

.other-card-model {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .car-ficha-inner { grid-template-columns: 1fr; gap: 60px; }
  .car-ficha-inner .car-ficha-specs { max-width: 560px; }
  .others-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .car-hero-content { padding: 0 24px 72px; }
  .car-ficha { padding: 72px 24px; }
  .car-gallery { padding: 0 24px 72px; }
  .car-restoration { padding: 72px 24px; }
  .car-others { padding: 72px 24px; }

  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item:first-child { grid-column: span 2; }

  .resto-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 32px; }
  .resto-desc { font-size: 17px; }
  .resto-slide { height: 260px; }
  .resto-arrow { width: 40px; height: 40px; font-size: 15px; }
  .resto-prev { left: 12px; }
  .resto-next { right: 12px; }

  .others-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item:first-child { grid-column: span 1; }
  .others-grid { grid-template-columns: repeat(2, 1fr); }
  .car-hero-title { font-size: 38px; }
}
