:root {
  color-scheme: dark;
  --bg: #13091f;
  --surface: #1e1130;
  --surface-2: #2b1945;
  --line: #452b68;
  --fg: #fdf0fa;
  --muted: #c0aed2;
  --accent: #ff82c4;
  --accent-strong: #ffa8d6;
  --accent-deep: #a83f83;
  --on-accent: #2e0a24;
  --purple: #6d2fc0;
  --crema: #ffc9e6;
  --good: #7ff0a8;
  --bad: #ff9b86;
  --display: "Pixelify Sans", "Trebuchet MS", sans-serif;
  --body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --r: 6px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 15px/1.5 var(--body); }
/* Layout: cabecera fija; tienda a dos columnas con carrito lateral; páginas de texto a una columna de lectura. */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
img { max-width: 100%; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

.wrap { width: 100%; max-width: 1340px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--surface); border-bottom: 1px solid var(--line); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font: 600 22px/1 var(--display); }
.brand img { width: 40px; height: 40px; display: block; border-radius: 8px; }
nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
nav a, nav button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--fg); font-weight: 700; font-size: 14px; text-decoration: none; }
nav a:hover, nav button:hover { background: var(--surface-2); }
nav a[aria-current="page"] { color: var(--accent-strong); }
nav .outlined { border-color: var(--line); }

.demo { background: var(--purple); color: var(--fg); font-size: 13.5px; font-weight: 700; }
.demo .wrap { padding-block: 7px; }
.hero-band { position: relative; border-bottom: 1px solid var(--line); background-color: #220f3d; background-image: linear-gradient(180deg, transparent 40%, var(--bg)), radial-gradient(1.5px 1.5px at 12% 22%, #fff, transparent), radial-gradient(1.5px 1.5px at 31% 64%, #ffc9e6, transparent), radial-gradient(1.5px 1.5px at 47% 18%, #fff, transparent), radial-gradient(1.5px 1.5px at 68% 44%, #ffc9e6, transparent), radial-gradient(1.5px 1.5px at 83% 16%, #fff, transparent), radial-gradient(1.5px 1.5px at 92% 70%, #fff, transparent), radial-gradient(70% 120% at 80% 0%, #5a2a9a, transparent); }
.hero { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; padding-block: 30px; }
.hero > img { width: 270px; max-width: 100%; height: auto; flex: none; }
.hero > div { flex: 1 1 320px; min-width: 0; }
.eyebrow { color: var(--accent-strong); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1 { margin-top: 4px; color: var(--accent); font: 700 clamp(34px, 5vw, 52px)/1.05 var(--display); text-shadow: 4px 4px 0 #3d1730; text-wrap: balance; }
.hero p { margin-top: 8px; color: var(--muted); max-width: 62ch; }

.shop { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 32px; align-items: start; padding-block: 28px 56px; }
.catalog { min-width: 0; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab-holder { position: relative; }
.tab { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-weight: 700; font-size: 14px; }
.tab:hover { border-color: var(--muted); }
.tab[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 3px 0 var(--accent-deep); }
.chev { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.menu { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; min-width: 190px; padding: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 28px rgba(0,0,0,.45); }
.menu button { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: none; text-align: left; font-weight: 700; font-size: 14px; }
.menu button:hover, .menu button[aria-current="true"] { background: var(--surface); color: var(--accent-strong); }
.count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.intro { margin-top: 16px; color: var(--muted); max-width: 70ch; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.grid[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.grid[data-count="1"] .card { flex-direction: row; }
.grid[data-count="1"] .art { flex: 0 0 42%; height: auto; min-height: 240px; }
.card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: transform .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.art { position: relative; display: grid; place-items: center; height: 150px; background: var(--surface-2); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 16px 16px; }
.art svg { width: 96px; height: 96px; display: block; filter: drop-shadow(0 6px 0 rgba(0,0,0,.35)); }
.art img { width: 100%; height: 100%; object-fit: cover; }
.body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 18px; }
.card h3 { font: 600 24px/1.1 var(--display); overflow-wrap: anywhere; }
.desc { color: var(--muted); font-size: 14px; }
.perks { display: grid; gap: 3px; color: var(--muted); font-size: 14px; }
.perks li { position: relative; padding-left: 15px; }
.perks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; background: var(--accent); }
.buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 12px; }
.price { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.old { margin-right: 6px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: line-through; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent); box-shadow: 0 3px 0 var(--accent-deep); font-weight: 800; font-size: 14px; }
.btn:hover:not(:disabled) { background: var(--accent-strong); }
.btn:disabled { background: var(--surface-2); color: var(--muted); box-shadow: none; cursor: not-allowed; }
.btn.added, .btn.added:hover:not(:disabled) { background: var(--good); box-shadow: 0 3px 0 #3f9d67; }
.chat { min-height: 21px; margin-top: 10px; font: 500 15px/1.3 var(--display); overflow-wrap: anywhere; }
.chat i { font-style: normal; color: var(--muted); }
.chat .plus { color: var(--good); }
.chat .minus { color: var(--bad); }
.chat b { color: var(--accent); font-weight: 500; }

aside { position: sticky; top: 88px; display: grid; gap: 16px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.panel > * { padding: 16px 18px; }
.panel > * + * { border-top: 1px solid var(--line); }
.panel h2 { margin-top: 1px; font: 600 25px/1.1 var(--display); }
.cart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badge { display: grid; place-items: center; min-width: 30px; height: 30px; padding-inline: 8px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.empty { display: grid; justify-items: center; gap: 6px; padding-block: 28px; color: var(--muted); text-align: center; font-size: 14px; }
.lines { display: grid; gap: 12px; }
.line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; }
.line b { overflow-wrap: anywhere; font-size: 14px; }
.line .amount { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.qty { display: flex; align-items: center; gap: 2px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.qty button { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); line-height: 1; font-weight: 800; }
.qty span { min-width: 24px; text-align: center; }
.remove { justify-self: end; padding: 3px 0; border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
label { display: block; margin-bottom: 7px; font-weight: 800; font-size: 14px; }
input[type="text"] { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
input[aria-invalid="true"] { border-color: var(--bad); }
.field-msg { min-height: 19px; margin-top: 5px; color: var(--muted); font-size: 13px; }
.field-msg.bad { color: var(--bad); }
.total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-block: 8px 12px; }
.total strong { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pay { width: 100%; min-height: 48px; font-size: 15px; }
.secure { margin-top: 10px; color: var(--muted); text-align: center; font-size: 12.5px; }
.status { margin-top: 10px; color: var(--bad); font-size: 13.5px; }
.status.ok { color: var(--good); }
.buyer { display: flex; align-items: center; gap: 12px; }
.head { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 6px; background: var(--surface-2); font: 600 19px/1 var(--display); color: var(--crema); overflow: hidden; }
.head img { width: 100%; height: 100%; }
.buyer div { min-width: 0; }
.buyer b { display: block; overflow-wrap: anywhere; }
.buyer small { color: var(--muted); }
.buyer .amount { margin-left: auto; color: var(--accent-strong); font-weight: 800; font-variant-numeric: tabular-nums; }
.recent { display: flex; flex-wrap: wrap; gap: 8px; }
.example { color: var(--muted); font-size: 12px; }

.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; margin-top: 20px; }
.faq h3 { font-size: 16px; font-weight: 800; }
.faq p { margin-top: 4px; color: var(--muted); max-width: 62ch; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer .wrap { padding-block: 20px; }

.mobile-bar { display: none; }
@media (max-width: 1040px) {
  .shop { grid-template-columns: minmax(0, 1fr); }
  aside { position: static; }
  .mobile-bar { position: fixed; z-index: 8; inset: auto 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: var(--surface); border-top: 1px solid var(--line); font-weight: 800; }
  .mobile-bar[hidden] { display: none; }
  body.has-items { padding-bottom: 70px; }
}
@media (max-width: 1240px) { .grid[data-count="3"] { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .grid[data-count="1"] .card { flex-direction: column; }
  .grid[data-count="1"] .art { flex: none; height: 150px; min-height: 0; }
  .grid, .faq { grid-template-columns: minmax(0, 1fr); }
  .top { min-height: 58px; }
  nav a, nav button { padding-inline: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
  .card:hover { transform: none; }
}

/* Ofertas */
.offer-band { border-bottom: 1px solid var(--line); background: linear-gradient(90deg, #3a1450, #22123a); }
.offer-band .wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 10px; }
.offer-band strong { color: var(--accent); font: 600 18px/1.2 var(--display); }
.offer-band span { color: var(--muted); font-size: 14px; }
.offer-band button { margin-left: auto; min-height: 36px; padding: 0 14px; border: 1px solid var(--accent); border-radius: 8px; background: none; color: var(--accent-strong); font-weight: 800; font-size: 13.5px; }
.offer-band button:hover { background: var(--surface-2); }
.tab.is-offer { border-color: var(--accent-deep); color: var(--accent-strong); }
.tab.is-offer[aria-pressed="true"] { color: var(--on-accent); }
.off { position: absolute; top: 10px; left: 10px; padding: 3px 8px; border-radius: 6px; background: var(--good); color: #0c2a18; font: 700 15px/1.2 var(--display); }
.terms-note { margin-top: 8px; color: var(--muted); text-align: center; font-size: 12.5px; }
.terms-note a, .secure a { color: var(--accent-strong); }

/* Páginas de texto (Ayuda, Normas) */
.page-head { border-bottom: 1px solid var(--line); background: #1a0d2c; }
.page-head .wrap { padding-block: 34px 28px; }
.page-head h1 { font-size: clamp(32px, 4.5vw, 46px); }
.page-head p { margin-top: 8px; color: var(--muted); max-width: 62ch; }
.page { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; padding-block: 32px 64px; }
.toc { position: sticky; top: 92px; display: grid; gap: 2px; }
.toc a { padding: 7px 10px; border-radius: 6px; color: var(--muted); font-size: 14px; font-weight: 700; text-decoration: none; }
.toc a:hover { background: var(--surface); color: var(--fg); }
.doc { min-width: 0; max-width: 760px; display: grid; gap: 34px; }
.doc section { scroll-margin-top: 90px; display: grid; gap: 10px; }
.doc h2 { font: 600 26px/1.15 var(--display); color: var(--fg); text-wrap: balance; }
.doc h3 { margin-top: 6px; font-size: 16px; font-weight: 800; }
.doc p, .doc li { color: var(--muted); max-width: 68ch; }
.doc strong { color: var(--fg); }
.doc a { color: var(--accent-strong); }
.doc ul.list { display: grid; gap: 6px; }
.doc ul.list li { position: relative; padding-left: 16px; }
.doc ul.list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; background: var(--accent); }
.steps { display: grid; gap: 12px; counter-reset: paso; }
.steps li { position: relative; display: grid; gap: 2px; padding: 14px 16px 14px 60px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); counter-increment: paso; }
.steps li::before { content: counter(paso); position: absolute; left: 16px; top: 13px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font: 700 18px/1 var(--display); }
.steps b { color: var(--fg); }
.ticket { padding: 14px 16px; border: 1px dashed var(--accent-deep); border-radius: var(--r); background: var(--surface); font: 500 15px/1.6 var(--display); color: var(--crema); overflow-x: auto; }
.callout { padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); color: var(--fg); }
.updated { color: var(--muted); font-size: 13px; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.ghost { background: none; border: 1px solid var(--line); color: var(--fg); box-shadow: none; text-decoration: none; }
.btn.ghost:hover { background: var(--surface); }
a.btn { text-decoration: none; }
footer .wrap { display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: center; }
footer nav a { min-height: 32px; padding: 0 8px; font-size: 13px; color: var(--muted); }
footer p { margin-right: auto; }
@media (max-width: 860px) {
  .page { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .toc a { border: 1px solid var(--line); }
}
.doc a.btn { color: var(--on-accent); }
.doc a.btn.ghost { color: var(--fg); }
