@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300..800&display=swap');

:root {
  --humo: #ECECE8;      /* fondo general */
  --blanco: #FFFFFF;    /* fichas de producto */
  --tinta: #000000;     /* texto y botones principales */
  --ceniza: #6B6B66;    /* texto secundario */
  --linea: #D6D6D0;     /* divisores */
  --brasa: #FF4B14;     /* acento */
  --whats: #1FAF5A;
  --error: #C8290A;

  --f: 'Sora', system-ui, sans-serif;
  --ancho: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header: 68px;
  --salida: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 16px); }
body {
  margin: 0;
  background: var(--humo);
  color: var(--tinta);
  font: 400 15.5px/1.6 var(--f);
  -webkit-font-smoothing: antialiased;
}
body.bloqueado { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brasa); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cont { max-width: var(--ancho); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Tipografía ---------- */
.display {
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin: 0;
}
.h2 {
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin: 0;
}
.sub { color: var(--ceniza); font-size: 16.5px; max-width: 50ch; margin: 14px 0 0; }
.num { font-variant-numeric: tabular-nums; }
.link { font-weight: 600; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; white-space: nowrap; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 26px;
  border: 0; border-radius: 999px;
  font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform .15s ease, background-color .2s ease, color .2s ease;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-negro { background: var(--tinta); color: #fff; }
.btn-negro:hover { background: #2a2a2a; }
.btn-whats { background: var(--whats); color: #fff; }
.btn-whats:hover { background: #179a4d; }
.btn-borde { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.agregado { background: var(--whats); color: #fff; }

/* ---------- Franja superior y encabezado ---------- */
.franja { display: block; background: var(--tinta); color: #fff; font-size: 13px; text-align: center; padding: 9px var(--gutter); }
.franja b { color: var(--brasa); font-weight: 600; }

.header { position: sticky; top: 0; z-index: 20; background: rgba(236,236,232,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--linea); }
.header .cont { display: flex; align-items: center; gap: 32px; height: var(--header); }
.logo {
  font-weight: 800; font-size: 25px; letter-spacing: -0.07em;
  display: inline-flex; align-items: center;
}
.logo i { width: 8px; height: 8px; border-radius: 50%; background: var(--brasa); display: inline-block; margin-left: 4px; margin-top: 8px; }
.nav { display: flex; gap: 26px; font-size: 14.5px; font-weight: 500; }
.nav a { padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-color: var(--tinta); }
.header-acc { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; position: relative; }
.icon-btn:hover { background: rgba(0,0,0,.06); }
.icon-btn svg { width: 22px; height: 22px; }
.badge { position: absolute; top: 4px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--brasa); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.badge:empty { display: none; }
.menu-btn { display: none; }

/* Rebote de la bolsa cuando llega un producto */
.rebota { animation: rebota .55s var(--salida); }
.rebota .badge { animation: badge-pop .55s var(--salida); }
@keyframes rebota { 0% { transform: scale(1); } 30% { transform: scale(1.28) rotate(-8deg); } 60% { transform: scale(.94) rotate(4deg); } 100% { transform: none; } }
@keyframes badge-pop { 0% { transform: scale(.4); } 50% { transform: scale(1.5); } 100% { transform: none; } }

/* Producto que vuela al carrito */
.vuelo {
  position: fixed; z-index: 95; pointer-events: none; left: 0; top: 0;
  border-radius: 50%; background: #fff; object-fit: contain; padding: 8%;
  box-shadow: 0 16px 40px -10px rgba(0,0,0,.45);
  will-change: transform, opacity;
}
.chispa { position: fixed; z-index: 96; pointer-events: none; width: 8px; height: 8px; border-radius: 50%; background: var(--brasa); will-change: transform, opacity; }

/* ---------- Menú móvil ---------- */
.menu-movil { position: fixed; inset: 0; z-index: 60; background: var(--humo); padding: 16px var(--gutter) 32px; display: flex; flex-direction: column; }
.menu-movil-cab { display: flex; justify-content: space-between; align-items: center; height: 52px; }
.menu-movil nav { display: grid; margin-top: 24px; }
.menu-movil nav a { font-weight: 700; font-size: 36px; line-height: 1.2; letter-spacing: -0.05em; padding: 8px 0; border-bottom: 1px solid var(--linea); }
.menu-movil .btn { margin-top: auto; }

/* ---------- Ficha de producto ---------- */
.prods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.prod { display: flex; flex-direction: column; background: var(--blanco); border-radius: 18px; overflow: hidden; }
.prod-foto { position: relative; aspect-ratio: 1; background: #fff; overflow: hidden; }
.prod-foto img { position: absolute; inset: 9%; width: 82%; height: 82%; object-fit: contain; transition: transform .45s var(--salida); }
.prod:hover .prod-foto img { transform: translateY(-6px) rotate(-4deg) scale(1.04); }
.etiqueta { position: absolute; top: 12px; left: 12px; background: var(--brasa); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.prod-info { display: grid; gap: 2px; padding: 4px 16px 18px; }
.prod-marca { font-size: 12.5px; color: var(--ceniza); }
.prod-nombre { font-weight: 600; font-size: 15.5px; line-height: 1.25; letter-spacing: -0.02em; }
.prod-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ceniza); margin-top: 6px; }
.prod-meta b { color: var(--tinta); font-weight: 700; }
.prod-precio { font-weight: 700; font-size: 20px; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }

/* ---------- Paquetes ---------- */
.paquetes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.paq { background: var(--tinta); color: #fff; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.paq-foto { aspect-ratio: 4/3; background: #fff; position: relative; }
.paq-foto img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; }
.paq-info { padding: 20px; display: grid; gap: 2px; flex: 1; align-content: start; }
.paq-info b { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.paq-info span { color: #a9a9a4; font-size: 14px; }
.paq-info strong { font-size: 24px; font-weight: 700; margin: 10px 0 14px; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.paq-opciones { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.paq-opciones button { height: 38px; padding: 0 14px; border-radius: 999px; border: 0; background: #222; color: #fff; font-size: 13.5px; font-weight: 600; }
.paq-opciones button[aria-pressed="true"] { background: #fff; color: #000; }
.paq .btn { margin-top: auto; height: 48px; background: #fff; color: #000; }
.paq .btn:hover { background: #e6e6e1; }
.paq .btn.agregado { background: var(--whats); color: #fff; }

/* ---------- Secciones ---------- */
.seccion { padding-top: 96px; }
.seccion-cab { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }

/* ---------- Botón flotante WhatsApp ---------- */
.whats-flot {
  position: fixed; right: 18px; bottom: 18px; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  background: var(--whats); color: #fff; height: 56px; padding: 0 22px 0 18px;
  border-radius: 999px; font-weight: 600; box-shadow: 0 10px 30px -8px rgba(0,0,0,.35);
}
.whats-flot svg { width: 24px; height: 24px; }

/* ---------- Carrito lateral ---------- */
.capa { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.capa.abierta { opacity: 1; pointer-events: auto; }
.carrito {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 71; width: min(440px, 100%);
  background: var(--humo); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .35s var(--salida);
}
.carrito.abierto { transform: none; }
.carrito-cab { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--linea); }
.carrito-cab h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.03em; }
.carrito-lista { flex: 1; overflow-y: auto; padding: 8px 20px; }
.carrito-pie { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linea); display: grid; gap: 10px; }
.carrito-pie .fila { display: flex; justify-content: space-between; font-size: 14.5px; }
.carrito-pie .fila b { font-size: 19px; font-variant-numeric: tabular-nums; }
.carrito-pie .nota { font-size: 13px; color: var(--ceniza); margin: 0; }
.carrito-vacio { text-align: center; padding: 64px 12px; }
.carrito-vacio p { color: var(--ceniza); margin: 8px 0 24px; }

.item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--linea); align-items: start; }
.item:last-child { border-bottom: 0; }
.item-foto { width: 72px; height: 72px; background: #fff; border-radius: 12px; position: relative; overflow: hidden; }
.item-foto img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; }
.item-nombre { font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; }
.item-detalle { font-size: 13.5px; color: var(--ceniza); }
.item-precio { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.item-precio small { display: block; font-weight: 400; color: var(--ceniza); font-size: 12px; }
.item-acc { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.quitar { border: 0; background: none; color: var(--ceniza); font-size: 13px; text-decoration: underline; padding: 4px 0; }

/* ---------- Selector de cantidad ---------- */
.cantidad { display: inline-flex; align-items: center; background: var(--blanco); border-radius: 999px; height: 54px; }
.cantidad button { width: 48px; height: 100%; border: 0; background: none; font-size: 20px; line-height: 1; }
.cantidad input { width: 44px; text-align: center; font: 600 16px var(--f); font-variant-numeric: tabular-nums; border: 0; background: none; padding: 0; -moz-appearance: textfield; color: var(--tinta); }
.cantidad input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cantidad.chica { height: 36px; }
.cantidad.chica button { width: 34px; font-size: 17px; }
.cantidad.chica input { width: 32px; font-size: 14px; }

/* ---------- Avisos ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 24px); opacity: 0;
  display: flex; align-items: center; gap: 14px;
  background: var(--tinta); color: #fff; padding: 10px 10px 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  transition: opacity .25s ease, transform .35s var(--salida); pointer-events: none; max-width: calc(100% - 32px);
  box-shadow: 0 14px 40px -12px rgba(0,0,0,.5);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast button { flex: none; border: 0; border-radius: 999px; background: #fff; color: #000; height: 36px; padding: 0 14px; font-size: 13.5px; font-weight: 600; }
.toast button[hidden] { display: none; }
body[data-pagina="producto"] .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }

/* ---------- Pie ---------- */
.pie { background: var(--tinta); color: #cfcfca; margin-top: 120px; padding: 72px 0 40px; font-size: 14.5px; }
.pie-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.pie .logo { color: #fff; font-size: 32px; }
.pie h3 { color: #fff; margin: 0 0 14px; font-size: 14.5px; font-weight: 600; }
.pie ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pie a:hover { color: #fff; }
.pie-legal { border-top: 1px solid #2c2c2c; margin-top: 56px; padding-top: 24px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 13px; color: #8d8d88; }
.pagos { display: flex; gap: 8px; margin-top: 20px; }
.pagos span { border: 1px solid #3a3a3a; color: #fff; border-radius: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; }

/* ---------- Verificación de edad ---------- */
.edad { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; }
.edad-caja { background: var(--humo); border-radius: 24px; padding: 40px 32px 32px; max-width: 420px; width: 100%; text-align: center; }
.edad-caja .logo { font-size: 30px; }
.edad-caja h2 { font-size: 24px; line-height: 1.15; margin: 22px 0 8px; font-weight: 700; letter-spacing: -0.04em; }
.edad-caja p { color: var(--ceniza); margin: 0 0 26px; font-size: 14.5px; }
.edad-caja .btn { width: 100%; }
.edad-caja .btn + .btn { margin-top: 10px; }

/* ---------- Páginas de texto ---------- */
.texto { max-width: 720px; }
.texto h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.04em; margin: 48px 0 10px; }
.texto p, .texto li { color: #2b2b28; }
.texto ul { padding-left: 20px; }

.faq details { border-bottom: 1px solid var(--linea); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 400; font-size: 26px; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 22px; color: var(--ceniza); max-width: 62ch; }

/* ---------- Flotar ---------- */
@keyframes flotar {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-16px) rotate(-5deg); }
}
@keyframes sombra {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: .35; }
  50% { transform: translateX(-50%) scale(.82); opacity: .22; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .prods { grid-template-columns: repeat(3, 1fr); }
  .pie-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .menu-btn { display: grid; margin-left: -10px; }
  .header .cont { gap: 4px; }
  .prods { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .prod { border-radius: 14px; }
  .prod-info { padding: 2px 12px 14px; }
  .prod-nombre { font-size: 14px; }
  .prod-precio { font-size: 17px; }
  .prod-meta span:last-child { display: none; }
  .paquetes { grid-template-columns: 1fr; }
  .whats-flot { padding: 0; width: 56px; justify-content: center; }
  .whats-flot span { display: none; }
  .seccion { padding-top: 72px; }
  .seccion-cab { flex-direction: column; align-items: start; }
  .pie { margin-top: 80px; }
  .pie-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
