/* ============================================================
   PRODUCT PAGE — CSS
   Thumbnail-left gallery · Info · Colour+Qty row · Panels
   ============================================================ */

/* Uses .section in HTML — no position/z-index/width/max-width/margin needed here */
.product-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  grid-template-areas:
    "gallery header"
    "gallery info"
    "bottom  bottom";
  gap: 3rem;
  align-items: start;
}
/* ── Bottom section: panels (2 col, full width) ──────────── */
.product-bottom {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 3rem;
  border-top: 1px solid var(--C-LIG);
  margin-top: 1rem;
  padding-bottom: 3rem;
}

/* Desktop grid area assignments */
.product-gallery      { grid-area: gallery; }
.product-info__header { grid-area: header; }
.product-info         { grid-area: info; }
.product-bottom       { grid-area: bottom; }

@media (max-width: 800px) {
  /* Main layout: single column */
  .product-wrap {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1.5rem var(--SPACE-MD) 0;
  }
  /* Bottom panels: single column */
  .product-bottom {
    grid-template-columns: 1fr;
    gap: 1.5rem 0;
  }
  /* Order: title+tagline → gallery → info → bottom */
  .product-info__header { order: 1; }
  .product-gallery      { order: 2; flex-direction: column; }
  .product-info         { order: 3; }
  .product-bottom       { order: 4; }
  /* Image aspect ratio */
  .pgallery__slide { aspect-ratio: 6 / 5; }
  /* Lightbox: hide arrows, full-width image */
  .lb__arrow { display: none; }
  .lb__img   { max-width: 100%; }
}
/* ── Gallery (left col) ───────────────────────────────────── */
.product-gallery {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 0.75rem;
}

.pgallery__thumbs {
  overflow: hidden;
  min-height: 0;
}

.pgallery__thumb-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: var(--T-SLOW);
  justify-content: space-between;
}

.pgallery__thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--R-SM);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: var(--T-FAST);
  background: var(--C-WHT);
}
.pgallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pgallery__thumb:hover     { border-color: var(--C-DLIG); }
.pgallery__thumb.is-active { border-color: var(--C-TEA); }

/* Main image */
.pgallery__outer {
  position: relative;
  width: 100%;
  border-radius: var(--R-LG);
  background: var(--C-WHT);
  box-shadow: var(--S-MD);
}
.pgallery {
  width: 100%;
  overflow: hidden;
  border-radius: var(--R-LG);
  position: relative;
}
.pgallery__track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.pgallery__slide {
  flex: 0 0 100%;
  min-width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--C-LIG);
  overflow: hidden;
}
.pgallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Arrow buttons — hover to reveal, same pattern as project gallery */
.pgallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--C-WHT);
  font-size: 1.4rem;
  cursor: pointer;
  padding: var(--SPACE-MD);
  opacity: 0;
  transition: opacity var(--T-BASE);
  z-index: 11;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
.pgallery__outer:hover .pgallery__arrow { opacity: 1; }
.pgallery__arrow:hover { color: var(--C-TEA) !important; }
.pgallery__arrow--prev { left: 0.5rem; }
.pgallery__arrow--next { right: 0.5rem; }

/* Centre click zone — lightbox trigger (desktop only) */
.pgallery__zone--center {
  position: absolute;
  top: 0; bottom: 0;
  left: 0; right: 0;
  z-index: 9;
  cursor: zoom-in;
}

@media (hover: none) {
  .pgallery__zone--center {
    cursor: default;
  }
}
/* Lightbox */
#pg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  opacity: 0;
  transition: var(--T-BASE);
  pointer-events: none;
}
#pg-lightbox.lb--open { opacity: 1; pointer-events: auto; }
.lb__bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.9);
  cursor: zoom-out;
}
.lb__img {
  position: relative;
  z-index: 1;
  max-height: 90vh;
  max-width: calc(100vw - 160px);
  object-fit: contain;
  border-radius: var(--R-MD);
  display: block;
  transform: scale(0.95);
  transition: var(--T-BASE);
}
#pg-lightbox.lb--open .lb__img { transform: scale(1); }
.lb__close {
  position: absolute;
  top: 1rem; right: 1rem;
  z-index: 2;
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--C-WHT);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--T-BASE);
}
.lb__close:hover { background: rgba(255,255,255,0.3); }
.lb__arrow {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.15);
  border: none;
  color: var(--C-WHT);
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--T-BASE);
}
.lb__arrow:hover { background: rgba(255,255,255,0.3); }



/* Mobile: hide thumbs, show dots */
.pgallery__dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  justify-content: center;
  gap: 6px;
  z-index: 5;
}
.pgallery__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--C-DLIG);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: var(--T-BASE), transform 0.2s;
}
.pgallery__dot.is-active {
  background: var(--C-TEA);
  transform: scale(1.35);
}

/* Hide thumbnails at 1200px, switch to dots */
@media (max-width: 1200px) {
  .product-gallery {
    grid-template-columns: 1fr;
    display: block;
  }
  .pgallery__thumbs { display: none !important; }
  .pgallery__thumb-list { display: none !important; }
  .pgallery__dots { display: flex; }
}




/* ── Product info (right col) ─────────────────────────────── */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  justify-content: space-between;
}

.product-info__title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--C-LIG);
}
.product-info__name {
  font-family: var(--F-QCK);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--C-DRK);
  margin: 0;
  line-height: 1.1;
}
.product-info__price {
  font-family: var(--F-QCK);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--C-TEA);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .product-info__name  { font-size: 1.75rem; }
  .product-info__price { font-size: 1.4rem; }
}
.product-info__tagline {
  font-size: 1rem;
  color: var(--C-DRK);
  opacity: 0.6;
  line-height: 1.6;
  margin: 0;
}

/* Trust badges */
.product-trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.2rem;
}
.product-trust__item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--C-DRK);
  opacity: 0.7;
}
.product-trust__item i {
  color: var(--C-TEA);
  font-size: 0.85rem;
  opacity: 1;
}

/* Colour + Qty row */
.product-options-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.product-options-row > div { flex-shrink: 0; }

/* Option label */
.product-option__label {
  display: block;
  font-family: var(--F-QCK);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--C-DRK);
  opacity: 0.5;
  margin-bottom: 0.6rem;
  height: 1rem;
  line-height: 1rem;
}
.product-option__label span {
  text-transform: none;
  letter-spacing: 0;
  opacity: 1;
  font-weight: 700;
  color: var(--C-DRK);
}

/* Colour swatches */
.colour-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.colour-swatch {
  width: 40px;
  height: 40px;
  border-radius: var(--R-MD);
  cursor: pointer;
  position: relative;
  border: 2px solid transparent;
  transition: var(--T-FAST), border-color 0.15s;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .colour-swatch {
    width: 44px;
    height: 44px;
  }
  .qty-btn {
    width: 44px;
    height: 44px;
  }
}
.colour-swatch:hover { transform: scale(1.1); }
.colour-swatch.is-active {
  border-color: var(--C-TEA);
  transform: scale(1.1);
}
.colour-swatch.is-active::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: calc(var(--R-MD) + 3px);
  border: 2px solid var(--C-TEA);
  pointer-events: none;
}
.colour-swatch__label {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--C-DRK);
  color: var(--C-WHT);
  font-family: var(--F-QCK);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: var(--R-SM);
  opacity: 0;
  pointer-events: none;
  transition: var(--T-FAST);
  z-index: 20;
}

/* Qty stepper */
.qty-wrap {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--C-DLIG);
  border-radius: var(--R-MD);
  overflow: hidden;
  background: var(--C-WHT);
}
.qty-btn {
  width: 38px;
  height: 40px;
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--C-DRK);
  transition: var(--T-FAST);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--F-QCK);
}
.qty-btn:hover { background: var(--C-LIG); }
.qty-input {
  width: 48px;
  height: 40px;
  border: none;
  border-left: 1.5px solid var(--C-DLIG);
  border-right: 1.5px solid var(--C-DLIG);
  text-align: center;
  font-family: var(--F-QCK);
  font-size: 1rem;
  font-weight: 600;
  color: var(--C-DRK);
  background: var(--C-WHT);
}
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.qty-input:focus { outline: none; }


/* ── Bottom panels (2 col) ───────────────────────────────── */
.product-desc {
  background: var(--C-WHT);
  border-radius: var(--R-MD);
  padding: 0 1.5rem 1.5rem;
  box-shadow: var(--S-SM);
}

/* Panel heading */
.product-desc__toggle {
  display: block;
  font-family: var(--F-QCK);
  font-size: 1rem;
  font-weight: 700;
  color: var(--C-TEA);
  padding: 1.2rem 0 0.75rem;
  margin: 0 0 0.75rem;
  border-bottom: 1px solid var(--C-LIG);
}

/* Scroll container */
.product-desc__body {
  position: relative;
  max-height: 500px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--C-DLIG) transparent;
}
.product-desc__body::-webkit-scrollbar { width: 4px; }
.product-desc__body::-webkit-scrollbar-track { background: transparent; }
.product-desc__body::-webkit-scrollbar-thumb { background: var(--C-DLIG); border-radius: 99px; }

/* Fade in at top */
.product-desc__body::before {
  content: '';
  position: sticky;
  top: 0;
  display: block;
  height: 12px;
  margin-bottom: -12px;
  background: linear-gradient(to bottom, var(--C-WHT), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Fade out at bottom */
.product-desc__body::after {
  content: '';
  position: sticky;
  bottom: 0;
  display: block;
  height: 15px;
  margin-top: -15px;
  background: linear-gradient(to top, var(--C-WHT), transparent);
  pointer-events: none;
  z-index: 1;
}

.product-desc__body-inner {
  padding-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.product-desc__body p {
  font-size: 0.92rem;
  color: var(--C-DRK);
  opacity: 0.75;
  line-height: 1.7;
  margin: 0;
}
.product-desc__body ul {
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}
.product-desc__body li {
  font-size: 0.88rem;
  color: var(--C-DRK);
  opacity: 0.75;
  line-height: 1.6;
}
.product-desc__dims {
  font-size: 0.8rem !important;
  opacity: 0.45 !important;
  padding-top: 0.2rem;
}
.product-desc__note {
  font-size: 0.8rem !important;
  opacity: 0.45 !important;
  font-style: italic;
}
.product-desc__ifu {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--F-QCK);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--C-TEA);
  text-decoration: none;
  padding: 0.45rem 1rem;
  border: 1.5px solid var(--C-TEA);
  border-radius: var(--R-MD);
  width: fit-content;
  transition: var(--T-BASE), color 0.2s;
  margin-top: 0.25rem;
}
.product-desc__ifu:hover {
  background: var(--C-TEA);
  color: var(--C-WHT);
}

/* Reviews */
.product-reviews { display: flex; flex-direction: column; }
.product-review {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--C-LIG);
}
.product-review:last-child { border-bottom: none; padding-bottom: 0; }
.product-review__stars {
  color: var(--C-STAR);
  font-size: 0.82rem;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}
.product-review__text {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--C-DRK);
  opacity: 0.8;
  line-height: 1.6;
  margin: 0 0 0.25rem;
}
.product-review__meta {
  font-size: 0.76rem;
  opacity: 0.45;
  font-family: var(--F-QCK);
  font-weight: 600;
  margin: 0;
}