/* =============================================
   MYA HAYES — PRODUCT DETAIL PAGE
   product.css
   ============================================= */

.product-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3.5rem) 3rem 8rem;
}

/* ── Back link ── */
.product-back {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm-gray);
  text-decoration: none;
  margin-bottom: 3rem;
  transition: color var(--transition);
}

.product-back:hover {
  color: var(--accent);
}

/* ── Diptych display ── */
.product-diptych {
  position: relative;
  display: flex;
  gap: 6px;
  margin-bottom: 1.25rem;
  /* height is set via JS on load to lock the container size */
}

.diptych-frame {
  flex: 1;
  border-radius: 2px;
  overflow: hidden;
  line-height: 0;
  font-size: 0;
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.14), 0 2px 10px rgba(0, 0, 0, 0.07);
  cursor: zoom-in;
  transition: box-shadow 0.35s ease;
}

/* Single-panel mode: frame is pulled out of flow and centered */
.diptych-frame--solo {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  flex: none;
}

.diptych-frame--hidden {
  visibility: hidden;
  flex: 1;
}

.diptych-frame:hover {
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);
}

.diptych-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
}

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

[data-theme="dark"] .diptych-frame {
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* ── Panel thumbnails ── */
.product-thumbs {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 3.5rem;
}

.thumb-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
  transition: border-color var(--transition);
  overflow: hidden;
  flex-shrink: 0;
}

/* Both-panels thumb — two mini images side by side */
.thumb-btn[data-panel="both"] {
  display: flex;
  gap: 1px;
}

.thumb-diptych-img {
  display: block;
  height: 44px;
  width: auto;
  object-fit: cover;
}

/* Single-panel thumb */
.thumb-btn img:not(.thumb-diptych-img) {
  display: block;
  height: 44px;
  width: auto;
  object-fit: cover;
}

.thumb-btn:hover {
  border-color: var(--accent);
}

.thumb-btn.active {
  border-color: var(--charcoal);
}

[data-theme="dark"] .thumb-btn.active {
  border-color: var(--accent);
}

/* ── Info row ── */
.product-info-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}

/* Left — title, meta, price */
.product-detail-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.product-detail-meta {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--warm-gray);
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
}

.product-sold-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--warm-gray);
}

.sold-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* Right — details */
.product-detail-section {
  margin-bottom: 2.5rem;
}

.product-detail-section:last-child {
  margin-bottom: 0;
}

.product-detail-section h4 {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: 0.9rem;
}

.product-detail-section p {
  font-size: 0.9rem;
  color: var(--charcoal);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

.product-detail-section p:last-child {
  margin-bottom: 0;
}

.product-detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.product-detail-list li {
  display: flex;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--charcoal);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.55rem;
}

.product-detail-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.product-detail-list li span {
  width: 90px;
  flex-shrink: 0;
  color: var(--warm-gray);
  font-size: 0.8rem;
}

/* ── Frame preview ── */
.frame-preview {
  display: inline-block;
  transition: box-shadow 0.3s ease, border 0.3s ease, padding 0.3s ease, background 0.3s ease;
  border-radius: 2px;
}

/* No frame — just the shadow from the existing container */
.frame-preview[data-frame="none"] {
  padding: 0;
  border: none;
  background: none;
}

/* Natural wood */
.frame-preview[data-frame="natural"] {
  padding: 14px;
  border: 3px solid #C8A96E;
  background: linear-gradient(135deg, #D4B483 0%, #B8955A 40%, #C9A96D 60%, #A07840 100%);
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.3), inset 0 -1px 3px rgba(0,0,0,0.2), 0 20px 60px rgba(0,0,0,0.2);
}

/* Matte black */
.frame-preview[data-frame="black"] {
  padding: 14px;
  border: 3px solid #111;
  background: linear-gradient(135deg, #2A2A2A 0%, #1A1A1A 40%, #252525 60%, #0F0F0F 100%);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.05), inset 0 -1px 2px rgba(0,0,0,0.5), 0 20px 60px rgba(0,0,0,0.25);
}

/* White */
.frame-preview[data-frame="white"] {
  padding: 14px;
  border: 3px solid #DDD;
  background: linear-gradient(135deg, #FAFAFA 0%, #EBEBEB 40%, #F5F5F5 60%, #E0E0E0 100%);
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.8), inset 0 -1px 3px rgba(0,0,0,0.1), 0 20px 60px rgba(0,0,0,0.15);
}

/* ── Single-image product ── */
.product-single-frame {
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
}

.product-single-img {
  display: block;
  max-height: 480px;
  width: auto;
  max-width: 100%;
  height: auto;
}

/* ── Purchase options ── */
.product-purchase {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.purchase-label {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: 0;
}

.purchase-option-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.purchase-option-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm-gray);
}

.purchase-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.purchase-opt {
  background: none;
  border: 1px solid var(--border);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  padding: 0.45rem 0.85rem;
  border-radius: 2px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.purchase-opt:hover {
  border-color: var(--charcoal);
}

.purchase-opt.active {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--ivory);
}

[data-theme="dark"] .purchase-opt.active {
  background: var(--accent);
  border-color: var(--accent);
}

.purchase-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 0.5rem;
}

.purchase-total-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm-gray);
}

.purchase-total-price {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--charcoal);
}

.purchase-add-btn {
  width: 100%;
  justify-content: center;
}

/* ── Lightbox ── */
.product-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}

.product-lightbox[hidden] {
  display: none;
}

.plb-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  border-radius: 2px;
  cursor: default;
}

.plb-close {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  background: none;
  border: none;
  color: rgba(253,250,245,0.7);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}

.plb-close:hover {
  color: #FDFAF5;
}

/* ── Subpage footer ── */
.subpage-footer {
  text-align: center;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--warm-gray);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
}

.subpage-footer-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.3rem;
}

.subpage-footer-links a {
  color: var(--warm-gray);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.subpage-footer-links a:hover,
.subpage-footer-links a.active {
  color: var(--accent);
}

/* ── Responsive ── */
@media (max-width: 800px) {
  .product-info-row {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .product-diptych {
    gap: 3px;
  }
}

@media (max-width: 500px) {
  .product-main {
    padding: calc(var(--nav-h) + 2rem) 1.5rem 5rem;
  }

  .product-diptych {
    flex-direction: column;
    gap: 6px;
  }

  .diptych-frame {
    flex: none;
  }
}
