/* =====================================================================
   Oxygena — Product Details Page (PDP)
   Namespaced with .pdp / .pdp-* to stay isolated from legacy styles.
   Uses logical properties so it works in both RTL (ar) and LTR (en).
   ===================================================================== */

.pdp {
  --pdp-ink: #0b1325;
  --pdp-ink-2: #1c2a4f;
  --pdp-text: #334155;
  --pdp-muted: #64748b;
  --pdp-faint: #94a3b8;
  --pdp-line: #e5eaf1;
  --pdp-line-strong: #d4dbe6;
  --pdp-surface: #ffffff;
  --pdp-canvas: #f4f7fb;
  --pdp-stage: #eef4f8;
  --pdp-cyan: #06b6d4;
  --pdp-cyan-deep: #0e7490;
  --pdp-cyan-soft: #e6f9fc;
  --pdp-gold: #d4a017;
  --pdp-rose: #e11d48;
  --pdp-rose-soft: #fff1f3;
  --pdp-green: #15803d;
  --pdp-green-soft: #ecfdf3;
  --pdp-amber: #b45309;
  --pdp-amber-soft: #fff7e6;
  --pdp-wa: #1faa59;
  --pdp-r-lg: 24px;
  --pdp-r: 16px;
  --pdp-r-sm: 12px;
  --pdp-shadow: 0 1px 2px rgba(11, 19, 37, .04), 0 8px 24px -12px rgba(11, 19, 37, .12);
  --pdp-shadow-lift: 0 18px 40px -18px rgba(11, 19, 37, .35);
  --pdp-header: 92px;
  --pdp-ease: cubic-bezier(.2, .7, .2, 1);
  --pdp-num: 'Poppins', 'Cairo', sans-serif;

  color: var(--pdp-text);
  background: var(--pdp-surface);
  font-size: 1rem;
  line-height: 1.7;
}

[data-theme="dark"] .pdp {
  --pdp-ink: #f1f5f9;
  --pdp-ink-2: #cbd5e1;
  --pdp-text: #cbd5e1;
  --pdp-muted: #94a3b8;
  --pdp-faint: #64748b;
  --pdp-line: #1f2a3d;
  --pdp-line-strong: #2b3a52;
  --pdp-surface: #0f172a;
  --pdp-canvas: #0b1222;
  --pdp-stage: #131d33;
  --pdp-cyan-soft: rgba(6, 182, 212, .12);
  --pdp-rose-soft: rgba(225, 29, 72, .14);
  --pdp-green: #4ade80;
  --pdp-green-soft: rgba(74, 222, 128, .12);
  --pdp-amber: #fbbf24;
  --pdp-amber-soft: rgba(251, 191, 36, .12);
  --pdp-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
}

.pdp *,
.pdp *::before,
.pdp *::after { box-sizing: border-box; }

/* Resets wrapped in :where() => zero specificity, never beat component classes */
:where(.pdp) :where(h1, h2, h3) { color: var(--pdp-ink); margin: 0; }
:where(.pdp) :where(p) { font-size: inherit; margin: 0; }
:where(.pdp) :where(a) { color: inherit; text-decoration: none; }
:where(.pdp) :where(button) { font: inherit; color: inherit; }
.pdp :focus-visible { outline: 2px solid var(--pdp-cyan); outline-offset: 2px; border-radius: 8px; }

/* ---------- Buttons ---------- */
.pdp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 54px;
  padding: 0 1.5rem;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .2s var(--pdp-ease), box-shadow .2s var(--pdp-ease), background-color .2s, color .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.pdp-btn:active:not(:disabled) { transform: scale(.98); }
.pdp-btn:disabled { opacity: .55; cursor: not-allowed; }
.pdp-btn--block { width: 100%; }

.pdp-btn--primary {
  background: var(--pdp-ink);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(11, 19, 37, .7);
}
[data-theme="dark"] .pdp-btn--primary { background: var(--pdp-cyan); color: #04212a; }
.pdp-btn--primary:hover:not(:disabled) { background: var(--pdp-ink-2); box-shadow: var(--pdp-shadow-lift); }
[data-theme="dark"] .pdp-btn--primary:hover:not(:disabled) { background: #22d3ee; }
.pdp-btn--primary.is-success { background: var(--pdp-green); color: #fff; }

.pdp-btn--whatsapp {
  width: 100%;
  background: transparent;
  color: var(--pdp-wa);
  border-color: color-mix(in srgb, var(--pdp-wa) 40%, transparent);
}
.pdp-btn--whatsapp:hover { background: var(--pdp-wa); color: #fff; border-color: var(--pdp-wa); }
.pdp-btn--whatsapp i { font-size: 1.25rem; }

.pdp-btn--ghost {
  background: var(--pdp-surface);
  color: var(--pdp-ink);
  border-color: var(--pdp-line-strong);
}
.pdp-btn--ghost:hover { border-color: var(--pdp-ink); }

.pdp-icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--pdp-line);
  background: color-mix(in srgb, var(--pdp-surface) 85%, transparent);
  backdrop-filter: blur(8px);
  color: var(--pdp-ink);
  cursor: pointer;
  transition: transform .2s var(--pdp-ease), color .2s, background-color .2s;
}
.pdp-icon-btn:hover { transform: translateY(-2px); }
.pdp-wish-btn.is-active { color: var(--pdp-rose); }
.pdp-wish-btn.is-pulse i { animation: pdp-pop .45s var(--pdp-ease); }

@keyframes pdp-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---------- Hero ---------- */
.pdp-hero {
  padding: 1rem 0 3.5rem;
  background:
    radial-gradient(1200px 400px at 85% -10%, var(--pdp-cyan-soft), transparent 60%),
    var(--pdp-surface);
}

.pdp-crumbs { margin-bottom: 1.25rem; }
.pdp-crumbs ol {
  display: flex;
  align-items: center;
  gap: .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .85rem;
  color: var(--pdp-muted);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.pdp-crumbs ol::-webkit-scrollbar { display: none; }
.pdp-crumbs li { display: inline-flex; align-items: center; gap: .35rem; }
.pdp-crumbs li + li::before { content: "/"; color: var(--pdp-faint); }
.pdp-crumbs a:hover { color: var(--pdp-cyan-deep); }
.pdp-crumbs [aria-current] span {
  color: var(--pdp-ink);
  font-weight: 600;
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}

.pdp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

/* ---------- Gallery ---------- */
.pdp-gallery {
  position: sticky;
  top: calc(var(--pdp-header) + 1rem);
  display: grid;
  gap: .9rem;
}
.pdp-gallery.has-thumbs { grid-template-columns: 76px minmax(0, 1fr); }
.pdp-gallery.has-thumbs .pdp-thumbs { order: -1; }

.pdp-stage {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: calc(100vh - var(--pdp-header) - 2.5rem);
  border-radius: var(--pdp-r-lg);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60% 55% at 50% 55%, color-mix(in srgb, var(--pdp-surface) 90%, transparent) 0%, transparent 70%),
    linear-gradient(160deg, var(--pdp-stage) 0%, color-mix(in srgb, var(--pdp-cyan-soft) 70%, var(--pdp-stage)) 100%);
  border: 1px solid var(--pdp-line);
}
.pdp-stage::before,
.pdp-stage::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}
.pdp-stage::before {
  width: 38%; aspect-ratio: 1;
  inset-block-start: -8%; inset-inline-end: -6%;
  background: radial-gradient(circle, rgba(6, 182, 212, .18), transparent 70%);
}
.pdp-stage::after {
  width: 26%; aspect-ratio: 1;
  inset-block-end: 6%; inset-inline-start: -4%;
  background: radial-gradient(circle, rgba(212, 160, 23, .14), transparent 70%);
}

.pdp-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.pdp-track::-webkit-scrollbar { display: none; }

.pdp-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  margin: 0;
  scroll-snap-align: start;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}
/* Blurred copy of the same photo fills the frame behind the uncropped image */
.pdp-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--img) center / cover no-repeat;
  filter: blur(32px) saturate(1.15);
  transform: scale(1.25);
  opacity: .55;
}
.pdp-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .35s var(--pdp-ease);
  user-select: none;
}
@media (hover: hover) and (pointer: fine) {
  .pdp-slide { cursor: zoom-in; }
  .pdp-slide.is-zoomed img { transform: scale(1.9); transition-duration: .15s; }
}

.pdp-stage-badges {
  position: absolute;
  inset-block-start: 1rem;
  inset-inline-start: 1rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .45rem;
}
.pdp-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .75rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.4;
}
.pdp-badge--sale { background: var(--pdp-rose); color: #fff; font-family: var(--pdp-num); }
.pdp-badge--offer { background: var(--pdp-ink); color: #fff; }
.pdp-badge--featured { background: var(--pdp-surface); color: var(--pdp-gold); border: 1px solid var(--pdp-line); }

.pdp-stage-tools {
  position: absolute;
  inset-block-start: 1rem;
  inset-inline-end: 1rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.pdp-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--pdp-line);
  background: var(--pdp-surface);
  color: var(--pdp-ink);
  box-shadow: var(--pdp-shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%) scale(.9);
  transition: opacity .2s, transform .2s var(--pdp-ease);
}
.pdp-nav--prev { inset-inline-start: 1rem; }
.pdp-nav--next { inset-inline-end: 1rem; }
.pdp-stage:hover .pdp-nav,
.pdp-nav:focus-visible { opacity: 1; transform: translateY(-50%) scale(1); }
.pdp-nav:disabled { opacity: 0 !important; pointer-events: none; }
[dir="ltr"] .pdp-nav i,
[dir="ltr"] .pdp-link-more i { transform: scaleX(-1); }

.pdp-dots {
  position: absolute;
  inset-block-end: .9rem;
  inset-inline: 0;
  z-index: 3;
  display: none;
  justify-content: center;
  gap: .35rem;
}
.pdp-dots span {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pdp-ink) 25%, transparent);
  transition: width .25s var(--pdp-ease), background-color .25s;
}
.pdp-dots span.is-active { width: 18px; background: var(--pdp-ink); }

.pdp-thumbs {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
}
.pdp-thumbs::-webkit-scrollbar { display: none; }
.pdp-thumb {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  padding: 6px;
  border-radius: 14px;
  border: 1.5px solid var(--pdp-line);
  background: var(--pdp-stage);
  cursor: pointer;
  opacity: .7;
  transition: border-color .2s, opacity .2s, transform .2s var(--pdp-ease);
}
.pdp-thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.pdp-thumb:hover { opacity: 1; transform: translateY(-2px); }
.pdp-thumb.is-active { opacity: 1; border-color: var(--pdp-ink); }
[data-theme="dark"] .pdp-thumb.is-active { border-color: var(--pdp-cyan); }

/* ---------- Buy box ---------- */
.pdp-buy { display: flex; flex-direction: column; gap: 1.25rem; padding-top: .25rem; }

.pdp-eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .9rem; font-size: .85rem; }
.pdp-cat {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .8rem;
  border-radius: 999px;
  background: var(--pdp-cyan-soft);
  color: var(--pdp-cyan-deep);
  font-weight: 700;
  transition: background-color .2s;
}
[data-theme="dark"] .pdp-cat { color: #67e8f9; }
a.pdp-cat:hover { background: color-mix(in srgb, var(--pdp-cyan) 22%, transparent); }
.pdp-brand { color: var(--pdp-muted); font-weight: 600; letter-spacing: .02em; }

.pdp-title {
  font-size: clamp(1.4rem, 1.15rem + 1vw, 1.95rem) !important;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.pdp-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  font-size: .9rem;
  color: var(--pdp-muted);
  margin-top: -.4rem;
}
.pdp-rating-link { display: inline-flex; align-items: center; gap: .45rem; }
.pdp-rating-link strong { color: var(--pdp-ink); font-family: var(--pdp-num); }
.pdp-rating-link:hover span:last-child { color: var(--pdp-cyan-deep); text-decoration: underline; text-underline-offset: 3px; }
.pdp-sku { padding-inline-start: 1.25rem; border-inline-start: 1px solid var(--pdp-line-strong); }
.pdp-sku bdi { font-family: var(--pdp-num); color: var(--pdp-ink-2); }

/* Star display driven by --rating (0..5) */
.pdp-stars {
  --size: .95rem;
  --pct: calc(var(--rating, 0) / 5 * 100%);
  display: inline-block;
  font-size: var(--size);
  line-height: 1;
  letter-spacing: 2px;
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
}
.pdp-stars::before {
  content: "\f005\f005\f005\f005\f005";
  background: linear-gradient(90deg, var(--pdp-gold) var(--pct), var(--pdp-line-strong) var(--pct));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[dir="rtl"] .pdp-stars::before {
  background: linear-gradient(270deg, var(--pdp-gold) var(--pct), var(--pdp-line-strong) var(--pct));
  -webkit-background-clip: text;
  background-clip: text;
}
.pdp-stars--lg { --size: 1.25rem; }

.pdp-lead {
  font-size: 0.95rem !important;
  line-height: 1.8;
  color: var(--pdp-text);
  max-width: 60ch;
}

/* Price */
.pdp-price-card {
  padding: 1.25rem 1.4rem;
  border-radius: var(--pdp-r);
  background: var(--pdp-canvas);
  border: 1px solid var(--pdp-line);
}
.pdp-price-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .5rem 1.25rem; }
.pdp-price { display: flex; align-items: baseline; gap: .45rem; color: var(--pdp-ink); }
.pdp-price-value {
  font-family: var(--pdp-num);
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}
.pdp-price-cur { font-weight: 700; color: var(--pdp-muted); }
.pdp-price-old { display: flex; align-items: center; gap: .6rem; padding-bottom: .25rem; }
.pdp-price-old del { color: var(--pdp-faint); font-family: var(--pdp-num); font-size: .95rem; }
.pdp-save {
  padding: .2rem .6rem;
  border-radius: 8px;
  background: var(--pdp-rose-soft);
  color: var(--pdp-rose);
  font-size: .8rem;
  font-weight: 700;
}
.pdp-price-note { margin-top: .6rem !important; font-size: .82rem !important; color: var(--pdp-muted); }
.pdp-price-note i { margin-inline-end: .3rem; opacity: .7; }

.pdp-countdown {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--pdp-line-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.pdp-countdown-label { font-weight: 700; color: var(--pdp-rose); font-size: .9rem; }
.pdp-countdown-units { display: flex; gap: .4rem; }
.pdp-countdown-units span {
  min-width: 52px;
  padding: .35rem .3rem;
  border-radius: 10px;
  background: var(--pdp-surface);
  border: 1px solid var(--pdp-line);
  text-align: center;
  line-height: 1.1;
}
.pdp-countdown-units b { display: block; font-family: var(--pdp-num); font-size: 1.1rem; color: var(--pdp-ink); }
.pdp-countdown-units small { font-size: .68rem; color: var(--pdp-muted); }

/* Facts */
.pdp-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .92rem; }
.pdp-facts li { display: inline-flex; align-items: center; gap: .5rem; color: var(--pdp-text); }
.pdp-facts li > i { color: var(--pdp-muted); }
.pdp-facts strong { color: var(--pdp-ink); }
.pdp-stock { font-weight: 700; }
.pdp-stock-dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.pdp-stock-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: currentColor;
  opacity: .25;
  animation: pdp-ping 1.8s var(--pdp-ease) infinite;
}
.pdp-stock.is-in { color: var(--pdp-green); }
.pdp-stock.is-low { color: var(--pdp-amber); }
.pdp-stock.is-out { color: var(--pdp-rose); }
.pdp-stock.is-out .pdp-stock-dot::after { animation: none; }
@keyframes pdp-ping { 0% { transform: scale(.6); opacity: .45; } 100% { transform: scale(1.6); opacity: 0; } }

/* Purchase */
.pdp-purchase { display: flex; gap: .75rem; }
.pdp-purchase .pdp-btn--primary { flex: 1; }

.pdp-qty {
  display: flex;
  align-items: center;
  height: 54px;
  border: 1px solid var(--pdp-line-strong);
  border-radius: 14px;
  background: var(--pdp-surface);
  overflow: hidden;
}
.pdp-qty-btn {
  width: 44px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--pdp-ink);
  cursor: pointer;
  font-size: .8rem;
  transition: background-color .15s;
}
.pdp-qty-btn:hover:not(:disabled) { background: var(--pdp-canvas); }
.pdp-qty-btn:disabled { color: var(--pdp-faint); cursor: not-allowed; }
.pdp-qty-input {
  width: 44px;
  height: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font-family: var(--pdp-num);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--pdp-ink);
  -moz-appearance: textfield;
  appearance: textfield;
}
.pdp-qty-input::-webkit-outer-spin-button,
.pdp-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-qty-input:focus { outline: none; }
.pdp-qty:focus-within { border-color: var(--pdp-ink); }
.pdp-qty.is-shake { animation: pdp-shake .35s; }
@keyframes pdp-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.pdp-spinner {
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  animation: pdp-spin .7s linear infinite;
}
@keyframes pdp-spin { to { transform: rotate(360deg); } }

/* Assurances */
.pdp-assure {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--pdp-line);
  border-radius: var(--pdp-r);
  overflow: hidden;
}
.pdp-assure li {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .95rem 1rem;
  background: var(--pdp-surface);
}
.pdp-assure li:nth-child(odd) { border-inline-end: 1px solid var(--pdp-line); }
.pdp-assure li:nth-child(-n+2) { border-bottom: 1px solid var(--pdp-line); }
.pdp-assure-ico {
  flex: 0 0 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--pdp-cyan-soft);
  color: var(--pdp-cyan-deep);
}
[data-theme="dark"] .pdp-assure-ico { color: #67e8f9; }
.pdp-assure strong { display: block; font-size: .88rem; color: var(--pdp-ink); line-height: 1.35; }
.pdp-assure small { display: block; font-size: .76rem; color: var(--pdp-muted); line-height: 1.4; }

/* Share */
.pdp-share { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--pdp-muted); }
.pdp-share span { margin-inline-end: .35rem; }
.pdp-share a,
.pdp-share button {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--pdp-line);
  background: transparent;
  color: var(--pdp-ink-2);
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.pdp-share a:hover,
.pdp-share button:hover { background: var(--pdp-ink); color: var(--pdp-surface); border-color: var(--pdp-ink); }

/* ---------- Section tabs (sticky) ---------- */
.pdp-tabs {
  position: sticky;
  top: var(--pdp-header);
  z-index: 50;
  background: color-mix(in srgb, var(--pdp-surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-block: 1px solid var(--pdp-line);
}
.pdp-tabs ul {
  display: flex;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.pdp-tabs ul::-webkit-scrollbar { display: none; }
.pdp-tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: 1rem 1.1rem;
  font-weight: 700;
  font-size: .95rem;
  color: var(--pdp-muted);
  white-space: nowrap;
  transition: color .2s;
}
.pdp-tabs a::after {
  content: "";
  position: absolute;
  inset-inline: 1.1rem;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--pdp-ink);
  transform: scaleX(0);
  transition: transform .25s var(--pdp-ease);
}
[data-theme="dark"] .pdp-tabs a::after { background: var(--pdp-cyan); }
.pdp-tabs a:hover { color: var(--pdp-ink); }
.pdp-tabs a.is-active { color: var(--pdp-ink); }
.pdp-tabs a.is-active::after { transform: scaleX(1); }
.pdp-tab-count {
  min-width: 22px;
  padding: 0 .4rem;
  border-radius: 999px;
  background: var(--pdp-canvas);
  border: 1px solid var(--pdp-line);
  font-family: var(--pdp-num);
  font-size: .72rem;
  line-height: 20px;
  text-align: center;
}

/* ---------- Generic section ---------- */
.pdp-section {
  padding: clamp(2rem, 3.5vw, 3.5rem) 0;
  scroll-margin-top: calc(var(--pdp-header) + 56px);
}
.pdp-section--tinted { background: var(--pdp-canvas); }
#pdp-specs { scroll-margin-top: calc(var(--pdp-header) + 72px); }

.pdp-section-head { margin-bottom: 1.75rem; }
.pdp-section-head h2 {
  font-size: clamp(1.35rem, 1.1rem + .9vw, 1.75rem) !important;
  font-weight: 800;
  line-height: 1.35;
}
.pdp-section-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.pdp-section-head--center { text-align: center; margin-bottom: 1.5rem; }
.pdp-kicker {
  display: inline-block;
  margin-bottom: .35rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pdp-cyan-deep);
}
[data-theme="dark"] .pdp-kicker { color: #67e8f9; }
.pdp-link-more { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--pdp-ink); }
.pdp-link-more i { transition: transform .2s var(--pdp-ease); }
.pdp-link-more:hover i { transform: translateX(-4px); }
[dir="ltr"] .pdp-link-more:hover i { transform: scaleX(-1) translateX(-4px); }

/* ---------- Details ---------- */
.pdp-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.pdp-prose { max-width: 72ch; font-size: 0.95rem; line-height: 1.85; color: var(--pdp-text); }
.pdp-prose > * + * { margin-top: 1rem !important; }
.pdp-prose p { margin: 0; }
.pdp-prose h2, .pdp-prose h3, .pdp-prose h4, .pdp-prose h5 {
  font-size: 1.15rem !important;
  font-weight: 800;
  color: var(--pdp-ink);
  margin-top: 2rem !important;
  margin-bottom: .25rem;
  padding-inline-start: .85rem;
  border-inline-start: 3px solid var(--pdp-cyan);
  line-height: 1.5;
}
.pdp-prose ul, .pdp-prose ol { padding-inline-start: 1.25rem; margin: 0; }
.pdp-prose li { margin-bottom: .5rem; padding-inline-start: .25rem; }
.pdp-prose li::marker { color: var(--pdp-cyan); }
.pdp-prose strong, .pdp-prose b { color: var(--pdp-ink); }
.pdp-prose a { color: var(--pdp-cyan-deep); text-decoration: underline; text-underline-offset: 3px; }
.pdp-prose img { max-width: 100%; height: auto; border-radius: var(--pdp-r); }
.pdp-prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.pdp-prose th, .pdp-prose td { padding: .6rem .8rem; border: 1px solid var(--pdp-line); text-align: start; }
.pdp-empty-note { color: var(--pdp-muted); }

.pdp-specs {
  position: sticky;
  top: calc(var(--pdp-header) + 80px);
  padding: 1.5rem;
  border-radius: var(--pdp-r-lg);
  background: var(--pdp-canvas);
  border: 1px solid var(--pdp-line);
}
.pdp-specs-title {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: 1.05rem !important;
  font-weight: 800;
  margin-bottom: 1rem !important;
}
.pdp-specs-title i { color: var(--pdp-cyan-deep); }
.pdp-specs dl { margin: 0; }
.pdp-specs dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px dashed var(--pdp-line-strong);
  font-size: .92rem;
}
.pdp-specs dl > div:last-child { border-bottom: 0; }
.pdp-specs dt { font-weight: 500; color: var(--pdp-muted); }
.pdp-specs dd { margin: 0; font-weight: 700; color: var(--pdp-ink); text-align: end; }
.pdp-specs dd.is-ok { color: var(--pdp-green); }
.pdp-specs dd.is-bad { color: var(--pdp-rose); }
.pdp-specs-help {
  margin-top: 1.1rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .9rem 1rem;
  border-radius: var(--pdp-r-sm);
  background: var(--pdp-surface);
  border: 1px solid var(--pdp-line);
  font-size: .86rem;
  line-height: 1.5;
  transition: border-color .2s, transform .2s var(--pdp-ease);
}
.pdp-specs-help i { font-size: 1.3rem; color: var(--pdp-wa); }
.pdp-specs-help strong { display: block; color: var(--pdp-ink); }
.pdp-specs-help:hover { border-color: var(--pdp-wa); transform: translateY(-2px); }

/* ---------- Reviews ---------- */
.pdp-alert {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1.1rem;
  margin-bottom: 1.5rem;
  border-radius: var(--pdp-r-sm);
  font-weight: 600;
  font-size: .92rem;
}
.pdp-alert--ok { background: var(--pdp-green-soft); color: var(--pdp-green); }
.pdp-alert--bad { background: var(--pdp-rose-soft); color: var(--pdp-rose); }

.pdp-reviews-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}
.pdp-reviews-side { display: flex; flex-direction: column; gap: 1rem; }

.pdp-score {
  padding: 1.5rem;
  border-radius: var(--pdp-r-lg);
  background: var(--pdp-surface);
  border: 1px solid var(--pdp-line);
}
.pdp-score-big { display: grid; justify-items: start; gap: .35rem; margin-bottom: 1.25rem; }
.pdp-score-big strong {
  font-family: var(--pdp-num);
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--pdp-ink);
}
.pdp-score-big small { color: var(--pdp-muted); font-size: .85rem; }

.pdp-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.pdp-bars li { display: grid; grid-template-columns: 38px 1fr 28px; align-items: center; gap: .6rem; font-size: .82rem; }
.pdp-bar-label { font-family: var(--pdp-num); font-weight: 600; color: var(--pdp-ink-2); white-space: nowrap; }
.pdp-bar-label i { color: var(--pdp-gold); font-size: .7rem; }
.pdp-bar { height: 8px; border-radius: 999px; background: var(--pdp-canvas); overflow: hidden; }
.pdp-bar span { display: block; height: 100%; border-radius: inherit; background: var(--pdp-gold); }
.pdp-bar-count { font-family: var(--pdp-num); color: var(--pdp-muted); text-align: end; }

.pdp-compose details > summary { list-style: none; width: 100%; }
.pdp-compose details > summary::-webkit-details-marker { display: none; }
.pdp-compose details[open] > summary { border-color: var(--pdp-ink); margin-bottom: 1rem; }
.pdp-compose-done {
  display: flex;
  gap: .6rem;
  align-items: center;
  padding: 1rem 1.1rem;
  border-radius: var(--pdp-r-sm);
  background: var(--pdp-green-soft);
  color: var(--pdp-green);
  font-weight: 600;
  font-size: .9rem !important;
}

.pdp-review-form {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--pdp-r);
  background: var(--pdp-surface);
  border: 1px solid var(--pdp-line);
}
.pdp-field { display: grid; gap: .4rem; border: 0; margin: 0; padding: 0; min-width: 0; }
.pdp-field > label,
.pdp-field > legend { font-size: .85rem; font-weight: 700; color: var(--pdp-ink); margin: 0 0 .4rem; padding: 0; float: none; width: auto; }
.pdp-req { color: var(--pdp-rose); }
.pdp-field input[type="text"],
.pdp-field textarea {
  width: 100%;
  padding: .75rem .9rem;
  border-radius: var(--pdp-r-sm);
  border: 1px solid var(--pdp-line-strong);
  background: var(--pdp-surface);
  color: var(--pdp-ink);
  font: inherit;
  font-size: .95rem;
  resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.pdp-field input[type="text"]:focus,
.pdp-field textarea:focus {
  outline: none;
  border-color: var(--pdp-cyan);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pdp-cyan) 18%, transparent);
}
.pdp-field-error { color: var(--pdp-rose); font-size: .8rem; }
.pdp-form-hint { color: var(--pdp-muted); font-size: .78rem; text-align: center; }

/* Accessible radio-based star input (DOM order 5→1, row-reverse) */
.pdp-rate-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: .2rem; }
.pdp-rate-input input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pdp-rate-input label {
  font-size: 1.6rem;
  line-height: 1;
  color: var(--pdp-line-strong);
  cursor: pointer;
  padding: .1rem;
  transition: color .15s, transform .15s var(--pdp-ease);
}
.pdp-rate-input label:hover { transform: scale(1.15); }
.pdp-rate-input input:checked ~ label,
.pdp-rate-input:hover label:hover,
.pdp-rate-input:hover label:hover ~ label { color: var(--pdp-gold); }
.pdp-rate-input:hover input:checked ~ label:not(:hover):not(:hover ~ label) { color: var(--pdp-line-strong); }
.pdp-rate-input input:focus-visible + label { outline: 2px solid var(--pdp-cyan); border-radius: 6px; }

.pdp-reviews-list { display: grid; gap: 1rem; }
.pdp-review {
  padding: 1.35rem 1.5rem;
  border-radius: var(--pdp-r);
  background: var(--pdp-surface);
  border: 1px solid var(--pdp-line);
}
.pdp-review header { display: flex; align-items: center; gap: .8rem; margin-bottom: .75rem; }
.pdp-avatar {
  flex: 0 0 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pdp-ink), var(--pdp-cyan-deep));
  color: #fff;
  font-weight: 800;
}
.pdp-review-who { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.pdp-review-who strong { color: var(--pdp-ink); font-size: .95rem; }
.pdp-review-who time { color: var(--pdp-muted); font-size: .78rem; }
.pdp-review h3 { font-size: 1rem !important; font-weight: 800; margin-bottom: .35rem !important; }
.pdp-review p { color: var(--pdp-text); font-size: .95rem !important; line-height: 1.8; }

.pdp-reviews-empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: .5rem;
  padding: 3rem 1.5rem;
  border-radius: var(--pdp-r-lg);
  border: 1.5px dashed var(--pdp-line-strong);
  background: var(--pdp-surface);
}
.pdp-reviews-empty-ico {
  width: 64px; height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--pdp-amber-soft);
  color: var(--pdp-gold);
  font-size: 1.6rem;
  margin-bottom: .5rem;
}
.pdp-reviews-empty h3 { font-size: 1.1rem !important; font-weight: 800; }
.pdp-reviews-empty p { color: var(--pdp-muted); max-width: 42ch; font-size: .95rem !important; }

/* ---------- Compact Empty State for Zero Reviews ---------- */
.pdp-section--reviews-empty {
  padding: clamp(1.75rem, 3vw, 2.5rem) 0 !important;
}

.pdp-reviews-empty-box {
  width: 100%;
}

.pdp-reviews-empty-card {
  max-width: 540px;
  margin: 0 auto;
  padding: 2.25rem 2rem;
  border-radius: var(--pdp-r-lg);
  background: var(--pdp-surface);
  border: 1px solid var(--pdp-line);
  box-shadow: 0 4px 20px -8px rgba(11, 19, 37, .06);
  display: grid;
  justify-items: center;
  text-align: center;
  gap: .5rem;
}

.pdp-reviews-empty-card .pdp-reviews-empty-ico {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--pdp-amber-soft);
  color: var(--pdp-gold);
  font-size: 1.5rem;
  margin-bottom: .25rem;
}

.pdp-reviews-empty-card h3 {
  font-size: 1.15rem !important;
  font-weight: 800;
  color: var(--pdp-ink);
}

.pdp-reviews-empty-card p {
  color: var(--pdp-muted);
  max-width: 44ch;
  font-size: .92rem !important;
  line-height: 1.6;
}

.pdp-reviews-empty-action {
  margin-top: .75rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.pdp-reviews-empty-action > .pdp-btn {
  min-height: 44px;
  padding: 0 1.5rem;
  font-weight: 700;
  font-size: .92rem;
}

.pdp-empty-compose-details {
  width: 100%;
  max-width: 460px;
}

.pdp-empty-compose-details > summary {
  list-style: none;
  margin: 0 auto;
  min-height: 44px;
  padding: 0 1.5rem;
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
}

.pdp-empty-compose-details > summary::-webkit-details-marker {
  display: none;
}

.pdp-empty-compose-details[open] > summary {
  margin-bottom: 1.25rem;
}

.pdp-empty-compose-details .pdp-review-form {
  text-align: start;
}

/* ---------- Related ---------- */
.pdp-related {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
.pdp-related > * { min-width: 0; }

/* ---------- Mobile buy bar ---------- */
.pdp-buybar { display: none; }

/* ---------- Toasts ---------- */
.pdp-toast-region {
  position: fixed;
  z-index: 1100;
  inset-block-start: calc(var(--pdp-header) + .75rem);
  inset-inline-end: 1rem;
  display: grid;
  gap: .5rem;
  pointer-events: none;
}
.pdp-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 260px;
  max-width: min(380px, calc(100vw - 2rem));
  padding: .85rem 1rem;
  border-radius: 14px;
  background: #0b1325;
  color: #fff;
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .5);
  font-size: .9rem;
  font-weight: 600;
  animation: pdp-toast-in .35s var(--pdp-ease);
}
.pdp-toast.is-leaving { animation: pdp-toast-out .25s ease forwards; }
.pdp-toast i { font-size: 1.1rem; }
.pdp-toast--ok i { color: #4ade80; }
.pdp-toast--bad i { color: #fb7185; }
.pdp-toast a { margin-inline-start: auto; color: #67e8f9; font-weight: 700; white-space: nowrap; }
@keyframes pdp-toast-in { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pdp-toast-out { to { opacity: 0; transform: translateY(-8px); } }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1199px) {
  .pdp-related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pdp-details-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 991px) {
  .pdp { --pdp-header: 76px; }
  .pdp-hero { padding-bottom: 2.5rem; }
  .pdp-hero-grid { grid-template-columns: minmax(0, 1fr); }

  .pdp-gallery,
  .pdp-gallery.has-thumbs { position: static; grid-template-columns: minmax(0, 1fr); }
  .pdp-gallery .pdp-thumbs { display: none; }
  .pdp-stage { aspect-ratio: 4 / 5; max-height: 62vh; margin-inline: auto; width: 100%; }
  .pdp-dots { display: flex; }
  .pdp-nav { display: none; }

  .pdp-details-grid,
  .pdp-reviews-grid { grid-template-columns: minmax(0, 1fr); }
  .pdp-specs { position: static; }

  .pdp-related {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: -15px;
    padding: .25rem 15px 1rem;
    scrollbar-width: none;
  }
  .pdp-related::-webkit-scrollbar { display: none; }
  .pdp-related > * { flex: 0 0 min(260px, 72vw); scroll-snap-align: start; }

  /* Mobile buy bar */
  .pdp-buybar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--pdp-surface) 94%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--pdp-line);
    box-shadow: 0 -12px 30px -18px rgba(11, 19, 37, .35);
    transform: translateY(110%);
    transition: transform .3s var(--pdp-ease);
  }
  .pdp-buybar.is-visible { transform: none; }
  .pdp-buybar-info { display: flex; align-items: center; gap: .6rem; min-width: 0; }
  .pdp-buybar-info img {
    width: 44px; height: 44px;
    object-fit: contain;
    border-radius: 10px;
    background: var(--pdp-stage);
    padding: 3px;
    flex-shrink: 0;
  }
  .pdp-buybar-info div { display: grid; min-width: 0; line-height: 1.3; }
  .pdp-buybar-name { font-size: .8rem; color: var(--pdp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pdp-buybar-price { font-family: var(--pdp-num); font-weight: 700; color: var(--pdp-ink); }
  .pdp-buybar-actions { display: flex; gap: .5rem; flex-shrink: 0; }
  .pdp-buybar .pdp-btn { min-height: 46px; padding: 0 1.1rem; font-size: .92rem; }
  .pdp-buybar-wa {
    width: 46px; height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--pdp-wa);
    color: #fff;
    font-size: 1.35rem;
  }
  body.pdp-has-buybar { padding-bottom: 76px; }

  .pdp-toast-region { inset-inline: 1rem; inset-block-start: auto; bottom: 90px; }
  .pdp-toast { max-width: none; }
}

@media (max-width: 575px) {
  .pdp-hero { padding-top: .5rem; }
  .pdp-crumbs { margin-bottom: .75rem; }
  .pdp-stage { border-radius: 20px; }
  .pdp-buy { gap: 1.1rem; }
  .pdp-sku { padding-inline-start: 0; border: 0; }
  .pdp-price-card { padding: 1.1rem; }
  .pdp-purchase { flex-wrap: nowrap; }
  .pdp-qty-btn { width: 38px; }
  .pdp-qty-input { width: 36px; }
  .pdp-assure li { padding: .8rem .75rem; gap: .55rem; }
  .pdp-assure-ico { flex-basis: 32px; height: 32px; border-radius: 9px; font-size: .85rem; }
  .pdp-assure small { display: none; }
  .pdp-countdown { justify-content: center; }
  .pdp-countdown-units span { min-width: 48px; }
  .pdp-tabs a { padding: .85rem .8rem; font-size: .9rem; }
  .pdp-tabs a::after { inset-inline: .8rem; }
  .pdp-review { padding: 1.1rem; }
  .pdp-score { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pdp *,
  .pdp *::before,
  .pdp *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
