/* ═══════════════════════════════════════════════════
   PRODUCT DETAILS PAGE ONLY
═══════════════════════════════════════════════════ */

.product-detail {
  width: min(1400px, 92%);
  margin: 48px auto 100px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: start;
}

/* ── PRODUCT GALLERY ───────────────────────────── */

.product-gallery {
  position: sticky;
  top: 100px;
  min-height: 200px; /* FIX: prevents gallery collapsing to zero if sticky misbehaves */
}

.product-gallery-main {
  width: 100%;
  border-radius: 28px;
  object-fit: cover;
  background: #111;
  border: 1px solid var(--border);
}

/* ── PRODUCT INFO ──────────────────────────────── */

.product-info-panel {
  width: 100%;
}

.product-detail-brand {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.product-detail-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.9;
  margin-bottom: 20px;
}

.product-detail-price {
  font-size: 1.2rem;
  color: var(--cream);
  margin-bottom: 28px;
  letter-spacing: 0.08em;
}

.product-detail-desc {
  color: var(--silver);
  line-height: 1.9;
  font-size: 0.95rem;
  margin-bottom: 40px;
  max-width: 620px;
}

/* ── SIZE ─────────────────────────────────────── */

.size-label {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silver);
  margin-bottom: 16px;
}

.size-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.size-btn {
  width: 58px;
  height: 54px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--cream);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: 0.3s ease;
}

.size-btn:hover,
.size-btn.selected {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
  color: var(--gold);
}

/* ── CTA BUTTONS ──────────────────────────────── */

.product-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

/* ── PRODUCT SPECS ────────────────────────────── */

.product-specs {
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.spec-row dt {
  color: var(--silver);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.spec-row dd {
  color: var(--cream);
  text-align: right;
  font-size: 0.88rem;
}

/* ── RESPONSIVE ───────────────────────────────── */

@media (max-width: 980px) {

  .product-detail {
    grid-template-columns: 1fr;
    gap: 50px;
    margin-top: -19px;
  }

  .product-gallery {
    position: relative;
    top: 0;
    min-height: 0; /* reset min-height when not sticky */
  }

  .product-detail-name {
    font-size: 3.6rem;
  }

  .product-ctas {
    flex-direction: column;
  }

  .product-ctas .btn {
    width: 100%;
    justify-content: center;
  }

  .spec-row {
    flex-direction: column;
    gap: 8px;
  }

  .spec-row dd {
    text-align: left;
  }
}

@media (max-width: 600px) {

  .product-detail {
    width: 94%;
    gap: 40px;
  }

  .product-detail-name {
    font-size: 2.8rem;
  }

  .size-btn {
    width: 52px;
    height: 50px;
  }
}

/* ═══════════════════════════════════════════════════
   PRODUCT CAROUSEL
═══════════════════════════════════════════════════ */

.carousel {
  position: relative;
  width: 100%;
}

/* Main stage — holds the active image + arrows + dots */
.carousel-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  min-height: 300px; /* FIX: fallback so stage never collapses if aspect-ratio fails */
  border-radius: 28px;
  overflow: hidden;
  background: #111;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  touch-action: pan-y;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Override legacy .product-gallery-main so it doesn't fight the carousel */
.carousel .product-gallery-main {
  border-radius: 0;
  border: none;
  background: transparent;
}

/* Prev / Next arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  z-index: 3;
}

.carousel:hover .carousel-arrow,
.carousel:focus-within .carousel-arrow {
  opacity: 1;
}

.carousel-arrow:hover {
  background: rgba(201, 168, 76, 0.85);
  border-color: var(--gold);
  color: var(--black);
}

.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }

/* Dot indicators */
.carousel-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
  padding: 6px 12px;
  background: rgba(10, 10, 10, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 999px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.65);
}

.carousel-dot.active {
  background: var(--gold);
  transform: scale(1.3);
}

/* Thumbnail strip */
.carousel-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.carousel-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #111;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.3s ease, transform 0.2s ease;
}

.carousel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.55;
  transition: opacity 0.3s ease;
}

.carousel-thumb:hover img { opacity: 0.85; }

.carousel-thumb.active {
  border-color: var(--gold);
}
.carousel-thumb.active img {
  opacity: 1;
}

/* Responsive: tablet & mobile */
@media (max-width: 768px) {
  .carousel-stage {
    aspect-ratio: 3 / 4;
    border-radius: 18px;
    margin-bottom: 12px;
  }
  .carousel-arrow {
    width: 38px;
    height: 38px;
    opacity: 1; /* always visible on touch devices */
    font-size: 0.8rem;
  }
  .carousel-prev { left: 10px; }
  .carousel-next { right: 10px; }
  .carousel-dots {
    bottom: 12px;
    padding: 5px 10px;
    gap: 6px;
  }
  .carousel-dot { width: 7px; height: 7px; }
  .carousel-thumbs { gap: 8px; }
  .carousel-thumb { border-radius: 10px; }
}

@media (max-width: 480px) {
  .carousel-stage { aspect-ratio: 3 / 4; border-radius: 14px; }
  .carousel-arrow { width: 34px; height: 34px; font-size: 0.75rem; }
  .carousel-thumbs { gap: 6px; }
}