/* Comikids · estilo pop/cómic. Colores tomados del logo. Mobile-first. */
:root {
  --blue: #1ea7ee; --blue-2: #0b86c9; --ink: #1b1b1b; --yellow: #ffe600; --pink: #ff2e86; --lilac: #c9a8f0;
  --orange: #ff7a00; --lime: #b4ff00; --peach: #ffa070; --sky: #7fd8f8; --paper: #fffdf5; --wa: #25d366;
  --font: 'Fredoka', ui-rounded, 'Segoe UI Rounded', 'Nunito', system-ui, sans-serif;
  --pop: 4px 4px 0 var(--ink);
  --ease: cubic-bezier(.2, .9, .25, 1.15);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); font-weight: 500; color: var(--ink); line-height: 1.3;
  background: var(--blue) radial-gradient(rgba(255, 255, 255, .34) 2.3px, transparent 2.9px) 0 0 / 17px 17px;
  min-height: 100dvh; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 4px solid var(--yellow); outline-offset: 2px; box-shadow: 0 0 0 7px var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none;
  font-weight: 700; font-size: 19px; padding: 14px 26px; border-radius: 999px; border: 3px solid var(--ink);
  background: #fff; box-shadow: 0 6px 0 var(--ink); transition: transform .12s, box-shadow .12s; user-select: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.btn-pink { background: var(--pink); color: #fff; }
.btn-sky { background: var(--sky); }
.btn-yellow { background: var(--yellow); }
.btn-wa { background: var(--wa); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.ico { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }

/* ---------- hero ---------- */
.hero { position: relative; text-align: center; padding: 14px 16px 64px; overflow: hidden; isolation: isolate; }
.hero-top { display: flex; justify-content: flex-end; position: relative; z-index: 2; }
.pill-wa { font-size: 15px; padding: 9px 16px; box-shadow: 0 4px 0 var(--ink); }
.hero-logo { width: min(86vw, 540px); height: auto; margin: 6px auto 0; filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .18)); animation: bob 3.6s ease-in-out infinite; }
.hero h1 {
  font-size: clamp(27px, 6.4vw, 50px); line-height: 1.05; font-weight: 700; color: #fff; letter-spacing: .01em; margin: 22px auto 8px; max-width: 14em;
  -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink);
}
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero p { font-size: clamp(16px, 3.6vw, 21px); color: #fff; font-weight: 600; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); max-width: 28em; margin: 0 auto 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero-cta .btn { font-size: clamp(18px, 4.6vw, 24px); padding: 14px 28px; }
.confetti { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.confetti i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); background: var(--c); border: 3px solid var(--ink); animation: float var(--d) ease-in-out infinite; animation-delay: var(--dl, 0s); }
.confetti .st { clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 36%); border: 0; }
.confetti .ci { border-radius: 50%; }
.confetti .sq { border-radius: 8px; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-10px) rotate(1.5deg); } }
@keyframes float { 0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); } 50% { transform: translate3d(8px, -18px, 0) rotate(40deg); } }

.ticker { background: var(--yellow); border: 3px solid var(--ink); border-left: 0; border-right: 0; transform: rotate(-1.4deg); margin: -34px -12px 6px; overflow: hidden; position: relative; z-index: 3; box-shadow: 0 6px 0 rgba(0, 0, 0, .25); }
.ticker-track { display: flex; width: max-content; animation: marq 26s linear infinite; }
.ticker span { padding: 11px 20px; font-weight: 700; font-size: 17px; white-space: nowrap; letter-spacing: .04em; text-transform: uppercase; }
@keyframes marq { to { transform: translateX(-50%); } }

/* ---------- filtros ---------- */
.shop { max-width: 1240px; margin: 0 auto; padding: 18px 12px 0; scroll-margin-top: 0; }
.filters { position: sticky; top: 8px; z-index: 30; background: #fff; border: 3px solid var(--ink); border-radius: 26px; box-shadow: var(--pop); padding: 10px; display: grid; gap: 8px; }
.row { display: flex; gap: 8px; align-items: center; }
.seg { display: flex; gap: 8px; flex: 1; }
.seg button { flex: 1; padding: 10px 6px; font-weight: 700; font-size: 17px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; transition: transform .15s var(--ease), background .15s; white-space: nowrap; }
.seg button:active { transform: scale(.94); }
.seg button[aria-pressed="true"] { transform: translateY(-2px); box-shadow: 0 3px 0 var(--ink); }
.seg button[data-g="ninas"][aria-pressed="true"] { background: var(--pink); color: #fff; }
.seg button[data-g="ninos"][aria-pressed="true"] { background: var(--sky); }
.seg button[data-g="all"][aria-pressed="true"] { background: var(--yellow); }
.sbtn { width: 48px; height: 48px; flex: none; border: 3px solid var(--ink); border-radius: 50%; display: grid; place-items: center; background: var(--lilac); font-size: 21px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 5px; margin: 0 -2px; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: start; padding: 8px 15px; font-weight: 600; font-size: 16px; border: 2.5px solid var(--ink); border-radius: 999px; background: #fff; white-space: nowrap; transition: transform .15s var(--ease), background .15s; }
.chip:active { transform: scale(.93); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--yellow); transform: translateY(-1px); }
.chip.sub { background: #f3eaff; border-style: dashed; }
.chip.sub[aria-pressed="true"] { background: var(--lilac); color: var(--ink); border-style: solid; }
.chip small { opacity: .55; font-weight: 600; margin-left: 4px; }
.search { display: none; }
.search.on { display: flex; }
.search input { flex: 1; min-width: 0; font: inherit; font-size: 17px; padding: 11px 16px; border: 3px solid var(--ink); border-radius: 999px; background: #fffbe0; }
.count { color: #fff; font-weight: 700; font-size: 18px; text-shadow: 0 2px 0 rgba(0, 0, 0, .3); padding: 16px 6px 2px; }

/* ---------- tarjetas ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 12px 0 110px; }
.card {
  position: relative; display: flex; flex-direction: column; background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--pop); overflow: hidden;
  opacity: 0; transform: translateY(28px) scale(.94) rotate(var(--rot, 0deg)); transition: opacity .45s ease var(--d, 0s), transform .5s var(--ease) var(--d, 0s), box-shadow .2s;
}
.card.in { opacity: 1; transform: translateY(0) rotate(var(--rot, 0deg)); }
.card.in.live { transition: transform .18s ease-out, box-shadow .2s; }
.card:hover { box-shadow: 8px 10px 0 var(--ink); }
.card.tilt { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-5px); transition: transform .08s linear, box-shadow .2s; z-index: 2; }
.card > .open { all: unset; display: flex; flex-direction: column; cursor: pointer; flex: 1; }
.card > .open:focus-visible { outline: 4px solid var(--yellow); outline-offset: -6px; }
.thumb { position: relative; aspect-ratio: 4 / 5; background: var(--tint, #ffd6ea) radial-gradient(rgba(255, 255, 255, .6) 2px, transparent 2.6px) 0 0 / 14px 14px; border-bottom: 3px solid var(--ink); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 7%; transition: transform .35s var(--ease), opacity .2s; }
.thumb img.cover { object-fit: cover; padding: 0; }
.card:hover .thumb img { transform: scale(1.07) rotate(-1.5deg); }
.tags { position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border: 2.5px solid var(--ink); border-radius: 999px; background: #fff; text-transform: uppercase; letter-spacing: .03em; box-shadow: 2px 2px 0 var(--ink); }
.tag.new { background: var(--pink); color: #fff; }
.tag.sale { background: var(--orange); color: #fff; }
.tag.low { background: var(--lime); }
.b3d { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 50%; box-shadow: 2px 2px 0 var(--ink); }
.card:hover .b3d { animation: wob .6s ease-in-out infinite; }
@keyframes wob { 0%, 100% { rotate: -10deg; } 50% { rotate: 10deg; } }
.sold .thumb img { filter: grayscale(1) opacity(.55); }
.sold .thumb::after { content: 'AGOTADO'; position: absolute; left: -10%; right: -10%; top: 42%; text-align: center; font-weight: 700; font-size: 22px; letter-spacing: .08em; background: var(--ink); color: #fff; padding: 6px 0; transform: rotate(-12deg); }
.meta { padding: 10px 12px 4px; }
.meta h3 { font-size: 16px; font-weight: 600; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.3em; }
.price { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; font-weight: 700; font-size: 20px; }
.price s { font-size: 14px; opacity: .45; font-weight: 500; }
.dots { display: flex; gap: 6px; padding: 4px 12px 12px; align-items: center; flex-wrap: wrap; }
.dots button { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--c); transition: transform .15s var(--ease); position: relative; }
.dots button:hover { transform: scale(1.25); }
.dots button[aria-pressed="true"] { box-shadow: 0 0 0 2.5px #fff, 0 0 0 5px var(--ink); }
.dots button.none::after, .sw.none::after { content: ''; position: absolute; inset: 40% -12%; background: var(--ink); transform: rotate(-45deg); }
.dots small { font-weight: 600; opacity: .6; }

.empty { grid-column: 1 / -1; text-align: center; background: #fff; border: 3px solid var(--ink); border-radius: 26px; box-shadow: var(--pop); padding: 34px 20px; }
.empty img { width: 90px; margin: 0 auto 10px; animation: wob 2s ease-in-out infinite; }
.empty h3 { font-size: 24px; margin-bottom: 6px; }
.empty p { margin-bottom: 16px; }
.sk { aspect-ratio: 4 / 6.3; border: 3px solid var(--ink); border-radius: 22px; background: #fff; box-shadow: var(--pop); position: relative; overflow: hidden; }
.sk::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(30, 167, 238, .18) 50%, transparent 70%); animation: shimmer 1.1s linear infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- visor (ficha de producto) ---------- */
#sheet { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; padding: 0; border: 0; background: transparent; color: inherit; overflow: hidden; }
#sheet::backdrop { background: rgba(6, 40, 82, .62); }
#sheet .veil { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
.box { position: absolute; left: 0; right: 0; bottom: 0; height: min(97dvh, 100%); display: flex; flex-direction: column; background: var(--paper); border: 3px solid var(--ink); border-bottom: 0; border-radius: 28px 28px 0 0; overflow: hidden; transform: translateY(104%); transition: transform .42s var(--ease); }
#sheet.open .box { transform: none; }
.stage { position: relative; flex: none; height: 46dvh; min-height: 280px; background: var(--blue) radial-gradient(rgba(255, 255, 255, .34) 2.3px, transparent 2.9px) 0 0 / 17px 17px; border-bottom: 3px solid var(--ink); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.stage::after { content: ''; position: absolute; left: 50%; bottom: 3.5%; width: 46%; height: 5%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(0, 0, 0, .38), transparent); pointer-events: none; }
#v3d, .v3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.v3d-canvas { display: block; cursor: grab; }
.v3d-canvas:active { cursor: grabbing; }
.flat { position: absolute; inset: 7% 18%; width: 64%; height: 86%; object-fit: contain; background: var(--tint); border: 3px solid var(--ink); border-radius: 24px; display: none; }
.stage.noggl .flat { display: block; }
.round { position: absolute; z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; box-shadow: 0 4px 0 var(--ink); display: grid; place-items: center; font-size: 22px; font-weight: 700; transition: transform .12s, box-shadow .12s; }
.round:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.round.x { top: 12px; right: 12px; background: var(--yellow); }
.round.prev, .round.next { top: 50%; margin-top: -23px; background: #fff; }
.round.prev { left: 10px; } .round.next { right: 10px; }
.round.reset { left: 12px; top: 12px; font-size: 20px; }
.hint { position: absolute; z-index: 2; left: 50%; bottom: 12px; transform: translateX(-50%); white-space: nowrap; background: #fff; border: 2.5px solid var(--ink); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 14px; box-shadow: 0 3px 0 var(--ink); transition: opacity .4s, transform .4s; pointer-events: none; animation: hintbob 1.6s ease-in-out infinite; }
.hint.gone { opacity: 0; transform: translate(-50%, 10px); animation: none; }
@keyframes hintbob { 50% { transform: translate(-50%, -4px); } }
.info { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px 12px; }
.info .tags { position: static; flex-direction: row; flex-wrap: wrap; margin-bottom: 8px; }
.info h2 { font-size: clamp(25px, 6vw, 34px); line-height: 1.05; font-weight: 700; }
.info .price { font-size: 30px; margin: 6px 0 14px; }
.info .price s { font-size: 18px; }
.lbl { font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; margin: 12px 0 8px; display: flex; gap: 8px; align-items: baseline; }
.lbl b { font-weight: 600; text-transform: none; letter-spacing: 0; opacity: .7; font-size: 16px; }
.swatches, .sizes { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--ink); background: var(--c); box-shadow: 0 3px 0 var(--ink); transition: transform .18s var(--ease); }
.sw:active { transform: scale(.9); }
.sw[aria-pressed="true"] { transform: scale(1.12); box-shadow: 0 0 0 3px #fff, 0 0 0 6.5px var(--ink); }
.sz { min-width: 52px; height: 46px; padding: 0 14px; font-weight: 700; font-size: 18px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; box-shadow: 0 3px 0 var(--ink); transition: transform .15s var(--ease); }
.sz:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.sz[aria-pressed="true"] { background: var(--yellow); transform: translateY(-2px) scale(1.05); }
.sz:disabled { opacity: .35; text-decoration: line-through; box-shadow: none; cursor: not-allowed; }
.stock { margin-top: 12px; font-weight: 600; }
.stock.low { color: #c2410c; } .stock.out { color: #b91c1c; }
.desc { margin-top: 14px; font-size: 16px; line-height: 1.45; opacity: .85; }
.cta { flex: none; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 3px solid var(--ink); background: #fff; }
.cta .btn { width: 100%; font-size: 21px; padding: 15px 20px; }
.pop { animation: pop .38s var(--ease); }
@keyframes pop { 0% { transform: scale(.85); } 100% { transform: scale(1); } }

@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  .shop { padding: 24px 20px 0; }
}
@media (min-width: 900px) {
  .box { inset: 50% auto auto 50%; width: min(1060px, 94vw); height: min(720px, 92dvh); border: 3px solid var(--ink); border-radius: 32px; display: grid; grid-template-columns: 1.1fr 1fr; grid-template-rows: 1fr auto; transform: translate(-50%, -46%) scale(.9); opacity: 0; transition: transform .38s var(--ease), opacity .22s; box-shadow: 10px 12px 0 rgba(0, 0, 0, .35); }
  #sheet.open .box { transform: translate(-50%, -50%); opacity: 1; }
  .stage { grid-row: 1 / 3; height: auto; border-bottom: 0; border-right: 3px solid var(--ink); }
  .info { grid-column: 2; padding: 26px 28px 12px; }
  .cta { grid-column: 2; }
}
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .filters { padding: 12px 14px; } }
@media (hover: none) { .card:hover { box-shadow: var(--pop); } .card:hover .thumb img { transform: none; } }
@media (max-width: 380px) { .seg button { font-size: 15px; } .meta h3 { font-size: 15px; } }

/* ---------- varios ---------- */
.fab { position: fixed; right: 14px; bottom: calc(14px + var(--safe-b)); z-index: 40; width: 64px; height: 64px; border-radius: 50%; background: var(--wa); color: #fff; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); display: grid; place-items: center; text-decoration: none; transition: transform .12s, box-shadow .12s; }
.fab:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.fab .ico { width: 34px; height: 34px; }
.fab::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid var(--wa); animation: ring 2.2s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
.foot { background: var(--ink); color: #fff; text-align: center; padding: 28px 16px calc(100px + var(--safe-b)); }
.foot img { width: 150px; margin: 0 auto 12px; }
.foot a { color: var(--yellow); font-weight: 700; }
.foot small { display: block; margin-top: 10px; opacity: .6; }
.draftbar { position: fixed; left: 12px; bottom: calc(14px + var(--safe-b)); z-index: 40; background: var(--yellow); border: 3px solid var(--ink); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; box-shadow: 0 4px 0 var(--ink); }
.draftbar button { text-decoration: underline; font-weight: 700; margin-left: 4px; }
noscript p { background: #fff; padding: 20px; text-align: center; font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .card { opacity: 1; transform: none; }
}
