/* Product detail — matches landing-page / index visual language */

.page-product-detail {
  padding-top: clamp(76px, 10vw, 96px);
}

.page-product-detail .pd-main {
  padding-bottom: 48px;
}

/* ---------- Hero ---------- */
.pd-hero {
  position: relative;
  margin: 0;
  color: #fff;
  background: #01032c;
  overflow: hidden;
  /* Image drives height; text overlays */
}

.pd-thumb__img {
  width: min(560px, 92vw);
  height: auto;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
  display: block;
}

.pd-thumb-section {
  padding-top: clamp(18px, 2.6vw, 32px);
  padding-bottom: clamp(18px, 2.6vw, 32px);
}

.pd-thumb-wrap {
  display: grid;
  place-items: center;
}

.pd-hero__img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  object-fit: cover;
}

.pd-hero__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 110% 85% at 50% 30%, rgba(0, 12, 32, 0) 0%, rgba(0, 10, 28, 0.35) 100%),
    linear-gradient(180deg, rgba(2, 12, 34, 0.38) 0%, rgba(2, 14, 38, 0.58) 52%, rgba(1, 8, 28, 0.78) 100%);
  pointer-events: none;
}

.pd-hero__inner {
  position: relative;
  z-index: 1;
  position: absolute;
  inset: 0;
  padding: clamp(32px, 5vw, 56px) 0 clamp(36px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pd-hero__crumb {
  margin: 0 0 12px;
  font-size: var(--lp-fs-sm);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pd-hero__crumb * {
  text-transform: uppercase !important;
}

.pd-hero__crumb a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.pd-hero__crumb a:hover {
  text-decoration: underline;
}

.pd-hero__title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pd-hero__lead {
  margin: 0;
  max-width: 62ch;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
}

.pd-hero__actions {
  margin-top: 20px;
}

/* ---------- Cards ---------- */
.pd-layout {
  display: grid;
  gap: var(--lp-gap);
  align-items: start;
}

@media (min-width: 1024px) {
  .pd-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
    gap: var(--lp-gap);
  }

  .pd-layout.pd-layout--single {
    grid-template-columns: minmax(0, 1fr);
  }
}

.pd-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.pd-card__head {
  padding: 18px 18px 0;
}

.pd-card__title {
  margin: 0;
  font-size: var(--lp-fs-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1f2937;
}

.pd-rich {
  padding: 18px;
  color: #334155;
  line-height: 1.75;
  font-size: var(--lp-fs-md);
}

.pd-rich img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ---------- Specifications table (ext_parameters) ---------- */
.page-product-detail [data-pd-section="specs"] .pd-rich {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.page-product-detail [data-pd-section="specs"] .pd-rich table {
  width: 100%;
  min-width: 520px;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.page-product-detail [data-pd-section="specs"] .pd-rich th,
.page-product-detail [data-pd-section="specs"] .pd-rich td {
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

.page-product-detail [data-pd-section="specs"] .pd-rich tr:last-child th,
.page-product-detail [data-pd-section="specs"] .pd-rich tr:last-child td {
  border-bottom: 0;
}

.page-product-detail [data-pd-section="specs"] .pd-rich th {
  width: 34%;
  font-weight: 700;
  color: #0f172a;
  background: #f8fafc;
  text-align: left;
  white-space: nowrap;
}

.page-product-detail [data-pd-section="specs"] .pd-rich td {
  color: #334155;
}

.page-product-detail [data-pd-section="specs"] .pd-rich tr:nth-child(even) td {
  background: #fbfdff;
}

.page-product-detail [data-pd-section="specs"] .pd-rich a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pd-spec-grid {
  padding: 18px;
  display: grid;
  gap: var(--lp-gap);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .pd-spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pd-spec {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 12px;
  padding: 12px 12px;
}

.pd-spec__k {
  font-size: var(--lp-fs-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #64748b;
  text-transform: uppercase;
}

.pd-spec__v {
  margin-top: 4px;
  font-size: var(--lp-fs-md);
  font-weight: 600;
  color: #0f172a;
}

/* ---------- Galleries ---------- */
.pd-section-head {
  text-align: center;
  margin-bottom: 22px;
}

.pd-gallery-main {
  max-width: min(1200px, 65vw);
  margin: 0 auto 18px;
}

.pd-carousel.pd-carousel--thumbs {
  max-width: min(1200px, 65vw);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1024px) {
  .pd-gallery-main,
  .pd-carousel.pd-carousel--thumbs {
    max-width: min(1200px, 92vw);
  }
}

.pd-gallery-main__link {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  background: #f3f4f6;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.pd-gallery-main__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  max-height: 70vh;
}

.pd-section-title {
  margin: 0 0 5px;
  font-size: var(--lp-fs-h2);
  font-weight: 700;
  line-height: 1.25;
  color: #1f2937;
  text-transform: uppercase;
}

.pd-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--lp-gap);
}

/* ---------- Exterior carousel ---------- */
.pd-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
}

.pd-carousel__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  scrollbar-width: none; /* Firefox: hide scrollbar */
}

.pd-carousel__viewport::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.pd-carousel__track {
  display: flex;
  gap: var(--lp-gap);
  padding: 4px;
}

.pd-carousel__slide {
  flex: 0 0 auto;
  width: calc((100% - (var(--lp-gap) * 3)) / 4);
  scroll-snap-align: start;
}

.pd-carousel--thumbs .pd-carousel__slide {
  border-radius: 12px;
  overflow: hidden;
  opacity: 0.92;
  transform: translateY(0);
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.pd-carousel--thumbs .pd-carousel__slide.is-active {
  opacity: 1;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.22);
  outline: 2px solid rgba(37, 99, 235, 0.38);
  outline-offset: 0;
}

.pd-carousel--thumbs .pd-carousel__slide:hover {
  opacity: 1;
  transform: translateY(-1px);
}

@media (max-width: 1024px) {
  .pd-carousel__slide {
    width: calc((100% - (var(--lp-gap) * 1)) / 2);
  }
}

.pd-carousel__slide .pd-shot__img {
  aspect-ratio: 16 / 10;
  height: 100%;
  object-fit: cover;
}

.pd-carousel__btn {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.10);
}

.pd-carousel__btn:hover {
  background: #fff;
}

.pd-carousel__btn i {
  font-size: 14px;
}

@media (max-width: 640px) {
  .pd-carousel {
    grid-template-columns: 1fr;
  }
  .pd-carousel__btn {
    display: none;
  }

  .pd-carousel__slide {
    /* At least 2 thumbnails visible on phone */
    width: calc((100% - var(--lp-gap)) / 2);
  }
}

@media (min-width: 640px) {
  .pd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .pd-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Interior: show 4 per row on desktop */
@media (min-width: 1024px) {
  .page-product-detail [data-pd-section="interior"] .pd-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.pd-grid--ga {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .pd-grid--ga {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .pd-grid--ga {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.pd-shot {
  display: block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  text-decoration: none;
}

.pd-shot:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.14);
}

.pd-shot__img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.45s ease;
}

.pd-shot--ga .pd-shot__img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #ffffff;
}

.pd-shot:hover .pd-shot__img {
  transform: scale(1.04);
}

/* ---------- Lightbox ---------- */
.pd-lock {
  overflow: hidden;
}

.pd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.pd-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
}

.pd-lightbox__panel {
  position: relative;
  z-index: 2;
  width: min(1080px, calc(100vw - 32px));
  height: min(86vh, 820px);
  margin: 7vh auto 0;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
}

.pd-lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
  color: #000000;
  cursor: pointer;
}

.pd-lightbox__close:hover {
  background: rgba(0, 0, 0, 0.18);
}

.pd-lightbox__body {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 18px;
}

.pd-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* caption removed: lightbox shows image only */

/* ------------------------------------------------------------
   1920+ scaling (match homepage linear scale)
------------------------------------------------------------ */
@media (min-width: 1921px) {
  .pd-hero__title {
    font-size: calc(1.6vw + 12px);
    line-height: 1.18;
  }

  .pd-section-title {
    font-size: calc(1.25vw + 10px);
  }

  .pd-spec__k {
    font-size: calc(0.6vw + 14px);
  }

  .pd-spec__v {
    font-size: calc(0.55vw + 9px);
    line-height: 1.8;
  }

  .pd-card__title,
  .pd-rich {
    font-size: calc(0.55vw + 9px);
  }

  .pd-grid {
    gap: var(--lp-gap);
  }

  .pd-lightbox__panel {
    width: min(calc(20vw + 1160px), calc(100vw - 64px));
    height: min(86vh, calc(12vw + 700px));
  }
}

