/* ═══════════════════════════════════════════════
   Product Detail Page — Lespwi Dacou
   Overrides style.css product rules
   ═══════════════════════════════════════════════ */

/* ── Layout: two-column split ── */
#lamp-container {
  display: grid !important;
  grid-template-columns: 56% 1fr !important;
  gap: 0 3rem !important;
  max-width: 1140px !important;
  width: 100% !important;
  margin: 2.5rem auto 5rem !important;
  padding: 0 2.5rem !important;
  align-items: start !important;
  /* kill the flex column from style.css */
  flex-direction: unset !important;
  align-self: unset !important;
}

/* ── Left: sticky image theater ── */
.p-col-media {
  position: sticky;
  top: 1.5rem;
  width: 100%;
}

/* ── Gallery ── */
.p-gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: zoom-in;
  background: rgba(12, 21, 9, 0.5);
  border: 1px solid rgba(242, 234, 216, 0.07);
  /* Subtle vignette frame */
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.35),
    0 8px 40px rgba(0, 0, 0, 0.5);
}

/* Amber "lamp on" glow from bottom — hover */
.p-gallery::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(184, 164, 114, 0.22) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}
.p-gallery:hover::after { opacity: 1; }

/* ── Main image — no absolute, just fill the ratio box ── */
#lamp-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.22s ease, transform 0.65s ease, filter 0.4s ease;
  filter: brightness(0.92) saturate(0.9);
}

#lamp-image.fading {
  opacity: 0;
}

.p-gallery:hover #lamp-image {
  transform: scale(1.035);
  filter: brightness(1.0) saturate(1.05);
}

/* ── Chevron arrows — reveal on hover ── */
.p-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(12, 21, 9, 0.6);
  border: 1px solid rgba(242, 234, 216, 0.12);
  color: var(--text-light, #f2ead8);
  width: 44px;
  height: 44px;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease, border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.p-gallery:hover .p-arrow { opacity: 1; }
.p-arrow:hover {
  border-color: var(--accent-gold, #b8a472);
  background: rgba(184, 164, 114, 0.14);
  color: var(--accent-gold, #b8a472);
}
.p-arrow-prev { left: 0; border-left: none; border-top: none; border-bottom: none; }
.p-arrow-next { right: 0; border-right: none; border-top: none; border-bottom: none; }

/* ── Counter overlay ── */
.p-img-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 3;
  font-family: var(--body-font, 'EB Garamond', serif);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: rgba(242, 234, 216, 0.45);
  background: rgba(12, 21, 9, 0.55);
  padding: 4px 9px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}

/* ── Thumbnail strip ── */
.p-thumbs {
  display: flex;
  gap: 6px;
  padding: 8px 0 0;
  margin: 0;
  list-style: none;
  flex-wrap: wrap;
}

.p-thumb {
  border: 1px solid rgba(242, 234, 216, 0.08);
  border-radius: 0;
  padding: 0;
  background: rgba(12, 21, 9, 0.4);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.42;
  transition: opacity 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  flex-shrink: 0;
}
.p-thumb img {
  display: block;
  width: 68px;
  height: 85px;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.3s ease;
  filter: brightness(0.88) saturate(0.85);
}
.p-thumb:hover { opacity: 0.82; }
.p-thumb:hover img { transform: scale(1.06); filter: brightness(1.0) saturate(1.0); }
.p-thumb.active {
  border-color: var(--accent-gold, #b8a472);
  opacity: 1;
  box-shadow: 0 0 0 1px var(--accent-gold, #b8a472);
}
.p-thumb.active img { filter: brightness(1.0) saturate(1.0); }

/* ── Right column: info panel ── */
.p-col-info {
  padding: 0.5rem 0 0;
  /* subtle left border as divider */
  border-left: 1px solid rgba(242, 234, 216, 0.06);
  padding-left: 2.5rem;
  margin-left: -0.5rem;
}

/* ── Lamp title + badge ── */
.p-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.5rem;
  padding-bottom: 0;
  border-bottom: none;
}

.p-title {
  font-family: var(--heading-font, 'Playfair Display', serif) !important;
  font-size: clamp(1.6rem, 2.5vw, 2.4rem) !important;
  font-weight: 400 !important;
  letter-spacing: 0.05em !important;
  color: var(--text-light, #f2ead8) !important;
  margin: 0 !important;
  text-align: left !important;
  line-height: 1.15 !important;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Thin gold underline below title */
.p-header::after {
  display: none;
}
.p-col-info .p-header {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(242, 234, 216, 0.07);
  margin-bottom: 1.6rem;
}

.p-badge {
  font-family: var(--body-font, 'EB Garamond', serif) !important;
  font-size: 0.6rem !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  padding: 5px 11px !important;
  border-radius: 0 !important;
  flex-shrink: 0 !important;
  border: 1px solid transparent !important;
  margin-top: 6px;
  background: transparent !important;
}
.p-badge.sale    { border-color: var(--accent-gold, #b8a472) !important; color: var(--accent-gold, #b8a472) !important; }
.p-badge.sold    { border-color: rgba(180, 50, 50, 0.6) !important; color: rgba(190, 70, 70, 0.85) !important; }
.p-badge.retired { border-color: rgba(242, 234, 216, 0.18) !important; color: rgba(242, 234, 216, 0.3) !important; }

/* ── Price ── */
.p-price-cta {
  display: block !important;
  margin: 0 0 1.8rem !important;
  padding: 0 !important;
  grid-template-columns: unset !important;
}

.p-price {
  font-family: var(--body-font, 'EB Garamond', serif) !important;
  font-size: clamp(2rem, 3vw, 2.8rem) !important;
  color: var(--accent-gold, #b8a472) !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  margin: 0 0 1.5rem !important;
  letter-spacing: 0.01em !important;
}

/* ── CTA buttons ── */
.p-ctas {
  display: flex !important;
  gap: 0.7rem !important;
  flex-wrap: wrap !important;
}

/* Full override of the generic .btn from style.css */
#lamp-container .btn {
  font-family: var(--body-font, 'EB Garamond', serif) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  padding: 0.8rem 1.8rem !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  background: transparent !important;
  transition: background 0.28s ease, color 0.28s ease, border-color 0.28s ease !important;
}
#lamp-container .btn:disabled { opacity: 0.3 !important; cursor: not-allowed !important; }

#lamp-container .btn-primary {
  border: 1px solid var(--accent-gold, #b8a472) !important;
  color: var(--accent-gold, #b8a472) !important;
}
#lamp-container .btn-primary:hover:not(:disabled) {
  background: var(--accent-gold, #b8a472) !important;
  color: var(--bg-dark, #0c1509) !important;
}

#lamp-container .btn-secondary {
  border: 1px solid rgba(242, 234, 216, 0.2) !important;
  color: rgba(242, 234, 216, 0.6) !important;
}
#lamp-container .btn-secondary:hover:not(:disabled) {
  border-color: rgba(242, 234, 216, 0.5) !important;
  color: var(--text-light, #f2ead8) !important;
}

.p-note {
  font-family: var(--body-font, 'EB Garamond', serif) !important;
  font-size: 0.78rem !important;
  font-style: italic !important;
  color: rgba(242, 234, 216, 0.3) !important;
  margin: 0.9rem 0 0 !important;
  letter-spacing: 0.03em !important;
}

/* ── Success message ── */
.m-success {
  background: transparent !important;
  border: 1px solid var(--accent-gold, #b8a472) !important;
  color: var(--accent-gold, #b8a472) !important;
  border-radius: 0 !important;
  font-family: var(--body-font, 'EB Garamond', serif) !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.04em !important;
  padding: 10px 14px !important;
}

/* ── Details section ── */
.p-details {
  display: block !important;
  margin: 0 !important;
  border-top: 1px solid rgba(242, 234, 216, 0.07) !important;
  padding-top: 1.6rem !important;
  grid-template-columns: unset !important;
}

.p-detail-block {
  margin-bottom: 1.6rem;
}

.p-details h2 {
  font-family: var(--body-font, 'EB Garamond', serif) !important;
  font-size: 0.62rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.22em !important;
  text-transform: uppercase !important;
  color: rgba(242, 234, 216, 0.3) !important;
  margin: 0 0 0.75rem !important;
  padding: 0 !important;
}

.p-details p {
  font-family: var(--body-font, 'EB Garamond', serif) !important;
  font-size: 0.97rem !important;
  line-height: 1.8 !important;
  color: rgba(242, 234, 216, 0.7) !important;
  margin: 0 !important;
}

#p-specs {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
#p-specs li {
  font-family: var(--body-font, 'EB Garamond', serif);
  font-size: 0.92rem;
  color: rgba(242, 234, 216, 0.6);
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(242, 234, 216, 0.04);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
#p-specs li::before {
  content: '—';
  color: var(--accent-gold, #b8a472);
  opacity: 0.5;
  flex-shrink: 0;
  font-size: 0.7rem;
  margin-top: 3px;
}
#p-specs li:last-child { border-bottom: none; }

/* ── Lightbox ── */
.lb-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(4, 8, 3, 0.97) !important;
  z-index: 2000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
}
.lb-overlay.open { opacity: 1 !important; }
.lb-overlay.hidden { display: none !important; }

#lb-img {
  max-width: min(88vw, 800px);
  max-height: 88vh;
  object-fit: contain;
  display: block;
  border: 1px solid rgba(242, 234, 216, 0.06);
  box-shadow: 0 0 100px rgba(0, 0, 0, 0.85), 0 0 40px rgba(184, 164, 114, 0.04);
}

.lb-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(12, 21, 9, 0.75);
  border: 1px solid rgba(242, 234, 216, 0.14);
  color: rgba(242, 234, 216, 0.7);
  width: 44px;
  height: 44px;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.lb-close:hover {
  border-color: var(--accent-gold, #b8a472);
  color: var(--accent-gold, #b8a472);
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(12, 21, 9, 0.7);
  border: 1px solid rgba(242, 234, 216, 0.1);
  color: rgba(242, 234, 216, 0.65);
  width: 48px;
  height: 48px;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lb-nav:hover {
  border-color: var(--accent-gold, #b8a472);
  background: rgba(184, 164, 114, 0.1);
  color: var(--accent-gold, #b8a472);
}
.lb-prev-btn { left: 1.5rem; }
.lb-next-btn { right: 1.5rem; }

.lb-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--body-font, 'EB Garamond', serif);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: rgba(242, 234, 216, 0.3);
  pointer-events: none;
}

/* ── Offer modal reskin ── */
.modal-box {
  background: rgba(9, 16, 7, 0.97) !important;
  border: 1px solid rgba(242, 234, 216, 0.09) !important;
  border-radius: 0 !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  max-width: 500px !important;
  width: 92% !important;
  padding: 2rem 2.2rem !important;
}
.modal-box h3 {
  font-family: var(--heading-font, 'Playfair Display', serif) !important;
  font-weight: 400 !important;
  font-size: 1.3rem !important;
  letter-spacing: 0.07em !important;
  color: var(--text-light, #f2ead8) !important;
  margin: 0 0 1.4rem !important;
  padding-bottom: 1rem !important;
  border-bottom: 1px solid rgba(242, 234, 216, 0.07) !important;
}
.modal-box label {
  font-family: var(--body-font, 'EB Garamond', serif) !important;
  font-size: 0.62rem !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: rgba(242, 234, 216, 0.35) !important;
  margin: 0.9rem 0 5px !important;
  display: block !important;
}
.modal-box input,
.modal-box textarea {
  background: rgba(242, 234, 216, 0.02) !important;
  border: 1px solid rgba(242, 234, 216, 0.09) !important;
  border-radius: 0 !important;
  color: var(--text-light, #f2ead8) !important;
  font-family: var(--body-font, 'EB Garamond', serif) !important;
  font-size: 1rem !important;
  padding: 9px 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease !important;
}
.modal-box input:focus,
.modal-box textarea:focus {
  border-color: var(--accent-gold, #b8a472) !important;
  outline: none !important;
}
.modal-box textarea { min-height: 88px !important; resize: vertical !important; }

/* ── Responsive ── */
@media (max-width: 768px) {
  #lamp-container {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 0 1rem !important;
    margin: 1rem auto 2.5rem !important;
  }
  .p-col-media { position: static !important; }
  .p-col-info {
    border-left: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    border-top: 1px solid rgba(242, 234, 216, 0.07) !important;
    padding-top: 1.25rem !important;
  }

  /* Arrows stay hidden on mobile — swipe handles navigation */
  .p-arrow { opacity: 0 !important; pointer-events: none !important; }

  /* Lightbox: full-screen on mobile */
  #lb-img {
    max-width: 100vw !important;
    max-height: 80vh !important;
  }
  .lb-nav { display: flex !important; width: 44px !important; height: 56px !important; }
  .lb-close {
    width: 44px !important;
    height: 44px !important;
    top: 0.75rem !important;
    right: 0.75rem !important;
  }

  /* Thumbnails */
  .p-thumb img { width: 56px !important; height: 70px !important; }
  .p-thumbs { gap: 6px !important; }

  /* Action buttons — full width, 48px touch targets */
  #lamp-container .btn {
    width: 100% !important;
    min-height: 48px !important;
    padding: 0.85rem 1rem !important;
    font-size: 0.8rem !important;
    justify-content: center !important;
  }
  #lamp-container .p-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }

  /* Details section */
  .p-details h2 {
    font-size: 0.72rem !important;
    letter-spacing: 0.14em !important;
  }
  .p-details { padding-top: 1.25rem !important; }

  /* Modal offer form — 44px inputs */
  .modal-box {
    width: 96% !important;
    padding: 1.5rem 1.25rem !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
  .modal-box input,
  .modal-box textarea {
    min-height: 44px !important;
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {
  #lamp-container { padding: 0 0.75rem !important; }

  /* Gallery aspect ratio less tall on very small screens */
  .p-gallery { aspect-ratio: 4/5 !important; }
}
