/*
 * Ficha de producto (products/show) y ficha de producto a pedido
 * (supplier-catalog/show): galería, compra, variantes, entrega, detalles y
 * reseñas. La interacción es mejora progresiva: public/js/product.js.
 */

/* ── Estructura ────────────────────────────────────────────────────────── */
.a-pdp {
  display: grid;
  /* minmax(0, 1fr): la columna no crece al min-content de la fila de compra (a 320px desbordaba). */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--a-space-6);
  align-items: start;
}

@media (min-width: 900px) {
  .a-pdp {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: var(--a-space-10);
  }

  /* La columna de compra es la más larga: la galería acompaña al hacer scroll. */
  .a-pdp__gallery {
    position: sticky;
    top: 9rem;
  }
}

/* ── Galería ───────────────────────────────────────────────────────────── */
.a-gallery {
  display: grid;
  gap: var(--a-space-3);
  min-width: 0;
}

@media (min-width: 900px) {
  .a-gallery:has(.a-gallery__thumbs:not([hidden])) {
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: start;
  }

  .a-gallery__thumbs { order: -1; flex-direction: column; max-height: 620px; overflow-x: hidden; overflow-y: auto; }
}

.a-gallery__stage {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius-xl);
  background: #fff;
}

.a-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.a-gallery__mark {
  position: absolute;
  right: var(--a-space-4);
  bottom: var(--a-space-4);
  width: 72px;
  height: auto;
  opacity: 0.16;
  pointer-events: none;
}

.a-gallery__flags {
  position: absolute;
  top: var(--a-space-3);
  left: var(--a-space-3);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.a-gallery__flags .a-badge { min-height: 26px; padding: 3px 10px; font-size: var(--a-text-sm); }

.a-gallery__hint {
  position: absolute;
  left: 50%;
  bottom: var(--a-space-3);
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--a-radius-pill);
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: var(--a-text-xs);
  font-weight: 600;
  transform: translateX(-50%);
  transition: opacity var(--a-dur) ease;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .a-gallery__hint { display: inline-flex; }
  .a-gallery__stage { cursor: zoom-in; }
}

.a-gallery__hint.is-hidden { opacity: 0; }

@media (max-width: 899px) {
  .a-gallery__hint { display: none !important; }
}

.a-gallery__thumbs {
  display: flex;
  gap: var(--a-space-2);
  overflow-x: auto;
  padding: 3px;
  scrollbar-width: none;
}

.a-gallery__thumbs::-webkit-scrollbar { display: none; }

.a-gallery__thumb {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  overflow: hidden;
  border: 1.5px solid var(--a-line);
  border-radius: var(--a-radius);
  background: #fff;
  transition: border-color var(--a-dur) ease;
}

.a-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.a-gallery__thumb:hover { border-color: var(--a-line-strong); }
.a-gallery__thumb[aria-current="true"] { border-color: var(--a-brand-700); box-shadow: 0 0 0 1px var(--a-brand-700); }

/* Lupa que sigue al cursor (product.js) */
.a-loupe {
  position: fixed;
  z-index: 80;
  width: 190px;
  height: 190px;
  border: 3px solid #fff;
  border-radius: 50%;
  background-color: #fff;
  background-repeat: no-repeat;
  box-shadow: var(--a-shadow-lg);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 160ms var(--a-ease-out), transform 160ms var(--a-ease-out);
  pointer-events: none;
}

.a-loupe.is-active { opacity: 1; transform: scale(1); }

/* ── Información y compra ──────────────────────────────────────────────── */
.a-pdp__info {
  display: grid;
  gap: var(--a-space-4);
  min-width: 0;
}

.a-pdp__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--a-space-2) var(--a-space-3);
  font-size: var(--a-text-sm);
  font-weight: 700;
}

.a-pdp__cat,
.a-pdp__cat:hover {
  color: var(--a-brand-700);
  text-decoration: underline;
  text-decoration-color: var(--a-brand-200);
  text-underline-offset: 0.25em;
}

.a-pdp__cat:hover { text-decoration-color: currentColor; }
.a-pdp__brand { color: var(--a-muted); }

.a-pdp__title {
  font-size: var(--a-text-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--a-ink);
}

.a-pdp__proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--a-space-2) var(--a-space-4);
  margin-top: calc(-1 * var(--a-space-1));
  font-size: var(--a-text-sm);
}

.a-pdp__rating,
.a-pdp__rating:hover {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  font-weight: 800;
  color: var(--a-ink);
}

.a-pdp__rating:hover .a-pdp__muted { text-decoration: underline; }

.a-pdp__muted {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  color: var(--a-muted);
}

/* "Personas viendo": punto verde que late. */
.a-pdp__live { font-weight: 600; color: var(--a-ink-2); }
.a-pdp__live-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-right: 2px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgb(16 185 129 / 0.45);
  animation: a-pdp-live 2s ease-out infinite;
}

@keyframes a-pdp-live {
  0% { box-shadow: 0 0 0 0 rgb(16 185 129 / 0.45); }
  70%, 100% { box-shadow: 0 0 0 7px rgb(16 185 129 / 0); }
}

@media (prefers-reduced-motion: reduce) {
  .a-pdp__live-dot { animation: none; box-shadow: 0 0 0 3px rgb(16 185 129 / 0.25); }
}

.a-pdp__price { padding-block: var(--a-space-1); }

.a-pdp__promo {
  display: grid;
  gap: var(--a-space-3);
  padding: var(--a-space-4);
  border: 1px solid var(--a-offer-100);
  border-radius: var(--a-radius-lg);
  background: var(--a-offer-50);
}

.a-pdp__promo .a-countdown__cell { background: var(--a-surface); }

.a-pdp__promo-link,
.a-pdp__promo-link:hover {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--a-text-sm);
  font-weight: 700;
  color: var(--a-offer-700);
}

.a-pdp__promo-link:hover { text-decoration: underline; }

/* Bloque de oferta: precio, ahorro, cuenta regresiva y "Parte de …" en un solo panel rosado claro. */
.a-pdp__price--offer {
  display: grid;
  gap: var(--a-space-3);
  padding: var(--a-space-4);
  border: 1px solid var(--a-offer-100);
  border-radius: var(--a-radius-lg);
  background: var(--a-offer-50);
}

.a-pdp__price--offer .a-pdp__promo { padding: 0; border: 0; background: none; }

.a-pdp__price--offer .a-price__save {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: var(--a-radius-sm);
  background: var(--a-success-50);
  font-size: var(--a-text-md);
  font-weight: 800;
}

.a-pdp__offer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--a-space-2);
}

.a-pdp__offer-name {
  font-size: var(--a-text-sm);
  font-weight: 800;
  color: var(--a-offer-700);
}

.a-pdp__promo-link .a-icon { flex-shrink: 0; }

/* Variantes */
.a-variants { display: grid; gap: var(--a-space-4); }

.a-variants__group { border: 0; min-width: 0; }

.a-variants__legend {
  margin-bottom: var(--a-space-2);
  font-size: var(--a-text-sm);
  font-weight: 600;
  color: var(--a-ink-2);
}

.a-variants__legend b { font-weight: 800; color: var(--a-ink); }

.a-variants__values { display: flex; flex-wrap: wrap; gap: var(--a-space-2); }

.a-variant {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--a-dur) ease, box-shadow var(--a-dur) ease, transform var(--a-dur-press) var(--a-ease-out);
}

.a-variant:active { transform: scale(0.96); }

.a-variant--chip {
  min-width: 48px;
  min-height: 44px;
  padding: 0 var(--a-space-4);
  border: 1.5px dashed var(--a-line-strong);
  border-radius: var(--a-radius);
  background: var(--a-surface);
  font-size: var(--a-text-md);
  font-weight: 700;
  color: var(--a-ink-2);
}

/* Variantes: borde punteado en reposo; la elegida pasa a borde sólido del acento. */
.a-variant--chip:hover { border-color: var(--a-brand-700); }

.a-variant--chip:has(input:checked) {
  border-style: solid;
  border-color: var(--a-brand-700);
  background: var(--a-brand-50);
  color: var(--a-brand-800);
  box-shadow: inset 0 0 0 1px var(--a-brand-700);
}

.a-variant--swatch {
  width: 44px;
  height: 44px;
  padding: 4px;
  border: 1.5px dashed var(--a-line-strong);
  border-radius: 50%;
}

.a-variant__dot {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--a-surface-3) center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14);
}

.a-variant--swatch:hover { border-color: var(--a-brand-700); }
.a-variant--swatch:has(input:checked) { border-style: solid; border-color: var(--a-brand-700); box-shadow: 0 0 0 1px var(--a-brand-700); }

.a-variant:has(input:focus-visible) { box-shadow: var(--a-focus); }

/* Combinación sin stock o inexistente (product.js) */
.a-variant.is-unavailable { opacity: 0.45; }
.a-variant--chip.is-unavailable span { text-decoration: line-through; }

.a-variant--swatch.is-unavailable::after {
  content: "";
  position: absolute;
  inset: 50% 4px auto;
  height: 1.5px;
  background: var(--a-ink-2);
  transform: rotate(-45deg);
}

.a-pdp__stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--a-text-md);
  font-weight: 700;
}

.a-pdp__stock.is-ok { color: var(--a-success); }
.a-pdp__stock.is-out { color: var(--a-muted); }
.a-pdp__stock.is-low { color: var(--a-offer-700); }

.a-pdp__buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--a-space-3);
}

.a-pdp__add { flex: 1 1 200px; }

.a-pdp__fav {
  width: 52px;
  height: 52px;
  border: 1.5px solid var(--a-line-strong);
  color: var(--a-ink-2);
}

.a-pdp__fav:hover { color: var(--a-offer-600); }
.a-pdp__fav.is-active { border-color: var(--a-offer-100); background: var(--a-offer-50); color: var(--a-offer-600); }
.a-pdp__fav.is-active svg { fill: currentColor; }

.a-pdp__buy .a-qty__btn { width: 48px; height: 48px; }

/* Celular: cantidad + "Agregar al carrito" en una fila; el favorito pasa a la esquina de la foto. */
.a-pdp { position: relative; }

@media (max-width: 599px) {
  .a-pdp__buy { flex-wrap: nowrap; }
  .a-pdp__buy .a-qty__btn { width: 40px; height: 48px; }
  .a-pdp__buy .a-qty__val { width: 2.25rem; }
  .a-pdp__add { flex: 1 1 0; min-width: 0; padding-inline: var(--a-space-4); }

  .a-pdp__fav {
    position: absolute;
    top: var(--a-space-3);
    right: calc(var(--a-gutter) + var(--a-space-3));
    z-index: 3;
    width: 44px;
    height: 44px;
    background: var(--a-surface);
    box-shadow: var(--a-shadow-sm);
  }
}

/* Entrega y pago */
.a-pdp__delivery {
  display: grid;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius-lg);
}

.a-pdp__delivery li {
  display: flex;
  gap: var(--a-space-3);
  padding: var(--a-space-3) var(--a-space-4);
  font-size: var(--a-text-sm);
  line-height: 1.45;
  color: var(--a-muted);
}

.a-pdp__delivery li + li { border-top: 1px solid var(--a-line); }
.a-pdp__delivery .a-icon { flex-shrink: 0; margin-top: 1px; color: var(--a-brand-700); }
.a-pdp__delivery b { display: block; font-size: var(--a-text-md); font-weight: 700; color: var(--a-ink); }

.a-pdp__share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--a-space-1);
  font-size: var(--a-text-sm);
  font-weight: 700;
  color: var(--a-muted);
}

.a-pdp__share > span:first-child { margin-right: var(--a-space-2); }
.a-pdp__share .a-iconbtn { border: 1px solid var(--a-line); }

.a-pdp__copied {
  margin-left: var(--a-space-2);
  color: var(--a-success);
}

/* ── Descripción y especificaciones ────────────────────────────────────── */
.a-pdp__details {
  display: grid;
  gap: var(--a-space-8);
}

@media (min-width: 900px) {
  .a-pdp__details:has(.a-pdp__block + .a-pdp__block) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: var(--a-space-12); }
}

.a-pdp__block-title {
  margin-bottom: var(--a-space-4);
  font-size: var(--a-text-xl);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.a-pdp__desc {
  max-width: 72ch;
  font-size: var(--a-text-base);
  line-height: 1.65;
  color: var(--a-ink-2);
}

.a-specs {
  overflow: hidden;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius-lg);
}

.a-specs > div {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--a-space-3);
  padding: var(--a-space-3) var(--a-space-4);
  font-size: var(--a-text-md);
}

.a-specs > div:nth-child(odd) { background: var(--a-surface-2); }
.a-specs dt { font-weight: 700; color: var(--a-ink-2); }
.a-specs dd { color: var(--a-ink); overflow-wrap: anywhere; }

/* ── Opiniones + preguntas frecuentes ──────────────────────────────────── */
/* Celular: una debajo de la otra. Escritorio: lado a lado desde la misma altura. */
.a-pdp__community { display: grid; gap: var(--a-section-gap); align-items: start; }
.a-pdp__community .faq-section { margin-block: 0; }

@media (min-width: 1024px) {
  .a-pdp__community:has(> .faq-section) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--a-space-10);
  }
  /* En media columna: resumen arriba, reseñas debajo; preguntas en una sola columna. */
  .a-pdp__community:has(> .faq-section) .a-reviews__grid { grid-template-columns: minmax(0, 1fr); gap: var(--a-space-6); }
  .a-pdp__community .faq-list { grid-template-columns: minmax(0, 1fr); gap: var(--a-space-2); }}

/* ── Reseñas ───────────────────────────────────────────────────────────── */
.a-reviews__grid {
  display: grid;
  gap: var(--a-space-6);
}

@media (min-width: 900px) {
  .a-reviews__grid { grid-template-columns: 340px minmax(0, 1fr); gap: var(--a-space-10); align-items: start; }
}

.a-reviews__side { display: grid; gap: var(--a-space-5); }

.a-reviews__score { display: flex; align-items: center; gap: var(--a-space-4); }

.a-reviews__avg {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--a-ink);
}

.a-reviews__count { margin-top: 4px; font-size: var(--a-text-sm); color: var(--a-muted); }

.a-reviews__bars { display: grid; gap: 6px; }

.a-reviews__bar {
  display: grid;
  grid-template-columns: 1ch 14px minmax(0, 1fr) 3.2ch;
  align-items: center;
  gap: 6px;
  font-size: var(--a-text-sm);
  font-weight: 600;
  color: var(--a-ink-2);
}

.a-reviews__bar-star { color: #b7791f; fill: currentColor; }

.a-reviews__track {
  height: 8px;
  overflow: hidden;
  border-radius: var(--a-radius-pill);
  background: var(--a-surface-3);
}

.a-reviews__fill {
  display: block;
  width: var(--pct, 0%);
  height: 100%;
  border-radius: inherit;
  background: #d99a00;
}

.a-reviews__pct { text-align: right; color: var(--a-muted); }

.a-reviews__write { display: grid; gap: var(--a-space-3); }
.a-reviews__write-title { font-size: var(--a-text-lg); font-weight: 800; }

.a-reviews__text {
  max-width: 70ch;
  font-size: var(--a-text-md);
  line-height: 1.6;
  color: var(--a-ink-2);
  overflow-wrap: anywhere;
}

.a-reviews__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--a-text-sm);
  font-weight: 600;
  color: var(--a-muted);
}

.a-reviews__items { display: grid; }

.a-review {
  display: grid;
  gap: var(--a-space-2);
  padding-block: var(--a-space-4);
  border-bottom: 1px solid var(--a-line);
}

.a-review:first-child { padding-top: 0; }
.a-review:last-child { border-bottom: 0; }

.a-review__head { display: flex; align-items: center; gap: var(--a-space-3); }

.a-review__avatar {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--a-brand-50);
  color: var(--a-brand-800);
  font-weight: 800;
}

.a-review__who { display: grid; flex: 1; min-width: 0; font-size: var(--a-text-md); }

.a-review__verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--a-text-xs);
  font-weight: 700;
  color: var(--a-success);
}

.a-review__date { font-size: var(--a-text-xs); color: var(--a-muted); white-space: nowrap; }

.a-review__reply {
  display: grid;
  gap: var(--a-space-2);
  margin-top: var(--a-space-2);
  padding: var(--a-space-3) var(--a-space-4);
  border: 1px solid var(--a-brand-100);
  border-radius: var(--a-radius);
  background: var(--a-brand-50);
}

@media (min-width: 560px) {
  .a-review__reply { margin-left: calc(38px + var(--a-space-3)); }
}

.a-review__reply-head { display: flex; align-items: center; gap: var(--a-space-2); }

.a-review__reply-mark {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--a-brand-700);
  color: var(--a-on-primary);
  font-size: var(--a-text-sm);
  font-weight: 800;
}

.a-review__reply-who { flex: 1; min-width: 0; font-size: var(--a-text-sm); color: var(--a-ink-2); }
.a-review__reply-who b { color: var(--a-ink); font-weight: 800; }

.a-review__reply-text {
  max-width: 70ch;
  font-size: var(--a-text-md);
  line-height: 1.6;
  color: var(--a-ink-2);
  overflow-wrap: anywhere;
}

.a-reviews__empty { margin-block: 0; }

/* Calificación del formulario: radios 5→1 en fila invertida para que
   :checked ~ label pinte la estrella elegida y las de su izquierda. */
.a-rate { border: 0; }

.a-rate__stars {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 2px;
  margin-top: 6px;
}

.a-rate__stars label {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--a-radius-sm);
  color: var(--a-line-strong);
  cursor: pointer;
  transition: color var(--a-dur) ease, transform var(--a-dur-press) var(--a-ease-out);
}

.a-rate__stars label:active { transform: scale(0.9); }

.a-rate__stars input:checked ~ label,
.a-rate__stars label:hover,
.a-rate__stars label:hover ~ label { color: #d99a00; }

.a-rate__stars input:checked ~ label .a-icon,
.a-rate__stars label:hover .a-icon,
.a-rate__stars label:hover ~ label .a-icon { fill: currentColor; }

.a-rate__stars input:focus-visible + label { box-shadow: var(--a-focus); }

/* ── Ficha a pedido (supplier-catalog/show) ────────────────────────────── */
.a-pdp__note {
  display: flex;
  gap: var(--a-space-2);
  padding: var(--a-space-3) var(--a-space-4);
  border-radius: var(--a-radius);
  background: var(--a-surface-2);
  font-size: var(--a-text-sm);
  line-height: 1.45;
  color: var(--a-ink-2);
}

.a-pdp__note .a-icon { flex-shrink: 0; margin-top: 1px; color: var(--a-brand-700); }

.a-pdp__tags { display: flex; flex-wrap: wrap; gap: 6px; }

.a-pdp__tags span {
  padding: 4px 10px;
  border-radius: var(--a-radius-pill);
  background: var(--a-surface-2);
  font-size: var(--a-text-sm);
  color: var(--a-ink-2);
}

.a-gallery__empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--a-line-strong);
}

@media (prefers-reduced-motion: reduce) {
  .a-loupe { transition: none; }
}

/* A 320px cantidad + "Agregar al carrito" no caben en una línea: el botón baja entero (nunca a dos líneas). */
@media (max-width: 359px) {
  .a-pdp__buy { flex-wrap: wrap; }
  .a-pdp__add { flex-basis: 100%; }
}

/* "Parte de …": una línea; un título largo se corta con puntos suspensivos en vez de partir el link. */
.a-pdp__promo-link { min-width: 0; max-width: 100%; }
.a-pdp__promo-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ── Animaciones de la ficha ───────────────────────────────────────────── */
/* Todo solo si la persona no pidió menos movimiento; sin esto la ficha se ve igual, quieta. */
@keyframes a-pdp-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes a-pdp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes a-pdp-zoom { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes a-pdp-swap { from { opacity: 0.25; transform: scale(1.02); } to { opacity: 1; transform: none; } }
@keyframes a-pdp-flash {
  0% { transform: scale(1); }
  35% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@keyframes a-pdp-heart {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  60% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: no-preference) {
  /* Entrada: la foto aparece y la información sube en cascada. */
  .a-pdp__gallery { animation: a-pdp-zoom 560ms var(--a-ease-out) both; }
  /* backwards y no both: con both la animación sigue "activa" y el transform convierte a cada bloque en la referencia
     de los absolute; en celular el favorito terminaba encima de "Agregar al carrito" en vez de en la foto */
  .a-pdp__info > * { animation: a-pdp-rise 520ms var(--a-ease-out) backwards; }
  .a-pdp__info > :nth-child(1) { animation-delay: 60ms; }
  .a-pdp__info > :nth-child(2) { animation-delay: 110ms; }
  .a-pdp__info > :nth-child(3) { animation-delay: 160ms; }
  .a-pdp__info > :nth-child(4) { animation-delay: 210ms; }
  .a-pdp__info > :nth-child(5) { animation-delay: 260ms; }
  .a-pdp__info > :nth-child(6) { animation-delay: 310ms; }
  .a-pdp__info > :nth-child(7) { animation-delay: 360ms; }
  .a-pdp__info > :nth-child(n + 8) { animation-delay: 410ms; }

  /* Celular: la fila de compra contiene el favorito absoluto; solo fundido, sin transform, para que no salte de sitio */
  @media (max-width: 599px) {
    .a-pdp__info > .a-pdp__buy { animation-name: a-pdp-fade; }
  }

  /* Cambio de foto (miniatura o variante): fundido corto. */
  .a-gallery__img.is-swap { animation: a-pdp-swap 360ms var(--a-ease-out); }

  /* Miniaturas: se levantan un poco al pasar el mouse. */
  .a-gallery__thumb { transition: transform 200ms var(--a-ease-out), border-color 200ms ease, box-shadow 200ms ease; }

  /* Precio que cambia al elegir variante: un latido. */
  .a-pdp__price .a-price.is-flash { animation: a-pdp-flash 420ms var(--a-ease-out); transform-origin: left center; }

  /* Variantes: transición suave al elegir. */
  .a-variant { transition: transform 160ms var(--a-ease-out), border-color 200ms ease, box-shadow 200ms ease; }

  /* Botones de compra. */
  .a-pdp__add,
  .a-pdp__wa { transition: transform 200ms var(--a-ease-out), box-shadow 200ms ease, background-color 200ms ease; }
  .a-pdp__add:active:not(:disabled),
  .a-pdp__wa:active { transform: scale(0.97); }
  .a-pdp__add .a-icon { transition: transform 260ms var(--a-ease-out); }

  /* Favorito: el corazón late al marcarlo. */
  .a-pdp__fav.is-active .a-icon { animation: a-pdp-heart 480ms var(--a-ease-out); }

  /* Entrega y pago: el ícono se mueve un poco al pasar el mouse. */
  .a-pdp__delivery li .a-icon { transition: transform 240ms var(--a-ease-out); }

  /* Compartir: los íconos suben. */
  .a-pdp__share .a-iconbtn { transition: transform 200ms var(--a-ease-out), background-color 200ms ease; }

  @media (hover: hover) {
    .a-gallery__thumb:hover { transform: translateY(-2px); }
    .a-variant--swatch:hover,
    .a-variant--chip:hover { transform: translateY(-2px); }
    .a-pdp__add:hover:not(:disabled),
    .a-pdp__wa:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgb(15 23 42 / 0.45); }
    .a-pdp__add:hover:not(:disabled) .a-icon { transform: translateX(-2px) rotate(-8deg); }
    .a-pdp__delivery li:hover .a-icon { transform: translateX(3px) scale(1.08); }
    .a-pdp__share .a-iconbtn:hover { transform: translateY(-3px); }
    .a-variant--swatch:hover:active,
    .a-variant--chip:hover:active { transform: scale(0.96); }
  }
}
