/* ============================================================
   4Health — Estilos base (compartidos por los 3 sitios)
   El color/tipografía lo define cada tema vía variables CSS.
   ============================================================ */
:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --surface-2: #eef0f4;
  --text: #1b2330;
  --muted: #5b6472;
  --brand: #2f5ec4;
  --brand-2: #6b3fa0;
  --accent: #2f5ec4;
  --border: #e2e6ee;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(20, 30, 60, .08);
  --shadow-sm: 0 3px 10px rgba(20, 30, 60, .06);
  --maxw: 1160px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font-body);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 .4em; font-weight: 700; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 76px 0; }
.section-sm { padding: 44px 0; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .16em; font-size: .74rem;
  font-weight: 700; color: var(--brand); margin-bottom: 12px;
}
.lead { color: var(--muted); font-size: 1.08rem; max-width: 60ch; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; letter-spacing: -.01em; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.brand small { display: block; font-weight: 600; font-size: .68rem; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--text); }
.nav .btn { color: #fff; }
@media (max-width: 720px){ .nav a.hide-sm { display: none; } }

/* ---- Botones ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  border: 0; border-radius: 100px; padding: 12px 22px;
  font: inherit; font-weight: 700; text-decoration: none;
  background: var(--brand); color: #fff; transition: transform .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--border); }
.btn.ghost:hover { border-color: var(--brand); }
.btn.wa { background: #25d366; color: #08331b; }
.btn.block { width: 100%; justify-content: center; }
.btn.sm { padding: 8px 15px; font-size: .9rem; }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; padding: 92px 0 84px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); letter-spacing: -.02em; }
.hero .lead { margin: 18px 0 28px; font-size: 1.15rem; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art {
  aspect-ratio: 4/3.4; border-radius: 20px; box-shadow: var(--shadow);
  background:
    radial-gradient(120% 90% at 80% 10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%),
    linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  display: grid; place-items: center; position: relative;
}
.hero-art .ph { text-align: center; color: var(--muted); padding: 24px; }
.hero-art .drop {
  width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 50% 50% 50% 4px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: inset 0 0 22px rgba(255,255,255,.35);
}
@media (max-width: 900px){ .hero .wrap { grid-template-columns: 1fr; } .hero-art { order: -1; } }

/* ---- Audiencia / tarjetas ---- */
.grid { display: grid; gap: 20px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px){ .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3 { grid-template-columns: 1fr; } }
@media (max-width: 560px){ .grid.cols-4, .grid.cols-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 1.06rem; }
.card p { color: var(--muted); margin: 0; font-size: .96rem; }
.tag { display:inline-block; font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em;
  padding:4px 9px; border-radius:100px; background: var(--surface-2); color: var(--muted); }

/* ---- Catálogo ---- */
.cat-filters { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:26px; }
.chip { border:1px solid var(--border); background:var(--bg); color:var(--muted); border-radius:100px;
  padding:8px 15px; font-weight:600; font-size:.9rem; cursor:pointer; }
.chip.active { background: var(--brand); color:#fff; border-color: var(--brand); }
.prod { display:flex; flex-direction:column; }
.prod .media {
  aspect-ratio: 4/3; border-radius: var(--radius-sm); margin-bottom:14px; border:1px solid var(--border);
  background: linear-gradient(160deg, var(--surface), var(--surface-2)); display:grid; place-items:center;
  overflow:hidden;
}
.prod .media img { max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; display:block; }
.prod .media .mini-drop { width:44px;height:44px;border-radius:50% 50% 50% 3px;transform:rotate(45deg);
  background:linear-gradient(135deg,var(--brand),var(--brand-2)); opacity:.85; }
.prod h3 { font-size:1.02rem; margin-bottom:4px; }
.prod .pres { color:var(--muted); font-size:.86rem; margin-bottom:8px; }
.prod .price { font-weight:800; color:var(--text); margin-bottom:14px; }
.prod .price.info { color: var(--brand); font-weight:700; font-size:.95rem; }
.prod .add { margin-top:auto; }
.prod.selected { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---- Bandeja de cotización ---- */
.tray {
  position: fixed; right: 20px; bottom: 20px; z-index: 45;
  width: 340px; max-width: calc(100vw - 40px);
  background: var(--bg); border:1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transform: translateY(140%); transition: transform .3s ease;
  overflow: hidden;
}
.tray.open { transform: translateY(0); }
.tray header { padding:14px 16px; background: var(--brand); color:#fff; display:flex; justify-content:space-between; align-items:center; }
.tray header b { font-size: .98rem; }
.tray .items { max-height: 240px; overflow:auto; padding: 6px 16px; }
.tray .row { display:flex; justify-content:space-between; gap:10px; padding:9px 0; border-bottom:1px solid var(--border); font-size:.9rem; }
.tray .row button { background:none;border:0;color:var(--muted);cursor:pointer;font-size:1.1rem;line-height:1; }
.tray .foot { padding: 14px 16px; }
.tray .empty { color:var(--muted); padding: 22px 16px; text-align:center; font-size:.92rem; }

/* ---- Bloque comparativa ---- */
.compare { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
@media (max-width:760px){ .compare { grid-template-columns:1fr; } }
.compare .col { border:1px solid var(--border); border-radius:var(--radius); padding:24px; background:var(--bg); }
.compare .col.acida { border-top:4px solid var(--brand); }
.compare .col.alcalina { border-top:4px solid var(--brand-2); }
.compare dl { margin:14px 0 0; }
.compare dt { font-weight:700; margin-top:12px; }
.compare dd { margin:2px 0 0; color:var(--muted); }

/* ---- Certificaciones ---- */
.certs { display:flex; flex-wrap:wrap; gap:12px; justify-content:center; }
.certs span { border:1px solid var(--border); border-radius:100px; padding:9px 18px; font-weight:700; color:var(--muted); font-size:.9rem; background:var(--bg); }

/* ---- Contacto ---- */
.contact { display:grid; grid-template-columns: 1fr 1fr; gap:34px; align-items:start; }
@media (max-width:820px){ .contact { grid-template-columns:1fr; } }
.field { margin-bottom:14px; }
.field label { display:block; font-weight:600; font-size:.9rem; margin-bottom:6px; }
.field input, .field textarea, .field select {
  width:100%; padding:11px 13px; border:1px solid var(--border); border-radius:var(--radius-sm);
  font:inherit; background:var(--bg); color:var(--text);
}
.field textarea { min-height:110px; resize:vertical; }
.contact-methods a { display:flex; align-items:center; gap:12px; padding:14px 16px; border:1px solid var(--border);
  border-radius:var(--radius); text-decoration:none; margin-bottom:12px; background:var(--bg); font-weight:600; }
.contact-methods a:hover { border-color: var(--brand); }
.contact-methods .ic { width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:var(--surface-2); }

.msg { padding:12px 14px; border-radius:var(--radius-sm); font-weight:600; font-size:.92rem; margin-top:10px; display:none; }
.msg.ok { display:block; background:#e7f7ec; color:#136c34; }
.msg.err { display:block; background:#fdeaea; color:#a12525; }

/* ---- Footer ---- */
.site-footer { background: var(--surface); border-top:1px solid var(--border); padding: 42px 0 30px; margin-top: 20px; }
.site-footer .cols { display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap:28px; margin-bottom:26px; }
@media (max-width:760px){ .site-footer .cols { grid-template-columns:1fr; } }
.legal { font-size:.82rem; color:var(--muted); border-top:1px solid var(--border); padding-top:18px; }

/* ---- WhatsApp flotante ---- */
.wa-float {
  position: fixed; left: 20px; bottom: 20px; z-index: 44;
  width: 58px; height: 58px; border-radius: 50%; background:#25d366; color:#fff;
  display:grid; place-items:center; box-shadow: var(--shadow); text-decoration:none; font-weight:800; font-size:1.5rem;
}
.wa-float:hover { filter:brightness(1.05); }

/* ---- Chat widget ---- */
.chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 46;
  height: 56px; padding: 0 20px 0 16px; border-radius:100px; border:0; cursor:pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color:#fff; font:inherit; font-weight:700;
  display:flex; align-items:center; gap:10px; box-shadow: var(--shadow);
}
.chat-fab .pulse { width:10px;height:10px;border-radius:50%;background:#7CFFB2;box-shadow:0 0 0 0 rgba(124,255,178,.7); animation:pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(124,255,178,.6)} 70%{box-shadow:0 0 0 10px rgba(124,255,178,0)} 100%{box-shadow:0 0 0 0 rgba(124,255,178,0)} }

.chat-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 47;
  width: 380px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 40px);
  background: var(--bg); border:1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
  display:none; flex-direction:column; overflow:hidden;
}
.chat-panel.open { display:flex; }
.chat-head { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color:#fff; padding:15px 16px; display:flex; align-items:center; gap:10px; }
.chat-head .t { font-weight:800; }
.chat-head .s { font-size:.76rem; opacity:.85; }
.chat-head .x { margin-left:auto; background:none;border:0;color:#fff;font-size:1.3rem;cursor:pointer; }
.chat-body { flex:1; overflow:auto; padding:16px; background: var(--surface); display:flex; flex-direction:column; gap:10px; }
.bubble { max-width: 82%; padding:10px 13px; border-radius:14px; font-size:.94rem; white-space:pre-wrap; word-wrap:break-word; }
.bubble.bot { background: var(--bg); border:1px solid var(--border); align-self:flex-start; border-bottom-left-radius:4px; }
.bubble.me { background: var(--brand); color:#fff; align-self:flex-end; border-bottom-right-radius:4px; }
.bubble.typing { color: var(--muted); font-style: italic; }
.chat-quick { padding: 8px 12px; display:flex; gap:8px; flex-wrap:wrap; border-top:1px solid var(--border); background: var(--bg); }
.chat-quick button { border:1px solid var(--border); background:var(--surface); border-radius:100px; padding:7px 12px; font:inherit; font-size:.82rem; cursor:pointer; color:var(--text); }
.chat-input { display:flex; gap:8px; padding:12px; border-top:1px solid var(--border); background:var(--bg); }
.chat-input input { flex:1; padding:11px 13px; border:1px solid var(--border); border-radius:100px; font:inherit; }
.chat-input button { border:0; background:var(--brand); color:#fff; width:44px; border-radius:50%; cursor:pointer; font-size:1.1rem; }
.chat-legal { font-size:.68rem; color:var(--muted); text-align:center; padding:6px 12px 10px; background:var(--bg); }

@media (prefers-reduced-motion: reduce){ * { animation:none !important; transition:none !important; scroll-behavior:auto; } }

/* ---- Añadidos: logo, video, acciones, redes, modal ---- */
.brand-logo{ height:42px; width:auto; max-width:230px; object-fit:contain; display:block; }
@media (max-width:560px){ .brand-logo{ height:34px; max-width:170px; } }

.hero-art{ overflow:hidden; }
.hero-video{ width:100%; height:100%; object-fit:cover; display:block; border-radius:20px; }

.prod-actions{ margin-top:auto; display:flex; gap:8px; flex-wrap:wrap; }
.prod-actions .btn{ flex:1 1 auto; }

.socials{ display:flex; gap:10px; margin-top:4px; flex-wrap:wrap; }
.socials a{ width:40px; height:40px; padding:0; margin:0; gap:0; border-radius:10px;
  display:grid; place-items:center; line-height:0;
  background:#fff; border:1px solid rgba(0,0,0,.08); box-shadow:var(--shadow-sm); transition:transform .12s ease; }
.socials a:hover{ transform:translateY(-1px); }
.socials svg{ display:block; }

.modal{ position:fixed; inset:0; z-index:60; display:none; }
.modal.open{ display:block; }
.modal-backdrop{ position:absolute; inset:0; background:rgba(10,15,25,.55); }
.modal-card{ position:relative; max-width:520px; width:calc(100% - 32px); margin:6vh auto 0;
  background:var(--bg); border:1px solid var(--border); border-radius:16px; box-shadow:var(--shadow);
  padding:22px; max-height:88vh; overflow:auto; }
.modal-x{ position:absolute; top:10px; right:12px; background:none; border:0; font-size:1.5rem;
  line-height:1; cursor:pointer; color:var(--muted); }
.modal-media{ aspect-ratio:16/10; border-radius:12px; border:1px solid var(--border); margin-bottom:14px;
  background:linear-gradient(160deg,var(--surface),var(--surface-2)); display:grid; place-items:center; overflow:hidden; }
.modal-media img{ max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; }
.modal-media .mini-drop{ width:56px; height:56px; border-radius:50% 50% 50% 3px; transform:rotate(45deg);
  background:linear-gradient(135deg,var(--brand),var(--brand-2)); opacity:.85; }
