/* Marshmelo · Tienda retail — sistema de diseño
   Fuentes: Fredoka (títulos) + Nunito (texto). Un acento: amarillo de marca sobre tinta. */
:root {
  --ink: #101A3A; --text: #1B2140; --muted: #5F6786; --faint: #8B92AB;
  --line: #E6E8EF; --line-2: #D5D8E3;
  --bg: #FFFFFF; --soft: #F5F4F0; --soft-2: #ECEBE5; --tile: #F4F3EE;
  --sun: #FFD21F; --sun-2: #F5C400; --sun-soft: #FFF4C2;
  --sky-soft: #DDF6F6; --lilac-soft: #ECE3FB; --coral-soft: #FFE4DE; --mint-soft: #E3F5EA;
  --ok: #1E7F4F; --ok-soft: #E3F5EA; --warn: #B45309; --warn-soft: #FFF1DB; --danger: #C62828; --danger-soft: #FDE7E7;
  --r-sm: 10px; --r: 16px; --r-lg: 24px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(16,26,58,.06), 0 4px 14px rgba(16,26,58,.06);
  --shadow-2: 0 8px 30px rgba(16,26,58,.14);
  --font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --container: 1240px; --gutter: 16px;
  --hdr-h: 64px; --ease: cubic-bezier(.2,.8,.2,1); --fast: 160ms; --med: 260ms;
}
@media (min-width: 768px) { :root { --gutter: 28px; --hdr-h: 72px; } }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.55; color: var(--text); background: var(--bg); font-feature-settings: "tnum"; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; touch-action: manipulation; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 5vw, 48px); }
h2 { font-size: clamp(24px, 3.4vw, 34px); }
h3 { font-size: 20px; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 2000; }
.skip:focus { top: 12px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.price { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 5px 10px; border-radius: var(--r-pill); background: var(--sun); color: var(--ink); line-height: 1; }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--off { background: var(--soft-2); color: var(--muted); }
.badge--ink { background: var(--ink); color: #fff; }
.icon { width: 22px; height: 22px; flex: none; }
.icon--sm { width: 18px; height: 18px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--r-pill); font-weight: 800; font-size: 16px; line-height: 1; transition: transform var(--fast) var(--ease), background var(--fast), box-shadow var(--fast), opacity var(--fast); white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--sun); color: var(--ink); }
.btn--primary:hover { background: var(--sun-2); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #1C2A5E; }
.btn--ghost { background: var(--bg); color: var(--ink); border: 2px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--soft { background: var(--soft); color: var(--ink); }
.btn--soft:hover { background: var(--soft-2); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .5; pointer-events: none; }
.btn--icon { width: 44px; min-height: 44px; padding: 0; border-radius: var(--r-pill); }
.btn--icon:hover { background: var(--soft); }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(16,26,58,.25); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cabecera */
.topbar { background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; text-align: center; padding: 8px var(--gutter); letter-spacing: .01em; }
.topbar span + span::before { content: "·"; margin: 0 10px; opacity: .5; }
@media (max-width: 767px) { .topbar span:nth-child(3) { display: none; } }
.hdr { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.hdr__bar { display: flex; align-items: center; gap: 8px; height: var(--hdr-h); }
.hdr__logo { display: flex; align-items: center; margin-right: auto; }
.hdr__logo img { height: 30px; width: auto; }
.hdr__nav { display: none; gap: 4px; margin: 0 auto; }
.hdr__nav a { padding: 10px 14px; border-radius: var(--r-pill); font-weight: 800; font-size: 15px; color: var(--ink); transition: background var(--fast); }
.hdr__nav a:hover { background: var(--soft); }
.hdr__nav a.is-active { background: var(--sun-soft); }
.hdr__actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.cart-btn { position: relative; }
.cart-btn__n { position: absolute; top: 4px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--sun); color: var(--ink); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.cart-btn__n[hidden] { display: none; }
@media (min-width: 1024px) {
  .hdr__nav { display: flex; }
  .hdr__logo { margin-right: 8px; }
  .hdr__logo img { height: 34px; }
  .menu-btn { display: none; }
}
.search { position: relative; display: none; }
.search input { width: 260px; height: 44px; border-radius: var(--r-pill); border: 2px solid var(--line); padding: 0 16px 0 42px; background: var(--soft); transition: border-color var(--fast), width var(--med) var(--ease); }
.search input:focus { border-color: var(--ink); background: #fff; width: 320px; outline: none; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
@media (min-width: 1024px) { .search { display: block; } .search-btn { display: none; } }

/* Menú móvil */
.drawer { position: fixed; inset: 0; z-index: 300; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(16,26,58,.5); opacity: 0; transition: opacity var(--med); }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel { position: absolute; top: 0; bottom: 0; width: min(420px, 92vw); background: #fff; display: flex; flex-direction: column; transition: transform var(--med) var(--ease); box-shadow: var(--shadow-2); }
.drawer--left .drawer__panel { left: 0; transform: translateX(-100%); }
.drawer--right .drawer__panel { right: 0; transform: translateX(100%); }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 22px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 16px 20px; overscroll-behavior: contain; }
.drawer__foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.mnav a { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); }
.mnav .eyebrow { display: block; margin: 20px 0 8px; }
.mnav .mnav__sub a { font-family: var(--font-body); font-size: 16px; font-weight: 700; padding: 11px 4px; }
.mnav__search { display: flex; gap: 8px; margin-bottom: 8px; }
.mnav__search input { flex: 1; height: 48px; border-radius: var(--r-pill); border: 2px solid var(--line); padding: 0 18px; background: var(--soft); }

/* Carrito lateral */
.cart-line { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line__img { width: 76px; height: 96px; background: var(--tile); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cart-line__img img { width: 88%; height: 88%; object-fit: contain; }
.cart-line__name { font-weight: 800; color: var(--ink); font-size: 15px; line-height: 1.3; }
.cart-line__meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.cart-line__row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }
.stepper { display: inline-flex; align-items: center; border: 2px solid var(--line-2); border-radius: var(--r-pill); height: 40px; }
.stepper button { width: 40px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-pill); color: var(--ink); }
.stepper button:hover { background: var(--soft); }
.stepper button[disabled] { opacity: .35; cursor: default; }
.stepper output { min-width: 28px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.stepper--lg { height: 52px; } .stepper--lg button { width: 50px; height: 48px; } .stepper--lg output { min-width: 36px; font-size: 18px; }
.link-danger { color: var(--danger); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.link-danger:hover { text-decoration: underline; }
.cart-empty { text-align: center; padding: 48px 12px; color: var(--muted); }
.cart-empty .icon { width: 56px; height: 56px; color: var(--line-2); margin: 0 auto 12px; }
.ship-meter { margin-bottom: 14px; font-size: 14px; }
.ship-meter__bar { height: 8px; background: var(--soft-2); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.ship-meter__fill { height: 100%; background: var(--sun); border-radius: 4px; transition: width var(--med) var(--ease); }
.totals { display: grid; gap: 6px; font-size: 15px; }
.totals div { display: flex; justify-content: space-between; }
.totals .totals__grand { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--ink); padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-pill); font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-2); opacity: 0; pointer-events: none; transition: opacity var(--med), transform var(--med) var(--ease); z-index: 400; max-width: calc(100vw - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast .icon { color: var(--sun); }

/* Tarjeta de producto */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 22px 18px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 28px 22px; } }
.card { display: flex; flex-direction: column; position: relative; }
.card__media { position: relative; aspect-ratio: 4 / 5; background: var(--tile); border-radius: var(--r); overflow: hidden; display: flex; align-items: center; justify-content: center; transition: background var(--fast); }
.card:hover .card__media { background: var(--soft-2); }
.card__media img { width: 82%; height: 82%; object-fit: contain; transition: transform var(--med) var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.card__add { position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-1); transition: transform var(--fast) var(--ease), background var(--fast); }
.card__add:hover { background: var(--sun); transform: scale(1.06); }
.card__add:active { transform: scale(.94); }
.card__add[disabled] { opacity: .4; pointer-events: none; }
.card__body { padding: 10px 2px 0; }
.card__brand { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.card__name { font-weight: 800; color: var(--ink); font-size: 15px; line-height: 1.3; margin-top: 2px; }
.card__name a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.card__cat { font-size: 13px; color: var(--muted); margin-top: 1px; }
.card__price { margin-top: 6px; font-size: 16px; }
.card__price small { font-weight: 700; color: var(--muted); font-size: 13px; margin-left: 6px; }
@media (min-width: 640px) { .card__name { font-size: 16px; } .card__price { font-size: 17px; } }

/* Secciones */
.section { padding: 40px 0; }
@media (min-width: 768px) { .section { padding: 64px 0; } }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section__head p { color: var(--muted); margin-top: 6px; max-width: 60ch; }
.section__link { font-weight: 800; color: var(--ink); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.section__link:hover { text-decoration: underline; }
@media (min-width: 768px) { .section__head { margin-bottom: 28px; } }

/* Hero */
.hero { background: linear-gradient(180deg, var(--sun-soft) 0%, #fff 100%); overflow: hidden; }
.hero__inner { display: grid; gap: 24px; padding: 32px 0 0; align-items: center; }
.hero__copy { text-align: center; }
.hero__copy h1 { font-size: clamp(34px, 7vw, 62px); font-weight: 700; line-height: 1.05; }
.hero__copy h1 em { font-style: normal; color: transparent; background: linear-gradient(90deg, #E8A800, #F5C400); -webkit-background-clip: text; background-clip: text; }
.hero__copy p { font-size: clamp(16px, 2vw, 19px); color: var(--muted); margin: 14px auto 22px; max-width: 46ch; }
.hero__cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero__art { position: relative; height: clamp(260px, 60vw, 460px); }
.hero__blob { position: absolute; left: 50%; top: 50%; width: 92%; height: 90%; transform: translate(-50%, -50%); background: var(--sun); border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%; }
.hero__art img { position: absolute; height: 78%; width: auto; filter: drop-shadow(0 22px 24px rgba(16,26,58,.22)); }
.hero__art img:nth-child(2) { left: 0; bottom: 6%; height: 64%; transform: rotate(-8deg); z-index: 1; }
.hero__art img:nth-child(3) { left: 52%; bottom: 2%; transform: translateX(-50%); z-index: 2; height: 74%; }
.hero__art img:nth-child(4) { right: 0; bottom: 8%; height: 62%; transform: rotate(8deg); z-index: 3; }
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.05fr 1fr; padding: 40px 0 24px; gap: 32px; }
  .hero__copy { text-align: left; } .hero__copy p { margin-left: 0; } .hero__cta { justify-content: flex-start; }
}

/* USP */
.usp { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 8px 0 0; }
.usp div { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--soft); font-weight: 700; font-size: 14px; line-height: 1.3; color: var(--ink); }
.usp .icon { color: var(--ink); width: 26px; height: 26px; }
.usp small { display: block; font-weight: 600; color: var(--muted); font-size: 12.5px; }
@media (min-width: 900px) { .usp { grid-template-columns: repeat(4, 1fr); gap: 16px; } .usp div { padding: 18px; font-size: 15px; } }

/* Tiles por edad */
.ages { display: grid; gap: 14px; }
.age-tile { position: relative; display: grid; grid-template-columns: 1fr 42%; align-items: center; min-height: 170px; padding: 22px; border-radius: var(--r-lg); overflow: hidden; transition: transform var(--med) var(--ease), box-shadow var(--med); }
.age-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.age-tile h3 { font-size: 26px; font-weight: 700; }
.age-tile .age-tile__range { font-weight: 800; font-size: 13px; color: var(--ink); opacity: .7; letter-spacing: .06em; text-transform: uppercase; }
.age-tile p { color: var(--muted); font-size: 14px; margin: 6px 0 12px; }
.age-tile .btn { align-self: start; justify-self: start; }
.age-tile img { position: absolute; right: 6%; bottom: 0; height: 88%; width: auto; object-fit: contain; filter: drop-shadow(0 14px 16px rgba(16,26,58,.18)); }
.age-tile--kinder { background: var(--sun-soft); } .age-tile--primaria { background: var(--sky-soft); } .age-tile--teens { background: var(--lilac-soft); }
@media (min-width: 800px) { .ages { grid-template-columns: repeat(3, 1fr); gap: 20px; } .age-tile { min-height: 300px; grid-template-columns: 1fr; align-content: end; padding: 26px; } .age-tile img { right: 8%; top: 18px; bottom: auto; height: 46%; } .age-tile h3 { font-size: 30px; } }

/* Colecciones */
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .cats { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1024px) { .cats { grid-template-columns: repeat(4, 1fr); gap: 22px; } }
.cat-tile { display: block; border-radius: var(--r); overflow: hidden; background: var(--tile); transition: transform var(--med) var(--ease); }
.cat-tile:hover { transform: translateY(-3px); }
.cat-tile__img { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.cat-tile__img img { width: 70%; height: 70%; object-fit: contain; }
.cat-tile__body { padding: 12px 14px 14px; background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r) var(--r); }
.cat-tile__body strong { display: block; font-family: var(--font-display); font-size: 17px; color: var(--ink); font-weight: 600; }
.cat-tile__body span { font-size: 13px; color: var(--muted); }

/* Banner set */
.banner { display: grid; gap: 20px; border-radius: var(--r-lg); background: var(--ink); color: #fff; padding: 28px; overflow: hidden; position: relative; }
.banner h2 { color: #fff; font-weight: 700; }
.banner p { color: rgba(255,255,255,.78); margin: 10px 0 18px; max-width: 48ch; }
.banner ul { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 8px; font-weight: 700; }
.banner li { display: flex; gap: 10px; align-items: center; } .banner li .icon { color: var(--sun); }
.banner__img { display: flex; align-items: center; justify-content: center; }
.banner__img img { max-height: 340px; width: auto; filter: drop-shadow(0 20px 24px rgba(0,0,0,.35)); }
@media (min-width: 900px) { .banner { grid-template-columns: 1.1fr 1fr; padding: 48px; } }

/* Pasos */
.steps { display: grid; gap: 14px; counter-reset: step; }
.steps div { padding: 22px; border-radius: var(--r); border: 1px solid var(--line); position: relative; }
.steps div::before { counter-increment: step; content: counter(step); display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; background: var(--sun); color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-bottom: 12px; }
.steps h3 { font-size: 19px; margin-bottom: 4px; }
.steps p { color: var(--muted); font-size: 15px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; font-weight: 800; color: var(--ink); font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform var(--med) var(--ease); color: var(--muted); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 18px; max-width: 70ch; }

/* Footer */
.footer { background: var(--soft); border-top: 1px solid var(--line); padding: 40px 0 calc(28px + env(safe-area-inset-bottom)); margin-top: 24px; color: var(--muted); font-size: 14px; }
.footer__grid { display: grid; gap: 28px; }
.footer h4 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); font-family: var(--font-body); font-weight: 800; margin-bottom: 12px; }
.footer a { display: block; padding: 4px 0; } .footer a:hover { color: var(--ink); }
.footer img { height: 28px; margin-bottom: 12px; }
.footer__bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; }
@media (min-width: 800px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

/* Listado (PLP) */
.plp__head { padding: 22px 0 14px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs span::before { content: "/"; margin-right: 6px; opacity: .5; }
.plp__head p { color: var(--muted); margin-top: 6px; max-width: 64ch; }
.plp__layout { display: grid; gap: 24px; padding-bottom: 48px; }
.filters { display: none; }
.plp__toolbar { position: sticky; top: var(--hdr-h); z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 10px 0; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.plp__count { color: var(--muted); font-size: 14px; margin-right: auto; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 2px solid var(--line-2); font-weight: 800; font-size: 14px; color: var(--ink); white-space: nowrap; background: #fff; transition: background var(--fast), border-color var(--fast); flex: none; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .icon { width: 16px; height: 16px; }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; height: 40px; padding: 0 36px 0 14px; border-radius: var(--r-pill); border: 2px solid var(--line-2); background: #fff; font-weight: 800; font-size: 14px; color: var(--ink); cursor: pointer; }
.select .icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; pointer-events: none; }
.fgroup { padding: 16px 0; border-bottom: 1px solid var(--line); }
.fgroup h3 { font-size: 15px; font-family: var(--font-body); font-weight: 800; margin-bottom: 10px; }
.fgroup label { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; font-weight: 600; font-size: 15px; }
.fgroup label span:last-child { margin-left: auto; color: var(--faint); font-size: 13px; }
.fgroup input[type=checkbox], .fgroup input[type=radio] { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); flex: none; }
.empty { text-align: center; padding: 64px 16px; color: var(--muted); }
.empty h3 { margin-bottom: 8px; }
@media (min-width: 1024px) {
  .plp__layout { grid-template-columns: 250px 1fr; gap: 40px; }
  .filters { display: block; position: sticky; top: calc(var(--hdr-h) + 16px); align-self: start; max-height: calc(100dvh - var(--hdr-h) - 32px); overflow-y: auto; padding-right: 8px; }
  .filters-btn { display: none; }
  .plp__toolbar { position: static; background: none; backdrop-filter: none; padding: 0 0 14px; }
}
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.active-filters:empty { display: none; }
.active-filters .chip { height: 34px; font-size: 13px; padding: 0 10px 0 12px; border-color: var(--line); background: var(--soft); }

/* Ficha (PDP) */
.pdp { display: grid; gap: 24px; padding: 16px 0 48px; }
.gallery { display: grid; gap: 10px; }
.gallery__main { position: relative; aspect-ratio: 4 / 5; background: var(--tile); border-radius: var(--r-lg); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; transition: opacity var(--fast); }
.gallery__main img.is-main { width: 78%; height: 78%; }
.gallery__main .badge { position: absolute; top: 14px; left: 14px; }
.gallery__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: var(--shadow-1); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.gallery__nav--prev { left: 10px; } .gallery__nav--next { right: 10px; }
.gallery__nav:hover { background: #fff; }
.gallery__thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumbs button { flex: none; width: 64px; height: 80px; border-radius: var(--r-sm); background: var(--tile); overflow: hidden; border: 2px solid transparent; transition: border-color var(--fast); display: flex; align-items: center; justify-content: center; }
.gallery__thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs button img.is-main { width: 80%; height: 80%; object-fit: contain; }
.gallery__thumbs button.is-on { border-color: var(--ink); }
.gallery__dots { display: flex; justify-content: center; gap: 6px; }
.gallery__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); } .gallery__dots i.is-on { background: var(--ink); width: 18px; border-radius: 3px; }
.buy { display: grid; gap: 18px; align-content: start; }
.buy__brand { display: flex; align-items: center; gap: 10px; }
.buy__brand img { height: 22px; }
.buy h1 { font-size: clamp(24px, 3.2vw, 34px); }
.buy__sub { color: var(--muted); margin-top: 4px; font-size: 15px; }
.buy__price { display: flex; align-items: baseline; gap: 12px; }
.buy__price .price { font-family: var(--font-display); font-size: 30px; font-weight: 600; }
.buy__stock { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.buy__stock .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.buy__stock.is-low .dot { background: var(--warn); } .buy__stock.is-out .dot { background: var(--faint); }
.buy__actions { display: flex; gap: 10px; align-items: center; }
.buy__actions .btn { flex: 1; }
.includes { background: var(--soft); border-radius: var(--r); padding: 18px 20px; }
.includes h3 { font-size: 15px; font-family: var(--font-body); font-weight: 800; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.includes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-weight: 600; font-size: 15px; }
.includes li { display: flex; gap: 10px; align-items: flex-start; } .includes li .icon { color: var(--ok); width: 20px; height: 20px; margin-top: 2px; }
.perks { display: grid; gap: 10px; }
.perks > div { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.perks .icon { color: var(--ink); margin-top: 1px; } .perks strong { display: block; color: var(--ink); font-size: 15px; }
.specs { border-top: 1px solid var(--line); }
.specs details { border-bottom: 1px solid var(--line); }
.specs summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 16px 0; font-weight: 800; color: var(--ink); cursor: pointer; }
.specs summary::-webkit-details-marker { display: none; }
.specs summary .icon { color: var(--muted); transition: transform var(--med) var(--ease); }
.specs details[open] summary .icon { transform: rotate(180deg); }
.specs table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 15px; }
.specs td { padding: 8px 0; border-top: 1px solid var(--line); } .specs td:first-child { color: var(--muted); width: 45%; } .specs td:last-child { font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.specs p { padding-bottom: 16px; color: var(--muted); font-size: 15px; }
.stickybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; transform: translateY(110%); transition: transform var(--med) var(--ease); }
.stickybar.is-on { transform: none; }
.stickybar .price { font-family: var(--font-display); font-size: 20px; }
.stickybar .btn { flex: 1; }
@media (min-width: 900px) {
  .pdp { grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 48px; padding: 24px 0 64px; }
  .gallery { grid-template-columns: 72px 1fr; }
  .gallery__thumbs { flex-direction: column; order: -1; overflow: visible; }
  .gallery__dots, .stickybar { display: none; }
  .buy { position: sticky; top: calc(var(--hdr-h) + 20px); }
}
.rail { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { display: none; }
.rail .card { flex: 0 0 46%; scroll-snap-align: start; }
@media (min-width: 640px) { .rail .card { flex-basis: 30%; } }
@media (min-width: 1024px) { .rail .card { flex-basis: calc(25% - 11px); } }

/* Formularios / checkout */
.field { display: grid; gap: 6px; }
.field label { font-weight: 800; font-size: 14px; color: var(--ink); }
.field input, .field select, .field textarea { height: 50px; border-radius: 12px; border: 2px solid var(--line-2); padding: 0 16px; background: #fff; transition: border-color var(--fast), box-shadow var(--fast); width: 100%; }
.field textarea { height: auto; min-height: 96px; padding: 12px 16px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 4px rgba(16,26,58,.08); }
.field .help { font-size: 13px; color: var(--muted); }
.field .err { display: none; color: var(--danger); font-size: 13px; font-weight: 700; align-items: center; gap: 4px; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--danger); }
.field.is-invalid .err { display: flex; }
.fields-2 { display: grid; gap: 14px; }
@media (min-width: 640px) { .fields-2 { grid-template-columns: 1fr 1fr; } }
.opt { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: start; padding: 16px; border: 2px solid var(--line-2); border-radius: var(--r); cursor: pointer; transition: border-color var(--fast), background var(--fast); }
.opt:has(input:checked) { border-color: var(--ink); background: var(--soft); }
.opt input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
.opt strong { display: block; color: var(--ink); } .opt span { font-size: 14px; color: var(--muted); }
.opt .opt__price { font-weight: 800; color: var(--ink); white-space: nowrap; }
.opts { display: grid; gap: 10px; }
.co { display: grid; gap: 28px; padding: 16px 0 64px; }
.co__form { display: grid; gap: 28px; }
.co__block { display: grid; gap: 14px; }
.co__block h2 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.co__block h2 i { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); color: var(--ink); font-style: normal; font-size: 16px; align-items: center; justify-content: center; }
.summary { background: var(--soft); border-radius: var(--r-lg); padding: 22px; align-self: start; }
.summary h2 { font-size: 20px; margin-bottom: 10px; }
.summary .cart-line { grid-template-columns: 56px 1fr; padding: 10px 0; } .summary .cart-line__img { width: 56px; height: 70px; }
.alert { padding: 14px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert--danger { background: var(--danger-soft); color: var(--danger); }
.alert--ok { background: var(--ok-soft); color: var(--ok); }
.alert--info { background: var(--sun-soft); color: var(--ink); }
@media (min-width: 900px) { .co { grid-template-columns: 1fr 400px; gap: 48px; padding: 32px 0 80px; } .summary { position: sticky; top: calc(var(--hdr-h) + 20px); } }

/* Confirmación */
.done { max-width: 720px; margin: 0 auto; padding: 32px 0 64px; display: grid; gap: 22px; }
.done__hero { text-align: center; }
.done__check { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.done__check .icon { width: 36px; height: 36px; }
.done__num { font-family: var(--font-display); font-size: 28px; color: var(--ink); font-weight: 700; }
.panel { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.panel h2 { font-size: 20px; margin-bottom: 12px; }
.kv { display: grid; gap: 8px; font-size: 15px; }
.kv div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; } .kv div span:first-child { color: var(--muted); } .kv div span:last-child { font-weight: 700; color: var(--ink); }
.copybox { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--soft); border-radius: 12px; padding: 12px 14px; font-weight: 800; color: var(--ink); }

/* Admin */
.admin { padding: 24px 0 64px; display: grid; gap: 22px; }
.admin__login { max-width: 400px; margin: 60px auto; display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.kpi { padding: 18px; border-radius: var(--r); background: var(--soft); } .kpi span { font-size: 13px; color: var(--muted); font-weight: 700; } .kpi strong { display: block; font-family: var(--font-display); font-size: 28px; color: var(--ink); font-weight: 600; }
@media (min-width: 800px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.tabs button { padding: 12px 16px; font-weight: 800; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button.is-on { color: var(--ink); border-color: var(--ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; background: var(--soft); }
.tbl td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr.is-open td { background: #FCFCFA; }
.tbl .num { font-variant-numeric: tabular-nums; text-align: right; }
.status { display: inline-flex; padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.status--pendiente { background: var(--warn-soft); color: var(--warn); } .status--pagado { background: var(--sky-soft); color: #0E6B6C; } .status--enviado { background: var(--lilac-soft); color: #5B3FA0; } .status--entregado { background: var(--ok-soft); color: var(--ok); } .status--cancelado { background: var(--soft-2); color: var(--muted); }
.detail { display: grid; gap: 12px; padding: 4px 0; }
.detail ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.detail__actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; scroll-behavior: auto !important; } }
