/* Onawa — página de producto. Usa los tokens y piezas de styles.css. */

/* ── Estructura ──────────────────────────────────── */
.pdp__top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.pdp__stage {
  position: sticky; top: 0; height: 100vh;
  overflow: hidden; display: grid; place-items: center;
}
.pdp__glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(46% 38% at 50% 58%, color-mix(in srgb, var(--glow, #e4783f) 42%, transparent), color-mix(in srgb, var(--glow, #c9a27a) 10%, transparent) 55%, rgba(22, 17, 13, 0) 80%),
    radial-gradient(90% 70% at 50% 100%, var(--tint, #3a2416) 0%, rgba(22, 17, 13, 0) 72%);
}
.pdp__giant {
  position: absolute; left: 0; right: 0; top: 50%;
  translate: 0 -62%;
  display: flex; justify-content: center; pointer-events: none;
  font-size: min(17vw, calc(92vw / var(--n, 6))); font-weight: 800; letter-spacing: -.06em; line-height: 1;
  color: color-mix(in srgb, var(--glow, #c9a27a) 20%, transparent);
  white-space: nowrap;
}
.pdp__giant span { display: inline-block; }
/* Objetos del café (notas de cata y planta) flotando alrededor de la bolsa: unos detrás y otros delante */
.pdp__items { position: absolute; inset: 0; pointer-events: none; }
.pdp__item {
  position: absolute; left: var(--x); top: var(--y); width: calc(var(--s) * 1vmin); height: auto;
  margin: calc(var(--s) * -.5vmin) 0 0 calc(var(--s) * -.5vmin);
  opacity: 0; scale: .35; filter: blur(var(--b, 0px)) brightness(var(--l, 1));
  translate: calc(var(--px, 0) * var(--d) * 1px) calc(var(--py, 0) * var(--d) * 1px);
  transition: opacity .9s var(--ease), scale 1.3s var(--ease), translate .6s var(--ease);
  transition-delay: calc(var(--i) * 110ms + 250ms), calc(var(--i) * 110ms + 250ms), 0s;
  animation: pdp-float var(--t, 7s) ease-in-out infinite alternate; animation-delay: calc(var(--i) * -1.3s);
}
.is-3d .pdp__item, html:not(.motion) .pdp__item { opacity: 1; scale: 1; }
.pdp__item--1 { --x: 17%; --y: 24%; --s: 15; --d: 16; --i: 0; --t: 7s; }
.pdp__item--4 { --x: 88%; --y: 71%; --s: 19; --d: 26; --i: 3; --t: 8.5s; --b: 1.5px; }
.pdp__item--2 { --x: 81%; --y: 20%; --s: 11; --d: -9; --i: 1; --t: 6.2s; --b: 2px; --l: .82; }
.pdp__item--3 { --x: 13%; --y: 68%; --s: 10; --d: -12; --i: 2; --t: 9s; --b: 3px; --l: .74; }
.pdp__item--5 { --x: 68%; --y: 90%; --s: 8; --d: -6; --i: 4; --t: 7.6s; --b: 4px; --l: .7; }
@keyframes pdp-float { from { transform: translate3d(0, -9px, 0) rotate(-6deg); } to { transform: translate3d(0, 11px, 0) rotate(7deg); } }
html:not(.motion) .pdp__item { animation: none; }
/* El escenario no acaba en un corte: el 3D y la luz se funden hacia el borde con el panel */
@media (min-width: 861px) {
  .pdp__canvas, .pdp__glow { -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 84%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 84%, transparent); }
}
@media (min-width: 861px) and (max-width: 1279px) { .pdp__giant { display: none; } } /* a ese ancho solo asomaban dos trazos de la palabra */
@media (prefers-reduced-motion: reduce) { .pdp__item { animation: none; } }
.pdp__canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; opacity: 0; transition: opacity 1s var(--ease); }
.pdp__canvas.is-grabbing { cursor: grabbing; }
.is-3d .pdp__canvas { opacity: 1; }
.pdp__fallback { position: relative; width: auto; height: 58%; max-height: 560px; border-radius: 18px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7); transition: opacity .6s; }
.is-3d .pdp__fallback { opacity: 0; }
.pdp__hint {
  position: absolute; left: 50%; bottom: 32px; translate: -50% 0;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 12px; border-radius: 999px;
  background: rgba(22, 17, 13, .66); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px; font-weight: 500; color: var(--mute);
  pointer-events: none; white-space: nowrap; transition: opacity .6s, translate .6s var(--ease);
}
.pdp__hint svg { width: 18px; height: 18px; fill: none; stroke: var(--ray); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.motion .pdp__hint svg { animation: spinhint 2.6s var(--ease) infinite; }
@keyframes spinhint { 0%, 30% { transform: rotate(0); } 70%, 100% { transform: rotate(360deg); } }
.pdp__hint.is-gone { opacity: 0; translate: -50% 12px; }

.pdp__panel { padding: 0 var(--gut) 0 clamp(16px, 3vw, 48px); }
.pdp__buy { min-height: 100vh; display: grid; align-content: center; gap: 0; padding: 96px 0 32px; }
.pdp__chapter { min-height: 100vh; display: grid; align-content: center; padding: 100px 0; }

/* ── Compra ──────────────────────────────────────── */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--mute); margin-bottom: 16px; }
.crumbs a:hover { color: var(--cream); }
.pdp__h1 { display: flex; flex-direction: column-reverse; align-items: flex-start; font-weight: inherit; }
.pdp__h1 .eyebrow { display: block; }
.pdp__title { display: block; margin-top: 12px; font-size: clamp(48px, 5.4vw, 88px); line-height: .9; letter-spacing: -.055em; font-weight: 800; }
.pdp__lede { margin-top: 18px; max-width: 40ch; color: var(--mute); font-size: 18px; }
.pdp__price { margin-top: 20px; display: flex; align-items: baseline; gap: 12px; }
.pdp__price b { font-size: 40px; letter-spacing: -.04em; font-weight: 700; font-variant-numeric: tabular-nums; }
.pdp__price span { color: var(--mute); }

.opt { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.opt legend { padding: 0; margin-bottom: 12px; font-family: var(--f-label); font-weight: 600; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ray); }
.opt legend span { margin-left: 10px; font-family: var(--f-display); font-weight: 400; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--mute); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: none; box-shadow: inset 0 0 0 1px rgba(243, 234, 223, .22); color: var(--cream); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: background-color .3s, color .3s, box-shadow .3s; }
.chips button[aria-checked="true"] { background: var(--cream); color: var(--ink); box-shadow: none; }
@media (hover: hover) { .chips button:hover { box-shadow: inset 0 0 0 1px rgba(243, 234, 223, .5); } }

.pdp__add { margin-top: 18px; display: flex; gap: 12px; max-width: 520px; }
.qty { display: inline-flex; align-items: center; height: 54px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(243, 234, 223, .22); }
.qty button { width: 46px; height: 100%; border: 0; background: none; color: var(--cream); font-size: 20px; cursor: pointer; }
.qty output { min-width: 22px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.pdp__cta { flex: 1; justify-content: center; font-variant-numeric: tabular-nums; }
.grindline { margin-top: 10px; font-size: 14px; color: var(--mute); min-height: 1.5em; }
.pdp__perks { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--mute); }
.pdp__perks li::before { content: "✓"; color: var(--ray); margin-right: 6px; }

.upsell--pdp { margin-top: 16px; max-width: 520px; width: 100%; background: rgba(243, 234, 223, .05); box-shadow: inset 0 0 0 1px var(--line); color: var(--mute); }
.upsell--pdp b { color: var(--cream); }
.upsell--pdp em { color: var(--ray); }
@media (hover: hover) { .upsell--pdp:hover { background: rgba(243, 234, 223, .09); } }

/* ── Capítulos ───────────────────────────────────── */
.specs { margin: 40px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px; }
.specs div { border-top: 1px solid var(--line); padding-top: 14px; }
.specs dt { font-family: var(--f-label); font-weight: 600; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.specs dd { margin: 6px 0 0; font-size: clamp(24px, 2.2vw, 34px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.pdp__text { margin-top: 34px; max-width: 46ch; color: var(--mute); font-size: 18px; }
.pdp__gone { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(243, 234, 223, .1); font-size: 15px; line-height: 1.4; }
.pdp__gone a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.pdp__small { margin-top: 18px; font-size: 14px; color: var(--mute); }

.bignotes { list-style: none; padding: 0; margin: 22px 0 0; }
.bignotes li { font-size: clamp(54px, 6.6vw, 112px); font-weight: 800; letter-spacing: -.055em; line-height: .98; color: var(--c); }
.motion .bignotes li { opacity: .14; }

.tabs { margin-top: 32px; display: inline-flex; gap: 6px; padding: 4px; border-radius: 999px; background: rgba(243, 234, 223, .07); box-shadow: inset 0 0 0 1px var(--line); justify-self: start; }
.tabs button { height: 42px; padding: 0 20px; border: 0; border-radius: 999px; background: none; color: var(--cream); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; transition: background-color .35s, color .35s; }
.tabs button[aria-selected="true"] { background: var(--cream); color: var(--ink); }
.recipe { margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.recipe div { border-top: 1px solid var(--line); padding-top: 14px; }
.recipe dt { font-family: var(--f-label); font-weight: 600; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.recipe dd { margin: 6px 0 0; font-size: clamp(26px, 2.4vw, 36px); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pdp__brew .btn { justify-self: start; margin-top: 22px; background: none; }

/* ── Más orígenes (sección clara) ────────────────── */
.pdp__more { background: var(--cream); color: var(--ink); padding: clamp(90px, 14vh, 160px) var(--gut); border-radius: 36px 36px 0 0; position: relative; z-index: 1; }
.pdp__more header { max-width: 1320px; margin: 0 auto 48px; }
.pdp__more .eyebrow, .pdp__more .h2 em { color: var(--ray-d); }
.more__grid { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.more__card { position: relative; border-radius: var(--r); overflow: hidden; color: var(--cream); display: grid; background: radial-gradient(70% 55% at 50% 42%, color-mix(in srgb, var(--glow) 34%, var(--tint)), var(--tint) 78%); aspect-ratio: 1 / 1.12; }
.more__card img { position: absolute; left: 50%; top: 9%; height: 64%; width: auto; max-width: none; translate: -50% 0; border-radius: 10px; box-shadow: 0 30px 50px -22px rgba(0, 0, 0, .7); transition: scale 1.2s var(--ease), rotate 1.2s var(--ease); }
.more__card span { grid-area: 1 / 1; align-self: end; display: grid; gap: 2px; padding: 22px; color: rgba(243, 234, 223, .78); font-size: 14px; }
.more__card b { font-size: 26px; letter-spacing: -.03em; color: var(--cream); }
@media (hover: hover) { .more__card:hover img { scale: 1.05; rotate: -3deg; } }

/* ── Móvil ───────────────────────────────────────── */
@media (max-width: 860px) {
  .pdp__top { grid-template-columns: 1fr; }
  .pdp__stage { position: relative; height: 72svh; min-height: 460px; }
  .pdp__canvas, .pdp__glow { -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent); mask-image: linear-gradient(180deg, #000 78%, transparent); }
  /* en el móvil la bolsa ocupa casi todo el ancho: los objetos van arriba y a la izquierda, lejos de la pegatina */
  .pdp__item--1 { --x: 13%; --y: 17%; --s: 17; }
  .pdp__item--4 { --x: 10%; --y: 80%; --s: 18; }
  .pdp__item--2 { --x: 88%; --y: 13%; --s: 13; }
  .pdp__item--3 { --x: 8%; --y: 50%; --s: 11; }
  .pdp__item--5 { --x: 92%; --y: 37%; --s: 10; }
  .pdp__giant { font-size: min(31vw, calc(150vw / var(--n, 6))); translate: 0 -78%; }
  .pdp__hint { bottom: 18px; }
  .pdp__panel { padding: 0 var(--gut); }
  .pdp__buy { min-height: 0; padding: 18px 0 40px; }
  .pdp__chapter { min-height: 0; padding: 70px 0; }
  .crumbs { display: none; }
  .pdp__add { position: relative; }
  .recipe { grid-template-columns: 1fr 1fr; }
  .more__grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(72vw, 320px); overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gut)); padding: 2px var(--gut) 8px; scroll-padding-inline: var(--gut); scrollbar-width: none; }
  .more__grid::-webkit-scrollbar { display: none; }
  .more__card { scroll-snap-align: start; }
  .more__card img { top: 7%; height: 57%; }
  .more__card span { padding: 18px 20px 20px; }
  .pdp__more { border-radius: 28px 28px 0 0; }
}

/* Entrada: oculto solo si hay movimiento (GSAP lo muestra) */
.motion .pdp__buy > * { opacity: 0; }
