/* =========================================================
   TIENDA - MUNDO CURIOSO LATAM
   CSS autónomo (no depende del portal principal)
   Paleta coherente con el portal: #00B4B4
   ========================================================= */

:root {
  --teal: #00B4B4;
  --teal-dark: #008C8C;
  --teal-light: #E6F9F9;
  --accent: #FF6B35;
  --accent-dark: #E04F1C;
  --gold: #FFB800;
  --dark: #14213D;
  --gray-900: #1B2537;
  --gray-700: #4A5568;
  --gray-500: #718096;
  --gray-300: #CBD5E0;
  --gray-100: #EDF2F7;
  --gray-50: #F8F9FA;
  --white: #FFFFFF;
  --danger: #E53E3E;
  --ok: #38A169;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(20, 33, 61, .08);
  --shadow: 0 8px 24px rgba(20, 33, 61, .12);
  --shadow-lg: 0 20px 48px rgba(20, 33, 61, .18);

  --maxw: 1080px;
  --header-h: 60px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  overflow-x: hidden;
}

.app { max-width: var(--maxw); margin: 0 auto; padding-bottom: 40px; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============ HEADER ============ */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; }
.logo-img { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; }
.logo-text { font-size: 1.15rem; letter-spacing: -.3px; }

/* Texto dorado mini (header) */
.gold-text-mini {
  background: linear-gradient(174deg,
      #FFF8DF 0%, #F6DFA2 14%, #E8B54B 30%, #C4861A 44%,
      #F6E2A8 56%, #D39C26 70%, #FFF4CB 86%, #BC8A1E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(112,72,8,.45)) drop-shadow(0 0 10px rgba(232,181,75,.30));
  letter-spacing: .06em;
}

.header-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  position: relative;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--gray-700);
  transition: background .18s, color .18s;
}
.icon-btn:hover { background: var(--gray-100); color: var(--teal); }

.badge {
  position: absolute; top: 2px; right: 0;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-size: .7rem; font-weight: 800;
  border-radius: 9px;
  border: 2px solid #fff;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 58px 20px 52px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  background: #071522;
}

/* Fondo generado por IA: video + imagen de respaldo */
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg-video,
.hero-bg-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
/* La imagen queda detras del video como fallback */
.hero-bg-fallback { z-index: -1; }
.hero-bg-video { z-index: 0; }
/* Velo oscuro para que el texto resalte */
.hero-bg-veil {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(6,18,32,.26) 0%, rgba(6,18,32,.70) 60%, rgba(4,12,22,.93) 100%),
    linear-gradient(180deg, rgba(6,18,32,.50) 0%, rgba(6,18,32,.18) 32%, rgba(6,18,32,.88) 100%);
}

.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }

.hero-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(0,180,180,.18);
  border: 1px solid rgba(0,180,180,.55);
  color: #7DE8E8;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ---- Título BACARÁ en ORO CROMADO ---- */
.gold-title {
  position: relative;
  font-size: clamp(3.1rem, 13vw, 6.2rem);
  font-weight: 900;
  line-height: .98;
  letter-spacing: .045em;
  margin: 12px 0 2px;
  background: linear-gradient(174deg,
      #FFF8DF   0%,
      #F6DFA2  13%,
      #E8B54B  29%,
      #C4861A  43%,
      #F6E2A8  55%,
      #D39C26  69%,
      #FFF4CB  85%,
      #BC8A1E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter:
    drop-shadow(0 2px 0 rgba(112,72,8,.6))
    drop-shadow(0 5px 16px rgba(0,0,0,.7))
    drop-shadow(0 0 28px rgba(232,181,75,.32));
}
/* Reflejo cromado que recorre las letras */
.gold-title::after {
  content: "BACARÁ";
  position: absolute;
  left: 0; right: 0; top: 12px;
  background: linear-gradient(104deg,
      transparent 36%,
      rgba(255,255,255,.9) 47%,
      rgba(255,255,255,.38) 55%,
      transparent 65%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  pointer-events: none;
  animation: shine 6s linear infinite;
}
@keyframes shine {
  0%   { transform: translateX(-130%); }
  60%  { transform: translateX(130%); }
  100% { transform: translateX(130%); }
}

.hero-subtitle {
  font-size: clamp(1rem, 3.2vw, 1.35rem);
  font-weight: 800;
  color: #FFE9AE;
  margin: 0 0 14px;
  letter-spacing: .01em;
  text-shadow: 0 2px 12px rgba(0,0,0,.75);
}

.hero-title {
  font-size: clamp(1.75rem, 6vw, 2.6rem);
  font-weight: 900; line-height: 1.12;
  letter-spacing: -1px;
  color: var(--dark);
  margin-bottom: 14px;
}

.hero-text {
  max-width: 540px; margin: 0 auto 26px;
  color: #C4D4E2; font-size: 1.02rem;
  line-height: 1.65;
  text-shadow: 0 1px 10px rgba(0,0,0,.7);
}

.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero-nota {
  margin-top: 18px;
  font-size: .88rem; color: var(--gray-500);
}
.link-inline {
  color: var(--teal-dark); font-weight: 800;
  text-decoration: underline; text-underline-offset: 3px;
  white-space: nowrap;
}
.link-inline:hover { color: var(--teal); }

/* ============ BOTONES ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 800; font-size: .96rem;
  transition: transform .15s, box-shadow .2s, background .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 4px 14px rgba(0,180,180,.32); }
.btn-primary:hover { background: var(--teal-dark); box-shadow: 0 8px 22px rgba(0,180,180,.4); }

.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(255,107,53,.32); }
.btn-accent:hover { background: var(--accent-dark); box-shadow: 0 8px 22px rgba(255,107,53,.4); }

.btn-ghost { background: transparent; color: var(--teal-dark); border: 2px solid var(--teal); }
.btn-ghost:hover { background: var(--teal-light); }

.btn-lg { padding: 15px 32px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ============ BENEFICIOS ============ */
.beneficios {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 30px 16px 10px;
}

.beneficio {
  background: #fff; border: 1px solid var(--gray-100);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm);
}
.beneficio-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--teal-light); color: var(--teal-dark);
  display: grid; place-items: center; margin-bottom: 12px;
}
.beneficio h3 { font-size: 1.02rem; font-weight: 800; margin-bottom: 5px; }
.beneficio p { font-size: .9rem; color: var(--gray-500); }

/* ============ SECCIONES ============ */
.seccion { padding: 46px 16px 10px; }
.seccion-head { text-align: center; margin-bottom: 28px; }
.seccion-title { font-size: clamp(1.35rem, 4vw, 1.8rem); font-weight: 900; letter-spacing: -.6px; color: var(--dark); }
.seccion-sub { color: var(--gray-500); font-size: .97rem; margin-top: 6px; }

/* ============ GRILLA PRODUCTOS ============ */
.grid-productos {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.producto {
  background: #fff; border: 1px solid var(--gray-100);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.producto:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.producto-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--gray-100);
  overflow: hidden;
}
.producto-img img { width: 100%; height: 100%; object-fit: cover; }
.producto-img.vacia { display: grid; place-items: center; color: var(--gray-300); }

.producto-tag {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,.62); color: #fff;
  font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .8px; padding: 5px 9px; border-radius: 999px;
  backdrop-filter: blur(4px);
}

.producto-body { padding: 15px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.producto-nombre { font-size: 1rem; font-weight: 800; color: var(--dark); margin-bottom: 5px; }
.producto-desc { font-size: .86rem; color: var(--gray-500); margin-bottom: 13px; flex: 1; }

.producto-precio {
  display: flex; align-items: baseline; gap: 5px;
  margin-bottom: 12px;
}
.producto-precio .valor { font-size: 1.35rem; font-weight: 900; color: var(--teal-dark); }
.producto-precio .unidad { font-size: .82rem; color: var(--gray-500); font-weight: 700; }

/* ============ PLANES VIP ============ */
.planes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 760px; margin: 0 auto; }

.plan {
  background: #fff; border: 2px solid var(--gray-100);
  border-radius: var(--radius); padding: 26px 24px;
  text-align: center; position: relative;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.plan-alt { border-color: var(--accent); }

.plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--teal); color: #fff;
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
  padding: 6px 16px; border-radius: 999px;
}
.plan-badge-alt { background: var(--accent); }

.plan-nombre { font-size: 1.15rem; font-weight: 800; color: var(--dark); margin-bottom: 12px; }
.plan-precio { margin-bottom: 18px; }
.plan-valor { font-size: 2.6rem; font-weight: 900; color: var(--teal-dark); letter-spacing: -1.5px; }
.plan-alt .plan-valor { color: var(--accent-dark); }
.plan-unidad { display: block; font-size: .82rem; color: var(--gray-500); font-weight: 700; }

.plan-lista { list-style: none; text-align: left; margin-bottom: 20px; flex: 1; }
.plan-lista li {
  position: relative; padding-left: 26px; margin-bottom: 9px;
  font-size: .91rem; color: var(--gray-700);
}
.plan-lista li::before {
  content: "✓"; position: absolute; left: 0; top: -1px;
  color: var(--ok); font-weight: 900;
}
.plan-nota { font-size: .78rem; color: var(--gray-500); margin-top: 11px; }

/* ============ PASOS ============ */
.pasos { list-style: none; max-width: 620px; margin: 0 auto; display: grid; gap: 18px; }
.paso { display: flex; gap: 16px; align-items: flex-start; }
.paso-num {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%; background: var(--teal); color: #fff;
  display: grid; place-items: center; font-weight: 900; font-size: .98rem;
}
.paso h3 { font-size: 1rem; font-weight: 800; color: var(--dark); margin-bottom: 3px; }
.paso p { font-size: .89rem; color: var(--gray-500); }

/* ============ FAQ ============ */
.faq { max-width: 720px; margin: 0 auto; display: grid; gap: 10px; }
.faq-item {
  background: #fff; border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  padding: 15px 18px; font-weight: 800; font-size: .96rem;
  color: var(--dark); cursor: pointer;
  list-style: none; position: relative; padding-right: 40px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem; font-weight: 700; color: var(--teal);
  transition: transform .2s;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item[open] summary { border-bottom: 1px solid var(--gray-100); }
.faq-item p { padding: 14px 18px; font-size: .9rem; color: var(--gray-700); }

/* ============ CTA FINAL ============ */
.cta-final {
  margin: 50px 16px 0;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  border-radius: var(--radius-lg, 20px);
  padding: 44px 26px; text-align: center; color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-final h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); font-weight: 900; margin-bottom: 8px; }
.cta-final p { opacity: .92; margin-bottom: 22px; }
.cta-final .btn-primary { background: #fff; color: var(--teal-dark); box-shadow: none; }
.cta-final .btn-primary:hover { background: var(--teal-light); }

/* ============ FOOTER ============ */
.footer { text-align: center; padding: 36px 16px 10px; }
.footer-brand { font-weight: 900; color: var(--dark); margin-bottom: 8px; }
.footer-links { font-size: .88rem; color: var(--gray-500); margin-bottom: 14px; }
.footer-links a { color: var(--teal-dark); font-weight: 700; }
.footer-links .sep { margin: 0 8px; color: var(--gray-300); }
.footer-legal { font-size: .78rem; color: var(--gray-500); line-height: 1.7; }

/* ============ CARRITO ============ */

/* FIX CRITICO: el atributo `hidden` del navegador (display:none) pierde contra
   cualquier `display` de autor. Sin esto el carrito aparece abierto al cargar
   la pagina y el overlay tapa toda la pantalla. */
[hidden] { display: none !important; }

/* Pulso visual en el boton del carrito al agregar un producto */
.icon-btn.pulso { animation: pulsoCarrito .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes pulsoCarrito {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.22); }
  70%  { transform: scale(.94); }
  100% { transform: scale(1); }
}

.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20,33,61,.5);
  backdrop-filter: blur(3px);
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

.carrito {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 201;
  width: min(400px, 100%);
  background: #fff;
  display: flex; flex-direction: column;
  box-shadow: -10px 0 40px rgba(20,33,61,.2);
  animation: slide .26s cubic-bezier(.22,1,.36,1);
}
@keyframes slide { from { transform: translateX(100%) } to { transform: translateX(0) } }

.carrito-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--gray-100);
}
.carrito-head h3 { font-size: 1.08rem; font-weight: 900; color: var(--dark); }

.carrito-body { flex: 1; overflow-y: auto; padding: 16px 20px; }

.carrito-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--gray-100);
}
.carrito-item:last-child { border-bottom: none; }
.carrito-thumb {
  width: 52px; height: 52px; border-radius: 10px; flex-shrink: 0;
  background: var(--gray-100); object-fit: cover;
  display: grid; place-items: center; color: var(--gray-300);
}
.carrito-info { flex: 1; min-width: 0; }
.carrito-info h4 { font-size: .91rem; font-weight: 800; color: var(--dark); }
.carrito-info p { font-size: .8rem; color: var(--gray-500); }
.carrito-item .precio { font-weight: 900; color: var(--teal-dark); font-size: .92rem; white-space: nowrap; }
.carrito-quitar { color: var(--gray-300); font-size: 1.25rem; line-height: 1; padding: 4px; }
.carrito-quitar:hover { color: var(--danger); }

.carrito-foot { padding: 18px 20px; border-top: 1px solid var(--gray-100); background: var(--gray-50); }
.carrito-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 13px;
}
.carrito-total span { color: var(--gray-700); font-weight: 700; }
.carrito-total strong { font-size: 1.5rem; font-weight: 900; color: var(--teal-dark); }
.carrito-nota { font-size: .78rem; color: var(--gray-500); text-align: center; margin-top: 10px; }

/* ============ VACÍO / TOAST ============ */
.vacio {
  grid-column: 1 / -1;
  text-align: center; padding: 46px 20px;
  color: var(--gray-500); font-size: .95rem;
  background: #fff; border: 1px dashed var(--gray-300);
  border-radius: var(--radius);
}

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 300;
  background: var(--gray-900); color: #fff;
  padding: 13px 22px; border-radius: 999px;
  font-size: .9rem; font-weight: 700;
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s cubic-bezier(.22,1,.36,1);
  max-width: calc(100% - 32px); text-align: center;
}
.toast.ok { background: var(--ok); }
.toast.error { background: var(--danger); }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 14px) }
  to { opacity: 1; transform: translate(-50%, 0) }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 560px) {
  .hero { padding: 32px 16px 28px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .beneficios { padding: 22px 16px 6px; }
  .seccion { padding: 34px 16px 8px; }
  .carrito { width: 100%; }
}
