/* ==========================================================================
   Product detail hero — two-card, single-viewport buy experience (pdx-*)
   ========================================================================== */

.pdx {
  --pdx-card-radius: 20px;
  padding: 44px 0 52px;
  background: #fff;
  overflow-x: clip;
}

.pdx__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: 40px;
  align-items: stretch;
  width: 100%;
}

/* ---------- gallery — sticks while the buy column scrolls ---------- */
.pdx-gallery__inner {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pdx-gallery__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  max-height: min(60vh, 520px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--pdx-card-radius);
  overflow: hidden;
}

.pdx-gallery__stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 22px;
  transition: transform 0.45s ease;
}

.pdx-gallery__stage:hover img {
  transform: scale(1.05);
}

.pdx-flags {
  position: absolute;
  inset: 14px auto auto 14px;
  z-index: 2;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pdx-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--primary-600);
  box-shadow: 0 8px 18px -10px rgba(1, 58, 133, 0.9);
}

.pdx-flag--sale {
  background: #e5484d;
}

.pdx-flag--new {
  background: var(--accent-cyan);
}

.pdx-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  color: var(--primary);
  font-size: 17px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.2s;
}

.pdx-zoom:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pdx-strip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pdx-strip__arrow {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.2s;
}

.pdx-strip__arrow:hover {
  background: var(--primary);
  color: #fff;
}

.pdx-strip__arrow[disabled] {
  opacity: 0.35;
  cursor: default;
}

.pdx-thumbs {
  /* min-width:0 so the strip can shrink instead of widening the whole grid. */
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 2px;
}

.pdx-thumbs::-webkit-scrollbar {
  display: none;
}

.pdx-thumb {
  flex: 1 1 0;
  min-width: 62px;
  max-width: 96px;
  aspect-ratio: 1 / 1;
  height: auto;
  padding: 6px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: 0.2s;
}

.pdx-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.pdx-thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 123, 224, 0.16);
}

/* ---------- buy box ---------- */
.pdx-buy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0 8px;
}

.pdx-buy__top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pdx-rate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.pdx-rate .lu-stars i {
  color: #f5a524;
  font-size: 14px;
}

.pdx-rate .lu-stars i.is-off {
  color: #dfe6f1;
}

.pdx-rate a {
  color: var(--accent);
  text-decoration: none;
}

.pdx-rate a:hover {
  text-decoration: underline;
}

.pdx-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.pdx-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: none;
  color: #4a5a72;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.pdx-actions button.is-saved {
  color: #c22a2f;
  border-color: rgba(229, 72, 77, 0.28);
  background: #fdeff0;
}

.pdx-actions button:disabled {
  opacity: 0.6;
  cursor: default;
}

.pdx-actions button:hover {
  border-color: var(--line-strong);
  color: var(--primary);
  background: var(--accent-soft);
}

.pdx-buy__title {
  font-family: "Poppins", sans-serif;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.22;
  font-weight: 700;
  color: var(--primary-900);
  margin: 0;
}

.pdx-buy__sub {
  margin: -6px 0 0;
  color: #5a6b83;
  font-size: 15px;
}

.pdx-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pdx-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: #eef6ef;
  color: #0f7a45;
  border: 1px solid rgba(15, 157, 88, 0.18);
}

.pdx-chip--info {
  background: var(--accent-soft);
  color: var(--primary-600);
  border-color: rgba(47, 123, 224, 0.2);
}

.pdx-chip--out {
  background: #fdeff0;
  color: #c22a2f;
  border-color: rgba(229, 72, 77, 0.2);
}

.pdx-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.pdx-rule {
  height: 1px;
  background: var(--line);
  margin: 2px 0;
}

.pdx-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.pdx-price__now {
  font-family: "Poppins", sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  color: var(--primary-900);
  letter-spacing: -0.02em;
}

.pdx-price__was {
  font-size: 18px;
  color: #93a1b5;
  text-decoration: line-through;
}

.pdx-price__save {
  padding: 5px 11px;
  border-radius: 8px;
  background: #fdeff0;
  color: #c22a2f;
  font-size: 13px;
  font-weight: 700;
}

.pdx-tax {
  margin: -8px 0 0;
  font-size: 13px;
  color: #7b8aa1;
}

.pdx-lead {
  margin: 0;
  color: #4d5d75;
  font-size: 14.5px;
  line-height: 1.7;
}

.pdx-usp {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
}

.pdx-usp__item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.pdx-usp__item i {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 15px;
}

.pdx-usp__item b {
  display: block;
  font-size: 12.5px;
  color: var(--primary-900);
  line-height: 1.25;
}

.pdx-usp__item span {
  font-size: 12px;
  color: #7b8aa1;
}

.pdx-cta {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfe;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pdx-cta__row {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 12px;
}

/* Desktop: qty + Add to Cart + Buy Now on one line, WhatsApp underneath. */
.pdx-wa-short {
  display: none;
}

.pdx-qty {
  flex: none;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.pdx-qty button {
  width: 42px;
  height: 52px;
  border: 0;
  background: none;
  font-size: 20px;
  color: var(--primary);
  cursor: pointer;
  transition: 0.15s;
}

.pdx-qty button:hover {
  background: var(--accent-soft);
}

.pdx-qty input {
  width: 46px;
  height: 52px;
  border: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-900);
  /* -moz-appearance: textfield; */
}

.pdx-qty input::-webkit-outer-spin-button,
.pdx-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pdx-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: 0.2s;
}

.pdx-btn--outline {
  background: #fff;
  color: var(--primary-600);
  border: 1.5px solid var(--primary-600);
}

.pdx-btn--outline:hover {
  background: var(--accent-soft);
  color: var(--primary-600);
}

/* WhatsApp CTA sits on its own row, same height as the buttons above it. */
.pdx-btn--ghost {
  width: 100%;
  flex: none;
}

.pdx-btn--primary {
  background: var(--grad-primary);
  color: #fff;
}

.pdx-btn--primary:hover {
  filter: brightness(1.12);
  color: #fff;
}

.pdx-btn--ghost {
  background: #fff;
  color: var(--accent);
  border: 1.5px solid rgba(47, 123, 224, 0.4);
}

.pdx-btn--ghost:hover {
  background: var(--accent-soft);
  color: var(--primary-600);
}

.pdx-assure {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: #f2f9f4;
  border: 1px solid rgba(15, 157, 88, 0.16);
}

.pdx-assure__item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: #33465e;
}

.pdx-assure__item i {
  color: #0f9d58;
  font-size: 16px;
}

.pdx-assure__item b {
  display: block;
  color: var(--primary-900);
  font-size: 12.5px;
}

/* ---------- lightbox ---------- */
.pdx-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  place-items: center;
  padding: 40px;
  background: rgba(0, 20, 45, 0.82);
  backdrop-filter: blur(4px);
}

.pdx-lightbox.is-open {
  display: grid;
}

.pdx-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
}

.pdx-lightbox__close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--primary-900);
  font-size: 20px;
  cursor: pointer;
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .pdx__grid {
    grid-template-columns: 1fr;
  }

  .pdx-gallery__inner {
    position: static;
  }

  .pdx-gallery__stage {
    aspect-ratio: 4 / 3;
    max-height: 420px;
  }
}

@media (max-width: 640px) {
  .pdx {
    padding: 24px 0 32px;
  }

  .pdx__grid {
    gap: 22px;
  }

  /* Full-bleed image: the stage breaks out of the shell padding so the
     product fills the screen width. */
  .pdx-gallery__inner {
    margin-inline: calc(var(--shell-pad) * -1);
    gap: 12px;
  }

  .pdx-gallery__stage {
    aspect-ratio: 1 / 1;
    max-height: 100vw;
    border-inline: 0;
    border-radius: 0;
  }

  .pdx-gallery__stage img {
    padding: 10px;
  }

  .pdx-flags {
    inset: 10px auto auto 12px;
  }

  .pdx-zoom {
    top: 10px;
    right: 12px;
  }

  /* Thumbs keep the page gutter the stage gave up. */
  .pdx-strip {
    padding-inline: var(--shell-pad);
  }

  /* Thumbs swipe horizontally; the arrows are redundant on touch. */
  .pdx-strip__arrow {
    display: none;
  }

  .pdx-thumb {
    flex: 0 0 auto;
    width: 64px;
    max-width: none;
  }

  /* Rating on its own line, the icon actions beneath it. */
  .pdx-buy__top {
    gap: 8px;
  }

  .pdx-actions {
    margin-left: 0;
    width: 100%;
  }

  .pdx-actions button {
    flex: 1 1 0;
    justify-content: center;
    padding: 10px 8px;
    font-size: 13.5px;
    border-color: var(--line);
  }

  .pdx-buy__title {
    font-size: 21px;
  }

  .pdx-usp,
  .pdx-assure {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Two assurances fill the row cleanly on a phone; returns drops off. */
  .pdx-assure__item--returns {
    display: none;
  }

  .pdx-cta {
    padding: 14px;
  }

  .pdx-cta__row {
    flex-wrap: wrap;
  }

  /* Row 1: stepper + Add to Cart. Row 2: Buy Now + WhatsApp. */
  .pdx-qty {
    flex: 0 0 auto;
  }

  .pdx-qty button {
    width: 38px;
    height: 48px;
  }

  .pdx-qty input {
    width: 38px;
    height: 48px;
  }

  .pdx-btn {
    height: 48px;
    padding: 0 10px;
    font-size: 14px;
    gap: 7px;
  }

  .pdx-cta__row .pdx-btn--primary {
    flex: 1 1 auto;
  }

  .pdx-btn--buy,
  .pdx-btn--ghost {
    width: auto;
    flex: 1 1 calc(50% - 6px);
  }

  .pdx-wa-full {
    display: none;
  }

  .pdx-wa-short {
    display: inline;
  }

  .pdx-lightbox {
    padding: 16px;
  }
}
