/* ==========================================================================
   Juguetika · hoja de estilos
   Paleta tomada del logo: azul #2f6fe4 con relieve #1d4fa8 y letras blancas.
   ========================================================================== */
:root {
  --primary: #2f6fe4;
  --primary-dark: #1d4fa8;
  --primary-soft: #eef3ff;
  --accent: #ffc43d;
  --accent-dark: #e0a51a;
  --accent-soft: #fff3cf;
  --hot: #d92d32;
  --good: #15803d;
  --ink: #16213a;
  --muted: #5b6b8c;
  --surface: #f5f8ff;
  --line: #e3e9f5;
  --bg: #ffffff;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 6px 24px rgba(29, 79, 168, .10);
  --shadow-lg: 0 18px 48px rgba(29, 79, 168, .18);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --container: 1240px;
  --header-h: 72px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-md); line-height: 1.5; color: var(--ink); background: var(--bg); }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
small { font-size: .85em; }
.container { width: min(var(--container), 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--primary-dark); outline-offset: 2px; box-shadow: 0 0 0 2px #fff; border-radius: 6px; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; margin-right: 6px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; min-height: 44px; border-radius: 999px; border: 2px solid transparent; font-weight: 800; font-size: .95rem; line-height: 1.1; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; white-space: nowrap; text-decoration: none !important; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 0 var(--primary-dark); }
.btn-primary:hover { background: #3b7cf0; transform: translateY(-1px); box-shadow: 0 5px 0 var(--primary-dark), var(--shadow); }
.btn-primary:active { box-shadow: 0 1px 0 var(--primary-dark); }
.btn-primary:disabled { background: #b9c6e4; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; min-height: 52px; }
.btn-small { padding: 7px 14px; font-size: var(--fs-sm); min-height: 36px; }
.btn-block { width: 100%; }
.btn.loading { opacity: .7; pointer-events: none; }
.link-more { font-weight: 800; }

/* ---------- Barra superior ---------- */
.topbar { background: var(--primary-dark); color: #fff; font-size: var(--fs-xs); font-weight: 700; }
.topbar-inner { display: flex; gap: 10px; justify-content: center; align-items: center; padding: 7px 0; flex-wrap: wrap; text-align: center; }
.topbar .ico { width: 16px; height: 16px; margin-right: 5px; }
.topbar-sep { opacity: .5; }
@media (max-width: 640px) { .topbar-inner span:nth-child(n+2) { display: none; } }

/* ---------- Cabecera ---------- */
.header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); }
@media (min-width: 901px) { .header { background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(10px); } }
.header-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; min-height: var(--header-h); padding: 8px 0; }
.logo img { height: 64px; width: auto; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; flex-direction: column; justify-content: center; gap: 5px; padding: 8px; border-radius: var(--radius-sm); }
.nav-toggle span { display: block; height: 3px; border-radius: 3px; background: var(--primary-dark); transition: .2s; }
.search-toggle { display: none; width: 44px; height: 44px; border: 0; background: var(--primary-soft); color: var(--primary-dark); border-radius: 50%; place-items: center; }
.search { position: relative; display: flex; align-items: center; max-width: 620px; width: 100%; justify-self: center; }
.search input { width: 100%; padding: 13px 52px 13px 18px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 1rem; transition: border-color .15s, background .15s; }
.search input:focus { border-color: var(--primary); background: #fff; outline: none; }
.search button { position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; }
.search-suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; overflow-y: auto; max-height: min(50vh, 380px); z-index: 120; }
.search-suggest a { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 8px 14px; color: var(--ink); font-weight: 600; font-size: var(--fs-sm); }
.search-suggest a:hover, .search-suggest a:focus { background: var(--primary-soft); text-decoration: none; outline: none; }
.search-suggest img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: var(--surface); }
.search-suggest em { font-style: normal; color: var(--muted); font-size: .8em; }
.search-suggest .suggest-more { grid-template-columns: 1fr; text-align: center; color: var(--primary); background: var(--surface); }
.cart-link { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; position: relative; padding: 8px 10px; min-height: 44px; border-radius: var(--radius-sm); }
.cart-link:hover { background: var(--primary-soft); text-decoration: none; }
.cart-count { position: absolute; top: 0; left: 26px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--hot); color: #fff; font-size: .72rem; display: grid; place-items: center; font-weight: 800; }
.cart-count.bump { animation: bump .4s ease; }
@keyframes bump { 30% { transform: scale(1.4); } }

/* ---------- Navegación principal ---------- */
.nav { border-top: 1px solid var(--line); background: #fff; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.nav-list::-webkit-scrollbar { display: none; }
.nav-item > a { display: inline-flex; align-items: center; gap: 6px; padding: 12px 14px; font-weight: 800; color: var(--ink); white-space: nowrap; border-radius: var(--radius-sm) var(--radius-sm) 0 0; position: relative; }
.nav-item > a:hover, .nav-item.open > a { color: var(--primary); text-decoration: none; }
.nav-item > a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px; background: var(--primary); transform: scaleX(0); transition: transform .15s; }
.nav-item > a:hover::after, .nav-item.open > a::after { transform: scaleX(1); }
.nav-new > a { color: var(--primary-dark); }
.nav-new > a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 26px 0 30px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s, transform .15s, visibility .15s; }
.has-mega { position: static; }
.has-mega.open .mega { opacity: 1; visibility: visible; transform: none; }
.mega-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 22px 18px; }
.mega-title { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--primary-dark); display: block; margin-bottom: 8px; }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li a { display: block; padding: 4px 0; color: var(--ink); font-size: var(--fs-sm); font-weight: 600; }
.mega li a:hover { color: var(--primary); }
.mega-all { color: var(--muted) !important; font-size: var(--fs-xs) !important; margin-top: 4px; }
.mega-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px 20px; }
.mega-types a { display: flex !important; justify-content: space-between; padding: 8px 12px !important; border-radius: var(--radius-sm); }
.mega-types a:hover { background: var(--primary-soft); }
.mega-types small { color: var(--muted); }

/* ---------- Drawer móvil ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(22,33,58,.5); z-index: 150; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(340px, 88vw); background: #fff; z-index: 160; overflow-y: auto; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom); transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.drawer-logo { height: 34px; width: auto; }
.drawer-close, .filters-close { border: 0; background: var(--surface); width: 44px; height: 44px; border-radius: 50%; font-size: 1rem; display: grid; place-items: center; }
.drawer-list, .drawer-list ul { list-style: none; margin: 0; padding: 0; }
.drawer-group { padding: 16px 18px 6px; font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.drawer-list > li > a, .drawer-acc > button { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 48px; padding: 12px 18px; border: 0; border-bottom: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; text-align: left; font-size: 1rem; }
.drawer-new::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); margin-right: 10px; }
.drawer-new { justify-content: flex-start !important; }
.drawer-acc ul { background: var(--surface); }
.drawer-acc ul a { display: block; padding: 12px 18px 12px 28px; color: var(--ink); font-weight: 600; border-bottom: 1px solid #fff; }
.drawer-acc button[aria-expanded="true"] .caret { transform: rotate(-135deg) translateY(-2px); }

/* ---------- Flash y toast ---------- */
.flash { max-width: var(--container); margin: 14px auto 0; width: calc(100% - 32px); padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 700; }
.flash-ok { background: #dcfce7; color: #14532d; }
.flash-error { background: #fee2e2; color: #7f1d1d; }
.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 20px; background: var(--ink); color: #fff; padding: 14px 20px; border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 300; max-width: min(520px, calc(100vw - 32px)); font-weight: 600; opacity: 0; transition: opacity .25s, translate .25s; }
.toast.show { opacity: 1; translate: -50% 0; }
.toast a { color: var(--accent); font-weight: 800; }
.toast-error { background: #991b1b; }
body.has-sticky .toast { bottom: 96px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: radial-gradient(900px 420px at 85% 0%, #cfe0ff 0%, rgba(207,224,255,0) 65%), radial-gradient(520px 320px at 8% 100%, #fff1c7 0%, rgba(255,241,199,0) 70%), linear-gradient(180deg, var(--surface), #fff); padding: 56px 0 48px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; }
.eyebrow { display: inline-block; background: var(--accent); color: var(--ink); font-weight: 800; font-size: var(--fs-xs); letter-spacing: .04em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem); margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--primary-dark); background: linear-gradient(transparent 64%, var(--accent) 64%, var(--accent) 92%, transparent 92%); padding: 0 .06em; }
.hero p { font-size: var(--fs-lg); color: var(--muted); max-width: 54ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; font-weight: 700; color: var(--muted); font-size: var(--fs-sm); }
.hero-points .ico { color: var(--primary); }
.hero-visual { position: relative; height: 380px; }
.hero-visual::before { content: ""; position: absolute; inset: 8% 10%; border-radius: 45%; background: radial-gradient(circle, rgba(47,111,228,.22), rgba(47,111,228,0) 70%); }
.hero-tile { position: absolute; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 14px 14px 50px; width: 230px; transition: transform .25s; }
.hero-tile:hover { transform: translateY(-6px) rotate(0) !important; }
.hero-tile img { width: 100%; height: 186px; object-fit: contain; }
.hero-tile span { position: absolute; left: 14px; bottom: 14px; background: var(--primary); color: #fff; font-weight: 800; padding: 5px 12px; border-radius: 999px; font-size: var(--fs-sm); }
.hero-tile-0 { left: 8%; top: 40px; transform: rotate(-5deg); z-index: 2; }
.hero-tile-1 { right: 4%; top: 0; transform: rotate(6deg); }
.hero-tile-2 { left: 36%; bottom: 0; transform: rotate(2deg); z-index: 3; width: 210px; }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { height: 250px; }
  .hero-tile { width: 160px; padding: 10px 10px 42px; }
  .hero-tile img { height: 120px; }
  .hero-tile-0 { left: 0; top: 10px; }
  .hero-tile-1 { right: 0; top: 0; }
  .hero-tile-2 { left: 50%; translate: -50% 0; bottom: 0; width: 150px; }
}
@media (max-width: 640px) {
  .hero { padding: 32px 0 28px; }
  .hero p { font-size: 1rem; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- Secciones ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--surface); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
@media (max-width: 640px) { .section { padding: 36px 0; } .section-head { margin-bottom: 16px; } }
.universe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.universe-tile { display: flex; flex-direction: column; gap: 4px; padding: 18px 16px; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary-dark); border: 2px solid transparent; transition: .15s; }
.universe-tile strong { font-family: var(--font-display); font-size: 1.05rem; }
.universe-tile small { color: var(--muted); }
.universe-tile:hover { border-color: var(--primary); background: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.promise { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.promise-card { background: var(--primary-dark); color: #fff; border-radius: var(--radius-lg); padding: 30px; }
.promise-card h2 { color: #fff; }
.promise-card ul { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.promise-stat { background: var(--accent); border-radius: var(--radius-lg); padding: 30px; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.stat-num { font-family: var(--font-display); font-size: 3rem; font-weight: 700; line-height: 1; }
.stat-label { font-weight: 800; }
@media (max-width: 760px) { .promise { grid-template-columns: 1fr; } }

/* ---------- Grid y tarjetas de producto ---------- */
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
@media (max-width: 560px) { .grid-products { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s, border-color .18s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cdd9f3; }
.card-media { position: relative; display: block; background: #fff; aspect-ratio: 1; padding: 14px; }
.card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .25s; }
.card:hover .card-media img { transform: scale(1.04); }
.badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 800; }
.badge-hot { background: var(--hot); color: #fff; }
.badge-new { background: var(--accent); color: var(--ink); }
.badge-addon { background: var(--primary-soft); color: var(--primary-dark); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-license { font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--primary-dark); }
.card-title { font-family: var(--font); font-size: var(--fs-md); font-weight: 700; margin: 0; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card-title a { color: var(--ink); }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 6px; }
.card-note { color: var(--muted); font-size: var(--fs-xs); font-weight: 700; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.price s { font-family: var(--font); font-weight: 600; color: var(--muted); font-size: .8em; margin-right: 4px; }
.btn-add { background: var(--primary); color: #fff; padding: 8px 14px; min-width: 44px; min-height: 44px; border-radius: 999px; box-shadow: 0 3px 0 var(--primary-dark); }
.btn-add:hover { background: #3b7cf0; }
.btn-ghost.btn-add { background: #fff; color: var(--primary); box-shadow: none; }
@media (max-width: 560px) { .btn-add span { display: none; } .btn-add { padding: 9px 11px; } .btn-ghost.btn-add span { display: inline; } .card-body { padding: 10px; } }
.card-addon .card-media { background: var(--surface); }

/* ---------- Listado ---------- */
.listing, .blog { padding: 18px 0 40px; }
.crumbs { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.listing-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.listing-head h1 { margin: 0; }
.listing-count { color: var(--muted); font-weight: 700; margin: 0; }
.listing-layout { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 60px); }
.filters-head { display: none; }
.filter-group { border-bottom: 1px solid var(--line); padding: 10px 0; }
.filter-group summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; padding: 4px 0; }
.filter-group summary::after { content: "+"; color: var(--muted); }
.filter-group[open] summary::after { content: "–"; }
.filter-group ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.filter-group li a { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 8px; color: var(--ink); font-weight: 600; font-size: var(--fs-sm); }
.filter-group li a:hover { background: var(--primary-soft); text-decoration: none; }
.filter-group li a.on { background: var(--primary); color: #fff; }
.filter-group small { color: var(--muted); }
.filter-group li a.on small { color: #dbe7ff; }
.filter-active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.chip { display: inline-block; padding: 5px 11px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: var(--fs-xs); font-weight: 800; }
.chip-x { background: var(--ink); color: #fff; }
.chip-soft { background: var(--surface); color: var(--muted); }
.chip-free { background: #dcfce7; color: #14532d; }
.chip-kind { background: var(--accent); color: var(--ink); }
.filter-clear { font-size: var(--fs-xs); color: var(--muted); font-weight: 700; }
.price-form { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.price-form input { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.filters-open { display: none; }
.sort { font-weight: 700; font-size: var(--fs-sm); display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sort select { padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 700; font-size: 1rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 30px; font-weight: 800; flex-wrap: wrap; }
.pager a { padding: 10px 16px; min-height: 44px; display: inline-flex; align-items: center; border: 2px solid var(--primary); border-radius: 999px; }
.pager-nums { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.pager-nums a, .pager-nums span { min-width: 44px; height: 44px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 0; }
.pager-nums span[aria-current] { background: var(--primary); color: #fff; }
.pager-gap { color: var(--muted); padding: 0 4px; }
.empty { text-align: center; padding: 60px 16px; }
.empty p { color: var(--muted); }
@media (max-width: 860px) {
  .listing-layout { grid-template-columns: 1fr; }
  .filters { position: fixed; top: 0; bottom: 0; left: 0; width: min(340px, 90vw); background: #fff; z-index: 160; padding: 0 18px 24px; overflow-y: auto; transform: translateX(-100%); visibility: hidden; transition: transform .22s, visibility .22s; box-shadow: var(--shadow-lg); }
  .filters.open { transform: none; visibility: visible; }
  .filters-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 8px; font-size: 1.1rem; }
  .filters-open { display: inline-flex; }
  .btn-small { min-height: 44px; padding: 10px 16px; }
  .filter-group li a { padding: 11px 8px; }
}

/* ---------- Ficha de producto ---------- */
.product { padding: 18px 0 40px; }
.product-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.product-gallery { position: sticky; top: calc(var(--header-h) + 60px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.product-gallery img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.official { position: absolute; top: 16px; left: 16px; background: var(--good); color: #fff; font-weight: 800; font-size: var(--fs-xs); padding: 5px 11px; border-radius: 999px; }
.product-license { font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: var(--fs-xs); color: var(--primary-dark); }
.product-info h1 { margin: 6px 0 8px; font-size: clamp(1.4rem, 1rem + 1.6vw, 2.1rem); }
.product-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: var(--fs-sm); margin-bottom: 16px; }
.buy-box { background: var(--surface); border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); }
.price-row { display: flex; align-items: baseline; gap: 10px; }
.price-xl { font-size: 2.2rem; }
.vat { color: var(--muted); font-size: var(--fs-sm); font-weight: 700; }
.stock { font-weight: 700; margin: 6px 0 10px; color: var(--good); }
.stock-low { color: var(--hot); }
.addon-note { background: #fff; border-left: 4px solid var(--primary); padding: 10px 12px; border-radius: 8px; font-size: var(--fs-sm); }
.buy-points { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
.buy-points .ico { color: var(--primary); }
.buy-form { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; background: #fff; }
.qty-btn { width: 44px; height: 48px; border: 0; background: transparent; font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.qty input { width: 44px; text-align: center; border: 0; font-weight: 800; font-size: 1rem; -moz-appearance: textfield; background: transparent; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.btn-buy { width: 100%; white-space: normal; }
.bundle { grid-column: 1 / -1; background: #fff; border: 1.5px solid #c9d8f7; box-shadow: 0 2px 0 var(--line); border-radius: var(--radius); padding: 14px; margin-top: 4px; }
.bundle-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.bundle-pct { background: var(--accent); color: var(--ink); font-weight: 800; font-size: var(--fs-xs); padding: 4px 10px; border-radius: 999px; }
.bundle-hint { font-size: var(--fs-sm); color: var(--muted); margin: 0 0 10px; }
.bundle-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bundle-list label { display: grid; grid-template-columns: auto 56px 1fr auto; gap: 10px; align-items: center; padding: 8px; min-height: 48px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent; }
.bundle-list label:hover { background: var(--surface); }
.bundle-list label:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
.bundle-list input { width: 22px; height: 22px; accent-color: var(--primary); }
.bundle-list img { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: var(--radius-sm); }
.bundle-name { font-size: var(--fs-sm); font-weight: 700; line-height: 1.25; }
.bundle-name .chip { margin-left: 4px; }
.bundle-price { font-size: var(--fs-sm); text-align: right; }
.bundle-price s { color: var(--muted); font-size: .85em; display: block; }
.bundle-price b { color: var(--primary-dark); }
.bundle-total { grid-column: 1 / -1; margin: 6px 0 0; font-weight: 700; text-align: right; }
.product-desc { margin-top: 26px; }
.product-desc h2 { font-size: 1.2rem; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: var(--fs-sm); }
.specs dt { color: var(--muted); font-weight: 700; }
.specs dd { margin: 0; }
.buy-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 140; display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(29,79,168,.12); }
.buy-sticky-info { display: grid; line-height: 1.1; }
.buy-sticky-info small { color: var(--muted); font-weight: 700; }
@media (max-width: 860px) {
  .product-layout { grid-template-columns: 1fr; gap: 20px; }
  .product-gallery { position: relative; top: auto; padding: 12px; }
  .buy-form { grid-template-columns: 1fr; }
  .buy-form .qty { justify-self: start; }
  .buy-sticky:not([hidden]) { display: flex; }
  body.has-sticky { padding-bottom: 80px; }
}

/* ---------- Carrito ---------- */
.cart { padding: 20px 0 40px; }
.notice { background: var(--primary-soft); border-radius: var(--radius-sm); padding: 12px 16px; font-weight: 600; }
.notice-warn { background: var(--accent-soft); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.free-bar { background: var(--surface); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; }
.free-bar p { margin: 0 0 8px; font-weight: 600; }
.bar { height: 10px; border-radius: 999px; background: #dfe7f8; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #6ea0ff); border-radius: 999px; transition: width .4s; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.line { display: grid; grid-template-columns: 90px 1fr auto auto auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line-addon { background: var(--surface); margin: 0 -12px; padding-inline: 12px; border-radius: var(--radius-sm); border-bottom: 0; }
.line-img img { width: 90px; height: 90px; object-fit: contain; background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.line-name { color: var(--ink); font-weight: 700; display: block; }
.line-info { display: grid; gap: 4px; }
.line-qty input { width: 64px; padding: 8px; min-height: 44px; border: 2px solid var(--line); border-radius: var(--radius-sm); text-align: center; font-weight: 800; font-size: 1rem; }
.line-price { text-align: right; font-size: 1.05rem; }
.line-price s { display: block; color: var(--muted); font-size: var(--fs-sm); }
.line-remove { border: 0; background: transparent; color: var(--muted); font-size: 1rem; width: 44px; height: 44px; border-radius: 50%; }
.line-remove:hover { background: #fee2e2; color: #991b1b; }
.cart-actions { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; gap: 12px; flex-wrap: wrap; }
.summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: calc(var(--header-h) + 60px); box-shadow: var(--shadow); }
.summary h2 { font-size: 1.2rem; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0 0 16px; }
.summary dd { margin: 0; text-align: right; font-weight: 700; }
.summary .total { font-size: 1.3rem; font-family: var(--font-display); border-top: 1px solid var(--line); padding-top: 10px; }
.good { color: var(--good); font-weight: 800; }
.summary-note { font-size: var(--fs-xs); color: var(--muted); text-align: center; margin: 12px 0 0; }
.summary-lines { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.summary-lines li { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.summary-lines img { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); }
.summary-lines small { color: var(--muted); }
.grid-addons { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.addon { display: grid; grid-template-columns: 110px 1fr; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.addon-img img { width: 110px; height: 110px; object-fit: contain; border-radius: var(--radius-sm); background: var(--surface); }
.addon-body { display: flex; flex-direction: column; gap: 6px; }
.addon-name { color: var(--ink); font-weight: 700; font-size: var(--fs-sm); line-height: 1.3; }
.addon-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .cart-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .line { grid-template-columns: 70px 1fr auto; grid-template-areas: "img info remove" "img qty price"; }
  .line-img { grid-area: img; } .line-info { grid-area: info; } .line-qty { grid-area: qty; } .line-price { grid-area: price; } .line-remove { grid-area: remove; }
  .line-img img { width: 70px; height: 70px; }
  .grid-addons { grid-template-columns: 1fr; }
}

/* ---------- Checkout ---------- */
.checkout { padding: 20px 0 40px; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.checkout fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 20px; background: #fff; }
.checkout legend { font-family: var(--font-display); font-size: 1.15rem; padding: 0 8px; }
.checkout label { display: grid; gap: 6px; font-weight: 700; font-size: var(--fs-sm); margin-bottom: 14px; }
.checkout input:not([type=radio]):not([type=checkbox]), .checkout textarea { width: 100%; padding: 12px 14px; min-height: 48px; border: 2px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem; background: var(--surface); }
.checkout input:focus, .checkout textarea:focus { border-color: var(--primary); background: #fff; outline: none; }
.has-error input, .has-error textarea { border-color: var(--hot) !important; }
.field-error { color: #b91c1c; font-size: var(--fs-xs); font-weight: 700; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: 130px 1fr 1fr; gap: 14px; }
.pay-option { display: grid !important; grid-template-columns: auto 1fr; gap: 12px !important; align-items: start; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.pay-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.pay-option input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--primary); }
.pay-option span { display: grid; gap: 2px; }
.pay-option small { color: var(--muted); font-weight: 600; }
.accept { display: grid !important; grid-template-columns: auto 1fr; gap: 10px !important; align-items: start; font-weight: 600 !important; }
.accept input { width: 22px; height: 22px; accent-color: var(--primary); }
.summary-collapsible > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-size: 1.15rem; cursor: pointer; margin-bottom: 12px; }
.summary-collapsible > summary::-webkit-details-marker { display: none; }
@media (max-width: 860px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-layout .summary { order: -1; position: static; }
  .summary-collapsible:not([open]) > summary { margin-bottom: 0; }
  .summary-collapsible > summary::after { content: "▾"; margin-left: 8px; color: var(--muted); }
  .row-2, .row-3 { grid-template-columns: 1fr; }
}
@media (min-width: 861px) { .summary-collapsible > summary { pointer-events: none; } }

/* ---------- Gracias ---------- */
.thanks { padding: 30px 0 50px; }
.thanks-card { max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); }
.thanks-ico { font-size: 3rem; display: block; }
.pay-box { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; }
.pay-box h2 { font-size: 1.1rem; }
.iban { font-family: ui-monospace, monospace; font-size: 1.1rem; background: #fff; padding: 10px 14px; border-radius: var(--radius-sm); display: inline-block; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; }
.totals dd { margin: 0; text-align: right; }

/* ---------- Páginas de texto y blog ---------- */
.page { padding: 24px 0 50px; max-width: 760px; }
.prose p, .prose li { color: #2c3752; }
.prose h2 { font-size: 1.35rem; margin-top: 1.6em; }
.prose .lead { font-size: var(--fs-lg); }
.grid-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card-media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--surface); }
.post-card-media img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.post-card-media .chip { position: absolute; top: 10px; left: 10px; }
.post-card-body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.post-card-body h3 { font-family: var(--font); font-size: var(--fs-md); font-weight: 800; margin: 0; line-height: 1.3; }
.post-card-body h3 a { color: var(--ink); }
.post-card-body p { color: var(--muted); font-size: var(--fs-sm); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-body time { color: var(--muted); font-size: var(--fs-xs); font-weight: 700; }
.post { padding: 18px 0 50px; }
.post-head { max-width: 820px; margin-bottom: 24px; }
.post-head h1 { margin: 10px 0 8px; }
.post-meta { color: var(--muted); font-size: var(--fs-sm); font-weight: 700; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.post-body { max-width: 820px; }
.toc { background: var(--surface); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 22px; font-size: var(--fs-sm); }
.toc ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.post-products { list-style: none; margin: 0 0 1.5em; padding: 0; display: grid; gap: 16px; counter-reset: pp; }
.post-product { display: grid; grid-template-columns: 180px 1fr; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; counter-increment: pp; position: relative; }
.post-product::before { content: counter(pp); position: absolute; top: 10px; left: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--ink); font-weight: 800; font-size: var(--fs-sm); display: grid; place-items: center; }
.pp-img img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.pp-body h3 { font-family: var(--font); font-size: var(--fs-lg); font-weight: 800; margin: 0 0 4px; }
.pp-body h3 a { color: var(--ink); }
.pp-meta { color: var(--muted); font-size: var(--fs-sm); margin: 0 0 8px; }
.pp-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pp-foot .stock-low { font-size: var(--fs-sm); font-weight: 700; }
.post-links { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; gap: 8px; }
.post-links a { display: block; padding: 10px 14px; background: var(--surface); border-radius: var(--radius-sm); font-weight: 700; }
.faq { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 800; }
.faq p { margin: 10px 0 0; }
.post-aside { position: sticky; top: calc(var(--header-h) + 60px); display: grid; gap: 16px; }
.aside-card { background: var(--surface); border-radius: var(--radius); padding: 18px; }
.aside-card ul { padding-left: 18px; margin: 8px 0 14px; font-size: var(--fs-sm); display: grid; gap: 4px; }
.aside-posts { list-style: none !important; padding: 0 !important; }
.aside-posts a { font-weight: 700; }
.related-posts { padding-bottom: 0; }
@media (max-width: 860px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-aside { position: static; }
  .post-product { grid-template-columns: 110px 1fr; gap: 12px; }
}

/* ---------- Confianza y pie ---------- */
.trust { background: var(--surface); border-top: 1px solid var(--line); padding: 30px 0; margin-top: 30px; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.trust-grid > div { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; }
.trust-ico { grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; }
.trust-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.trust-grid strong { font-size: var(--fs-sm); }
.trust-grid small { color: var(--muted); font-size: var(--fs-xs); }
.footer { background: var(--primary-dark); color: #d9e4fb; padding: 44px 0 20px; }
.footer a { color: #fff; }
.footer h4 { color: #ffd978; font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--fs-sm); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer-logo { height: 48px; width: auto; padding: 8px 14px; background: #fff; border-radius: var(--radius-sm); box-sizing: content-box; margin-bottom: 14px; }
.footer-contact { font-size: var(--fs-sm); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 30px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.15); font-size: var(--fs-xs); }
.pay-logos { display: flex; gap: 6px; }
.pay-logos span { border: 1px solid rgba(255,255,255,.35); border-radius: 6px; padding: 2px 8px; font-weight: 800; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Responsive cabecera ---------- */
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: flex; }
  .header-inner { grid-template-columns: 44px 1fr auto auto; grid-template-areas: "toggle logo stoggle cart" "search search search search"; gap: 8px 10px; padding: 8px 0 10px; }
  .nav-toggle { grid-area: toggle; }
  .logo { grid-area: logo; justify-self: center; }
  .logo img { height: 46px; }
  .search { grid-area: search; max-width: none; transition: max-height .2s, opacity .2s, margin .2s; max-height: 60px; }
  .search input { padding: 11px 48px 11px 16px; }
  .search-toggle { grid-area: stoggle; }
  .search-toggle:not([hidden]) { display: grid; }
  .cart-link { grid-area: cart; }
  .cart-label { display: none; }
  .nav { display: none; }
  body.scrolled .search { max-height: 0; opacity: 0; pointer-events: none; overflow: hidden; margin-top: -8px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Texto SEO de categorías ---------- */
.seo-intro { margin: -4px 0 18px; max-width: 900px; }
.seo-intro p { color: var(--muted); font-size: var(--fs-md); margin: 0 0 10px; }
.chips-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 36px; background: var(--primary-soft); color: var(--primary-dark); border: 1px solid transparent; font-size: var(--fs-sm); font-weight: 700; transition: .15s; }
.chip-link:hover { background: #fff; border-color: var(--primary); text-decoration: none; }
.chip-link small { color: var(--muted); font-weight: 700; }
.seo-text { max-width: 820px; margin: 44px auto 0; padding-top: 28px; border-top: 1px solid var(--line); }
.seo-text h2 { font-size: 1.3rem; margin: 1.6em 0 .5em; }
.seo-text p { color: #2c3752; }
.seo-text .seo-lead { font-size: var(--fs-lg); color: var(--ink); }
.seo-text .chips-row { margin: 6px 0 12px; }

/* ---------- Ofertas ---------- */
.badge-sale { background: var(--hot); color: #fff; }
.nav-sale > a { color: var(--hot); }
.drawer-sale { color: var(--hot) !important; }
.price-before { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 700; }
.price-before s { font-size: 1.1rem; }
.badge-sale-inline { background: var(--hot); color: #fff; font-size: var(--fs-xs); font-weight: 800; padding: 3px 9px; border-radius: 999px; }
