/* =============================================================
   Página individual de producto
   ============================================================= */
.pd { padding: calc(var(--nav-h) + 32px) 0 90px; background: var(--cream); }
.pd-crumbs { font-size: .8rem; color: var(--ink-mute); margin-bottom: 24px; }
.pd-crumbs a { color: var(--ink-mute); }
.pd-crumbs a:hover { color: var(--forest); }
.pd-crumbs span { margin: 0 4px; }
.pd__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }

.pd-gallery { position: sticky; top: calc(var(--nav-h) + 20px); }
.pd-gallery__main { border-radius: 20px; overflow: hidden; background: var(--sand); aspect-ratio: 4/5; }
.pd-gallery__main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.pd-gallery__main img.is-loading { opacity: .3; }
.pd-gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.pd-gallery--single .pd-gallery__thumbs { display: none; }
.pd-thumb {
  flex: 0 0 76px; height: 92px; padding: 0; border: 2px solid transparent; border-radius: 10px;
  overflow: hidden; cursor: pointer; background: var(--sand); opacity: .7; transition: opacity .2s, border-color .2s;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb:hover { opacity: 1; }
.pd-thumb.is-active { border-color: var(--forest); opacity: 1; }

.pd-info h1 { font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.1; margin: 10px 0 20px; color: var(--forest); }
.pd-info__lead { font-size: 1.04rem; line-height: 1.75; color: var(--ink-soft); margin-bottom: 28px; }
.pd-price { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); margin-bottom: 30px; }
.pd-price > div { padding: 18px 22px; }
.pd-price > div + div { border-left: 1px solid var(--line); }
.pd-price span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--ink-mute); margin-bottom: 4px; }
.pd-price strong { font-size: 1.1rem; color: var(--forest); }
.pd-info__h { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: 1.4px; color: var(--sage); margin-bottom: 12px; }
.pd-list { list-style: none; padding: 0; margin: 0 0 24px; }
.pd-list li { position: relative; padding: 9px 0 9px 26px; border-bottom: 1px solid var(--line); font-size: .95rem; color: var(--ink-soft); }
.pd-list li::before { content: ''; position: absolute; left: 4px; top: 16px; width: 9px; height: 9px; border-radius: 50% 0; background: var(--sage); }
.pd-ideal { font-size: .92rem; color: var(--ink-soft); margin-bottom: 30px; }
.pd-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.pd-actions .btn { white-space: nowrap; }
.pd-note { margin-top: 14px; font-size: .82rem; color: var(--ink-mute); }

.pd-steps { background: var(--forest); color: var(--cream); padding: 64px 0; }
.pd-steps ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: s; }
.pd-steps li { counter-increment: s; }
.pd-steps li::before { content: '0' counter(s); display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--mint); margin-bottom: 8px; }
.pd-steps strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.pd-steps span { font-size: .88rem; opacity: .75; line-height: 1.5; }

.pd-related { padding: 90px 0; background: var(--cream); }
.pd-related h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 32px; }
.pd-related .reveal { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .pd__grid { grid-template-columns: 1fr; gap: 32px; }
  .pd-gallery { position: static; }
  .pd-gallery__main { aspect-ratio: 1/1; }
  .pd-steps ol { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .pd-price { grid-template-columns: 1fr; }
  .pd-price > div + div { border-left: 0; border-top: 1px solid var(--line); }
}

/* Proporción carta 8,5x11 */
.pd-gallery__main { aspect-ratio: 8.5 / 11; }
.pd-thumb { flex: 0 0 72px; height: auto; aspect-ratio: 8.5 / 11; }
@media (max-width: 960px) { .pd-gallery__main { aspect-ratio: 8.5 / 11; max-width: 560px; margin: 0 auto; } }

/* Flechas y contador de la galería */
.pd-gallery__main { position: relative; touch-action: pan-y; }
.pd-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.9); color: var(--forest); font-size: 1.9rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding-bottom: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15); transition: background .2s, transform .2s;
}
.pd-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.pd-arrow--prev { left: 14px; }
.pd-arrow--next { right: 14px; }
.pd-counter {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 4px 12px; border-radius: 50px; background: rgba(15,46,26,.7); color: #fff; font-size: .78rem;
}
@media (max-width: 540px) { .pd-arrow { width: 38px; height: 38px; font-size: 1.6rem; } }

/* Evita que la tira de miniaturas ensanche la columna en celular */
.pd__grid > * { min-width: 0; }

/* Variaciones del producto */
.pd-variants { margin: 0 0 26px; }
.pd-variants ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pd-variants li { padding: 6px 14px; border-radius: 50px; background: var(--paper); border: 1px solid var(--line); font-size: .88rem; }
