/* ==========================================================
   OkiDoki — estilos de la web pública
   Paleta y tipografías según el Manual de Marca 2026
   ========================================================== */

/* Si la tienda instala las fuentes oficiales (Sugo Pro Display / Cocomat Pro) se usan solas;
   si no, entran las alternativas gratuitas parecidas (Barlow Condensed / Quicksand). */
@font-face { font-family: "Sugo Pro Display"; src: local("Sugo Pro Display"), local("SugoProDisplay-Regular"); font-display: swap; }
@font-face { font-family: "Cocomat Pro"; src: local("Cocomat Pro"), local("CocomatPro-Regular"); font-display: swap; }

:root {
  --sky: #22bae1;
  --crimson: #e7255b;
  --orange: #f7a929;
  --olive: #bacf02;
  --aqua: #78d0d9;
  --lime: #bcf900;
  --white: #ffffff;
  --ink: #1b0a35;
  --paper: #fafaff;
  --tint: #eefbff;

  --f-display: "Sugo Pro Display", "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: "Cocomat Pro", "Quicksand", system-ui, sans-serif;

  --r-lg: 32px;
  --r-md: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-weight: 600; font-size: 1.05rem; line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.nw { white-space: nowrap; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 800; line-height: 1; margin: 0; letter-spacing: .005em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--ink); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .95em 1.7em; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--bg); color: var(--fg); text-decoration: none;
  font: 800 1.12rem/1 var(--f-display); letter-spacing: .03em; text-transform: uppercase;
  transition: transform .35s var(--spring), box-shadow .3s var(--ease), filter .2s;
  box-shadow: 0 6px 0 rgba(27, 10, 53, .22);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 10px 0 rgba(27, 10, 53, .22); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(27, 10, 53, .22); }
.btn--lime { --bg: var(--lime); --fg: var(--ink); }
.btn--white { --bg: #fff; --fg: var(--ink); }
.btn--crimson { --bg: var(--crimson); --fg: #fff; }
.btn--ink { --bg: var(--ink); --fg: #fff; }
.btn--sm { padding: .7em 1.2em; font-size: 1rem; box-shadow: 0 4px 0 rgba(27, 10, 53, .22); }
.btn[hidden] { display: none; }

/* ---------- Cabecera ---------- */
.topbar { position: fixed; inset: 12px 0 auto; z-index: 50; padding: 0 var(--gutter); pointer-events: none; }
.topbar__in {
  pointer-events: auto; max-width: var(--max); margin: 0 auto; display: flex; align-items: center; gap: 18px;
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-radius: 999px; padding: 8px 12px 8px 24px; box-shadow: 0 8px 30px rgba(27, 10, 53, .12);
  transition: transform .4s var(--ease), box-shadow .3s;
}
.topbar.is-scrolled .topbar__in { box-shadow: 0 10px 34px rgba(27, 10, 53, .2); }
.topbar__logo img { height: 34px; width: auto; }
.nav { margin-left: auto; display: flex; gap: 6px; }
.nav a {
  text-decoration: none; padding: .55em 1em; border-radius: 999px; font-family: var(--f-display); font-weight: 700;
  font-size: 1.1rem; letter-spacing: .03em; text-transform: uppercase; transition: background .2s, color .2s;
}
.nav a:hover { background: var(--lime); }
.burger { display: none; margin-left: auto; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--sky); cursor: pointer; position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 3px; border-radius: 3px; background: #fff; transition: transform .3s var(--ease), opacity .2s; }
.burger span:nth-child(1) { top: 15px; } .burger span:nth-child(2) { top: 22px; } .burger span:nth-child(3) { top: 29px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .burger { display: block; }
  .topbar__in { padding: 8px 8px 8px 20px; }
  .topbar .btn { display: none; }
  .nav {
    position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 10px); flex-direction: column; gap: 2px;
    background: #fff; border-radius: var(--r-md); padding: 10px; box-shadow: 0 16px 40px rgba(27, 10, 53, .22);
    opacity: 0; transform: translateY(-10px) scale(.97); pointer-events: none; transition: opacity .25s, transform .35s var(--spring);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: .8em 1em; font-size: 1.3rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--sky); padding: 110px var(--gutter) 130px; overflow: hidden; isolation: isolate; }
.hero__mark { position: absolute; right: -6%; top: 6%; width: min(62vw, 760px); opacity: .55; z-index: -1; pointer-events: none; }
.hero__in { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(8px, 3vw, 40px); align-items: center; min-height: min(78vh, 720px); }
.eyebrow {
  display: inline-block; font: 700 1.05rem/1 var(--f-display); letter-spacing: .16em; text-transform: uppercase;
  background: #fff; color: var(--ink); padding: .6em 1.1em; border-radius: 999px; margin-bottom: 22px;
}
.eyebrow--ink { background: var(--ink); color: #fff; }
.hero h1 { font-size: clamp(3rem, 7vw, 6.2rem); color: var(--ink); text-wrap: balance; }
.hl { position: relative; display: inline-block; color: #fff; z-index: 0; padding: 0 .12em; }
.hl::before { content: ""; position: absolute; inset: 8% -2% 0; background: var(--crimson); border-radius: .22em; transform: rotate(-2deg); z-index: -1; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.35rem); max-width: 34ch; margin-top: 22px; color: var(--ink); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.stage { position: relative; height: clamp(440px, 68vh, 700px); }
.stage__3d { position: absolute; inset: 0; touch-action: pan-y; }
.pinata-canvas { width: 100%; height: 100%; display: block; }
.stage__hint { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: center; align-items: center; gap: 10px; pointer-events: none; flex-wrap: wrap; }
.hint__bubble, .hint__btn {
  pointer-events: auto; background: #fff; color: var(--ink); border-radius: 999px; padding: .65em 1.2em;
  font: 800 1.05rem/1 var(--f-display); letter-spacing: .05em; text-transform: uppercase; box-shadow: 0 5px 0 rgba(27, 10, 53, .2);
}
.hint__bubble { animation: bob 2.4s ease-in-out infinite; }
.hint__btn { border: 0; cursor: pointer; background: var(--lime); transition: transform .3s var(--spring); }
.hint__btn:hover { transform: scale(1.06) rotate(-2deg); }
.stage__fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.stage__fallback img { width: min(60%, 320px); }
@keyframes bob { 50% { transform: translateY(-6px); } }

.bubbles i {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: var(--c);
  z-index: -1; animation: drift 7s ease-in-out infinite; animation-delay: calc(var(--v) * -3s);
  translate: 0 calc(var(--sy, 0) * var(--v) * -0.12px);
}
@keyframes drift { 50% { transform: translate(10px, -18px) scale(1.08); } }
.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: clamp(50px, 8vw, 110px); fill: var(--lime); }

@media (max-width: 900px) {
  .hero { padding-top: 100px; padding-bottom: 110px; }
  .hero__in { grid-template-columns: 1fr; min-height: 0; }
  .hero__copy { text-align: center; }
  .lead { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .stage { height: clamp(380px, 62vh, 560px); }
}

/* ---------- Cinta ---------- */
.ribbon { background: var(--lime); border-block: 4px solid var(--ink); overflow: hidden; padding: 14px 0; transform: rotate(-1.2deg) scale(1.03); margin: -6px 0 30px; position: relative; z-index: 2; }
.ribbon__track { display: flex; gap: 28px; width: max-content; white-space: nowrap; font: 800 clamp(1.5rem, 3.4vw, 2.3rem)/1 var(--f-display); text-transform: uppercase; animation: marquee 32s linear infinite; }
.ribbon__track b { color: var(--crimson); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Secciones ---------- */
.sec { padding: clamp(56px, 9vw, 120px) var(--gutter); max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; }
.sec--tint { max-width: none; background: var(--tint); }
.sec--tint > * { max-width: var(--max); margin-inline: auto; }
.sec__head { text-align: center; margin-bottom: clamp(28px, 5vw, 56px); }
.sec__head h2 { font-size: clamp(2.8rem, 7vw, 5.4rem); }
.sec__head .eyebrow { margin-bottom: 18px; }
.sec__sub { margin-top: 14px; color: rgba(27, 10, 53, .78); }

/* ---------- Categorías ---------- */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 28px); }
.cat {
  --tx: 0deg; --ty: 0deg;
  position: relative; border-radius: var(--r-lg); padding: 28px 28px 30px; min-height: 470px; display: flex; flex-direction: column; justify-content: flex-end;
  text-decoration: none; overflow: hidden; background: var(--bg); color: var(--fg);
  transform: perspective(900px) rotateX(var(--tx)) rotateY(var(--ty)); transition: transform .25s var(--ease), box-shadow .3s;
  box-shadow: 0 10px 0 rgba(27, 10, 53, .14); isolation: isolate; cursor: pointer; border: 0; text-align: left; font: inherit;
}
.cat:hover { box-shadow: 0 16px 0 rgba(27, 10, 53, .18); }
.cat svg { position: absolute; top: 26px; right: 0; left: 0; margin: auto; width: 54%; max-width: 230px; transition: transform .5s var(--spring); z-index: -1; filter: drop-shadow(0 14px 0 rgba(27,10,53,.12)); }
.cat:hover svg { transform: translateY(-8px) rotate(-4deg) scale(1.05); }
.cat::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .18); z-index: -2; }
.cat h3 { font-size: clamp(2.2rem, 4vw, 3rem); }
.cat p { margin-top: 8px; font-weight: 700; max-width: 26ch; }
.cat .go { margin-top: 16px; display: inline-flex; width: 46px; height: 46px; border-radius: 50%; background: var(--fg); color: var(--bg); align-items: center; justify-content: center; font-size: 1.5rem; transition: transform .3s var(--spring); }
.cat:hover .go { transform: translateX(6px) rotate(-8deg); }
@media (max-width: 860px) { .cats { grid-template-columns: 1fr; } .cat { min-height: 400px; } .cat svg { width: 46%; max-width: 210px; } }

/* ---------- Filtros ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 34px; }
.chip {
  border: 3px solid var(--ink); background: #fff; color: var(--ink); border-radius: 999px; padding: .55em 1.2em; cursor: pointer;
  font: 800 1.1rem/1 var(--f-display); letter-spacing: .04em; text-transform: uppercase; transition: transform .3s var(--spring), background .2s;
}
.chip:hover { transform: translateY(-2px) rotate(-1.5deg); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.demo-note { text-align: center; background: #fff7d6; border: 2px dashed var(--orange); border-radius: 16px; padding: 12px 18px; margin: 0 auto 28px; max-width: 640px; font-size: .98rem; }
.empty { text-align: center; padding: 40px 0; font-size: 1.2rem; }

/* ---------- Tarjetas de producto ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(16px, 2.2vw, 26px); }
.card {
  --tx: 0deg; --ty: 0deg; --cat: var(--sky);
  background: #fff; border-radius: var(--r-md); overflow: hidden; cursor: pointer; text-align: left; border: 0; padding: 0; font: inherit; color: inherit;
  box-shadow: 0 8px 0 rgba(27, 10, 53, .12), 0 0 0 3px var(--cat) inset;
  transform: perspective(900px) rotateX(var(--tx)) rotateY(var(--ty)); transition: transform .25s var(--ease), box-shadow .3s;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: 0 14px 0 rgba(27, 10, 53, .16), 0 0 0 3px var(--cat) inset; }
.card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.07); }
.card.is-out .card__media img { filter: grayscale(.85); opacity: .7; }
.badge {
  display: inline-block; padding: .45em .9em; border-radius: 999px; background: var(--cat, var(--sky)); color: var(--on, #fff);
  font: 800 .98rem/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase;
}
.card__media .badge { position: absolute; top: 12px; right: 12px; }
.card__media .badge--stock { background: #fff; color: var(--ink); box-shadow: 0 3px 0 rgba(27, 10, 53, .16); }
.card__cat { display: inline-flex; align-items: center; gap: .5em; font: 800 .95rem/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: rgba(27, 10, 53, .7); }
.card__cat i { width: .8em; height: .8em; border-radius: 50%; background: var(--cat); }
.badge--low { background: var(--orange) !important; color: var(--ink) !important; }
.badge--out { background: var(--ink) !important; color: #fff !important; }
.card__media .badge--demo { top: auto; right: auto; bottom: 12px; left: 12px; background: rgba(255, 255, 255, .92); color: var(--ink); }
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 1.7rem; line-height: 1.02; }
.card__meas { font-size: .95rem; color: rgba(27, 10, 53, .72); }
.card__foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; }
.price { font: 800 1.9rem/1 var(--f-display); color: var(--crimson); }
.more { font: 800 1.05rem/1 var(--f-display); text-transform: uppercase; letter-spacing: .05em; background: var(--ink); color: #fff; padding: .6em 1em; border-radius: 999px; transition: transform .3s var(--spring), background .2s; }
.card:hover .more { transform: translateX(4px) rotate(-2deg); background: var(--crimson); }

/* ---------- Pasos ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 28px); counter-reset: s; }
.steps li { background: #fff; border-radius: var(--r-lg); padding: 38px 28px 30px; position: relative; box-shadow: 0 8px 0 rgba(27, 10, 53, .12); }
.steps li:nth-child(1) { --c: var(--sky); } .steps li:nth-child(2) { --c: var(--orange); } .steps li:nth-child(3) { --c: var(--crimson); }
.steps__n { position: absolute; top: -22px; left: 24px; width: 56px; height: 56px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font: 800 2rem/1 var(--f-display); box-shadow: 0 5px 0 rgba(27, 10, 53, .18); }
.steps h3 { font-size: 2.2rem; margin-bottom: 8px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Contacto ---------- */
.contact { background: var(--crimson); color: #fff; padding: clamp(60px, 9vw, 120px) var(--gutter); position: relative; overflow: hidden; }
.contact::before, .contact::after { content: ""; position: absolute; border-radius: 50%; }
.contact::before { width: 320px; height: 320px; background: var(--orange); left: -110px; top: -120px; }
.contact::after { width: 220px; height: 220px; background: var(--lime); right: -60px; bottom: -80px; }
.contact__in { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; text-align: center; }
.contact h2 { font-size: clamp(3rem, 8vw, 6rem); }
.contact .lead { color: #fff; margin: 14px auto 0; }
.contact__list { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.contact__list li { background: #fff; color: var(--ink); border-radius: 999px; padding: .7em 1.3em; font-weight: 700; }
.contact__list a { text-decoration: none; }
.contact__list a:hover { text-decoration: underline; }
.contact__cta { margin-top: 30px; }

/* ---------- Pie ---------- */
.foot { background: var(--sky); color: var(--ink); text-align: center; padding: 48px var(--gutter) 40px; }
.foot img { margin: 0 auto 14px; width: 130px; height: auto; }
.foot p { font-weight: 700; }
.foot__small { margin-top: 8px; font-size: .92rem; opacity: .85; }

/* ---------- Ventana de producto ---------- */
.pm { border: 0; padding: 0; margin: auto; width: min(1040px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border-radius: var(--r-lg); background: #fff; color: var(--ink); overflow: auto; box-shadow: 0 30px 80px rgba(27, 10, 53, .4); }
.pm[open] { display: grid; grid-template-columns: 1.1fr 1fr; animation: pop .45s var(--spring); }
.pm::backdrop { background: rgba(27, 10, 53, .62); backdrop-filter: blur(4px); animation: fade .3s; }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.94); } }
@keyframes fade { from { opacity: 0; } }
.pm__close { position: absolute; top: 12px; right: 12px; z-index: 5; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; transition: transform .3s var(--spring); }
.pm__close:hover { transform: rotate(90deg) scale(1.08); background: var(--crimson); }
.pm__gallery { padding: 14px; background: var(--tint); display: flex; flex-direction: column; gap: 10px; }
.pm__main { position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-md); overflow: hidden; background: #fff; touch-action: pan-y; }
.pm__main img { width: 100%; height: 100%; object-fit: contain; background: #fff; transition: opacity .25s; user-select: none; -webkit-user-drag: none; }
.pm__nav { position: absolute; top: 50%; translate: 0 -50%; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); color: var(--ink); font-size: 1.8rem; line-height: 1; cursor: pointer; box-shadow: 0 4px 0 rgba(27,10,53,.18); transition: transform .3s var(--spring); }
.pm__nav:hover { transform: scale(1.1); }
.pm__nav--prev { left: 10px; } .pm__nav--next { right: 10px; }
.pm__count { position: absolute; bottom: 10px; left: 10px; background: var(--ink); color: #fff; padding: .35em .8em; border-radius: 999px; font: 700 .95rem/1 var(--f-display); letter-spacing: .06em; }
.pm__thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.pm__thumbs button { flex: 0 0 72px; height: 72px; border-radius: 14px; border: 3px solid transparent; padding: 0; overflow: hidden; cursor: pointer; background: #fff; transition: transform .25s var(--spring); }
.pm__thumbs button:hover { transform: translateY(-3px); }
.pm__thumbs button[aria-current="true"] { border-color: var(--crimson); }
.pm__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pm__info { padding: 56px 28px 28px; display: flex; flex-direction: column; gap: 14px; }
.pm__info .badge { align-self: flex-start; }
.pm__info h3 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
.pm__price { font: 800 2.4rem/1 var(--f-display); color: var(--crimson); }
.pm__desc { white-space: pre-line; }
.pm__facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; padding: 16px; border-radius: var(--r-md); background: var(--tint); }
.pm__facts dt { font: 800 1.05rem/1.5 var(--f-display); letter-spacing: .06em; text-transform: uppercase; }
.pm__facts dd { margin: 0; }
.pm__actions { margin-top: auto; padding-top: 6px; }
.pm__actions .btn { width: 100%; }
.pm__nowa { text-align: center; opacity: .8; }
@media (max-width: 760px) {
  .pm[open] { grid-template-columns: 1fr; }
  .pm__info { padding: 22px 18px 22px; }
  .pm__main { aspect-ratio: 4 / 3; }
}

/* ---------- Confeti 2D y revelado ---------- */
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }
.js [data-reveal] { opacity: 0; transform: translateY(28px) scale(.97); transition: opacity .7s var(--ease), transform .8s var(--spring); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
