/* Marca QuéInvento: azul #2654F5, amarillo #FFCE3A, negro #14161F, blanco #FAFAF6 */
:root {
  --bg: #fafaf6;
  --surface: #ffffff;
  --ink: #14161f;
  --ink-soft: #565a66;
  --line: #e6e6df;
  --brand: #2654f5;
  --brand-deep: #173bbe;
  --yellow: #ffce3a;
  --accent: var(--brand);
  --accent-ink: #ffffff;
  --pop: var(--yellow);
  --ok: var(--brand);
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 22, 31, 0.06), 0 8px 24px rgba(20, 22, 31, 0.07);
  --font-display: "Poppins", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;
  --wrap: 1120px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---------- Barra de aviso + cabecera ---------- */
.announce {
  background: var(--ink);
  letter-spacing: 0.01em;
  color: var(--bg);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 3px 8px rgba(20, 22, 31, 0.15); }
.nav { display: flex; align-items: center; gap: 20px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; }
.nav .hide-sm { display: none; }
@media (min-width: 720px) { .nav .hide-sm { display: inline; } }

.cart-btn {
  position: relative;
  border: 0;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 14px;
}
.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--pop);
  color: var(--ink);
  font-size: 12px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 15px 26px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(38, 84, 245, 0.35); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; border: 1.5px solid var(--ink); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero-band {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(rgba(255, 255, 255, 0.16) 1.2px, transparent 1.6px) 0 0 / 28px 28px,
    linear-gradient(180deg, var(--brand) 0%, var(--brand-deep) 100%);
}
.hero { position: relative; padding-block: 22px 26px; }
@media (min-width: 900px) {
  .hero { display: grid; grid-template-columns: 1.6fr 1fr; align-items: center; gap: 40px; padding-block: 40px; }
}
.eyebrow {
  display: inline-block;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.hero h1 { font-size: clamp(30px, 8vw, 56px); font-weight: 700; max-width: 14ch; margin-bottom: 10px; letter-spacing: -0.03em; }
.hero h1 mark { background: var(--yellow); color: var(--ink); padding: 0 0.14em; border-radius: 10px; }
.hero p { font-size: 16px; color: rgba(255, 255, 255, 0.86); max-width: 44ch; margin: 0 0 18px; }
@media (min-width: 720px) { .hero p { font-size: 18px; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .btn { flex: 1 1 auto; padding: 12px 18px; font-size: 15px; }
@media (min-width: 720px) { .hero-actions .btn { flex: 0 0 auto; padding: 14px 26px; font-size: 16px; } }
.hero .btn-primary { background: var(--yellow); color: var(--ink); box-shadow: 0 8px 22px rgba(10, 20, 80, 0.35); }
.hero .btn-ghost { border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
@media (max-width: 719px) { .hero .chips { display: none; } }
.chip {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.hero .chip { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.25); color: #fff; }
.hero-art { display: none; }
@media (min-width: 900px) {
  .hero-art { display: block; justify-self: center; width: min(230px, 100%); transform: rotate(-6deg); filter: drop-shadow(0 24px 40px rgba(8, 18, 80, 0.45)); }
}
.sparkle { position: absolute; color: var(--yellow); width: 30px; height: 30px; opacity: 0.9; }
.sparkle.s1 { top: 26px; right: 22px; }
.sparkle.s2 { display: none; bottom: 30px; right: 38%; width: 18px; height: 18px; color: #fff; opacity: 0.7; }
@media (min-width: 900px) { .sparkle.s2 { display: block; } }

/* ---------- Secciones ---------- */
.section { padding-block: 40px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { font-size: clamp(24px, 5vw, 36px); margin: 0; }
#productos { padding-top: 20px; }
.section-head { margin-bottom: 14px; }
.muted { color: var(--ink-soft); }

/* ---------- Tarjetas de producto ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-3px); }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card h3 { font-size: 15px; margin: 0; }
.card .muted { font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 900px) { .card-body { padding: 12px 14px 16px; } .card h3 { font-size: 17px; } .card .muted { font-size: 13px; } }

.media {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--tone, #333);
  overflow: hidden;
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media .emoji { font-size: clamp(56px, 14vw, 96px); filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3)); }
.tag {
  position: absolute;
  box-shadow: 0 2px 6px rgba(20, 22, 31, 0.15);
  top: 10px;
  left: 10px;
  background: var(--pop);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 6px;
}

.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.price strong { font-size: 18px; }
.price s { color: var(--ink-soft); font-size: 14px; }
.price .off { font-size: 12px; font-weight: 700; color: var(--brand); }

/* ---------- Cómo funciona ---------- */
.steps { display: grid; gap: 12px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--surface); border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.step b { display: block; font-family: var(--font-display); font-size: 36px; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.step h3 { font-size: 20px; margin-bottom: 4px; }
.step p { margin: 0; color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 8px; max-width: 760px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--ink-soft); }

/* ---------- Ficha de producto ---------- */
.product { display: grid; gap: 24px; padding-block: 20px 40px; }
@media (min-width: 900px) { .product { grid-template-columns: 1.1fr 1fr; gap: 48px; padding-top: 40px; } }

.gallery .media { border-radius: var(--radius); }
.gallery .media .emoji { font-size: clamp(110px, 30vw, 180px); }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs button { flex: 0 0 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; }
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.info h1 { font-size: clamp(32px, 6vw, 48px); margin-bottom: 8px; }
.info .lead { font-size: 18px; color: var(--ink-soft); margin: 0 0 16px; }
.info .price strong { font-size: 30px; }
.info .price s { font-size: 18px; }
.info .price .off { font-size: 14px; background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 3px 8px; border-radius: 6px; }

.field { margin: 20px 0 0; }
.field-label { font-size: 14px; font-weight: 600; margin-bottom: 8px; display: block; }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.options button {
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 14px;
}
.options button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }

.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); }
.qty button { border: 0; background: none; width: 40px; height: 40px; font-size: 18px; }
.qty span { min-width: 28px; text-align: center; font-weight: 700; }

.buy { display: grid; gap: 10px; margin-top: 24px; }

.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; }
.trust div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-size: 12px; text-align: center; line-height: 1.3; }
.trust b { display: block; font-size: 18px; margin-bottom: 2px; }

.bullets { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 8px; }
.bullets li { display: flex; gap: 10px; align-items: flex-start; }
.bullets li::before { content: "✓"; flex: 0 0 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--pop); font-weight: 800; font-size: 12px; margin-top: 1px; }

.video { margin-top: 32px; }
.video-frame { position: relative; width: 100%; max-width: 340px; aspect-ratio: 9 / 16; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-frame.wide { max-width: none; aspect-ratio: 16 / 9; }
.video-frame iframe,
.video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }

/* Barra fija de compra en móvil: el tráfico de TikTok es 95% móvil */
.sticky-buy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.25s ease;
}
.sticky-buy.show { transform: none; }
.sticky-buy .btn { flex: 1; padding: 13px 16px; }
.sticky-buy strong { font-size: 18px; white-space: nowrap; }
@media (min-width: 900px) { .sticky-buy { display: none; } }

/* ---------- Carrito lateral ---------- */
.drawer-bg { position: fixed; inset: 0; background: rgba(22, 19, 15, 0.45); z-index: 40; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  z-index: 50;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
body.cart-open .drawer { transform: none; }
body.cart-open .drawer-bg { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 24px; margin: 0; }
.icon-btn { border: 0; background: none; font-size: 26px; line-height: 1; padding: 4px 8px; }
.drawer-items { flex: 1; overflow-y: auto; padding: 8px 16px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line .media { border-radius: 10px; }
.line .media .emoji { font-size: 30px; }
.line h4 { margin: 0; font-size: 15px; }
.line small { color: var(--ink-soft); }
.line .qty button { width: 30px; height: 30px; font-size: 15px; }
.line .remove { border: 0; background: none; color: var(--ink-soft); font-size: 12px; text-decoration: underline; padding: 0; margin-top: 4px; }
.drawer-foot { padding: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.drawer-foot .row { display: flex; justify-content: space-between; font-weight: 700; font-size: 18px; }
.ship-bar { font-size: 13px; }
.ship-bar .track { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 6px; }
.ship-bar .fill { height: 100%; background: var(--ok); }
.empty { text-align: center; padding: 48px 0; color: var(--ink-soft); }

/* ---------- Aviso (toast) ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  z-index: 60;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  max-width: calc(100% - 32px);
  transition: all 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Páginas legales ---------- */
.legal { max-width: 760px; padding-block: 32px 64px; }
.legal h1 { font-size: clamp(34px, 6vw, 48px); }
.legal h2 { font-size: 24px; margin-top: 40px; scroll-margin-top: 80px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal .note { background: #fff4d6; border: 1px solid #f0d58a; border-radius: 12px; padding: 12px 16px; color: var(--ink); font-size: 14px; }

/* ---------- Pie ---------- */
.footer { border-top: 1px solid var(--line); padding: 32px 0 100px; margin-top: 40px; font-size: 14px; }
.footer .wrap { display: grid; gap: 20px; }
@media (min-width: 720px) { .footer .wrap { grid-template-columns: 2fr 1fr 1fr; } }
.footer h4 { margin: 0 0 8px; font-size: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer a { color: var(--ink-soft); text-decoration: none; }
.footer a:hover { color: var(--ink); }
