/* ═══════════════════════════════════════════════════════
   PAGES / PRODUCT.CSS
   Styles for product.html
   Product cards + shared utilities from components.css
═══════════════════════════════════════════════════════ */

/* ─── BREADCRUMB ─────────────────────────────────────── */
.breadcrumb {
  padding: 16px 48px;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--sand);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--dark); }
.breadcrumb span { opacity: 0.4; }
.breadcrumb span:last-child { opacity: 1; color: var(--dark); }

/* ─── TWO-COLUMN PDP (Product Detail Page) LAYOUT ──────────────────────────── */
.pdp-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  /*min-height: 640px;*/
  min-height: 100vh;
}

/* --- for iframe --- */
.pdp-layout.is-configuring {
  grid-template-columns: 1fr 0;
  gap: 0;
}

.pdp-layout.is-configuring .pdp-info {
  /*visibility: hidden;*/
  /*opacity: 0;*/
  /*transition: visibility 0s 0.4s, opacity 0.4s ease-in-out;*/
  display: none;
}

/* --- END OF iframe CODE --- */

div#shop_parameters .controlArrow {
    display: none;
}

/* ══════════════════════════════════════════════════════
   GALLERY (left column)
══════════════════════════════════════════════════════ */
.pdp-gallery {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0;
  background: var(--cream);
  position: sticky;
  top: var(--nav-h);
  /* height: calc(100vh - var(--nav-h)); */
  overflow: hidden;
}

/* ── Thumbnail strip ── */
.pdp-thumbs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 0 16px 16px;
  overflow-y: auto;
  scrollbar-width: none;
}
.pdp-thumbs::-webkit-scrollbar { display: none; }

.pdp-thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border: 1.5px solid transparent;
  background: var(--warm-white);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.2s;
}
.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pdp-thumb:hover   { border-color: var(--taupe); }
.pdp-thumb.is-active { border-color: var(--dark); }

/* ── Main image ── */
.pdp-main-image-wrap {
  position: relative;
  overflow: hidden;
  height: 100vh; /* for mobiles in landscape (horizonal) mode */
}
.pdp-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.18s ease;
}

.pdp-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--gold);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 500;
  padding: 5px 12px;
  z-index: 2;
}

.pdp-zoom-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(6px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s;
}
.pdp-zoom-btn:hover { background: #fff; }
.pdp-zoom-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--dark);
  fill: none;
  stroke-width: 1.5;
}

/* ─── LIGHTBOX ───────────────────────────────────────── */
.pdp-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(26,24,20,0.80);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  margin-left: 81px;
}
.pdp-lightbox[hidden] { display: none; }

.pdp-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  width: 85%;
}

.pdp-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s;
}
.pdp-lightbox-close:hover { border-color: #fff; }
.pdp-lightbox-close svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.5;
}

/* ══════════════════════════════════════════════════════
   CONFIGURATOR (right column)
══════════════════════════════════════════════════════ */
.pdp-info {
  padding: 48px 56px;
  overflow-y: auto;
  background: var(--warm-white);
}

/* ── Collection tag ── */
.pdp-collection-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 500;
  color: var(--gold);
  text-decoration: none;
  text-transform: uppercase;
  margin-bottom: 16px;
  transition: opacity 0.2s;
}
.pdp-collection-tag:hover { opacity: 0.7; }

/* ── Name ── */
.pdp-name {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

/* ── Rating + price row ── */
.pdp-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.pdp-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pdp-stars { color: var(--gold); font-size: 15px; letter-spacing: 1px; }
.pdp-rating-val { font-size: 14px; font-weight: 500; color: var(--dark); }
.pdp-review-count {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
}

.pdp-price {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--dark);
  white-space: nowrap;
  transition: color 0.2s;
}

/* ── Description ── */
.pdp-description {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ── Divider ── */
.pdp-divider {
  height: 1px;
  background: var(--sand);
  margin: 28px 0;
}

/* ── Option groups (finish, legs, dimension) ── */
.pdp-option-group { margin-bottom: 24px; }

.pdp-option-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.pdp-option-label > span:first-child {
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 500;
  color: var(--charcoal);
}
.pdp-option-value {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 300;
}

/* ── Finish swatches ── */
.pdp-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pdp-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--swatch-color, #ccc);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  outline: 2px solid transparent;
  outline-offset: 2px;
  padding: 0;
}
.pdp-swatch:hover   { transform: scale(1.1); outline-color: var(--taupe); }
.pdp-swatch.is-active { border-color: #fff; outline-color: var(--dark); }

/* ── Leg / secondary pills ── */
#shop_view .pdp-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#shop_view .pdp-pill {
  padding: 8px 16px;
  border: 1px solid var(--sand);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--charcoal);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  margin-bottom: 1em;
}
#shop_view .pdp-pill:hover    { border-color: var(--charcoal); }
#shop_view .pdp-pill.is-active {
  border-color: var(--dark);
  background: var(--dark);
  color: #fff;
}

/* ── Dimension slider ── */
.pdp-slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pdp-slider-min,
.pdp-slider-max {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.pdp-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  background: var(--sand);
  outline: none;
  cursor: pointer;
}
.pdp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--dark);
  cursor: pointer;
  border: 2px solid var(--warm-white);
  box-shadow: 0 0 0 1px var(--dark);
  transition: transform 0.15s;
}
.pdp-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.pdp-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--dark);
  cursor: pointer;
  border: 2px solid var(--warm-white);
  box-shadow: 0 0 0 1px var(--dark);
}

/* ── CTA buttons ── */
.pdp-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.pdp-add-btn {
  width: 100%;
  padding: 18px 24px;
  font-size: 12px;
  letter-spacing: 0.14em;
  transition: background 0.2s, color 0.2s;
}

.pdp-wishlist-btn {
  width: 100%;
  background: transparent;
  color: var(--dark);
  border: 1px solid var(--sand);
  padding: 15px 24px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color 0.2s;
}
.pdp-wishlist-btn:hover { border-color: var(--dark); }
.pdp-wishlist-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--dark);
  fill: none;
  stroke-width: 1.5;
  transition: fill 0.2s;
}

/* ── Delivery strip ── */
.pdp-delivery-strip {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

.pdp-delivery-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}
.pdp-delivery-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════
   DETAIL TABS
══════════════════════════════════════════════════════ */
.pdp-tabs-section {
  border-top: 1px solid var(--sand);
  padding: 0 48px 64px;
}

.pdp-tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--sand);
  margin-bottom: 36px;
}

.pdp-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 20px 0;
  margin-right: 40px;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 400;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  margin-bottom: -1px;
}
.pdp-tab-btn:hover    { color: var(--dark); }
.pdp-tab-btn.is-active {
  color: var(--dark);
  border-bottom-color: var(--dark);
  font-weight: 500;
}

.pdp-tab-panel { display: none; }
.pdp-tab-panel.is-active { display: block; }
.pdp-tab-panel p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 16px;
  max-width: 680px;
}
.pdp-tab-panel p strong { color: var(--dark); }

.pdp-details-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 40px;
  max-width: 680px;
}
.pdp-details-list li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}
.pdp-details-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 12px;
}

/* ══════════════════════════════════════════════════════
   RELATED PRODUCTS
══════════════════════════════════════════════════════ */
.pdp-related {
  background: var(--cream);
  border-top: 1px solid var(--sand);
  padding: 80px 48px;
}

.pdp-related-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 16px;
}

.pdp-related-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--dark);
  margin-top: 8px;
}
.pdp-related-title em { font-style: italic; }

/* product-card as link */
.pdp-related a.product-card { text-decoration: none; color: inherit; display: block; }

/* ─── NOT FOUND ──────────────────────────────────────── */
.pdp-not-found {
  padding: 120px 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */

/* ─── TABLET (≤1024px) ───────────────────────────────── */
@media (max-width: 1024px) {
  .breadcrumb { padding: 14px 24px; }

  /* Stack gallery + info vertically */
  .pdp-layout { grid-template-columns: 1fr; }

  /* Gallery: no longer sticky, horizontal thumb strip at bottom */
  .pdp-gallery {
    position: static;
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto 80px;
  }

  /*.pdp-main-image-wrap { aspect-ratio: 4/3; order: 1; }*/
  .pdp-thumbs {
    order: 2;
    flex-direction: row;
    padding: 12px 24px;
    gap: 8px;
  }

  .pdp-info { padding: 40px 24px; }

  .pdp-tabs-section { padding: 0 24px 48px; }
  .pdp-details-list { grid-template-columns: 1fr; }

  .pdp-related { padding: 64px 24px; }
  .pdp-related .products-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

/* ─── MOBILE (≤768px) ────────────────────────────────── */
@media (max-width: 768px) {
  .breadcrumb { padding: 12px 16px; font-size: 11px; }

  .pdp-gallery { grid-template-rows: auto 72px; }
  /*.pdp-main-image-wrap { aspect-ratio: 1; }*/
  .pdp-thumbs { padding: 8px 16px; gap: 6px; }
  .pdp-thumb { width: 52px; height: 52px; }

  .pdp-info { padding: 32px 16px 40px; }
  .pdp-name { font-size: clamp(24px, 7vw, 36px); }
  .pdp-meta-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pdp-price { font-size: 28px; }

  .pdp-tabs-section { padding: 0 16px 40px; }
  .pdp-tabs-nav { overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .pdp-tabs-nav::-webkit-scrollbar { display: none; }
  .pdp-tab-btn { margin-right: 24px; }

  .pdp-related { padding: 48px 16px; }
  .pdp-related-header { flex-direction: column; align-items: flex-start; }
  .pdp-related .products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .pdp-related .product-wishlist { opacity: 1; }
  .pdp-related .product-quick-add { transform: translateY(0); font-size: 10px; padding: 10px; }
  .pdp-related .product-image-wrap { aspect-ratio: 1/1; }

  .pdp-lightbox { padding: 16px; }
  .pdp-not-found { padding: 64px 16px; }
}

/* ─── SMALL MOBILE (≤400px) ──────────────────────────── */
@media (max-width: 400px) {
  .pdp-related .products-grid { grid-template-columns: 1fr; }
}