/* WOOLTEX — dedicated product pages */

.pd-page {
  padding: 48px clamp(24px, 5vw, 80px) 80px;
  max-width: 1200px;
  margin: 0 auto;
  font-family: "Poppins", sans-serif;
}

.pd-layout {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 48px;
  align-items: start;
}

.pd-main-frame {
  position: relative;
  background: #f5f7fa;
  border-radius: 16px;
  border: 1px solid rgba(26, 35, 126, 0.12);
  overflow: hidden;
  max-height: 500px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-main-frame .wtx-media {
  width: 100%;
  height: 100%;
  max-height: 500px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
}

.pd-main-frame img {
  width: 100%;
  height: 100%;
  max-height: 500px;
  object-fit: contain;
  display: block;
  transition: opacity 0.3s ease;
}

.pd-main-frame .wtx-media.is-error {
  background: #eceff1;
}

.pd-main-frame img.is-fading {
  opacity: 0;
}

.pd-main-frame--no-magnifier .wtx-media,
.pd-main-frame--no-magnifier img {
  cursor: default;
}

.pd-thumb-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.pd-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #eceff1;
  transition: border-color 0.2s ease;
}

.pd-thumb.is-active {
  border-color: #e53935;
}

.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pd-thumb-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 8px;
  background: rgba(13, 27, 75, 0.75);
  color: #fff;
  text-align: center;
  padding: 2px;
}

.pd-info--top {
  max-width: 800px;
  margin: 0 auto 32px;
}

.pd-info h1 {
  color: #0d1b4b;
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 12px;
}

.pd-lead {
  color: #37474f;
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 24px;
}

.pd-section-label {
  color: #0d1b4b;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.pd-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.pd-swatch-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.pd-swatch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: var(--swatch-color, #ccc);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pd-swatch:hover {
  border-color: #1a237e;
}

.pd-swatch.is-active {
  border-color: #e53935;
  transform: scale(1.15);
}

.pd-swatch--rainbow {
  background: linear-gradient(135deg, #e53935, #1565c0, #2e7d32, #6a1b9a, #e91e63);
}

.pd-swatch-label {
  font-size: 11px;
  color: #37474f;
  font-weight: 500;
}

.pd-swatch-wrap.is-active .pd-swatch-label {
  color: #e53935;
  font-weight: 600;
}

.pd-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pd-btn-enquire {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  background: #e53935;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.35);
  transition: background 0.2s ease;
}

.pd-btn-enquire:hover {
  background: #c62828;
}

.pd-btn-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  background: #25d366;
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  border-radius: 10px;
  text-decoration: none;
}

.pd-btn-wa:hover {
  background: #1ebe57;
}

.pd-box-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(26, 35, 126, 0.12);
}

.pd-box-section h2 {
  color: #0d1b4b;
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 20px;
}

.pd-box-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.pd-box-item {
  flex: 0 0 200px;
  scroll-snap-align: start;
}

.pd-box-media {
  height: 160px;
  min-height: 160px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(26, 35, 126, 0.12);
}

.pd-box-media img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.pd-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.pd-grid-cell .pd-grid-frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f7fa;
  border: 1px solid rgba(26, 35, 126, 0.12);
  aspect-ratio: 1;
}

.pd-grid-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-magnifier-lens {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 2px solid #e53935;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  position: absolute;
  pointer-events: none;
  z-index: 100;
  display: none;
  background-repeat: no-repeat;
}

/* Lightbox (mobile) */
.wtx-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

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

.wtx-lightbox.is-open[hidden] {
  display: flex;
}

.wtx-lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  transition: transform 0.1s ease;
}

.wtx-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  border-radius: 50%;
  cursor: pointer;
}

/* Laptop / small desktop — keep two columns but tighten proportions */
@media (max-width: 1100px) and (min-width: 901px) {
  .pd-page {
    padding: 40px clamp(20px, 3vw, 40px) 64px;
  }

  .pd-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 32px;
  }

  .pd-info h1 {
    font-size: 1.5rem;
  }

  .pd-main-frame,
  .pd-main-frame .wtx-media,
  .pd-main-frame img {
    min-height: 280px;
    max-height: 420px;
  }
}

@media (max-width: 900px) {
  .pd-page {
    padding: 28px 16px 56px;
    overflow-x: clip;
    max-width: 100%;
    box-sizing: border-box;
  }

  .pd-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .pd-gallery,
  .pd-info {
    min-width: 0;
    max-width: 100%;
  }

  .pd-info h1 {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem);
  }

  .pd-lead {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .pd-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .pd-actions a {
    width: 100%;
    box-sizing: border-box;
  }

  .pd-main-frame,
  .pd-main-frame .wtx-media {
    min-height: 240px;
    max-height: min(70vw, 380px);
  }

  .pd-main-frame img {
    width: 100%;
    height: 100%;
    max-height: min(70vw, 380px);
    object-fit: contain;
  }

  .pd-thumb-strip {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .pd-page {
    padding: 20px 14px 48px;
  }

  .pd-gallery-grid {
    grid-template-columns: 1fr;
  }

  .pd-thumb {
    width: 64px;
    height: 64px;
  }

  .pd-swatch {
    width: 40px;
    height: 40px;
  }

  .pd-btn-enquire,
  .pd-btn-wa {
    padding: 13px 18px;
    font-size: 14px;
  }
}
