/* ─────────────────────────────────────────────────────────────────────
   NEXTON / main-product (PDP)  —  1:1 with Figma node 27:114.
   Gallery: 140px vertical thumb strip + 640px main panel (radius 16).
   Buy-box: bordered sticky card, padding 33, gap 32; rating+price row,
   option chips, qty pill + ink ATC pill, order-summary lines.
   Below: separator, description H2 + body, Fabric/Keywords panels.
   Responsive 1440 / 768 / 375 — thumbs move below main image on mobile,
   buy-box stacks under the gallery, keywords wrap.
   ───────────────────────────────────────────────────────────────────── */

.nx-pdp { padding-block: clamp(20px, 3vw, 40px) clamp(40px, 6vw, 72px); }
.nx-pdp__breadcrumbs { margin-bottom: var(--space-5); }

/* ── HERO 2-col ──────────────────────────────────────────────────────
   Figma: product-info (gallery side) 804px + add-to-cart 460px, gap 32. */
.nx-pdp__hero {
  display: grid;
  grid-template-columns: minmax(0, 804fr) minmax(0, 460fr);
  gap: var(--space-6);
  align-items: start;
}

/* ── Gallery ──────────────────────────────────────────────────────── */
.nx-pdp-gallery { display: flex; gap: var(--space-5); align-items: flex-start; }
.nx-pdp-gallery__thumbs {
  display: flex; flex-direction: column; gap: var(--space-4);
  flex-shrink: 0; width: 140px;
}
.nx-pdp-thumb {
  display: block; width: 140px; aspect-ratio: 140 / 157.5;
  border: 1px solid var(--color-border); border-radius: var(--radius-card);
  background: var(--color-surface); overflow: hidden; padding: 0;
  transition: border-color var(--transition);
}
.nx-pdp-thumb:hover { border-color: var(--color-text-soft); }
.nx-pdp-thumb.is-active { border-color: rgba(14, 165, 233, 0.8); }
.nx-pdp-thumb__img { width: 100%; height: 100%; object-fit: cover; }

.nx-pdp-gallery__main {
  position: relative; flex: 1 1 auto; min-width: 0;
  aspect-ratio: 640 / 678;
  background: var(--color-surface);
  border-radius: var(--radius-card); overflow: hidden;
}
.nx-pdp-gallery__main-img { width: 100%; height: 100%; object-fit: cover; }
.nx-pdp-gallery__ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 4rem; font-weight: 600; color: var(--color-text-soft);
}
.nx-pdp-gallery__pill {
  position: absolute; top: 16px; left: 16px;
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff; color: var(--color-text-muted);
  font-size: var(--text-xs); font-weight: 400;
  padding: 8px 14px; border-radius: var(--radius-pill);
  box-shadow: 2px 8px 20px rgba(0, 0, 0, 0.08);
}
.nx-pdp-gallery__pill svg { width: 12px; height: 12px; color: var(--color-accent); }
.nx-pdp-gallery__share {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: var(--radius-pill);
  background: #fff; color: var(--color-text); border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 2px 8px 20px rgba(0, 0, 0, 0.08);
  transition: color var(--transition);
}
.nx-pdp-gallery__share svg { width: 16px; height: 16px; }
.nx-pdp-gallery__share[data-in-wishlist="true"] { color: var(--color-accent); }

/* ── Buy-box (sticky card) ───────────────────────────────────────────
   Figma 96:1679 — border #e5e7eb, radius 16, p-33, gap-32. */
.nx-pdp-buybox { min-width: 0; }
.nx-pdp-buybox__sticky {
  position: sticky; top: calc(var(--header-h) + 16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg);
  padding: 33px;
  display: flex; flex-direction: column; gap: var(--space-6);
}

/* Rating + price row */
.nx-pdp-buybox__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.nx-pdp-buybox__rating {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-md); color: var(--color-text-muted);
}
.nx-pdp-buybox__rating:hover { color: var(--color-text); }
.nx-pdp-buybox__star { width: 16px; height: 16px; color: var(--color-star); flex-shrink: 0; }
.nx-pdp-buybox__rating-value { font-weight: 600; }
.nx-pdp-buybox__rating-sep { font-weight: 600; }
.nx-pdp-buybox__rating-count { font-weight: 500; }
.nx-pdp-buybox__rating--empty { color: var(--color-text-soft); }

.nx-pdp-buybox__price {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  text-align: right; flex-shrink: 0;
}
.nx-pdp-buybox__price-current { font-family: var(--font-heading); font-weight: 900; font-size: var(--text-2xl); letter-spacing: -0.02em; line-height: 1.2; color: var(--color-text); }
.nx-pdp-buybox__price-compare { font-size: 0.875rem; font-weight: 500; color: var(--color-text-muted); text-decoration: line-through; }
/* Discount badge — gold-yellow pill, bold ink text (amber accent treatment). */
.nx-pdp-buybox__price-save {
  display: inline-flex; align-items: center;
  font-size: var(--text-xs); font-weight: 800;
  color: var(--color-text);
  background: var(--color-accent);
  padding: 3px 10px; border-radius: var(--radius-pill);
  letter-spacing: 0.01em;
}

/* ── Option pickers ── */
.nx-pdp-opt { display: flex; flex-direction: column; gap: var(--space-3); }
.nx-pdp-opt__label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-md); font-weight: 600; color: var(--color-text); }
.nx-pdp-opt__name { color: var(--color-text); }
.nx-pdp-opt__value { color: var(--color-text); }

/* Size / generic chips — Figma: flex-wrap, justify-between, 72px wide,
   py-10, radius 12. Active = accent fill + white; inactive = border. */
.nx-pdp-opt__chips { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.nx-pdp-chip {
  flex: 1 1 auto; min-width: 72px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--color-border); background: var(--color-bg);
  font-size: var(--text-md); font-weight: 600; color: var(--color-text-muted);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.nx-pdp-chip:hover { border-color: var(--color-text); color: var(--color-text); }
.nx-pdp-chip.is-active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

/* Color swatches */
.nx-pdp-opt__swatches { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.nx-pdp-swatch {
  width: 44px; height: 44px; border-radius: var(--radius-pill);
  padding: 0; border: 1px solid var(--color-border);
  background-color: var(--swatch);
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px var(--color-border);
  transition: box-shadow var(--transition);
}
.nx-pdp-swatch.is-active { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px var(--color-accent); }

/* ── Quantity + ATC row ──────────────────────────────────────────────
   Figma 96:1703 — qty pill (gray #f8f8f8) left, ink ATC pill right. */
.nx-pdp-buybox__form { display: flex; flex-direction: column; gap: var(--space-3); }
.nx-pdp-buybox__cart-row { display: flex; align-items: center; gap: var(--space-4); }
.nx-pdp-qty {
  display: inline-flex; align-items: center; gap: var(--space-4);
  background: var(--color-surface); border-radius: var(--radius-pill);
  padding: 6px 12px; flex-shrink: 0;
}
.nx-pdp-qty__btn {
  width: 24px; height: 24px; min-width: 24px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--color-text-muted);
  border-radius: var(--radius-pill);
}
.nx-pdp-qty__btn:hover { color: var(--color-text); }
.nx-pdp-qty__btn svg { width: 18px; height: 18px; }
.nx-pdp-qty__input {
  width: 28px; text-align: center; padding: 0; border: 0; background: none;
  font-size: var(--text-md); font-weight: 500; color: var(--color-text-muted);
  -moz-appearance: textfield;
}
.nx-pdp-qty__input::-webkit-outer-spin-button,
.nx-pdp-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nx-pdp-qty__input:focus { box-shadow: none; }

.nx-pdp-buybox__atc {
  flex: 1 1 auto; min-height: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 14px 32px; border-radius: var(--radius-pill); border: 0;
  background: var(--color-primary); color: var(--color-primary-ink);
  font-family: var(--font-body); font-size: var(--text-md); font-weight: 500;
  box-shadow: var(--shadow-lg);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.nx-pdp-buybox__atc:hover:not(:disabled) { background: #1f2937; transform: translateY(-1px); }
.nx-pdp-buybox__atc svg { width: 16px; height: 16px; }
.nx-pdp-buybox__atc:disabled,
.nx-pdp-buybox__atc.is-sold-out,
.nx-pdp-buybox__atc.is-unavailable {
  background: var(--color-surface); color: var(--color-text-soft);
  box-shadow: none; cursor: not-allowed; transform: none;
}
.nx-pdp-buybox__status { font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted); }
.nx-pdp-buybox__status.is-sold-out,
.nx-pdp-buybox__status.is-unavailable { color: #b91c1c; }

/* ── Order summary ── */
.nx-pdp-summary { display: flex; flex-direction: column; gap: var(--space-4); }
.nx-pdp-summary__line {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  font-size: var(--text-md); color: var(--color-text-muted);
}
.nx-pdp-summary__sep { height: 1px; background: var(--color-border); }
.nx-pdp-summary__line--total { font-weight: 600; color: var(--color-text); }

/* ── Product details (full width) ────────────────────────────────────
   Figma 96:1643 — separator above, then stacked detail blocks. */
.nx-pdp__details {
  margin-top: var(--space-7);
  padding-top: var(--space-7);
  border-top: 1px solid var(--color-border);
  display: flex; flex-direction: column; gap: var(--space-7);
  max-width: 804px;
}
/* Product title — Poppins Black, tight tracking (amber display heading). */
.nx-pdp-detail__title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 3.4vw, 40px); font-weight: 900;
  letter-spacing: -0.03em; line-height: 1.05;
  margin-bottom: var(--space-4);
}
.nx-pdp-detail__body { max-width: 735px; }
/* Sub-headings (Fabric / Sale performance / Keywords) — Poppins Black with
   a subtle gold-yellow underline accent. */
.nx-pdp-detail__heading {
  position: relative;
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-xl); font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
}
.nx-pdp-detail__heading::after {
  content: "";
  position: absolute;
  left: 0; right: -4%;
  bottom: 0.06em;
  height: 0.22em;
  border-radius: 999px;
  background: var(--color-accent);
  transform: skewX(-12deg);
  z-index: -1;
}
.nx-pdp-detail__lines { display: flex; flex-direction: column; gap: var(--space-1); }
.nx-pdp-detail__line { font-size: var(--text-md); color: var(--color-text-muted); }

/* Keywords */
.nx-pdp-keywords { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
.nx-pdp-keyword {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-xs); color: var(--color-text-muted);
  padding: 8px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--color-border); background: var(--color-bg);
}
.nx-pdp-keyword svg { width: 12px; height: 12px; color: var(--color-text-soft); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .nx-pdp__hero { grid-template-columns: 1fr; gap: var(--space-6); }
  .nx-pdp-buybox__sticky { position: static; }
  .nx-pdp__details { max-width: none; }
}

@media (max-width: 640px) {
  /* Thumbs move below the main image as a horizontal scroll rail. */
  .nx-pdp-gallery { flex-direction: column-reverse; gap: var(--space-3); }
  .nx-pdp-gallery__thumbs {
    flex-direction: row; width: 100%; gap: var(--space-3);
    overflow-x: auto; -ms-overflow-style: none; scrollbar-width: none;
  }
  .nx-pdp-gallery__thumbs::-webkit-scrollbar { display: none; }
  .nx-pdp-thumb { width: 72px; flex-shrink: 0; }
  .nx-pdp-buybox__sticky { padding: var(--space-5); gap: var(--space-5); }
  .nx-pdp-buybox__cart-row { flex-wrap: wrap; }
  .nx-pdp-buybox__atc { width: 100%; flex-basis: 100%; }
  .nx-pdp-chip { flex: 1 1 calc(33.333% - var(--space-3)); }
  .nx-pdp-detail__title { font-size: var(--text-xl); }
}
