/* ═══════════ producto.css · Detalle "Jacket Masters" adaptado ✿ ═══════════ */

.pd-page { background: var(--purple-deep); }
.pd-page { --pd-accent: #ff2e97; }

.pd-stage {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px clamp(14px, 3vw, 40px) 80px;
}

/* aura de color adaptativo detrás de la tarjeta */
.pd-aura {
  position: absolute; inset: 80px -5% -10%;
  background: radial-gradient(ellipse 75% 60% at 50% 30%, var(--pd-accent), transparent 70%);
  opacity: .35; filter: blur(70px);
  transition: background .8s ease;
  pointer-events: none;
}

.pd-crumbs {
  position: relative; z-index: 2;
  font-size: 13px; color: var(--lavender);
  margin: 8px 4px 16px; letter-spacing: .5px;
}
.pd-crumbs a { color: var(--lavender); text-decoration: none; }
.pd-crumbs a:hover { color: var(--pink); }
.pd-crumbs .sep { opacity: .5; padding: 0 6px; }

/* tarjeta principal (como el video) */
.pd-card {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 60px);
  background: linear-gradient(150deg, rgba(60, 20, 100, .92), var(--purple));
  border: 1px solid rgba(201, 162, 255, .22);
  border-radius: clamp(22px, 3.5vw, 40px);
  padding: clamp(26px, 4.5vw, 56px);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  animation: pdIn .8s cubic-bezier(.22, 1, .36, 1) backwards;
}
@keyframes pdIn { from { opacity: 0; translate: 0 40px; scale: .97; } }

/* transición de color al cambiar variante */
.pd-card { transition: background .6s ease, border-color .6s ease; }

.pd-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pd-brand {
  font-size: 12px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase;
  color: var(--pd-accent);
  transition: color .6s ease;
}
.pd-name {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(30px, 4.5vw, 52px); line-height: 1.08;
  color: #fff; margin-bottom: 2px;
}
.pd-price-row { display: flex; align-items: baseline; gap: 16px; }
.pd-price {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 4.5vw, 54px);
  background: linear-gradient(120deg, #fff, var(--pink));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 16px rgba(255, 46, 151, .4));
}
.pd-stock {
  font-family: var(--font-body); font-size: 13px; font-weight: 700;
  color: #ffd6ef;
  background: rgba(255, 46, 151, .16);
  border: 1px solid var(--pd-accent);
  padding: 5px 13px; border-radius: 999px;
  white-space: nowrap;
}
.pd-stock.few { color: #fff; background: var(--magenta); }
.pd-stock.out { color: var(--lavender); border-color: rgba(201,162,255,.4); }

/* cascada de entrada en toda la columna izquierda (al cargar) */
.pd-left > * { animation: pdItem .7s cubic-bezier(.22, 1, .36, 1) backwards; }
.pd-left > *:nth-child(1) { animation-delay: .08s; }
.pd-left > *:nth-child(2) { animation-delay: .16s; }
.pd-left > *:nth-child(3) { animation-delay: .24s; }
.pd-left > *:nth-child(4) { animation-delay: .32s; }
.pd-left > *:nth-child(5) { animation-delay: .4s; }
.pd-left > *:nth-child(6) { animation-delay: .48s; }
.pd-left > *:nth-child(7) { animation-delay: .56s; }
.pd-left > *:nth-child(8) { animation-delay: .64s; }
.pd-right { animation: pdItem .8s cubic-bezier(.22, 1, .36, 1) backwards .25s; }
@keyframes pdItem { from { opacity: 0; translate: 0 26px; } }

/* al cambiar de variante: textos e imagen entran de nuevo */
.swap-in { animation: swapIn .5s cubic-bezier(.22, 1, .36, 1); }
@keyframes swapIn { from { opacity: 0; translate: 0 12px; } }
/* pulso de la tarjeta al elegir variante */
.pd-card.swapping { animation: cardPulse .65s ease; }
@keyframes cardPulse {
  0% { box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
  35% { box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 70px rgba(255, 46, 151, .3); }
  100% { box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
}

.pd-desc { color: var(--cream); font-size: clamp(14px, 1.6vw, 16.5px); max-width: 56ch; white-space: pre-line; }

/* variantes: botones con miniatura de foto + nombre (modelo o color) */
.pd-variants { margin-top: 6px; display: flex; flex-direction: column; gap: 12px; }
.pd-variants[hidden] { display: none; }
.pd-variants-label { font-size: 14px; font-weight: 700; color: var(--lavender); letter-spacing: 1px; animation: pdItem .6s cubic-bezier(.22, 1, .36, 1) backwards .45s; }
.pd-swatches { display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; }
.pd-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  width: 66px; padding: 5px 4px 6px;
  background: rgba(27, 9, 48, .45);
  border: 2px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  cursor: pointer; position: relative;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
  animation: swIn .5s cubic-bezier(.22, 1, .36, 1) backwards;
  animation-delay: calc(var(--i) * 28ms);
}
.pd-swatch:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .4); }
.pd-swatch-img {
  width: 52px; height: 52px; border-radius: 10px; overflow: hidden;
  display: block; background: rgba(201, 162, 255, .15);
}
.pd-swatch-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-swatch-name {
  font-size: 10.5px; font-weight: 600; color: var(--lavender);
  line-height: 1.15; text-align: center; width: 100%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pd-swatch.sel {
  border-color: var(--pd-accent);
  background: rgba(255, 46, 151, .12);
  box-shadow: 0 0 0 2px rgba(255, 46, 151, .35), 0 8px 22px rgba(255, 46, 151, .3);
}
.pd-swatch.sel .pd-swatch-name { color: #fff; }
.pd-swatch.sel::after {
  content: '✓'; position: absolute; top: 7px; left: 7px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--pd-accent);
  display: grid; place-items: center;
  color: #fff; font-size: 11px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 46, 151, .6);
}
/* pop al elegir una variante */
.pd-swatch.pop { animation: swPop .55s cubic-bezier(.34, 1.56, .64, 1); animation-delay: 0s; }
@keyframes swIn { from { opacity: 0; transform: translateY(14px) scale(.8); } }
@keyframes swPop {
  0% { transform: scale(1); }
  40% { transform: scale(.88); }
  70% { transform: scale(1.09); }
  100% { transform: none; }
}

/* CTA */
.pd-cta-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.pd-qty {
  display: flex; align-items: center; gap: 4px;
  background: rgba(27, 9, 48, .6);
  border: 1.5px solid rgba(201, 162, 255, .3);
  border-radius: 999px; padding: 6px 10px;
}
.pd-qty button {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: rgba(201, 162, 255, .15); color: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: background .2s ease;
}
.pd-qty button:hover { background: var(--magenta); }
.pd-qty span { font-family: var(--font-display); font-weight: 600; min-width: 30px; text-align: center; }
.btn-pd {
  gap: 10px;
  background: linear-gradient(135deg, var(--pd-accent), var(--sunset-c));
  color: #fff;
  box-shadow: 0 8px 26px rgba(255, 46, 151, .45);
  transition: background .6s ease, transform .2s ease, box-shadow .2s ease;
}
.btn-pd:disabled { opacity: .5; pointer-events: none; }
.pd-cta-row .btn:disabled, .btn-pd.disabled { opacity: .45; pointer-events: none; }

.pd-note { font-size: 12.5px; color: var(--lavender); max-width: 48ch; }

/* imagen */
.pd-right { display: flex; align-items: center; justify-content: center; }
.pd-imgatoll { text-align: center; width: 100%; }
#pdImg {
  width: min(100%, 440px);
  aspect-ratio: 1; object-fit: cover;
  border-radius: clamp(18px, 2.5vw, 30px);
  border: 3px solid rgba(255, 255, 255, .14);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .5), 0 0 60px var(--pd-accent-glow, rgba(255, 46, 151, .35));
  transition: box-shadow .8s ease;
  animation: imgPop .5s cubic-bezier(.34, 1.56, .64, 1);
}
#pdImg.pop { animation: imgPop .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes imgPop { from { opacity: 0; scale: .9; } }
.pd-thumbrow { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pd-thumb {
  width: 56px; height: 56px;
  border-radius: 12px; overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .18);
  cursor: pointer; padding: 0; background: none;
  transition: border-color .2s ease, transform .2s ease;
  opacity: .75;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-thumb:hover { transform: translateY(-3px); opacity: 1; }
.pd-thumb.sel { border-color: var(--pd-accent); opacity: 1; }

/* incluye */
.pd-includes {
  position: relative; z-index: 2;
  background: var(--purple);
  border: 1px solid rgba(201, 162, 255, .18);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 36px);
  margin-top: 26px;
  white-space: pre-line;
}
.pd-includes h3 { font-family: var(--font-display); font-size: 22px; letter-spacing: 1px; margin-bottom: 10px; color: var(--pink); }
.pd-includes-body { color: var(--cream); font-size: 14.5px; line-height: 1.75; white-space: pre-line; }

/* relacionados */
.pd-related { position: relative; z-index: 2; margin-top: 60px; }
.pd-related h3 {
  font-family: var(--font-display); font-size: 24px; letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 22px;
}
.pd-related h3 i { font-style: normal; color: var(--pink); }
.pd-related .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* toast */
.toast { position: fixed; bottom: 26px; left: 50%; z-index: 120; translate: -50% 20px; background: var(--purple-mid); color: #fff; font-weight: 600; font-size: 14px; padding: 13px 26px; border-radius: 999px; border: 1px solid rgba(255, 46, 151, .5); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .25s ease, translate .25s ease; }
.toast.show { opacity: 1; translate: -50% 0; }

/* responsive */
@media (max-width: 860px) {
  .pd-card { grid-template-columns: 1fr; }
  .pd-right { order: -1; }
  #pdImg { width: min(100%, 340px); }
}
@media (max-width: 560px) {
  .pd-cta-row .btn { flex: 1; justify-content: center; }
}
