/* ==========================================================================
   Proyectos Libreria y Bazar · estilos de la tienda
   Paleta tomada del logo: rojo intenso + azul marino + blanco.
   ========================================================================== */
:root {
  --navy-900: #0a2350;
  --navy-800: #0f3170;
  --blue-600: #054298;
  --blue-500: #2a6fd6;
  --blue-100: #e1eaf8;
  --blue-50: #f1f5fc;
  --red: #dd020b;
  --red-700: #b00009;
  --red-500: #f2323a;
  --red-100: #fde8ea;
  --yellow: #ffc61a;
  --yellow-600: #f0a800;
  --yellow-100: #fff4d1;
  --green: #0d8f4f;
  --green-100: #dff5e8;
  --cream: #f6f8fc;
  --ink: #14213d;
  --ink-2: #4b5976;
  --ink-3: #7b869c;
  --line: #e2e8f3;
  --bg: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 6px 22px rgba(10, 35, 80, .10);
  --shadow-lg: 0 18px 50px rgba(10, 35, 80, .18);
  --font-title: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.2; margin: 0 0 .5em; color: var(--navy-900); font-weight: 600; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 800; font-size: 15px; transition: transform .15s, box-shadow .15s, background .15s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(221, 2, 11, .28); }
.btn-primary:hover { background: var(--red-700); }
.btn-navy { background: var(--navy-900); color: #fff; box-shadow: 0 6px 16px rgba(10, 35, 80, .3); }
.btn-navy:hover { background: var(--blue-600); }
.btn-wa { background: #25d366; color: #063d1f; box-shadow: 0 6px 16px rgba(37, 211, 102, .3); }
.btn-wa:hover { background: #1fbd5a; }
.btn-ghost { background: #fff; border: 2px solid var(--red); color: var(--red); }
.btn-ghost:hover { background: var(--red-100); }
.btn-white { background: #fff; color: var(--navy-900); }
.btn-lg { min-height: 54px; padding: 0 30px; font-size: 17px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- topbar ---------- */
.topbar { background: var(--navy-900); color: #fff; font-weight: 800; font-size: 14px; }
.topbar .wrap { height: 38px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.topbar-msg { position: absolute; opacity: 0; transform: translateY(10px); transition: .5s; text-align: center; padding: 0 8px; white-space: nowrap; }
.topbar-msg.on { opacity: 1; transform: none; }

/* ---------- header ---------- */
.header { background: #fff; position: sticky; top: 0; z-index: 60; box-shadow: 0 2px 14px rgba(10, 35, 80, .08); }
.header-main { display: grid; grid-template-columns: auto auto 1fr auto; gap: 18px; align-items: center; padding: 10px 0; }
.logo img { height: 58px; width: auto; }
.cat-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--red); color: #fff; font-weight: 800; border-radius: 999px; padding: 0 20px; min-height: 46px; }
.cat-btn:hover { background: var(--red-700); }
.burger { display: none; width: 46px; height: 46px; border-radius: 12px; align-items: center; justify-content: center; font-size: 24px; color: var(--navy-800); }
.search { position: relative; }
.search form { display: flex; background: var(--blue-50); border: 2px solid transparent; border-radius: 999px; overflow: hidden; transition: border-color .15s, background .15s; }
.search form:focus-within { border-color: var(--blue-500); background: #fff; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 20px; min-height: 46px; outline: none; }
.search button { width: 54px; color: var(--red); font-size: 20px; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; z-index: 70; max-height: 70vh; overflow: auto; }
.suggest h5 { margin: 8px 12px 4px; font: 800 12px var(--font-body); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; }
.suggest a:hover, .suggest a.sel { background: var(--blue-50); }
.suggest img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--line); }
.suggest small { color: var(--ink-3); display: block; }
.suggest .price { margin-left: auto; font-weight: 800; color: var(--red); }
.h-actions { display: flex; align-items: center; gap: 6px; }
.h-act { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px; border-radius: 12px; font-size: 12px; font-weight: 800; color: var(--navy-800); position: relative; }
.h-act:hover { background: var(--blue-50); }
.h-act svg { width: 26px; height: 26px; }
.cart-count { position: absolute; top: 0; right: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; display: grid; place-items: center; }
.cart-count[data-n="0"] { display: none; }
.search-row-m { display: none; }

/* mega menú */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: var(--shadow-lg); border-top: 1px solid var(--line); z-index: 65; }
.mega-in { display: grid; grid-template-columns: 280px 1fr 280px; min-height: 380px; }
.mega-cats { background: var(--blue-50); padding: 12px; }
.mega-cats a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; font-weight: 800; color: var(--navy-900); }
.mega-cats a:hover, .mega-cats a.on { background: #fff; color: var(--red); box-shadow: 0 3px 10px rgba(10, 35, 80, .08); }
.mega-cats .ic { font-size: 22px; width: 28px; text-align: center; }
.mega-subs { padding: 22px 28px; columns: 2; column-gap: 28px; align-content: start; }
.mega-subs h4 { column-span: all; font-size: 22px; }
.mega-subs a { display: block; padding: 7px 0; color: var(--ink-2); font-weight: 700; }
.mega-subs a:hover { color: var(--red); transform: translateX(3px); }
.mega-promo { margin: 16px; border-radius: var(--radius); padding: 22px; color: #fff; background: linear-gradient(150deg, var(--red-700), var(--red-500)); display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; position: relative; overflow: hidden; }
.mega-promo::after { content: '✏️'; position: absolute; top: 14px; right: 16px; font-size: 64px; opacity: .25; transform: rotate(18deg); }
.mega-promo h4 { color: #fff; font-size: 24px; }
.mega-promo p { margin: 0; opacity: .92; }

/* menú móvil */
.drawer-bg { position: fixed; inset: 0; background: rgba(6, 20, 50, .55); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-bg.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; bottom: 0; width: min(420px, 92vw); background: #fff; z-index: 95; display: flex; flex-direction: column; transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-lg); }
.drawer.left { left: 0; transform: translateX(-102%); }
.drawer.right { right: 0; transform: translateX(102%); }
.drawer.on { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-size: 22px; }
.x-btn { width: 42px; height: 42px; border-radius: 50%; font-size: 22px; background: var(--blue-50); color: var(--navy-800); }
.drawer-body { flex: 1; overflow: auto; padding: 8px 12px 20px; }
.m-acc > button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 10px; font-weight: 800; font-size: 17px; text-align: left; border-bottom: 1px solid var(--line); }
.m-acc > button::after { content: '+'; margin-left: auto; font-size: 22px; color: var(--red); }
.m-acc.on > button::after { content: '–'; }
.m-acc .subs { display: none; padding: 6px 10px 12px 52px; }
.m-acc.on .subs { display: block; }
.m-acc .subs a { display: block; padding: 8px 0; color: var(--ink-2); font-weight: 700; }

/* ---------- hero slider ---------- */
.hero { position: relative; overflow: hidden; background: var(--navy-900); }
.slides { display: flex; transition: transform .7s cubic-bezier(.6, 0, .2, 1); }
.slide { min-width: 100%; position: relative; min-height: 440px; display: flex; align-items: center; color: #fff; overflow: hidden; }
.slide .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 24px; width: min(var(--wrap), 100% - 160px); }
.slide h2 { color: #fff; font-size: clamp(34px, 5vw, 60px); margin-bottom: 12px; }
.slide p { font-size: clamp(17px, 2vw, 22px); opacity: .95; margin-bottom: 26px; }
.slide .art { position: relative; height: 380px; }
.slide .art .emoji { position: absolute; font-size: 110px; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .25)); animation: float 5s ease-in-out infinite; }
.slide .art img { position: absolute; max-height: 360px; width: auto; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .3)); animation: float 6s ease-in-out infinite; }
.slide::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .18), transparent 40%), radial-gradient(circle at 10% 100%, rgba(0, 0, 0, .18), transparent 45%); }
.slide .dots-bg { position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .13) 2px, transparent 2px); background-size: 28px 28px; opacity: .7; }
@keyframes float { 50% { transform: translateY(-12px) rotate(2deg); } }
.s1 { background: linear-gradient(120deg, #b00009, #f2323a); }
.s2 { background: linear-gradient(120deg, #0a2350, #2a6fd6); }
.s3 { background: linear-gradient(120deg, #7a0006, #dd020b); }
.s4 { background: linear-gradient(120deg, #054298, #3b86ee); }
.s5 { background: linear-gradient(120deg, #0a2350, #dd020b); }
.hero-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--navy-800); font-size: 22px; box-shadow: var(--shadow); }
.hero-nav.prev { left: 18px; } .hero-nav.next { right: 18px; }
.hero-dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 5; }
.hero-dots button { width: 12px; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .5); transition: .3s; }
.hero-dots button.on { width: 34px; background: #fff; }

/* ---------- secciones ---------- */
.section { padding: 56px 0; }
.section.alt { background: var(--cream); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 36px); margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--ink-2); }
.link-more { font-weight: 800; color: var(--red); }
.link-more:hover { text-decoration: underline; }

.benefits { background: #fff; border-bottom: 1px solid var(--line); }
.benefits .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 18px 0; }
.benefit { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--navy-900); font-size: 15px; line-height: 1.3; }
.benefit .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--blue-50); display: grid; place-items: center; font-size: 24px; flex: none; }

.cat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 16px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; font-weight: 800; color: var(--navy-900); }
.cat-tile .ball { width: 100%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(34px, 4.4vw, 56px); background: var(--blue-50); border: 3px solid #fff; box-shadow: var(--shadow); transition: transform .25s, background .25s; }
.cat-tile:nth-child(3n+2) .ball { background: var(--yellow-100); }
.cat-tile:nth-child(3n) .ball { background: var(--red-100); }
.cat-tile:hover .ball { transform: translateY(-6px) rotate(-4deg); }

/* ofertas */
.deal { background: linear-gradient(135deg, var(--red-700), var(--red-500)); color: #fff; border-radius: 28px; padding: 30px; position: relative; overflow: hidden; }
.deal::after { content: '%'; position: absolute; right: -10px; top: -70px; font: 700 300px var(--font-title); opacity: .1; }
.deal-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; position: relative; z-index: 1; }
.deal-head h2 { color: #fff; margin: 0; font-size: clamp(26px, 3.4vw, 38px); }
.deal-head p { margin: 2px 0 0; opacity: .92; }
.countdown { display: flex; gap: 8px; }
.cd { background: #fff; color: var(--red); border-radius: 12px; min-width: 62px; padding: 6px 8px; text-align: center; font: 700 26px/1 var(--font-title); }
.cd small { display: block; font: 800 11px var(--font-body); color: var(--ink-3); text-transform: uppercase; margin-top: 3px; }
.deal .link-more { color: #fff; }

/* carrusel */
.carousel { position: relative; }
.track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 6px 4px 18px; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.track > * { flex: 0 0 calc((100% - 18px * 3) / 4); scroll-snap-align: start; min-width: 220px; }
.car-btn { position: absolute; top: 40%; z-index: 3; width: 46px; height: 46px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); color: var(--navy-800); font-size: 20px; }
.car-btn.prev { left: -14px; } .car-btn.next { right: -14px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tab { padding: 9px 20px; border-radius: 999px; background: var(--blue-50); font-weight: 800; color: var(--navy-800); }
.tab.on { background: var(--red); color: #fff; }

/* ---------- tarjeta de producto ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; position: relative; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-img { display: block; aspect-ratio: 1; background: #fff; position: relative; padding: 10px; }
.card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s; }
.card:hover .card-img img { transform: scale(1.06); }
.badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; z-index: 2; }
.badge { font: 800 12px var(--font-body); padding: 4px 10px; border-radius: 999px; color: #fff; background: var(--red); }
.badge.new { background: var(--yellow); color: var(--navy-900); }
.badge.best { background: var(--navy-800); }
.badge.last { background: #6b778c; }
.fav { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); font-size: 18px; color: var(--ink-3); }
.fav.on { color: var(--red); }
.card-body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-brand { font: 800 12px var(--font-body); color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.card-name { font-weight: 800; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card-name:hover { color: var(--red); }
.stars { color: var(--yellow-600); letter-spacing: 1px; font-size: 14px; white-space: nowrap; }
.stars small { color: var(--ink-3); letter-spacing: 0; margin-left: 4px; font-weight: 700; }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.price { font: 700 24px var(--font-title); color: var(--navy-800); }
.price.sale { color: var(--red); }
.old { color: var(--ink-3); text-decoration: line-through; font-weight: 700; }
.card .btn { margin-top: 8px; }
.card.out { opacity: .7; }
.card.out .card-img img { filter: grayscale(1); }
.skeleton { background: linear-gradient(90deg, #eef2f9 25%, #f9fbfe 50%, #eef2f9 75%); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: var(--radius); min-height: 340px; }
@keyframes sk { to { background-position: -200% 0; } }

/* banners de media anchura */
.split-banner { display: grid; grid-template-columns: 1fr 1fr; border-radius: 28px; overflow: hidden; background: var(--blue-50); border: 1px solid var(--line); }
.split-banner .art { background: linear-gradient(135deg, var(--red-700), var(--red-500)); display: grid; place-items: center; padding: 30px; min-height: 280px; position: relative; }
.split-banner .art img { max-height: 280px; width: auto; filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .3)); }
.slide .art img, .split-banner .art img { border-radius: 28px; background: #fff; }
.split-banner .art img { box-shadow: 0 18px 40px rgba(0, 0, 0, .25); transform: rotate(-3deg); }
.slide .art img { transform: rotate(3deg); }
.split-banner .txt { padding: 40px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; }
.split-banner h2 { font-size: clamp(28px, 3.4vw, 40px); }
.split-banner .btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.strip { background: linear-gradient(100deg, var(--red-700), var(--red-500)); color: #fff; border-radius: 18px; padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; font: 600 20px var(--font-title); margin-bottom: 18px; flex-wrap: wrap; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.chip { padding: 8px 18px; border-radius: 999px; background: #fff; border: 2px solid var(--line); font-weight: 800; color: var(--navy-800); }
.chip:hover { border-color: var(--blue-500); background: var(--blue-50); }
.corp { background: linear-gradient(120deg, var(--navy-900), var(--blue-600)); color: #fff; border-radius: 28px; padding: 48px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; position: relative; overflow: hidden; }
.corp h2 { color: #fff; font-size: clamp(28px, 3.4vw, 40px); }
.corp .big { font-size: 130px; text-align: center; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .3)); }
.brands { display: flex; gap: 40px; align-items: center; justify-content: center; flex-wrap: wrap; }
.brand { font: 700 26px var(--font-title); color: var(--ink-3); filter: grayscale(1); opacity: .7; transition: .25s; letter-spacing: .02em; }
.brand:hover { filter: none; opacity: 1; color: var(--red); }
.testi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testi blockquote { margin: 0; background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.testi cite { display: block; margin-top: 12px; font-weight: 800; font-style: normal; color: var(--navy-800); }
.newsletter { background: var(--navy-900); color: #fff; border-radius: 28px; padding: 42px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.newsletter h2 { color: #fff; font-size: clamp(26px, 3.2vw, 36px); }
.nl-form { display: flex; gap: 10px; flex-wrap: wrap; }
.nl-form input[type=email] { flex: 1; min-width: 200px; border: 2px solid #fff; border-radius: 999px; padding: 0 20px; min-height: 52px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; flex-basis: 100%; }
.check input { margin-top: 4px; accent-color: var(--red); width: 18px; height: 18px; }

/* ---------- migas, listado ---------- */
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; padding: 18px 0 6px; font-size: 14px; color: var(--ink-3); font-weight: 700; }
.crumbs a:hover { color: var(--red); text-decoration: underline; }
.crumbs span.sep { opacity: .5; }
.cat-banner { background: linear-gradient(110deg, var(--red-700), var(--red-500)); color: #fff; border-radius: 24px; padding: 30px 36px; margin: 8px 0 18px; position: relative; overflow: hidden; }
.cat-banner h1 { color: #fff; font-size: clamp(28px, 4vw, 42px); margin-bottom: 4px; }
.cat-banner p { margin: 0; opacity: .95; }
.cat-banner .big { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); font-size: 100px; opacity: .3; }
.list-layout { display: grid; grid-template-columns: 270px 1fr; gap: 28px; align-items: start; padding-bottom: 60px; }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 20px 14px; position: sticky; top: 150px; }
.f-block { padding: 14px 0; border-bottom: 1px solid var(--line); }
.f-block:last-child { border: 0; }
.f-block h4 { font-size: 16px; margin-bottom: 8px; }
.f-block label { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.f-block label small { margin-left: auto; color: var(--ink-3); }
.f-block input[type=checkbox], .f-block input[type=radio] { accent-color: var(--red); width: 18px; height: 18px; }
.range { display: flex; gap: 8px; align-items: center; }
.range input { width: 100%; border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .count { font-weight: 800; color: var(--ink-2); }
.toolbar select { border: 2px solid var(--line); border-radius: 999px; padding: 9px 16px; background: #fff; font-weight: 700; }
.tools-r { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.view-btn { width: 42px; height: 42px; border-radius: 12px; border: 2px solid var(--line); font-size: 18px; }
.view-btn.on { background: var(--red); border-color: var(--red); color: #fff; }
.active-f { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tag { background: var(--red-100); color: var(--red-700); padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.tag button { font-size: 16px; line-height: 1; color: var(--red); }
.grid.list { grid-template-columns: 1fr; }
.grid.list .card { flex-direction: row; }
.grid.list .card-img { width: 200px; flex: none; }
.grid.list .card-body { padding: 16px; justify-content: center; }
.grid.list .price-row { margin-top: 6px; }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 30px; flex-wrap: wrap; }
.pager button { min-width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--line); font-weight: 800; background: #fff; }
.pager button.on { background: var(--red); border-color: var(--red); color: #fff; }
.empty { text-align: center; padding: 60px 20px; background: var(--blue-50); border-radius: var(--radius); }
.empty .big { font-size: 64px; }
.m-filter-bar { display: none; }

/* ---------- detalle de producto ---------- */
.pdp { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; padding: 10px 0 40px; align-items: start; }
.gallery { display: grid; grid-template-columns: 84px 1fr; gap: 14px; position: sticky; top: 150px; }
.thumbs { display: flex; flex-direction: column; gap: 10px; grid-column: 1; grid-row: 1; align-self: start; }
.main-img { grid-column: 2; grid-row: 1; }
.gallery.single { grid-template-columns: 1fr; }
.gallery.single .main-img, .gallery.single .share { grid-column: 1; }
.thumb { border: 2px solid var(--line); border-radius: 12px; padding: 4px; background: #fff; aspect-ratio: 1; }
.thumb.on { border-color: var(--red); }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.main-img { border: 1px solid var(--line); border-radius: 22px; background: #fff; aspect-ratio: 1; overflow: hidden; position: relative; cursor: zoom-in; }
.main-img img { width: 100%; height: 100%; object-fit: contain; padding: 18px; transition: transform .2s; transform-origin: center; }
.share { display: flex; gap: 10px; align-items: center; margin-top: 10px; grid-column: 2; font-weight: 800; color: var(--ink-3); font-size: 14px; flex-wrap: wrap; }
.share a, .share button { padding: 6px 14px; border-radius: 999px; background: var(--blue-50); color: var(--navy-800); font-weight: 800; font-size: 13px; }
.buy h1 { font-size: clamp(26px, 3vw, 36px); margin: 4px 0 8px; }
.buy .meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; color: var(--ink-3); font-weight: 700; font-size: 14px; margin-bottom: 14px; }
.buy .brand-l { font-weight: 800; color: var(--red); text-transform: uppercase; letter-spacing: .05em; font-size: 13px; }
.buy .price { font-size: 44px; }
.save { display: inline-block; background: var(--red-100); color: var(--red); font-weight: 800; border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.stock { font-weight: 800; margin: 12px 0; }
.stock.ok { color: var(--green); } .stock.low { color: #c77700; } .stock.no { color: var(--red); }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.qty button { width: 44px; height: 44px; font-size: 20px; font-weight: 800; color: var(--navy-800); }
.qty button:hover { background: var(--blue-50); }
.qty input { width: 48px; text-align: center; border: 0; font-weight: 800; -moz-appearance: textfield; background: transparent; }
.qty input::-webkit-inner-spin-button { display: none; }
.buy-actions { display: grid; gap: 12px; margin: 18px 0; }
.buy-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.buy-row .btn { flex: 1; }
.delivery { background: var(--blue-50); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 12px; margin-bottom: 14px; }
.delivery div { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.delivery b { color: var(--navy-900); }
.trust { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.trust span { display: inline-flex; gap: 6px; align-items: center; }
.ptabs { border: 1px solid var(--line); border-radius: 22px; overflow: hidden; margin-bottom: 40px; }
.ptabs-nav { display: flex; background: var(--blue-50); overflow-x: auto; }
.ptabs-nav button { padding: 16px 24px; font-weight: 800; color: var(--ink-2); white-space: nowrap; border-bottom: 4px solid transparent; }
.ptabs-nav button.on { color: var(--navy-800); border-color: var(--red); background: #fff; }
.ptab { padding: 28px; }
.ptab ul.dots li { padding: 6px 0 6px 28px; position: relative; }
.ptab ul.dots li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.spec { width: 100%; border-collapse: collapse; }
.spec td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.spec td:first-child { font-weight: 800; background: var(--blue-50); width: 38%; }
.mbar { display: none; }

/* ---------- carrito (drawer) ---------- */
.cart-items { padding: 6px 4px; }
.ci { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; padding: 14px 8px; border-bottom: 1px solid var(--line); align-items: center; }
.ci img { width: 76px; height: 76px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ci h5 { font: 800 15px/1.3 var(--font-body); margin: 0 0 4px; color: var(--ink); }
.ci .qty button { width: 34px; height: 34px; } .ci .qty input { width: 36px; }
.ci .rm { color: var(--ink-3); font-size: 13px; font-weight: 800; text-decoration: underline; margin-top: 6px; }
.ci .sub { font-weight: 800; color: var(--navy-800); text-align: right; }
.cart-foot { border-top: 1px solid var(--line); padding: 16px 20px 20px; background: var(--cream); }
.free-bar { margin-bottom: 14px; font-size: 14px; font-weight: 800; color: var(--navy-900); }
.free-bar .bar { height: 10px; background: #fff; border-radius: 5px; overflow: hidden; margin-top: 6px; border: 1px solid var(--line); }
.free-bar .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue-500), var(--red)); border-radius: 5px; transition: width .4s; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font-weight: 800; }
.total-row b { font: 700 28px var(--font-title); color: var(--navy-800); }
.co-form { display: grid; gap: 10px; margin-bottom: 12px; }
.co-form label { font-size: 13px; font-weight: 800; color: var(--ink-2); display: grid; gap: 4px; }
.co-form input, .co-form select, .co-form textarea { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; width: 100%; }
.co-form input:focus, .co-form select:focus, .co-form textarea:focus { border-color: var(--blue-500); outline: none; }
.co-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cart-empty { text-align: center; padding: 50px 20px; color: var(--ink-2); }
.cart-empty .big { font-size: 64px; }
.note { font-size: 13px; color: var(--ink-3); margin: 8px 0 0; text-align: center; }

/* ---------- páginas de contenido ---------- */
.page-hero { background: linear-gradient(120deg, var(--navy-900), var(--blue-600)); color: #fff; padding: 56px 0; position: relative; overflow: hidden; }
.page-hero h1 { color: #fff; font-size: clamp(32px, 5vw, 52px); margin-bottom: 8px; }
.page-hero p { font-size: 20px; margin: 0; opacity: .95; }
.page-hero::after { content: '✏️'; position: absolute; right: 8%; top: 50%; font-size: 150px; opacity: .15; transform: translateY(-50%) rotate(20deg); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.box .ic { width: 56px; height: 56px; border-radius: 16px; background: var(--yellow-100); display: grid; place-items: center; font-size: 28px; margin-bottom: 12px; }
.box h3 { font-size: 20px; }
.box p { margin: 0; color: var(--ink-2); }
.stat { text-align: center; }
.stat b { display: block; font: 700 48px var(--font-title); color: var(--red); }
.stat span { font-weight: 800; color: var(--ink-2); }
.store-card { display: grid; gap: 6px; }
.store-card .photo { height: 150px; border-radius: 14px; background: linear-gradient(135deg, var(--blue-100), var(--yellow-100)); display: grid; place-items: center; font-size: 56px; margin-bottom: 8px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 800; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::after { content: '+'; font-size: 22px; color: var(--red); }
.faq details[open] summary::after { content: '–'; }
.faq p { color: var(--ink-2); padding-bottom: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 800; font-size: 14px; }
.field input, .field select, .field textarea { border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-500); outline: none; }
.field .err { color: var(--red); font-size: 13px; font-weight: 700; min-height: 0; }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--red); }
.hp { position: absolute; left: -9999px; }
.alert { padding: 14px 18px; border-radius: 12px; font-weight: 800; margin-bottom: 14px; }
.alert.ok { background: var(--green-100); color: #075c33; }
.alert.bad { background: var(--red-100); color: var(--red); }
.legal h2 { margin-top: 30px; font-size: 26px; }
.legal { max-width: 860px; }
.legal .test { background: var(--yellow-100); border-radius: 12px; padding: 12px 16px; font-weight: 700; }
.claims { display: flex; gap: 18px; align-items: center; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 14px 20px; }

/* ---------- footer ---------- */
.footer { background: var(--navy-900); color: #c9d6ee; margin-top: 40px; position: relative; }
.footer::before { content: ''; position: absolute; left: 0; right: 0; top: -22px; height: 24px; background: radial-gradient(circle at 14px 24px, var(--navy-900) 14px, transparent 15px) 0 0 / 28px 24px repeat-x; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 36px; padding: 56px 0 30px; }
.footer h4 { color: #fff; font-size: 18px; }
.footer a { display: block; padding: 4px 0; color: #c9d6ee; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer .logo-f { background: #fff; border-radius: 18px; padding: 8px 14px; display: inline-block; margin-bottom: 14px; }
.footer .logo-f img { height: 120px; }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .1); display: grid; place-items: center; padding: 0; font-weight: 800; color: #fff; }
.socials a:hover { background: var(--red); color: #fff; }
.pay { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pay span { background: #fff; color: var(--navy-900); border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 800; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 0; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 14px; align-items: center; }
.libro { display: inline-flex !important; gap: 8px; align-items: center; border: 2px solid rgba(255, 255, 255, .5); border-radius: 10px; padding: 6px 12px !important; font-weight: 800; }

/* ---------- flotantes ---------- */
.fab-wa { position: fixed; right: 18px; bottom: 18px; z-index: 80; width: 62px; height: 62px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(37, 211, 102, .5); animation: pulse 2.4s infinite; }
.fab-wa svg { width: 34px; height: 34px; fill: #fff; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .6); } 70% { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
.fab-top { position: fixed; right: 26px; bottom: 92px; z-index: 79; width: 46px; height: 46px; border-radius: 50%; background: var(--red); color: #fff; font-size: 20px; opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--shadow); }
.fab-top.on { opacity: 1; pointer-events: auto; }
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 85; max-width: 760px; margin-inline: auto; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 18px 22px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border: 2px solid var(--red-100); }
.cookie p { margin: 0; flex: 1; min-width: 220px; font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); background: var(--navy-900); color: #fff; padding: 14px 22px; border-radius: 999px; font-weight: 800; z-index: 120; opacity: 0; transition: .3s; pointer-events: none; box-shadow: var(--shadow-lg); max-width: 92vw; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid, .track > * { --cols: 3; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .track > * { flex-basis: calc((100% - 18px * 2) / 3); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .mega-in { grid-template-columns: 240px 1fr; } .mega-promo { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .header-main { grid-template-columns: auto 1fr auto; gap: 8px; padding: 6px 0; }
  .burger { display: inline-flex; }
  .cat-btn, .search-d, .h-act .lbl, .h-act.hide-m { display: none; }
  .logo { justify-self: center; } .logo img { height: 40px; }
  .h-act { padding: 6px 8px; }
  .search-row-m { display: block; padding: 0 0 10px; }
  .slide { min-height: 520px; align-items: flex-start; }
  .slide .wrap { grid-template-columns: 1fr; width: min(var(--wrap), 100% - 32px); padding-top: 34px; }
  .slide .art { height: 220px; } .slide .art .emoji { font-size: 80px; } .slide .art img { max-height: 210px; }
  .hero-nav { display: none; }
  .benefits .wrap { grid-template-columns: 1fr 1fr; }
  .list-layout { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0 auto 0 0; width: min(380px, 92vw); z-index: 96; border-radius: 0; overflow: auto; transform: translateX(-102%); transition: transform .3s; top: 0; padding: 12px 20px 90px; }
  .filters.on { transform: none; }
  .m-filter-bar { display: flex; gap: 10px; position: sticky; top: 118px; z-index: 40; background: #fff; padding: 10px 0; }
  .m-filter-bar .btn { flex: 1; min-height: 44px; }
  .pdp { grid-template-columns: 1fr; gap: 20px; }
  .gallery { position: static; grid-template-columns: 1fr; }
  .thumbs, .main-img { grid-column: 1; grid-row: auto; }
  .thumbs { flex-direction: row; order: 2; overflow-x: auto; } .thumb { width: 70px; flex: none; }
  .share { grid-column: 1; order: 3; }
  .two-col, .corp, .newsletter, .split-banner { grid-template-columns: 1fr; }
  .corp, .newsletter { padding: 30px 24px; } .corp .big { display: none; }
  .split-banner .txt { padding: 28px 24px; }
  .testi, .three { grid-template-columns: 1fr; }
  .four { grid-template-columns: 1fr 1fr; }
  .mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -6px 20px rgba(0, 0, 0, .12); align-items: center; }
  .mbar .price { font-size: 22px; flex: none; } .mbar .btn { flex: 1; min-height: 48px; padding: 0 12px; }
  body.has-mbar { padding-bottom: 76px; } body.has-mbar .fab-wa { bottom: 90px; } body.has-mbar .fab-top { bottom: 160px; }
  .form-grid { grid-template-columns: 1fr; }
  .grid.list .card { flex-direction: column; } .grid.list .card-img { width: 100%; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .track > * { flex-basis: 62%; min-width: 0; }
  .car-btn { display: none; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; font-size: 12px; }
  .section { padding: 38px 0; }
  .card-body { padding: 2px 12px 14px; } .price { font-size: 20px; } .card .btn { min-height: 42px; padding: 0 10px; font-size: 14px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding-top: 40px; }
  .deal { padding: 22px 16px; border-radius: 22px; }
  .cd { min-width: 54px; font-size: 22px; }
  .four { grid-template-columns: 1fr; }
  .ptab { padding: 18px; }
  .topbar { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
