:root {
  --yellow: #FFD43B;
  --purple: #8731B4;
  --lilac: #EFE3F8;
  --yellow-soft: #F5ECFB;
  --yellow-deep: #F59F00;
  --orange: #FF922B;
  --ink: #2A1736;
  --ink-soft: #5E4D6B;
  --bg: #FFFCFF;
  --card: #FFFFFF;
  --line: #E8D9F3;
  --green: #2F9E44;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(80, 30, 110, .14);
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Fredoka", "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
a { color: inherit; }
.wrap { width: min(1120px, 92%); margin-inline: auto; }
.narrow { width: min(760px, 92%); }
.small { font-size: .9rem; color: var(--ink-soft); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255, 252, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; gap: 24px; font-weight: 700; }
.nav a { text-decoration: none; padding: 6px 2px; border-bottom: 3px solid transparent; }
.nav a:hover { border-color: var(--yellow); }
.cart-btn { position: relative; border: 0; background: var(--yellow); border-radius: 999px; width: 48px; height: 48px; font-size: 1.3rem; cursor: pointer; transition: transform .15s; }
.cart-btn:hover { transform: scale(1.06); }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 800; display: grid; place-items: center; }

/* ---------- Botones ---------- */
.btn { display: inline-block; border: 2px solid var(--ink); background: var(--yellow); color: var(--ink); font: 800 1rem var(--font-body); padding: 13px 26px; border-radius: 999px; text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.btn-ghost { background: #fff; }
.btn-block { width: 100%; text-align: center; }
.btn:focus-visible, .icon-btn:focus-visible, .cart-btn:focus-visible, .qty button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.link-btn { background: none; border: 0; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font: 600 .9rem var(--font-body); margin-top: 8px; width: 100%; }
.icon-btn { background: none; border: 0; font-size: 1.3rem; cursor: pointer; width: 40px; height: 40px; border-radius: 50%; }
.icon-btn:hover { background: var(--yellow-soft); }

/* ---------- Hero ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero { background: radial-gradient(circle at 50% 0%, var(--lilac), transparent 65%), var(--bg); padding: 40px 0 48px; }
.hero-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.banner { width: min(720px, 100%); height: auto; border-radius: 22px; border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); margin-bottom: 26px; }
.pill { display: inline-block; background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 14px; font-weight: 800; font-size: .85rem; margin-bottom: 14px; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 56ch; margin-bottom: 18px; }
.hero-colors { display: grid; grid-template-columns: repeat(4, minmax(0, 150px)); gap: 14px; justify-content: center; margin-bottom: 8px; width: 100%; }
.hc { text-decoration: none; background: #fff; border: 2px solid var(--ink); border-radius: 20px; padding: 8px 8px 10px; font-weight: 800; transition: transform .15s; box-shadow: 0 4px 0 var(--ink); }
.hc:hover { transform: translateY(-4px); }
.hc img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.hc span { display: block; font-size: .92rem; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 22px 0; }
.hero-points { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; list-style: none; padding: 0; margin: 0; font-weight: 700; color: var(--ink-soft); }

/* ---------- Secciones ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--yellow-soft); }
.h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); text-align: center; margin-bottom: 1.2em; }

/* ---------- Ficha del producto ---------- */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-img { background: var(--yellow-soft); border: 2px solid var(--ink); border-radius: 32px; padding: 28px; box-shadow: 8px 8px 0 var(--ink); position: sticky; top: 92px; }
.product-img img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.opt-label { font-weight: 800; margin: 18px 0 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.swatch { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px 6px 8px; font: 700 .9rem var(--font-body); color: var(--ink); cursor: pointer; }
.swatch .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink); }
.swatch.active { border-color: var(--ink); background: var(--yellow-soft); box-shadow: 0 3px 0 var(--ink); }
.swatch:focus-visible, .thumb:focus-visible, .hc:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.thumbs { display: flex; gap: 8px; margin: 0 0 10px; }
.thumb { width: 58px; height: 58px; padding: 2px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.thumb.active { border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.card-img { background: var(--yellow-soft); border-bottom: 2px solid var(--ink); }
.card-img img { width: 100%; aspect-ratio: 1; object-fit: contain; border: 0; padding: 10px; }
.product-info h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .1em; }
.subtitle { font-size: 1.15rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 1em; }
.price { font-family: var(--font-head); font-size: 2rem; font-weight: 700; margin: 18px 0 4px; }
.price small { font-family: var(--font-body); font-size: .9rem; font-weight: 600; color: var(--ink-soft); }
.price-tbd { font-size: 1.4rem; }
.add-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0 22px; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: #fff; }
.qty button { width: 38px; height: 42px; border: 0; background: #fff; font-size: 1.2rem; cursor: pointer; font-weight: 800; }
.qty button:hover { background: var(--yellow-soft); }
.qty span { min-width: 32px; text-align: center; font-weight: 800; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 26px 0; }
.feature { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 14px; }
.feature .ico { font-size: 1.5rem; }
.feature h3 { font-size: 1.05rem; margin: 4px 0 2px; }
.feature p { font-size: .9rem; color: var(--ink-soft); margin: 0; }
.sheet { width: 100%; border-collapse: collapse; margin: 8px 0 22px; background: #fff; border-radius: 16px; overflow: hidden; border: 2px solid var(--line); }
.sheet th, .sheet td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .95rem; }
.sheet tr:last-child th, .sheet tr:last-child td { border-bottom: 0; }
.sheet th { width: 38%; background: #FAF5FD; font-weight: 800; }
.safety { background: #EBFBEE; border: 2px solid #B2F2BB; border-radius: 16px; padding: 16px 18px 6px; }
.safety h3 { font-size: 1.1rem; }
.safety ul { margin: 0 0 10px; padding-left: 1.2em; }
.safety li { margin-bottom: 6px; font-size: .95rem; }
.sub { font-size: 1.2rem; margin: 26px 0 8px; }
.disclaimer { font-size: .88rem; color: var(--ink-soft); margin-top: 18px; }

/* ---------- Pasos ---------- */
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; padding: 0; margin: 0 0 28px; }
.steps li { background: #fff; border: 2px solid var(--ink); border-radius: 20px; padding: 18px 16px; position: relative; }
.steps .num { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); font-family: var(--font-head); font-weight: 700; margin-bottom: 10px; }
.steps h3 { font-size: 1.05rem; }
.steps p { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.note { text-align: center; max-width: 70ch; margin: 0 auto; color: var(--ink-soft); font-weight: 600; }

/* ---------- Accesorios ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.card { background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 6px 0 var(--ink); transition: transform .15s; }
.card:hover { transform: translateY(-4px); }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 1.2rem; margin: 0; }
.card p { color: var(--ink-soft); font-size: .93rem; margin: 0 0 8px; flex: 1; }
.card .price { font-size: 1.2rem; margin: 0 0 8px; }
.card .btn { padding: 10px 18px; font-size: .95rem; }

/* ---------- FAQ ---------- */
details { background: #fff; border: 2px solid var(--ink); border-radius: 16px; padding: 14px 18px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; }
details p { margin: 10px 0 0; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #fff; padding: 40px 0 20px; }
.footer .small { color: #D9CCE3; }
.footer-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer img { filter: none; background: #fff; border-radius: 14px; padding: 6px 12px; height: 44px; width: auto; margin-bottom: 10px; }
.footer a { color: var(--yellow); }
.footer-in .small a { color: var(--yellow); }
.copy { text-align: center; margin-top: 28px; }

/* ---------- Carrito ---------- */
.overlay { position: fixed; inset: 0; background: rgba(42, 23, 54, .5); z-index: 40; }
.overlay[hidden] { display: none; }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%); background: #fff; z-index: 50; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s ease; border-left: 2px solid var(--ink); }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 2px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 1.4rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.empty { text-align: center; color: var(--ink-soft); padding: 40px 10px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line img { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; border: 2px solid var(--line); background: var(--yellow-soft); }
.line h4 { margin: 0 0 4px; font: 800 .98rem var(--font-body); }
.line .lp { font-size: .88rem; color: var(--ink-soft); }
.line .qty { transform: scale(.85); transform-origin: left center; }
.line .rm { background: none; border: 0; cursor: pointer; font-size: 1.1rem; }
.drawer-foot { padding: 16px 20px 20px; border-top: 2px solid var(--line); }
.total-row { display: flex; justify-content: space-between; font-size: 1.2rem; margin-bottom: 6px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 700; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .product { grid-template-columns: 1fr; }
  .product-img { position: static; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hero { padding-top: 24px; }
  .banner { box-shadow: 4px 4px 0 var(--ink); border-radius: 16px; }
  .hero-colors { grid-template-columns: repeat(2, 1fr); max-width: 320px; }
  .nav { display: none; }
  .topbar-in { height: 60px; }
  .section { padding: 52px 0; }
  .features { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .sheet th { width: 42%; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
