/* =========================================
   LUCEMI — shop.css
   Product Detail Page
   ========================================= */

/* =========================================
   LAYOUT: Split — gallery left, info right
   ========================================= */

.pdp {
  display: grid;
  grid-template-columns: 1fr 420px;
  min-height: calc(100vh - var(--nav-height));
  padding-top: var(--nav-height);
}

/* =========================================
   LEFT COLUMN: Gallery
   ========================================= */

.pdp__gallery {
  display: flex;
  flex-direction: row;
  height: calc(100vh - var(--nav-height));
  position: sticky;
  top: var(--nav-height);
  overflow: hidden;
}

/* ── Vertical thumbnail rail ───────────────── */

.pdp__thumbrail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 72px;
  flex-shrink: 0;
  background: var(--color-bg);
  padding: 8px 0;
  gap: 0;
  overflow: hidden;
  border-right: 1px solid rgba(26, 26, 26, 0.06);
}

.pdp__thumbrail-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(26, 26, 26, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: color 0.2s ease;
  padding: 0;
}

.pdp__thumbrail-arrow:hover {
  color: var(--color-dark);
}

.pdp__thumbrail-track {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 4px 10px;
  width: 100%;
  align-items: center;
}

.pdp__thumbrail-track::-webkit-scrollbar {
  display: none;
}

.pdp__thumb {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  overflow: hidden;
  cursor: pointer;
  background: #EAE5DE;
  border: 1.5px solid transparent;
  padding: 0;
  transition: border-color 0.22s ease, opacity 0.22s ease;
  opacity: 0.52;
  position: relative;
}

.pdp__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  pointer-events: none;
}

.pdp__thumb:hover {
  opacity: 0.85;
}

.pdp__thumb:hover img {
  transform: scale(1.08);
}

.pdp__thumb.is-active {
  border-color: var(--color-dark);
  opacity: 1;
}

/* ── Main viewer ───────────────────────────── */

.pdp__viewer {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #F0EDE8;
  cursor: zoom-in;
  outline: none;
}

/* Viewer inner — contains only the current + entering image */
.pdp__viewer-inner {
  position: absolute;
  inset: 0;
}

.pdp__viewer-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  user-select: none;
  /* Default state — no transform, no opacity transition needed here,
     transitions are managed by entering/exiting classes */
  transition: none;
}

/* Slide animation — entering from right */
.pdp__viewer-img--from-right {
  transform: translateX(3.5%);
  opacity: 0;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.28s ease;
}

/* Slide animation — entering from left */
.pdp__viewer-img--from-left {
  transform: translateX(-3.5%);
  opacity: 0;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.28s ease;
}

/* Settled state */
.pdp__viewer-img--visible {
  transform: translateX(0);
  opacity: 1;
}

/* Exit — slide left */
.pdp__viewer-img--exit-left {
  transform: translateX(-3.5%);
  opacity: 0;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.28s ease;
}

/* Exit — slide right */
.pdp__viewer-img--exit-right {
  transform: translateX(3.5%);
  opacity: 0;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.28s ease;
}

/* ── Gallery nav arrows ─────────────────────── */

.pdp__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(242, 237, 230, 0.72);
  border: none;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-dark);
  opacity: 0;
  transition: opacity 0.22s ease, background 0.2s ease;
  z-index: 4;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.pdp__viewer:hover .pdp__arrow {
  opacity: 1;
}

.pdp__arrow:hover {
  background: rgba(242, 237, 230, 0.95);
}

.pdp__arrow--prev { left: 14px; }
.pdp__arrow--next { right: 14px; }

/* ── Dot indicators (mobile only) ────────────── */

.pdp__dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 6px;
  z-index: 4;
}

.pdp__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.22);
  transition: background 0.22s ease, transform 0.22s ease;
  flex-shrink: 0;
}

.pdp__dot.is-active {
  background: var(--color-dark);
  transform: scale(1.4);
}

/* ── Zoom hint ──────────────────────────────── */

.pdp__zoom-hint {
  position: absolute;
  bottom: 18px;
  right: 18px;
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.35);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease;
  z-index: 3;
}

.pdp__zoom-hint.is-hidden {
  opacity: 0;
}

/* =========================================
   RIGHT COLUMN: Product info
   ========================================= */

.pdp__info {
  padding: 52px 44px 64px;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--color-bg);
  overflow-y: auto;
  /* Info panel scrolls independently if window is short */
  max-height: calc(100vh - var(--nav-height));
  position: sticky;
  top: var(--nav-height);
  scrollbar-width: none;
  border-left: 1px solid rgba(26, 26, 26, 0.06);
}

.pdp__info::-webkit-scrollbar {
  display: none;
}

/* ── Eyebrow ────────────────────────────────── */

.pdp__eyebrow {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 9px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 20px;
}

/* ── Product name ───────────────────────────── */

.pdp__name {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(28px, 2.4vw, 40px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

/* Italic "Sable" colorway name */
.pdp__name em {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: 0.88em;
  letter-spacing: 0.08em;
  text-transform: none;
  color: rgba(26, 26, 26, 0.65);
}

/* ── Edition note ───────────────────────────── */

.pdp__edition {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.38);
  margin-bottom: 28px;
}

/* ── Gold rule ──────────────────────────────── */

.pdp__rule {
  width: 28px;
  height: 1px;
  background: var(--color-gold);
  margin-bottom: 24px;
  flex-shrink: 0;
}

/* ── Spec list ──────────────────────────────── */

.pdp__spec {
  list-style: none;
  margin-bottom: 28px;
}

.pdp__spec li {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  line-height: 2;
  color: rgba(26, 26, 26, 0.62);
  padding-left: 18px;
  position: relative;
}

.pdp__spec li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-weight: 200;
}

.pdp__spec em {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  color: rgba(26, 26, 26, 0.75);
  letter-spacing: 0.02em;
}

/* ── Actions block ──────────────────────────── */

.pdp__actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  justify-content: flex-end;
  padding-top: 4px;
}

/* ── Quantity ───────────────────────────────── */

.pdp__qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pdp__qty-label {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 9px;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.4);
  cursor: default;
  flex-shrink: 0;
}

.pdp__qty-ctrl {
  display: flex;
  align-items: center;
  border: 1px solid rgba(26, 26, 26, 0.18);
  width: fit-content;
}

.pdp__qty-btn {
  background: none;
  border: none;
  width: 38px;
  height: 38px;
  font-size: 16px;
  font-weight: 200;
  cursor: pointer;
  color: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  line-height: 1;
  font-family: var(--font-ui);
}

.pdp__qty-btn:hover {
  background: rgba(26, 26, 26, 0.04);
}

.pdp__qty-btn:active {
  background: rgba(26, 26, 26, 0.09);
}

.pdp__qty-input {
  width: 38px;
  height: 38px;
  border: none;
  border-left: 1px solid rgba(26, 26, 26, 0.18);
  border-right: 1px solid rgba(26, 26, 26, 0.18);
  text-align: center;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--color-dark);
  background: none;
  -moz-appearance: textfield;
  transition: none;
}

.pdp__qty-input::-webkit-outer-spin-button,
.pdp__qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* Qty pulse animations */
@keyframes qtyPulseUp {
  0%   { transform: translateY(0); opacity: 1; }
  40%  { transform: translateY(-3px); opacity: 0.5; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes qtyPulseDown {
  0%   { transform: translateY(0); opacity: 1; }
  40%  { transform: translateY(3px); opacity: 0.5; }
  100% { transform: translateY(0); opacity: 1; }
}

.pdp__qty-input--pulse-up {
  animation: qtyPulseUp 0.24s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.pdp__qty-input--pulse-down {
  animation: qtyPulseDown 0.24s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ── CTA button ─────────────────────────────── */

.pdp__cta {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 18px 24px;
  border: 1px solid var(--color-dark);
  background: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 9.5px;
  letter-spacing: 0.48em;
  text-transform: uppercase;
  color: var(--color-dark);
  transition: background 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.32s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp__cta:hover {
  background: var(--color-dark);
  color: var(--color-bg);
  border-color: var(--color-dark);
}

.pdp__cta:active {
  background: #333;
  border-color: #333;
}

/* Ripple */
.pdp__cta-ripple {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: translate(-50%, -50%) scale(0);
  animation: ctaRipple 0.55s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
  pointer-events: none;
}

@keyframes ctaRipple {
  to {
    transform: translate(-50%, -50%) scale(160);
    opacity: 0;
  }
}

/* ── Notice ─────────────────────────────────── */

.pdp__notice {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.28);
  text-align: center;
}

/* =========================================
   LIGHTBOX
   ========================================= */

.pdp-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 10, 9, 0.97);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* hidden attribute removes from layout; we layer opacity on top */
.pdp-lightbox[hidden] {
  display: none;
}

.pdp-lightbox.is-open {
  opacity: 1;
}

.pdp-lightbox__stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdp-lightbox__img {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
  user-select: none;
  transition: opacity 0.2s ease;
}

.pdp-lightbox__close {
  position: absolute;
  top: 22px;
  right: 26px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 2;
}

.pdp-lightbox__close:hover {
  color: rgba(255, 255, 255, 0.9);
}

.pdp-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: rgba(255, 255, 255, 0.55);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 2;
}

.pdp-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
}

.pdp-lightbox__nav--prev { left: 20px; }
.pdp-lightbox__nav--next { right: 20px; }

.pdp-lightbox__counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 9px;
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  text-transform: uppercase;
}

/* =========================================
   EDITORIAL HERO — second hero below PDP
   ========================================= */

.editorial {
  background: var(--color-bg);
  border-top: 1px solid rgba(26, 26, 26, 0.07);
}

/* ── Hero image ─────────────────────────────── */

.editorial__hero {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.editorial__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* ── Text intro ─────────────────────────────── */

.editorial__intro {
  max-width: 640px;
  margin: 0 auto;
  padding: 96px 40px 80px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.editorial__label {
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 9px;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--color-gold);
  display: block;
  margin-bottom: 28px;
}

.editorial__title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(30px, 3.6vw, 52px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-dark);
  line-height: 1.18;
  margin-bottom: 32px;
}

.editorial__title em {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: 0.9em;
  letter-spacing: 0.05em;
  text-transform: none;
  color: rgba(26, 26, 26, 0.6);
  display: block;
  margin-top: 4px;
}

.editorial__body {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 13.5px;
  line-height: 1.9;
  letter-spacing: 0.025em;
  color: rgba(26, 26, 26, 0.52);
  max-width: 480px;
}

/* ── Cinematic lead image ───────────────────── */

.editorial__lead {
  width: 100%;
  height: 80vh;
  max-height: 720px;
  overflow: hidden;
  position: relative;
}

.editorial__lead-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

/* ── Two-up image grid ──────────────────────── */

.editorial__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-top: 2px;
}

.editorial__grid-item {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #EAE5DE;
  position: relative;
}

.editorial__grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.editorial__grid-item:hover img {
  transform: scale(1.04);
}

/* ── CTA ────────────────────────────────────── */

.editorial__cta-wrap {
  display: flex;
  justify-content: center;
  padding: 72px 40px 96px;
}

.editorial__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 9.5px;
  letter-spacing: 0.46em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.45);
  text-decoration: none;
  position: relative;
  transition: color 0.28s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.editorial__cta::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold);
  transition: width 0.38s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.editorial__cta:hover {
  color: var(--color-dark);
}

.editorial__cta:hover::after {
  width: 100%;
}

.editorial__cta svg {
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.editorial__cta:hover svg {
  transform: translateX(4px);
}

/* =========================================
   RESPONSIVE — TABLET (≤ 1024px)
   ========================================= */

@media (max-width: 1024px) {
  .pdp {
    grid-template-columns: 1fr 360px;
  }

  .pdp__info {
    padding: 40px 32px 52px;
  }

  .pdp__thumbrail {
    width: 60px;
  }

  .pdp__thumb {
    width: 40px;
    height: 40px;
  }
}

/* =========================================
   RESPONSIVE — MOBILE (≤ 768px)
   Stacked layout: full-width gallery, then info
   ========================================= */

@media (max-width: 768px) {

  .pdp {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding-top: var(--nav-height);
    min-height: auto;
  }

  /* Gallery: full width, not sticky */
  .pdp__gallery {
    height: 72vw;
    max-height: 480px;
    min-height: 320px;
    position: relative;
    top: auto;
    flex-direction: row;
  }

  /* Hide vertical rail on mobile */
  .pdp__thumbrail {
    display: none;
  }

  /* Show dots on mobile */
  .pdp__dots {
    display: flex;
  }

  /* Hide arrow buttons on mobile (swipe replaces) */
  .pdp__arrow {
    display: none;
  }

  /* Info panel: full width, natural scroll */
  .pdp__info {
    position: static;
    max-height: none;
    overflow-y: visible;
    padding: 36px 24px 72px;
    border-left: none;
    border-top: 1px solid rgba(26, 26, 26, 0.06);
  }

  .pdp__name {
    font-size: clamp(26px, 7vw, 38px);
  }

  /* Editorial hero — mobile */
  .editorial__intro {
    padding: 64px 28px 56px;
  }

  .editorial__lead {
    height: 60vw;
    max-height: 460px;
    min-height: 280px;
  }

  .editorial__grid {
    grid-template-columns: 1fr 1fr;
  }

  .editorial__grid-item {
    aspect-ratio: 3 / 4;
  }

  .editorial__cta-wrap {
    padding: 52px 28px 72px;
  }

  /* Full-width CTA already — no change needed */

  .pdp-lightbox__nav {
    width: 40px;
    height: 40px;
  }

  .pdp-lightbox__nav--prev { left: 8px; }
  .pdp-lightbox__nav--next { right: 8px; }
}

/* =========================================
   RESPONSIVE — SMALL MOBILE (≤ 400px)
   ========================================= */

@media (max-width: 400px) {
  .pdp__info {
    padding: 28px 20px 64px;
  }
}
