/* ═══════════ Sila — Miel 100% natural ═══════════ */

:root {
  --miel: #f2a71b;
  --miel-oscura: #c77d02;
  --ambar: #8a4b08;
  --cafe: #2b1a0e;
  --cafe-suave: #4a3220;
  --crema: #fdf6e9;
  --crema-2: #f7ead2;
  --verde: #4d6b3c;
  --blanco: #fffdf8;
  --sombra: 0 20px 60px rgba(43, 26, 14, .18);
  --radio: 22px;
  --fuente-display: "Fraunces", Georgia, serif;
  --fuente-texto: "Outfit", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--fuente-texto);
  background: var(--crema);
  color: var(--cafe);
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--fuente-display); font-weight: 600; line-height: 1.08; }
h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-bottom: 1rem; }
em { font-style: italic; color: var(--ambar); }

.kicker {
  text-transform: uppercase; letter-spacing: .22em; font-size: .78rem;
  color: var(--miel-oscura); font-weight: 700; margin-bottom: .8rem;
}

/* ─────────── Loader ─────────── */
#loader {
  position: fixed; inset: 0; z-index: 999; background: var(--cafe);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.2rem; color: var(--crema); transition: opacity .7s ease, visibility .7s;
}
#loader.oculto { opacity: 0; visibility: hidden; }
#loader p { font-family: var(--fuente-display); font-style: italic; letter-spacing: .05em; }
.loader-hex {
  width: 54px; height: 60px; background: var(--miel);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  animation: girarhex 1.2s ease-in-out infinite;
}
@keyframes girarhex {
  0%, 100% { transform: rotate(0) scale(1); }
  50% { transform: rotate(180deg) scale(.82); }
}

/* ─────────── Nav ─────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem clamp(1rem, 4vw, 3rem);
  transition: background .4s, box-shadow .4s, padding .4s;
}
#nav.compacto {
  background: rgba(253, 246, 233, .88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(43, 26, 14, .08);
  padding-top: .5rem; padding-bottom: .5rem;
}
.nav-brand {
  display: flex; align-items: center; gap: .6rem; text-decoration: none;
  color: var(--crema); font-family: var(--fuente-display);
  font-size: 1.5rem; font-weight: 700; transition: color .4s;
}
#nav.compacto .nav-brand { color: var(--cafe); }
.nav-brand img { border-radius: 50%; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a {
  color: var(--crema); text-decoration: none; font-weight: 500; font-size: .95rem;
  opacity: .9; transition: color .4s, opacity .2s;
}
#nav.compacto .nav-links a { color: var(--cafe); }
.nav-links a:hover { opacity: 1; color: var(--miel); }
@media (max-width: 760px) { .nav-links a { display: none; } }

/* ─────────── Botones ─────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.7rem; border-radius: 999px; border: none; cursor: pointer;
  font-family: var(--fuente-texto); font-weight: 700; font-size: 1rem;
  text-decoration: none; transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s, background .25s;
}
.btn:hover { transform: translateY(-3px) scale(1.03); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--miel), var(--miel-oscura));
  color: #fff; box-shadow: 0 10px 26px rgba(199, 125, 2, .38);
}
.btn-primary:hover { box-shadow: 0 16px 34px rgba(199, 125, 2, .5); }
.btn-ghost {
  background: rgba(255, 253, 248, .12); color: var(--crema);
  border: 1.5px solid rgba(253, 246, 233, .5); backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255, 253, 248, .22); }
.btn-chat-open {
  background: var(--miel); color: #fff; font-size: .9rem; padding: .6rem 1.2rem;
}
.btn-xl { font-size: 1.15rem; padding: 1.1rem 2.4rem; }

/* ─────────── Hero ─────────── */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  background: radial-gradient(120% 90% at 70% 20%, #5a3a15 0%, #3a2410 45%, #241507 100%);
  overflow: hidden;
}
#scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-content {
  position: relative; z-index: 2; max-width: 640px;
  padding: clamp(5.5rem, 12vh, 9rem) clamp(1.2rem, 6vw, 4.5rem) 4rem;
  color: var(--crema);
}
.hero-kicker {
  text-transform: uppercase; letter-spacing: .3em; font-size: .8rem;
  color: var(--miel); font-weight: 700; margin-bottom: 1.2rem;
}
.hero-title {
  font-size: clamp(3rem, 8.5vw, 6.2rem); font-weight: 620; color: var(--blanco);
  margin-bottom: 1.4rem; text-shadow: 0 6px 40px rgba(0,0,0,.35);
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span { display: inline-block; will-change: transform; }
.hero-sub { font-size: clamp(1rem, 2vw, 1.2rem); opacity: .92; margin-bottom: 2.2rem; max-width: 34rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  width: 26px; height: 44px; border: 2px solid rgba(253,246,233,.5); border-radius: 14px; z-index: 2;
}
.hero-scroll span {
  position: absolute; top: 8px; left: 50%; width: 4px; height: 9px; margin-left: -2px;
  background: var(--miel); border-radius: 2px; animation: rueda 1.6s ease-in-out infinite;
}
@keyframes rueda { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(16px); opacity: 0; } 100% { opacity: 0; } }

/* ─────────── Marquesina ─────────── */
.marquee {
  background: var(--cafe); color: var(--miel); overflow: hidden;
  padding: .85rem 0; white-space: nowrap; font-family: var(--fuente-display);
  font-style: italic; font-size: 1.05rem; letter-spacing: .04em;
}
.marquee-track { display: inline-flex; gap: 2rem; animation: marquee 26s linear infinite; will-change: transform; }
.marquee-track i { font-style: normal; opacity: .55; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ─────────── Secciones ─────────── */
.section { padding: clamp(4.5rem, 10vh, 7.5rem) clamp(1.2rem, 6vw, 4.5rem); max-width: 1200px; margin: 0 auto; }

/* Historia */
.historia-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 860px) { .historia-grid { grid-template-columns: 1fr; } }
.historia-texto p { margin-bottom: 1rem; color: var(--cafe-suave); max-width: 34rem; }
.historia-datos { display: flex; gap: 2.6rem; list-style: none; margin-top: 2rem; }
.historia-datos strong { display: block; font-family: var(--fuente-display); font-size: 2.6rem; color: var(--miel-oscura); }
.historia-datos span { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--cafe-suave); }
.historia-img { position: relative; }
.historia-img img { border-radius: var(--radio); box-shadow: var(--sombra); aspect-ratio: 4/3.4; object-fit: cover; }
.historia-img figcaption { margin-top: .8rem; font-size: .88rem; font-style: italic; color: var(--cafe-suave); text-align: right; }

/* Productos */
.productos { text-align: center; }
.productos-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.2rem; margin-top: 3rem; text-align: left;
}
.producto-card {
  background: var(--blanco); border-radius: var(--radio); overflow: hidden;
  box-shadow: 0 8px 30px rgba(43,26,14,.09);
  transition: transform .35s ease, box-shadow .35s ease;
  transform-style: preserve-3d; perspective: 800px;
}
.producto-card:hover { transform: translateY(-10px); box-shadow: var(--sombra); }
.producto-visual {
  height: 300px; display: flex; align-items: flex-end; justify-content: center;
  background: linear-gradient(180deg, var(--crema-2), #f0dcb4);
  position: relative; overflow: hidden;
}
.producto-visual::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 22% 28%, rgba(242,167,27,.28), transparent 42%),
    repeating-conic-gradient(from 30deg, rgba(199,125,2,.05) 0 60deg, transparent 60deg 120deg);
}
.producto-visual img { height: 88%; object-fit: contain; position: relative; }

/* Botella CSS (placeholder mientras no haya foto) */
.botella { position: relative; display: flex; flex-direction: column; align-items: center; padding-bottom: 0; transform: translateY(6px); }
.botella-tapa { width: 44px; height: 22px; background: linear-gradient(180deg, #fdfdfb, #d8d5cc); border-radius: 6px 6px 2px 2px; box-shadow: inset 0 -4px 6px rgba(0,0,0,.12); }
.botella-cuello { width: 34px; height: 16px; background: linear-gradient(180deg, rgba(210,140,30,.75), rgba(180,110,10,.85)); }
.botella-cuerpo {
  width: 108px; height: 190px; position: relative;
  background: linear-gradient(105deg, #e8940c 0%, #c9780a 38%, #a35c05 62%, #d88a10 100%);
  border-radius: 26px 26px 34px 34px;
  box-shadow: inset 8px 0 16px rgba(255,214,140,.4), inset -10px -4px 18px rgba(60,30,0,.45), 0 18px 30px rgba(43,26,14,.28);
}
.botella-cuerpo.grande { width: 126px; height: 235px; }
.botella-etiqueta {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  width: 74px; height: 74px; background: var(--crema); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(0,0,0,.22); padding: 7px;
}
.botella-etiqueta img { border-radius: 50%; }
.botella-brillo {
  position: absolute; top: 12px; left: 14px; width: 16px; height: 70%;
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,.02));
  border-radius: 10px; filter: blur(1px);
}
.producto-info { padding: 1.5rem 1.6rem 1.8rem; }
.producto-info h3 { font-size: 1.45rem; margin-bottom: .5rem; }
.producto-desc { font-size: .93rem; color: var(--cafe-suave); margin-bottom: 1.2rem; min-height: 4.2em; }
.producto-compra { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.precio { font-family: var(--fuente-display); font-size: 2rem; font-weight: 700; color: var(--miel-oscura); }
.productos-nota { margin-top: 2.6rem; color: var(--cafe-suave); font-size: .95rem; max-width: 46rem; margin-inline: auto; }

/* Beneficios */
.beneficios { text-align: center; }
.beneficios-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.6rem; margin-top: 3rem; text-align: left; }
.beneficio {
  background: var(--blanco); padding: 1.8rem 1.6rem; border-radius: var(--radio);
  border: 1px solid rgba(199,125,2,.14); transition: transform .3s, box-shadow .3s;
}
.beneficio:hover { transform: translateY(-6px); box-shadow: 0 14px 34px rgba(43,26,14,.12); }
.beneficio i { font-style: normal; font-size: 2rem; display: block; margin-bottom: .9rem; }
.beneficio h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.beneficio p { font-size: .92rem; color: var(--cafe-suave); }
.beneficios-nota { margin-top: 2.2rem; font-size: .85rem; color: var(--cafe-suave); }

/* Entregas */
.entregas { text-align: center; }
.pasos { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.8rem; margin-top: 3rem; counter-reset: paso; text-align: left; }
.pasos li { background: var(--blanco); border-radius: var(--radio); padding: 2rem 1.7rem; position: relative; box-shadow: 0 8px 26px rgba(43,26,14,.08); }
.pasos li span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 58px; margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--miel), var(--miel-oscura)); color: #fff;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  font-family: var(--fuente-display); font-size: 1.5rem; font-weight: 700;
}
.pasos h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.pasos p { font-size: .93rem; color: var(--cafe-suave); }
.entregas-detalle {
  margin-top: 2.8rem; background: var(--crema-2); border-radius: var(--radio);
  padding: 1.8rem 2rem; text-align: left; display: grid; gap: .5rem; font-size: .95rem;
}

/* CTA final */
.cta-final {
  position: relative; text-align: center; background: var(--cafe); color: var(--crema);
  border-radius: var(--radio); max-width: 1120px; overflow: hidden;
  padding-top: 5rem; padding-bottom: 5rem; margin-bottom: 5rem;
}
.cta-final h2 { color: var(--blanco); }
.cta-final p { margin-bottom: 2rem; opacity: .85; }
.cta-panal {
  position: absolute; inset: 0; opacity: .1; pointer-events: none;
  background-image: radial-gradient(circle at 50% 50%, transparent 12px, var(--miel) 12.5px, var(--miel) 13.5px, transparent 14px);
  background-size: 46px 40px;
}

/* Footer */
footer { text-align: center; padding: 3rem 1rem 6.5rem; color: var(--cafe-suave); }
footer img { margin: 0 auto .8rem; border-radius: 50%; }
footer .fino { font-size: .85rem; opacity: .75; }

/* ─────────── Chat widget ─────────── */
#chat-fab {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 95;
  width: 62px; height: 62px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--miel), var(--miel-oscura)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px rgba(199,125,2,.5);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  animation: latido 3.2s ease-in-out infinite;
}
#chat-fab:hover { transform: scale(1.1); }
@keyframes latido { 0%, 100% { box-shadow: 0 12px 30px rgba(199,125,2,.5); } 50% { box-shadow: 0 12px 42px rgba(242,167,27,.75); } }
.fab-badge {
  position: absolute; top: -4px; right: -4px; width: 26px; height: 26px;
  background: var(--crema); border-radius: 50%; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

#chat-panel {
  position: fixed; right: 1.4rem; bottom: 5.6rem; z-index: 96;
  width: min(400px, calc(100vw - 2rem)); height: min(600px, calc(100svh - 8rem));
  background: var(--blanco); border-radius: 22px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(43,26,14,.35);
  transform: translateY(24px) scale(.96); opacity: 0; visibility: hidden;
  transform-origin: bottom right;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .3s, visibility .3s;
}
#chat-panel.abierto { transform: none; opacity: 1; visibility: visible; }
.chat-header {
  display: flex; align-items: center; gap: .8rem; padding: 1rem 1.2rem;
  background: linear-gradient(135deg, var(--cafe), #4a2f16); color: var(--crema);
}
.chat-header img { border-radius: 50%; }
.chat-header strong { display: block; font-family: var(--fuente-display); font-size: 1.1rem; }
.chat-status { font-size: .78rem; opacity: .85; display: flex; align-items: center; gap: .35rem; }
.chat-status i { width: 8px; height: 8px; background: #6fdc6f; border-radius: 50%; display: inline-block; animation: pulso 2s infinite; }
@keyframes pulso { 50% { opacity: .4; } }
#chat-close { margin-left: auto; background: none; border: none; color: var(--crema); font-size: 1.1rem; cursor: pointer; opacity: .8; }
#chat-close:hover { opacity: 1; }

#chat-mensajes { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: .7rem; background: var(--crema); }
.msg { max-width: 86%; padding: .7rem 1rem; border-radius: 16px; font-size: .94rem; white-space: pre-wrap; word-wrap: break-word; }
.msg a { color: var(--miel-oscura); font-weight: 700; }
.msg-bot { background: var(--blanco); border: 1px solid rgba(199,125,2,.16); border-bottom-left-radius: 6px; align-self: flex-start; box-shadow: 0 2px 8px rgba(43,26,14,.05); }
.msg-user { background: linear-gradient(135deg, var(--miel), var(--miel-oscura)); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.msg-error { background: #fdecea; border: 1px solid #f5c6c0; color: #8a2a1d; align-self: flex-start; font-size: .88rem; }

#chat-escribiendo { display: flex; gap: 5px; padding: .4rem 1.2rem .8rem; background: var(--crema); }
#chat-escribiendo span { width: 8px; height: 8px; background: var(--miel-oscura); border-radius: 50%; animation: puntos 1.2s infinite; }
#chat-escribiendo span:nth-child(2) { animation-delay: .15s; }
#chat-escribiendo span:nth-child(3) { animation-delay: .3s; }
@keyframes puntos { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-6px); opacity: 1; } }

#chat-form { display: flex; gap: .6rem; padding: .9rem; background: var(--blanco); border-top: 1px solid rgba(43,26,14,.08); }
#chat-input {
  flex: 1; border: 1.5px solid rgba(43,26,14,.14); border-radius: 999px;
  padding: .7rem 1.1rem; font-family: var(--fuente-texto); font-size: .95rem; outline: none;
  transition: border-color .2s;
}
#chat-input:focus { border-color: var(--miel); }
#chat-form button {
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--miel), var(--miel-oscura)); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: transform .2s;
}
#chat-form button:hover { transform: scale(1.08); }
#chat-form button:disabled { opacity: .5; cursor: wait; }

/* ─────────── Animaciones de scroll ─────────── */
.reveal { opacity: 0; transform: translateY(34px); }
body.sin-js .reveal, body.movimiento-reducido .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
  .reveal { opacity: 1; transform: none; }
}
