/* Paleta tomada del mockup. TODO: ajustar con los códigos exactos del branding. */
:root {
  --teal: #17a3a8;
  --teal-dark: #0f7f83;
  --mustard: #f4a521;
  --pink: #ec4e8a;
  --pink-soft: #fde8ef;
  --cream: #fffaf3;
  --ink: #2a2a2e;
  --muted: #6b6b73;
  --line: #ece4d8;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(42, 42, 46, 0.08);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); text-align: center; }
a { color: var(--teal-dark); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  border: 0; border-radius: 999px; padding: 0.85em 1.6em;
  font: 800 1rem var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
.btn-primary { background: var(--pink); color: #fff; box-shadow: 0 6px 18px rgba(236, 78, 138, 0.35); }
.btn-primary:hover { background: #d93d79; }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-mp { background: #009ee3; color: #fff; width: 100%; }
.btn-ghost { background: #fff; color: var(--ink); border: 2px solid var(--line); }
.btn-ghost.is-on { background: var(--teal); border-color: var(--teal); color: #fff; }

/* Barra superior */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.8rem clamp(1rem, 4vw, 3rem);
  background: rgba(255, 250, 243, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--teal); text-decoration: none; margin: 0; }
.logo span { color: var(--pink); }
.nav { display: flex; gap: 1.4rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; }
.nav a:hover { color: var(--pink); }
.currency { display: flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.currency button {
  border: 0; background: transparent; border-radius: 999px; padding: 0.35em 0.9em;
  font: 700 0.85rem var(--font-body); color: var(--muted); cursor: pointer;
}
.currency button.is-on { background: var(--teal); color: #fff; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center;
  max-width: 1150px; margin: 0 auto; padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem);
}
.eyebrow { color: var(--teal-dark); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.85rem; margin: 0 0 1rem; }
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); }
.hero h1 em { font-style: normal; color: var(--pink); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin: 1.8rem 0; }
.from { color: var(--muted); }
.from strong { color: var(--ink); font-size: 1.2rem; }
.badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.badges li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 0.4em 0.9em; font-weight: 700; font-size: 0.9rem; }
.hero-img img {
  border-radius: 28px; box-shadow: var(--shadow); aspect-ratio: 4 / 5; object-fit: cover; object-position: center 55%;
  width: 100%; height: auto; transform: rotate(1.5deg);
}

/* Pasos */
.steps { background: var(--teal); color: #fff; padding: 3rem clamp(1rem, 4vw, 3rem); }
.steps h2 { color: #fff; }
.steps ol { list-style: none; padding: 0; margin: 1.5rem auto 0; max-width: 1000px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.steps li { text-align: center; font-size: 1.05rem; }
.steps .n {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 0.6rem;
  background: var(--mustard); color: var(--ink); border-radius: 50%; font: 800 1.4rem var(--font-display);
}
.steps strong { display: block; font-size: 1.15rem; }

/* Secciones */
.section { padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 4vw, 3rem); }
.section > * { max-width: 1150px; margin-left: auto; margin-right: auto; }
.section-tint { background: #fff; }
.section-sub { text-align: center; color: var(--muted); margin-top: -0.4rem; margin-bottom: 2.2rem; }

/* Productos */
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.product {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; border: 3px solid transparent; transition: border-color 0.15s, transform 0.15s;
}
.product.is-selected { border-color: var(--teal); }
.product img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; height: auto; background: var(--pink-soft); }
.product-body { padding: 1.1rem 1.1rem 1.3rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.product h3 { font-size: 1.25rem; margin: 0; }
.product p { margin: 0; color: var(--muted); font-size: 0.95rem; flex: 1; }
.product .btn { width: 100%; margin-top: 0.4rem; }

/* Packs */
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; align-items: stretch; }
.pack {
  position: relative; background: var(--cream); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.5rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
}
.pack h3 { font-size: 1.3rem; margin: 0; }
.pack-price { font: 800 2.2rem var(--font-display); color: var(--teal-dark); margin: 0.2rem 0; }
.pack-note { color: var(--muted); margin: 0 0 0.8rem; font-weight: 700; }
.pack-featured { border-color: var(--pink); background: var(--pink-soft); }
.pack-featured .pack-price { color: var(--pink); }
.ribbon {
  position: absolute; top: -14px; background: var(--mustard); color: var(--ink);
  font-weight: 800; font-size: 0.8rem; padding: 0.3em 1em; border-radius: 999px;
}

/* Personalizados */
.custom {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  max-width: 1150px; margin: clamp(2rem, 5vw, 4rem) auto; padding: 2rem clamp(1.4rem, 4vw, 3rem);
  background: var(--mustard); border-radius: 28px;
}
.custom h2 { text-align: left; font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 0.3em; }
.custom p { margin: 0; max-width: 40em; }

/* Licencia */
.license { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; max-width: 850px; }
.license ul { list-style: none; margin: 0; padding: 1.5rem; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.license li { padding: 0.45rem 0 0.45rem 2rem; position: relative; font-weight: 600; }
.license li::before { position: absolute; left: 0; font-weight: 800; }
.license .yes li::before { content: "✓"; color: var(--teal); }
.license .no li::before { content: "✕"; color: var(--pink); }

/* FAQ */
.faq { max-width: 760px; }
.faq details { background: var(--cream); border-radius: 14px; margin-bottom: 0.8rem; padding: 0 1.2rem; border: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 800; padding: 1rem 0; list-style: none; position: relative; padding-right: 2rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; color: var(--pink); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 1rem; color: var(--muted); }

/* Footer */
.footer { text-align: center; padding: 3rem 1rem 7rem; border-top: 1px solid var(--line); }
.footer .small { color: var(--muted); font-size: 0.85rem; }
.social a { margin: 0 0.6rem; font-weight: 700; }

/* Barra del carrito */
.cartbar {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 30;
  width: min(720px, calc(100% - 2rem));
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--ink); color: #fff; border-radius: 20px; padding: 0.8rem 0.8rem 0.8rem 1.4rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  animation: rise 0.25s ease;
}
.cartbar[hidden] { display: none; }
.cartbar-info { display: flex; flex-direction: column; }
.cart-hint { color: var(--mustard); font-size: 0.88rem; font-weight: 700; }
.cartbar-action { display: flex; align-items: center; gap: 1rem; }
.cart-total { font: 800 1.3rem var(--font-display); white-space: nowrap; }
@keyframes rise { from { transform: translate(-50%, 20px); opacity: 0; } }

/* Checkout */
.checkout {
  border: 0; border-radius: 24px; padding: 0; width: min(480px, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.checkout::backdrop { background: rgba(42, 42, 46, 0.55); }
.checkout form { padding: 1.8rem; display: flex; flex-direction: column; gap: 0.9rem; position: relative; }
.checkout h2 { text-align: left; font-size: 1.6rem; margin: 0; }
.close { position: absolute; top: 0.8rem; right: 1rem; border: 0; background: none; font-size: 1.8rem; cursor: pointer; color: var(--muted); }
.summary { list-style: none; margin: 0; padding: 0.8rem 1rem; background: var(--cream); border-radius: 12px; }
.summary li { padding: 0.15rem 0; font-weight: 600; }
.summary .gift { color: var(--pink); }
.summary-total { margin: 0; text-align: right; font-size: 1.1rem; }
.checkout label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 700; font-size: 0.92rem; }
.checkout input[type="email"], .checkout input:not([type]) {
  font: 600 1rem var(--font-body); padding: 0.75em 0.9em; border: 2px solid var(--line); border-radius: 12px;
}
.checkout input:focus { outline: none; border-color: var(--teal); }
.checkout .check { flex-direction: row; align-items: flex-start; gap: 0.6rem; font-weight: 600; color: var(--muted); }
.check input { margin-top: 0.25em; width: 18px; height: 18px; accent-color: var(--teal); flex: none; }
.form-error { color: #c0264f; font-weight: 700; margin: 0; min-height: 1.2em; }
.pay-note, .pay-alt { margin: 0.4rem 0 0; text-align: center; color: var(--muted); font-size: 0.88rem; }
.pay-alt a { cursor: pointer; font-weight: 700; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 1.2rem; bottom: 6rem; z-index: 25;
  width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
}

/* Toast */
.toast {
  position: fixed; top: 5rem; left: 50%; transform: translateX(-50%) translateY(-20px); z-index: 50;
  background: var(--teal); color: #fff; font-weight: 800; padding: 0.8em 1.4em; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Página de gracias / descarga */
.center-page { min-height: 70vh; display: grid; place-items: center; padding: 2rem 1rem; }
.card { background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 2.4rem; max-width: 560px; width: 100%; text-align: center; }
.card h1 { font-size: 2rem; }
.card p { color: var(--muted); }
.downloads { list-style: none; padding: 0; margin: 1.5rem 0; display: flex; flex-direction: column; gap: 0.8rem; }
.downloads .btn { width: 100%; }
.spinner { width: 42px; height: 42px; border: 4px solid var(--line); border-top-color: var(--pink); border-radius: 50%; margin: 1rem auto; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 960px) {
  .products { grid-template-columns: repeat(2, 1fr); }
  .steps ol { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero { padding-top: 1.5rem; }
  .hero-img { max-width: 300px; margin: 0 auto; }
  .wa-float { bottom: 7.5rem; width: 50px; height: 50px; }
  .packs, .license { grid-template-columns: 1fr; }
  .custom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .products { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
  .product-body { padding: 0.8rem; }
  .product h3 { font-size: 1.05rem; }
  .product p { display: none; }
  .cart-total { font-size: 1.1rem; }
  .cartbar { padding-left: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
