/* ============================================================
   Miracle Heal — hoja de estilos principal
   Paleta: morado profundo + lavanda + crema (del empaque)
   ============================================================ */

:root {
  --purple:        #5E2C87;
  --purple-dark:   #3D1C5A;
  --purple-deep:   #2A1340;
  --lavender:      #8E8AC4;
  --lavender-soft: #EDEAF7;
  --lavender-mist: #F6F4FB;
  --cream:         #F7F2E9;
  --cream-deep:    #EFE7D6;
  --gold:          #C9A85C;
  --ink:           #2A2536;
  --muted:         #6E687C;
  --line:          #E7E2EF;
  --white:         #ffffff;

  --shadow-sm: 0 4px 14px rgba(42, 19, 64, .06);
  --shadow-md: 0 14px 40px rgba(42, 19, 64, .10);
  --shadow-lg: 0 30px 70px rgba(42, 19, 64, .16);

  --radius:    18px;
  --radius-lg: 28px;
  --container:  1180px;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans:  "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.15; color: var(--purple-dark); margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.9rem); }
h3 { font-size: 1.35rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--purple); text-decoration: none; transition: color .2s; }
a:hover { color: var(--lavender); }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section   { padding: 96px 0; }
.eyebrow {
  display: inline-block; font-family: var(--sans); font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; font-size: .78rem;
  color: var(--lavender); margin-bottom: 14px;
}
.center { text-align: center; }
.lead { font-size: 1.13rem; color: var(--muted); max-width: 620px; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 100px; font-family: var(--sans);
  font-weight: 600; font-size: .98rem; cursor: pointer; border: none;
  transition: transform .2s, box-shadow .2s, background .2s; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--purple); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--purple-dark); color: #fff; }
.btn-wa { background: #25D366; color: #fff; box-shadow: 0 12px 30px rgba(37,211,102,.28); }
.btn-wa:hover { background: #1eb457; color:#fff; }
.btn-ghost { background: transparent; color: var(--purple-dark); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--purple); color: var(--purple); }

/* ---------- Barra de anuncio ---------- */
.topbar {
  background: var(--purple-deep); color: #E9E2F5;
  font-size: .82rem; text-align: center; padding: 9px 16px; letter-spacing: .02em;
}
.topbar a { color: #fff; font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,242,233,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.nav .logo img { height: 42px; width: auto; }
.nav-links { display: flex; gap: 34px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: .96rem; }
.nav-links a:hover { color: var(--purple); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--purple-dark); margin: 5px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background:
  radial-gradient(1200px 600px at 80% -10%, var(--lavender-soft), transparent 60%),
  linear-gradient(180deg, var(--cream) 0%, var(--lavender-mist) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: 84px 0 96px; }
.hero h1 { margin-bottom: 18px; }
.hero h1 .script { color: var(--purple); font-style: italic; }
.hero .lead { font-size: 1.2rem; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 26px; margin-top: 36px; flex-wrap: wrap; }
.hero-badge { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--muted); font-weight: 500; }
.hero-badge svg { color: var(--purple); flex-shrink: 0; }

.hero-visual { position: relative; }
.hero-card {
  background: #fff; border-radius: var(--radius-lg); padding: 26px;
  box-shadow: var(--shadow-lg); position: relative; z-index: 2;
  transform: rotate(-1.5deg);
}
.hero-card img { border-radius: 16px; width: 100%; object-fit: contain; background: var(--cream); }
.hero-blob {
  position: absolute; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--lavender), var(--purple));
  filter: blur(10px); opacity: .28; top: -40px; right: -30px; z-index: 1;
}

/* ---------- Marquesina de confianza ---------- */
.trust { background: var(--purple-dark); color: #EDE6F7; padding: 26px 0; }
.trust-row { display: flex; justify-content: center; gap: 54px; flex-wrap: wrap; text-align: center; }
.trust-row div { font-size: .92rem; }
.trust-row strong { display: block; font-family: var(--serif); font-size: 1.5rem; color: #fff; }

/* ---------- Beneficios ---------- */
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 46px; }
.benefit {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s;
}
.benefit:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.benefit .ico {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--lavender-soft); color: var(--purple); margin-bottom: 16px;
}
.benefit h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.benefit p { font-size: .92rem; color: var(--muted); margin: 0; }

/* ---------- Productos ---------- */
.products { background: linear-gradient(180deg, var(--lavender-mist), var(--cream)); }
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px; margin-top: 50px; }
.product-card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md); display: flex; flex-direction: column;
  border-top: 6px solid var(--accent, var(--purple));
}
.product-media { background: var(--cream); padding: 30px; text-align: center; }
.product-media img { height: 280px; margin: 0 auto; object-fit: contain; }
.product-body { padding: 30px 32px 34px; display: flex; flex-direction: column; flex: 1; }
.product-tag {
  align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #fff; background: var(--accent, var(--purple));
  padding: 5px 12px; border-radius: 100px; margin-bottom: 14px;
}
.product-body h3 { font-size: 1.7rem; color: var(--purple-dark); margin-bottom: 4px; }
.product-body .p-tagline { color: var(--muted); font-size: .95rem; margin-bottom: 16px; }
.product-price { font-family: var(--serif); font-size: 2rem; color: var(--purple); font-weight: 700; }
.product-price span { font-family: var(--sans); font-size: .9rem; color: var(--muted); font-weight: 500; }
.product-meta { display: flex; gap: 18px; margin: 14px 0 18px; font-size: .86rem; color: var(--muted); }
.product-meta b { color: var(--ink); }
.product-note {
  background: var(--lavender-mist); border-radius: 14px; padding: 14px 16px;
  font-size: .84rem; color: var(--muted); margin-bottom: 10px;
}
.product-note.warn { background: #FBF1F1; color: #8a4b4b; }
.product-note strong { color: inherit; }
.product-body .btn { margin-top: auto; justify-content: center; }

/* ---------- Ingredientes ---------- */
.ingredients { position: relative; }
.chip-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.chip {
  background: #fff; border: 1px solid var(--line); color: var(--purple-dark);
  padding: 11px 20px; border-radius: 100px; font-weight: 500; font-size: .95rem;
  box-shadow: var(--shadow-sm);
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

/* ---------- Cómo tomarlo ---------- */
.steps { background: var(--purple-deep); color: #EDE6F7; }
.steps h2 { color: #fff; }
.steps .lead { color: #C9BEDD; }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 46px; }
.step {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 30px;
}
.step .num { font-family: var(--serif); font-size: 2.4rem; color: var(--lavender); line-height: 1; margin-bottom: 12px; }
.step h3 { color: #fff; font-size: 1.15rem; }
.step p { color: #C9BEDD; font-size: .93rem; margin: 0; }

/* ---------- Franja estilo de vida ---------- */
.lifestyle-band {
  position: relative; background-image: url('/images/lifestyle-santorini.jpg');
  background-size: cover; background-position: center; min-height: 460px;
  display: flex; align-items: center; text-align: center;
}
.lifestyle-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(42,19,64,.55), rgba(61,28,90,.75));
}
.lifestyle-content { position: relative; z-index: 2; padding: 90px 0; }
.lifestyle-content h2 { color: #fff; }
.lifestyle-content p { color: #EDE6F7; max-width: 520px; margin: 0 auto 28px; font-size: 1.1rem; }

/* ---------- Testimonios ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 46px; }
.testi {
  background: #fff; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--line); text-align: left;
}
.testi-photo {
  width: 68px; height: 68px; border-radius: 50%; object-fit: cover;
  margin-bottom: 16px; border: 3px solid var(--lavender-soft);
}
.testi .stars { color: var(--gold); margin-bottom: 12px; letter-spacing: 2px; }
.testi p { font-style: italic; color: var(--ink); }
.testi .who { font-weight: 600; color: var(--purple-dark); font-style: normal; font-size: .92rem; margin-top: 10px; }
.placeholder-note {
  margin-top: 24px; text-align: center; font-size: .85rem; color: var(--muted);
  background: var(--lavender-soft); padding: 10px; border-radius: 10px;
}

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 46px auto 0; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 22px 0; font-family: var(--sans); font-weight: 600; font-size: 1.05rem;
  color: var(--purple-dark); display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.faq-q .plus { flex-shrink: 0; transition: transform .25s; color: var(--lavender); }
.faq-item.open .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding-bottom: 22px; color: var(--muted); margin: 0; }

/* ---------- CTA / Contacto ---------- */
.cta {
  background: radial-gradient(900px 500px at 20% 0%, var(--purple), var(--purple-deep));
  color: #fff; border-radius: var(--radius-lg); padding: 64px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta h2 { color: #fff; }
.cta p { color: #D8CEE9; max-width: 560px; margin: 0 auto 28px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.pay-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.pay-pill { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 8px 18px; border-radius: 100px; font-size: .85rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--purple-deep); color: #C9BEDD; padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: 1rem; margin-bottom: 16px; }
.site-footer a { color: #C9BEDD; display: block; margin-bottom: 8px; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.footer-logo img { height: 40px; filter: brightness(0) invert(1); opacity: .95; margin-bottom: 14px; }
.disclaimer {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: .78rem; color: #9C90B4; line-height: 1.6;
}
.copyright { margin-top: 18px; font-size: .82rem; color: #9C90B4; }

/* ============================================================
   TIENDA: carrito, checkout, confirmación
   ============================================================ */
.cart-link { position: relative; display: inline-grid; place-items: center; color: var(--purple-dark); padding: 6px; }
.cart-link:hover { color: var(--purple); }
.cart-count {
  position: absolute; top: -4px; right: -6px; background: var(--purple); color: #fff;
  font-size: .68rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 100px;
  display: grid; place-items: center; padding: 0 5px; font-family: var(--sans);
}

.add-form { display: flex; gap: 10px; margin-top: auto; }
.qty-input {
  width: 66px; padding: 13px 10px; border: 1.5px solid var(--line); border-radius: 100px;
  font-family: var(--sans); font-size: .95rem; text-align: center; background: #fff;
}
.qty-input:focus { outline: none; border-color: var(--purple); }
.add-form .btn { flex: 1; justify-content: center; }
.wa-inline { display: inline-block; margin-top: 14px; font-size: .88rem; color: #25a55a; font-weight: 500; }

/* Mensajes flash */
.flash { padding: 14px 20px; border-radius: 14px; margin: 22px auto 0; font-weight: 500; text-align: center; }
.flash-ok { background: #e7f7ee; color: #1c7a45; border: 1px solid #bde8cf; }
.flash-error { background: #fdeceb; color: #a5342b; border: 1px solid #f4c9c5; }

/* Secciones de tienda */
.shop-section { background: linear-gradient(180deg, var(--lavender-mist), var(--cream)); min-height: 60vh; }
.shop-head { text-align: center; margin-bottom: 44px; }
.shop-head h1 { font-size: clamp(2rem, 4vw, 3rem); }
.container.narrow { max-width: 760px; }
.muted { color: var(--muted); }

/* Layout carrito / checkout */
.cart-layout { display: grid; grid-template-columns: 1.7fr .9fr; gap: 32px; align-items: start; }

.cart-items { display: flex; flex-direction: column; gap: 16px; }
.cart-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: grid; grid-template-columns: 84px 1fr auto auto auto;
  gap: 20px; align-items: center; box-shadow: var(--shadow-sm);
}
.cart-item img { width: 84px; height: 84px; object-fit: contain; background: var(--cream); border-radius: 12px; }
.cart-item-info h3 { font-size: 1.1rem; margin-bottom: 2px; }
.cart-price { color: var(--purple); font-weight: 600; margin: 6px 0 0; }
.cart-item-qty { display: flex; flex-direction: column; gap: 5px; align-items: center; }
.cart-item-subtotal { display: flex; flex-direction: column; gap: 3px; text-align: right; min-width: 90px; }
.cart-item-subtotal strong { font-size: 1.1rem; color: var(--purple-dark); }
.cart-remove { color: var(--muted); font-size: 1.1rem; padding: 4px 8px; border-radius: 8px; }
.cart-remove:hover { color: #c0392b; background: #fbeceb; }
.cart-actions-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

/* Resumen */
.cart-summary {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-md); position: sticky; top: 100px;
}
.cart-summary h3 { font-size: 1.3rem; margin-bottom: 18px; }
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: .95rem; border-bottom: 1px solid var(--line); }
.summary-total { font-family: var(--serif); font-size: 1.3rem; color: var(--purple-dark); font-weight: 700; border-bottom: none; padding-top: 16px; }
.cart-summary .btn-block { width: 100%; justify-content: center; margin-top: 18px; }
.summary-note { font-size: .82rem; color: var(--muted); margin: 14px 0 0; text-align: center; }

/* Carrito vacío */
.empty-cart { text-align: center; background: #fff; border-radius: var(--radius-lg); padding: 70px 30px; box-shadow: var(--shadow-sm); }
.empty-cart svg { color: var(--lavender); margin-bottom: 18px; }
.empty-cart h3 { font-size: 1.5rem; margin-bottom: 8px; }
.empty-cart .btn { margin-top: 20px; }

/* Checkout */
.checkout-form { display: flex; flex-direction: column; gap: 22px; }
.form-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.form-block h3 { font-size: 1.25rem; margin-bottom: 18px; }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 7px; color: var(--purple-dark); }
.field .input, .field .textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 12px;
  font-family: var(--sans); font-size: .95rem; background: #fff;
}
.field .input:focus, .field .textarea:focus { outline: none; border-color: var(--purple); }
.field .textarea { min-height: 82px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Contáctenos ---------- */
.contact-section { background: var(--lavender-mist); }
.contact-grid {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 30px;
  margin-top: 46px; align-items: start;
}
.contact-info h3 { font-size: 1.5rem; margin-bottom: 12px; color: var(--purple-dark); }
.contact-info p { color: var(--muted); margin-bottom: 22px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 26px; }
.contact-list li { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.contact-list li svg {
  flex-shrink: 0; width: 40px; height: 40px; padding: 10px; border-radius: 12px;
  background: #fff; color: var(--purple); box-shadow: var(--shadow-sm);
}
.contact-list li a { color: var(--ink); font-weight: 500; text-decoration: none; }
.contact-list li a:hover { color: var(--purple); }
.contact-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; box-shadow: var(--shadow-md);
}
.contact-card .flash { margin-top: 0; margin-bottom: 20px; }

.pay-option {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1.5px solid var(--line);
  border-radius: 14px; margin-bottom: 12px; cursor: pointer; transition: border .2s, background .2s;
}
.pay-option:hover { border-color: var(--lavender); }
.pay-option:has(input:checked) { border-color: var(--purple); background: var(--lavender-mist); }
.pay-option input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--purple); flex-shrink: 0; }
.pay-option strong { color: var(--purple-dark); }
.pay-option p { margin: 3px 0 0; font-size: .86rem; }

/* Confirmación */
.confirm-hero { text-align: center; margin-bottom: 34px; }
.confirm-check {
  width: 80px; height: 80px; border-radius: 50%; background: #e7f7ee; color: #27ae60;
  display: grid; place-items: center; margin: 0 auto 22px; box-shadow: 0 10px 30px rgba(39,174,96,.2);
}
.confirm-card, .confirm-summary {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; box-shadow: var(--shadow-md); margin-bottom: 24px;
}
.confirm-step { background: var(--lavender-mist); border-radius: 14px; padding: 16px 18px; margin-bottom: 18px; font-size: .95rem; }
.confirm-card .btn-block { width: 100%; justify-content: center; }
.pay-instructions { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.pay-instructions h3 { font-size: 1.15rem; margin-bottom: 10px; }
.zelle-box {
  background: var(--purple-deep); color: #fff; font-family: var(--serif); font-size: 1.15rem;
  padding: 14px 20px; border-radius: 12px; text-align: center; margin: 14px 0; letter-spacing: .02em;
}
.confirm-table { width: 100%; border-collapse: collapse; }
.confirm-table td { padding: 12px 0; border-bottom: 1px solid var(--line); }
.confirm-total td { font-family: var(--serif); font-size: 1.2rem; color: var(--purple-dark); font-weight: 700; border-bottom: none; padding-top: 16px; }

@media (max-width: 860px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-item { grid-template-columns: 64px 1fr auto; grid-template-areas: "img info remove" "img qty sub"; row-gap: 14px; }
  .cart-item img { width: 64px; height: 64px; grid-area: img; }
  .cart-item-info { grid-area: info; }
  .cart-item-qty { grid-area: qty; align-items: flex-start; }
  .cart-item-subtotal { grid-area: sub; }
  .cart-remove { grid-area: remove; justify-self: end; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Asistente virtual "Miri" ---------- */
.miri { position: fixed; right: 22px; bottom: 22px; z-index: 70; }
.miri-bubble {
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  display: grid; place-items: center; box-shadow: 0 14px 34px rgba(94,44,135,.45);
  transition: transform .2s; position: relative; margin-left: auto;
}
.miri-bubble:hover { transform: scale(1.07); }
.miri-ico-close { display: none; }
.miri.open .miri-ico-open { display: none; }
.miri.open .miri-ico-close { display: block; }

.miri-panel {
  position: absolute; right: 0; bottom: 74px; width: 370px; max-width: calc(100vw - 30px);
  background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg);
  overflow: hidden; display: flex; flex-direction: column;
  opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none;
  transition: opacity .2s, transform .2s; border: 1px solid var(--line);
}
.miri.open .miri-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.miri-header {
  background: linear-gradient(135deg, var(--purple), var(--purple-deep)); color: #fff;
  padding: 18px 20px; display: flex; align-items: center; gap: 12px;
}
.miri-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 1.2rem; }
.miri-header strong { display: block; font-family: var(--serif); font-size: 1.1rem; }
.miri-header span { font-size: .78rem; color: #D8CEE9; }

.miri-messages { padding: 18px; height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: var(--lavender-mist); }
.miri-msg { max-width: 82%; padding: 11px 15px; border-radius: 16px; font-size: .92rem; line-height: 1.5; white-space: pre-wrap; }
.miri-msg.bot { background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.miri-msg.user { background: var(--purple); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.miri-msg.typing { color: var(--muted); letter-spacing: 3px; font-size: 1.2rem; padding: 8px 15px; }

.miri-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.miri-input input { flex: 1; border: 1.5px solid var(--line); border-radius: 100px; padding: 11px 16px; font-family: var(--sans); font-size: .92rem; }
.miri-input input:focus { outline: none; border-color: var(--purple); }
.miri-input button { border: none; background: var(--purple); color: #fff; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; transition: background .2s; }
.miri-input button:hover { background: var(--purple-dark); }
.miri-foot { text-align: center; font-size: .78rem; color: var(--muted); padding: 0 12px 12px; background: #fff; }
.miri-foot a { color: #25a55a; font-weight: 600; }

/* Identificación suave del asistente */
.miri-identify { display: none; padding: 20px 18px; background: #fff; }
.miri-panel.miri-need-id .miri-identify { display: block; }
.miri-panel.miri-need-id .miri-messages,
.miri-panel.miri-need-id .miri-input,
.miri-panel.miri-need-id .miri-foot { display: none; }
.miri-id-title { font-weight: 600; color: var(--purple-dark); margin: 0 0 4px; }
.miri-id-sub { font-size: .85rem; color: var(--muted); margin: 0 0 14px; }
.miri-identify input {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px;
  margin-bottom: 10px; font-size: .92rem; font-family: var(--sans);
}
.miri-identify input:focus { outline: none; border-color: var(--purple); }
.miri-id-start {
  width: 100%; padding: 11px; background: var(--purple); color: #fff; border: none;
  border-radius: 12px; font-weight: 600; cursor: pointer; font-family: var(--sans); font-size: .92rem;
}
.miri-id-start:hover { background: var(--purple-dark); }
.miri-id-skip {
  width: 100%; margin-top: 10px; background: none; border: none; color: var(--muted);
  font-size: .82rem; cursor: pointer; text-decoration: underline; font-family: var(--sans);
}

@media (max-width: 480px) {
  .miri-panel { height: 70vh; }
  .miri-messages { height: auto; flex: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-actions, .hero-badges { justify-content: center; }
  .hero-visual { max-width: 420px; margin: 0 auto; }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .step-grid, .testi-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 720px) {
  .section { padding: 66px 0; }
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .menu-toggle { display: block; }
  .nav-links.open {
    display: flex; position: absolute; top: 78px; left: 0; right: 0;
    flex-direction: column; background: var(--cream); padding: 20px 24px; gap: 16px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
  .product-grid { grid-template-columns: 1fr; }
  .cta { padding: 44px 26px; }
  .contact-card { padding: 24px 20px; }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .benefits-grid { grid-template-columns: 1fr; }
  .trust-row { gap: 30px; }
}
