/* ============ Ayuno Turbo — Quiz ============ */
:root {
  --teal: #14b8a6;
  --teal-dark: #0d9488;
  --teal-light: #ccfbf1;
  --ink: #1f2937;
  --gray: #6b7280;
  --bg: #ffffff;
  --card: #f3f4f6;
  --card-hover: #e7f9f6;
  --border: #e5e7eb;
  --red: #ef4444;
  --amber: #f59e0b;
  --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
button { font-family: inherit; }

/* ---------- Header ---------- */
.topbar {
  display: flex; align-items: center; justify-content: center;
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 12px 16px; gap: 8px;
}
.logo-svg { height: 30px; width: 175px; display: block; }
.logo-t1 { font: 900 26px 'Inter'; fill: var(--ink); letter-spacing: -1px; }
.logo-t2 { font: 900 26px 'Inter'; fill: var(--teal); letter-spacing: -1px; }
.logo-bolt { font-size: 14px; }
.back-btn {
  position: absolute; left: 12px;
  background: none; border: none; font-size: 30px; line-height: 1;
  color: var(--gray); cursor: pointer; padding: 0 10px;
}
.spacer { width: 0; }

.progress-wrap { padding: 10px 16px 0; max-width: 520px; margin: 0 auto; width: 100%; }
.progress-bar { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--teal); border-radius: 99px; transition: width .35s ease; }

/* ---------- Layout ---------- */
main { max-width: 520px; margin: 0 auto; padding: 20px 16px 48px; }
.step { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

h1.q-title { font-size: 26px; font-weight: 800; text-align: center; line-height: 1.25; margin: 8px 0 6px; }
p.q-sub { text-align: center; color: var(--gray); font-size: 15px; margin-bottom: 16px; line-height: 1.5; }
.hl { color: var(--teal); }
.hl-red { color: var(--red); }

/* ---------- Botones opción ---------- */
.opts { display: grid; gap: 10px; margin-top: 18px; }
.opts.grid2 { grid-template-columns: 1fr 1fr; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--card); border: 2px solid transparent; border-radius: var(--radius);
  padding: 12px 14px; font-size: 16px; font-weight: 600; color: var(--ink);
  cursor: pointer; text-align: left; transition: all .15s ease; min-height: 56px;
}
.opt:hover { background: var(--card-hover); border-color: var(--teal); }
.opt.selected { background: var(--teal-light); border-color: var(--teal); }
.opt .emoji { font-size: 26px; flex-shrink: 0; width: 36px; text-align: center; }
.opt img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.opt .opt-txt { flex: 1; }
.opt .opt-sub { display: block; font-size: 13px; font-weight: 400; color: var(--gray); margin-top: 2px; }
.opt .check { width: 22px; height: 22px; border: 2px solid #d1d5db; border-radius: 6px; flex-shrink: 0; display: grid; place-items: center; color: #fff; font-size: 14px; }
.opt.selected .check { background: var(--teal); border-color: var(--teal); }

/* tarjetas grandes con foto (género / cuerpo) */
.opt.card-big { flex-direction: column; padding: 0; overflow: hidden; }
.opt.card-big img { width: 100%; height: 200px; border-radius: 0; }
.opt.card-big .opt-txt { padding: 12px; text-align: center; width: 100%; }

/* ---------- CTA ---------- */
.cta {
  display: block; width: 100%; margin-top: 20px;
  background: var(--teal); color: #fff; border: none; border-radius: var(--radius);
  padding: 17px 20px; font-size: 17px; font-weight: 800; cursor: pointer;
  box-shadow: 0 6px 18px rgba(20,184,166,.35);
  transition: transform .1s ease, background .15s ease;
  text-decoration: none; text-align: center;
}
.cta:hover { background: var(--teal-dark); }
.cta:active { transform: scale(.98); }
.cta:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.cta.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }

/* ---------- Imágenes ---------- */
.step-img { display: block; max-width: 100%; border-radius: var(--radius); margin: 12px auto; }
.step-img.small { max-width: 200px; }
.step-img.medium { max-width: 320px; }

/* ---------- Comidas ---------- */
.food-cat { font-size: 18px; font-weight: 800; margin: 22px 0 10px; }
.food-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.food-chip {
  background: var(--card); border: 2px solid transparent; border-radius: 99px;
  padding: 9px 16px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.food-chip.selected { background: var(--teal-light); border-color: var(--teal); }
.sticky-cta { position: sticky; bottom: 12px; margin-top: 24px; }

/* ---------- Slider ---------- */
.unit-toggle { display: flex; justify-content: center; gap: 0; margin: 10px 0 26px; }
.unit-toggle button {
  border: 2px solid var(--teal); background: #fff; color: var(--teal);
  padding: 8px 26px; font-weight: 700; font-size: 15px; cursor: pointer;
}
.unit-toggle button:first-child { border-radius: 10px 0 0 10px; }
.unit-toggle button:last-child { border-radius: 0 10px 10px 0; }
.unit-toggle button.active { background: var(--teal); color: #fff; }
.slider-value { text-align: center; font-size: 44px; font-weight: 900; margin: 18px 0 4px; }
.slider-value span { font-size: 22px; color: var(--gray); font-weight: 700; }
.slider-hint { text-align: center; color: var(--gray); font-size: 13px; margin-bottom: 10px; }
input[type=range] { width: 100%; accent-color: var(--teal); height: 34px; cursor: grab; }
.ruler { display: flex; justify-content: space-between; color: var(--gray); font-size: 12px; padding: 0 2px; }

/* ---------- Input edad ---------- */
.age-input {
  width: 100%; padding: 16px; font-size: 18px; border: 2px solid var(--border);
  border-radius: var(--radius); font-family: inherit; margin-top: 14px; text-align: center;
}
.age-input:focus { outline: none; border-color: var(--teal); }
.note-box {
  background: var(--teal-light); border-radius: var(--radius); padding: 14px 16px;
  font-size: 14px; color: var(--ink); line-height: 1.5; margin-top: 16px;
}
.note-box.warn { background: #fef3c7; }

/* ---------- IMC ---------- */
.bmi-card { background: var(--card); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.bmi-label { font-size: 13px; color: var(--gray); font-weight: 600; }
.bmi-value { font-size: 15px; font-weight: 800; margin: 2px 0 14px; }
.bmi-gauge { position: relative; height: 12px; border-radius: 99px; background: linear-gradient(90deg,#60a5fa,#34d399 35%,#fbbf24 65%,#ef4444); }
.bmi-dot {
  position: absolute; top: -6px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 4px solid var(--ink); transform: translateX(-50%);
  left: 0; transition: left 1.4s cubic-bezier(.22,.61,.36,1);
}
.bmi-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--gray); margin-top: 8px; }

/* ---------- Proyección ---------- */
.chart-box { background: var(--card); border-radius: var(--radius); padding: 18px; margin-top: 16px; }
.chart-goal { text-align: center; font-size: 22px; font-weight: 900; margin-bottom: 4px; }
.chart-goal .hl { font-size: 26px; }

/* ---------- Loading ---------- */
.load-pct { font-size: 54px; font-weight: 900; text-align: center; color: var(--teal); margin: 18px 0 4px; }
.load-status { text-align: center; color: var(--gray); margin-bottom: 18px; }
.load-bar { height: 10px; background: var(--border); border-radius: 99px; overflow: hidden; margin-bottom: 26px; }
.load-fill { height: 100%; background: var(--teal); width: 0%; transition: width .3s; border-radius: 99px; }

/* ---------- Testimonios ---------- */
.testi { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 10px 0; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.testi-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.testi-ava { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--teal-light); display: grid; place-items: center; font-weight: 800; color: var(--teal-dark); }
.testi-name { font-weight: 700; font-size: 14px; }
.testi-stars { color: var(--amber); font-size: 13px; letter-spacing: 2px; }
.testi p { font-size: 14px; color: var(--ink); line-height: 1.5; }

/* ---------- Página de venta ---------- */
.sales-section { margin-top: 34px; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.compare-card { background: var(--card); border-radius: var(--radius); padding: 14px; }
.compare-card h4 { text-align: center; font-size: 15px; margin-bottom: 10px; }
.compare-card img { width: 100%; border-radius: 10px; }
.meter { margin-top: 10px; }
.meter .m-label { font-size: 12px; color: var(--gray); font-weight: 600; }
.meter .m-track { height: 8px; background: #e5e7eb; border-radius: 99px; margin: 4px 0 2px; overflow: hidden; }
.meter .m-fill { height: 100%; border-radius: 99px; }
.meter .m-val { font-size: 12px; font-weight: 700; }

.plan-item { display: flex; gap: 14px; margin: 18px 0; }
.plan-item .pi-emoji { font-size: 30px; flex-shrink: 0; }
.plan-item h4 { font-size: 16px; margin-bottom: 4px; }
.plan-item p { font-size: 14px; color: var(--gray); line-height: 1.5; }

.price-box {
  border: 2px solid var(--teal); border-radius: var(--radius); padding: 22px 18px;
  text-align: center; margin-top: 18px; background: #f0fdfa;
}
.price-old { color: var(--gray); font-size: 15px; }
.price-old s { color: var(--red); }
.price-main { font-size: 46px; font-weight: 900; color: var(--teal-dark); line-height: 1.1; margin: 6px 0; }
.price-main small { font-size: 18px; color: var(--ink); font-weight: 700; }
.price-alt { color: var(--gray); font-size: 14px; margin-bottom: 12px; }
.countdown { display: flex; justify-content: center; gap: 8px; margin: 14px 0; }
.cd-cell { background: var(--ink); color: #fff; border-radius: 10px; padding: 8px 12px; min-width: 58px; }
.cd-num { font-size: 26px; font-weight: 900; display: block; }
.cd-lab { font-size: 11px; opacity: .7; }
.cd-sep { font-size: 26px; font-weight: 900; align-self: center; }

.guarantee { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: var(--radius); padding: 18px; margin-top: 26px; }
.guarantee .g-seal { font-size: 44px; }
.guarantee .g-seal-img { width: 90px; height: 90px; object-fit: contain; flex-shrink: 0; }
.guarantee h4 { margin-bottom: 6px; }
.guarantee p { font-size: 14px; color: var(--gray); line-height: 1.55; }

.badge-row { display: flex; justify-content: center; gap: 18px; margin: 18px 0 6px; color: var(--gray); font-size: 13px; flex-wrap: wrap; }
.badge-row span { display: flex; align-items: center; gap: 6px; }

.success-img { width: 100%; border-radius: var(--radius); margin: 10px 0; }

@media (max-width: 420px) {
  h1.q-title { font-size: 22px; }
  .opt.card-big img { height: 160px; }
}
