/* =========================================================
   EB Coffee · estilos
   Colores principales: cámbialos aquí y se aplican a toda la web
   ========================================================= */
:root {
  --green-900: #12261b;
  --green-800: #1d3a2a;   /* verde bosque: color principal */
  --green-700: #285239;
  --green-600: #33693f;
  --green-500: #4a8a57;   /* verde hoja */
  --green-300: #9cc3a3;
  --green-100: #e4efe6;
  --green-50:  #f3f8f4;
  --white: #ffffff;
  --ink: #16241b;
  --muted: #5b6b60;
  --line: #dbe7de;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -18px rgba(18, 38, 27, .35);
  --shadow-sm: 0 6px 18px -10px rgba(18, 38, 27, .3);

  --font-head: "DM Serif Display", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Colores por función (cambian con el tema) */
  --bg: #ffffff;              /* fondo de la página */
  --surface: #ffffff;         /* tarjetas */
  --tint: var(--green-50);    /* secciones y tarjetas verdes suaves */
  --tint-strong: var(--green-100);
  --heading: var(--green-800);/* títulos y textos destacados */
  --accent: var(--green-800); /* botones principales */
  --accent-hover: var(--green-700);
  --leaf-text: var(--green-600);
  --icon-text: var(--green-700);
  --header-bg: rgba(255, 255, 255, .88);
  color-scheme: light;
}

/* =========================================================
   Tema oscuro (se activa con el botón luna / sol)
   ========================================================= */
:root[data-theme="dark"] {
  --bg: #0e1812;
  --surface: #15231b;
  --tint: #122019;
  --tint-strong: #1d3327;
  --heading: #d3ead8;
  --accent: #3d7a4a;
  --accent-hover: #4a8a57;
  --leaf-text: #8fcb9b;
  --icon-text: #a6d8b1;
  --ink: #e4eee6;
  --muted: #a1b4a7;
  --line: #263a2e;
  --header-bg: rgba(14, 24, 18, .86);
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  --shadow-sm: 0 6px 18px -10px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
:root[data-theme="dark"] em { color: #7cbf89; }
:root[data-theme="dark"] .footer { border-top: 1px solid var(--line); background: #0a130e; }
:root[data-theme="dark"] .section--dark { background: #17301f; }
:root[data-theme="dark"] .photo { background: linear-gradient(135deg, #1d3327, #2c4a37); }
:root[data-theme="dark"] .photo__ph { color: var(--heading); }
:root[data-theme="dark"] .vcard--star .vcard__num { color: #b5e0bf; }

/* Cambio de logo según el tema */
.logo__img--dark { display: none; }
:root[data-theme="dark"] .logo__img--light { display: none; }
:root[data-theme="dark"] .logo__img--dark { display: block; }

/* ---------- Botón de tema ---------- */
.header__actions { display: flex; align-items: center; gap: .4rem; margin-left: 1.2rem; }
.theme-toggle {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--heading);
  transition: background-color .2s ease, border-color .2s ease, transform .3s ease;
}
.theme-toggle:hover { border-color: var(--green-500); transform: rotate(-15deg); }
.theme-toggle .icon { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

body, .header, .product, .feature, .vcard, .way, .stats li, .place li, .hero__tag, .section--tint {
  transition-property: background-color, color, border-color, transform, box-shadow;
  transition-duration: .3s;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.12; }
h1, h2 { font-family: var(--font-head); font-weight: 400; letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.2rem); }
h2 { font-size: clamp(2rem, 3.8vw, 2.9rem); }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
em { font-style: italic; color: var(--green-500); }

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .9em 1.6em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 600 .98rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: var(--white); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { border-color: var(--heading); color: var(--heading); background: transparent; }
.btn--ghost:hover { background: var(--accent); color: var(--white); }
.btn--light { background: #fff; color: var(--green-800); }
.btn--light:hover { background: var(--green-100); }
.btn--sm { padding: .65em 1.15em; font-size: .9rem; }

.link { color: var(--leaf-text); font-weight: 700; text-decoration: none; }
.link:hover { text-decoration: underline; }

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--leaf-text);
}
.eyebrow--light { color: var(--green-300); }

/* ---------- Encabezado ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 20px -14px rgba(18,38,27,.4); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--heading); }
.logo__img { height: 52px; width: auto; }
.logo__mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: var(--white);
  font: 700 .85rem/1 var(--font-body); letter-spacing: .04em;
}
.logo__text { font-family: var(--font-head); font-size: 1.45rem; }
/* Si hay logo, se oculta el círculo "EB" */
.logo.has-img .logo__mark { display: none; }
.logo--light { color: var(--white); }
.logo--light .logo__mark { background: #fff; color: var(--green-800); }

.nav { display: flex; align-items: center; gap: 2rem; margin-left: auto; }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--ink); position: relative; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 100%;
  background: var(--green-500); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }

.menu-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.menu-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--heading); border-radius: 2px; transition: transform .25s ease, top .25s ease; }
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Fotos (con marcador si aún no hay imagen) ---------- */
.photo {
  position: relative; margin: 0; overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.5), transparent 55%),
    linear-gradient(135deg, var(--green-100), var(--green-300));
}
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.photo__ph {
  position: absolute; inset: 0; display: none; place-items: center;
  color: var(--heading); font-weight: 600; font-size: .9rem; text-align: center; padding: 1rem;
}
.photo.is-missing img { display: none; }
.photo.is-missing .photo__ph { display: grid; }
.photo--hero { aspect-ratio: 4 / 5; border-radius: 28px; box-shadow: var(--shadow); }
.photo--tall { aspect-ratio: 4 / 5; }

/* ---------- Portada ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 100px);
  background: linear-gradient(180deg, var(--tint), var(--bg));
}
.hero::before {
  content: ""; position: absolute; right: -180px; top: -160px;
  width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(74,138,87,.18), transparent 65%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0 2.2rem; }
.hero__badges { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; list-style: none; padding: 0; margin: 0; }
.hero__badges li { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .92rem; color: var(--heading); }
.hero__badges .icon { color: var(--green-500); }

.hero__media { position: relative; }
.hero__tag {
  position: absolute; left: -28px; bottom: 32px;
  background: var(--surface); border-radius: var(--radius-sm);
  padding: .9rem 1.2rem; box-shadow: var(--shadow);
  display: grid; gap: .3rem; max-width: 260px;
  border-left: 4px solid var(--green-500);
}
.hero__tag strong { color: var(--heading); font-family: var(--font-head); font-weight: 400; font-size: 1.05rem; line-height: 1.3; }
.hero__tag span { font-size: .85rem; color: var(--muted); line-height: 1.4; }

/* ---------- Vitrina animada (portada) ---------- */
.showcase__stage { position: relative; }
.showcase__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.08);
  transition: opacity 1s ease, transform 6s ease-out;
}
.showcase__img.is-active { opacity: 1; transform: scale(1); }
.showcase__progress { position: absolute; left: 18px; right: 18px; top: 16px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); overflow: hidden; z-index: 2; }
.showcase__progress span { display: block; height: 100%; width: 0; background: #fff; border-radius: inherit; }
.showcase__progress span.is-running { animation: progress var(--slide-ms, 5000ms) linear forwards; }
.showcase.is-paused .showcase__progress span { animation-play-state: paused; }
@keyframes progress { from { width: 0; } to { width: 100%; } }

.showcase__card { display: grid; min-width: 240px; }
.showcase__slide { grid-area: 1 / 1; display: grid; gap: .25rem; opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; pointer-events: none; }
.showcase__slide.is-active { opacity: 1; transform: none; transition-delay: .25s; pointer-events: auto; }
.showcase__kicker { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--leaf-text); }
.showcase__slide strong { color: var(--heading); font-family: var(--font-head); font-weight: 400; font-size: 1.3rem; line-height: 1.15; }
.showcase__desc { font-size: .85rem; color: var(--muted); line-height: 1.4; }
.showcase__price { font-weight: 800; color: var(--heading); font-size: 1.05rem; margin-top: .2rem; }

.showcase__dots { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 6px; z-index: 3; }
.showcase__dots button {
  width: 9px; height: 9px; padding: 0; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.55); transition: width .3s ease, background-color .3s ease;
}
.showcase__dots button.is-active { width: 24px; background: #fff; }
.showcase__dots button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Frases animadas ---------- */
.phrases { background: var(--accent); color: #fff; overflow: hidden; }
.phrases__inner { display: flex; align-items: center; justify-content: center; gap: 1.2rem; min-height: 96px; padding-block: 1.4rem; }
.phrases__icon { width: 22px; height: 22px; flex: none; color: var(--green-300); opacity: .8; }
.phrases__stage { display: grid; flex: 1; max-width: 820px; text-align: center; }
.phrase {
  grid-area: 1 / 1; align-self: center; margin: 0;
  font-family: var(--font-head); font-size: clamp(1.15rem, 2.4vw, 1.75rem); line-height: 1.25;
  opacity: 0; transform: translateY(18px); filter: blur(6px);
  transition: opacity .7s ease, transform .7s ease, filter .7s ease;
}
.phrase.is-active { opacity: 1; transform: none; filter: none; transition-delay: .35s; }
.phrase.is-leaving { opacity: 0; transform: translateY(-18px); filter: blur(6px); }
.phrases + .features { padding-top: clamp(40px, 6vw, 72px); }
:root[data-theme="dark"] .phrases { background: #17301f; border-block: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  .showcase__img, .showcase__slide, .phrase { transition: opacity .01ms; transform: none !important; filter: none !important; }
  .showcase__progress { display: none; }
}
@media (max-width: 600px) {
  .phrases__icon { display: none; }
  .phrases__inner { min-height: 110px; }
  .showcase__card { min-width: 0; max-width: 220px; }
  .showcase__slide strong { font-size: 1.1rem; }
}

/* ---------- Beneficios ---------- */
.features { padding: 0 0 clamp(40px, 6vw, 72px); }
.features__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature { padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform .25s ease, box-shadow .25s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.feature__icon, .way__icon {
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 1rem;
  background: var(--tint-strong); color: var(--icon-text);
}
.feature__icon .icon, .way__icon .icon { width: 24px; height: 24px; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- Secciones ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--tint { background: var(--tint); }
.section--dark { background: var(--accent); color: var(--white); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto clamp(32px, 5vw, 52px); }
.section__sub { color: var(--muted); font-size: 1.05rem; }

/* ---------- Productos ---------- */
.filters { display: flex; justify-content: center; gap: .5rem; margin-bottom: 2.2rem; flex-wrap: wrap; }
.filter {
  font: 600 .92rem/1 var(--font-body);
  padding: .7em 1.4em; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.filter:hover { border-color: var(--green-500); }
.filter.is-active { background: var(--accent); border-color: var(--heading); color: var(--white); }

.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.product { position: relative; }
.ribbon {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: var(--accent); color: var(--white);
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .45em .9em; border-radius: 999px; box-shadow: var(--shadow-sm);
}

/* ---------- Selector de variedad ---------- */
.variety { margin-bottom: 1rem; }
.variety__label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
.variety__opts { display: flex; flex-wrap: wrap; gap: .35rem; }
.variety__opt {
  font: 600 .8rem/1 var(--font-body);
  padding: .55em .85em; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.variety__opt:hover { border-color: var(--green-500); }
.variety__opt.is-active { background: var(--tint-strong); border-color: var(--leaf-text); color: var(--heading); }

/* ---------- Variedades ---------- */
.varieties { margin-top: clamp(48px, 7vw, 80px); }
.varieties__head { text-align: center; margin-bottom: 1.8rem; }
.varieties__head h3 { font-family: var(--font-head); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.1rem); color: var(--heading); }
.varieties__head p { color: var(--muted); margin: 0; }
.varieties__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.vcard {
  display: flex; flex-direction: column;
  padding: 1.8rem; border-radius: var(--radius);
  background: var(--tint); border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease;
}
.vcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.vcard__num { font-family: var(--font-head); font-size: 2.2rem; line-height: 1; color: var(--green-300); margin-bottom: .6rem; }
.vcard h4 { margin: 0 0 .5rem; font-family: var(--font-head); font-weight: 400; font-size: 1.6rem; color: var(--heading); }
.vcard p { color: var(--muted); font-size: .95rem; flex: 1; }
.vcard__tag { align-self: flex-start; font-size: .75rem; font-weight: 700; padding: .4em .85em; border-radius: 999px; background: var(--surface); color: var(--icon-text); border: 1px solid var(--line); }
.vcard--star { background: var(--accent); border-color: var(--accent); }
.vcard--star h4 { color: var(--white); }
.vcard--star p { color: var(--green-100); }
.vcard--star .vcard__num { color: var(--green-500); }
.vcard--star .vcard__tag { background: rgba(255,255,255,.1); color: var(--white); border-color: rgba(255,255,255,.2); }

/* ---------- EB Cacao ---------- */
.cacao { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.cacao__media .photo { box-shadow: var(--shadow); }
.cacao__media .photo img { object-position: center 45%; }
.cacao__subtitle { margin-top: 1.6rem; color: var(--heading); }
.checks { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1.5rem; }
.checks li { position: relative; padding-left: 1.9rem; color: var(--ink); font-size: .96rem; line-height: 1.45; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .1em; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--green-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat;
}
.cacao__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; }

/* ---------- Origen ---------- */
.origin { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.origin__text { color: var(--muted); font-size: 1.02rem; }
.place { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.place li { padding: .9rem 1.1rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green-500); }
.place span { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.place strong { font-family: var(--font-head); font-weight: 400; font-size: 1.3rem; color: var(--heading); }
.origin__media { position: relative; }
.photo--origin { aspect-ratio: 4 / 3; border-radius: 28px; box-shadow: var(--shadow); }
.origin__badge {
  position: absolute; right: 18px; bottom: 18px;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1rem; border-radius: 999px;
  background: var(--surface); color: var(--heading);
  font-weight: 700; font-size: .85rem; box-shadow: var(--shadow-sm);
}
.origin__badge .icon { color: var(--green-500); width: 18px; height: 18px; }

/* ---------- Tarjeta del logo ---------- */
.brand-card {
  margin: 0; padding: clamp(20px, 4vw, 40px);
  background: #fff; border-radius: 28px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.brand-card img { width: 100%; height: auto; }
.product {
  display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .3s ease, box-shadow .3s ease;
}
.product:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.product:hover .photo img { transform: scale(1.05); }
.product .photo { border-radius: 0; aspect-ratio: 3 / 4; }
.product .photo img { object-position: center 55%; }
.product.is-hidden { display: none; }
.product__body { display: flex; flex-direction: column; flex: 1; padding: 1.3rem 1.4rem 1.4rem; }
.product__body p { color: var(--muted); font-size: .94rem; flex: 1; }
.product__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.price { font-weight: 800; color: var(--heading); font-size: 1.2rem; letter-spacing: -.01em; }

.chip {
  align-self: flex-start; margin-bottom: .7rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .35em .8em; border-radius: 999px;
  background: var(--tint-strong); color: var(--icon-text);
}
.chip--cacao { background: var(--accent); color: var(--white); }

/* ---------- Historia ---------- */
.story { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.story__copy > p { color: var(--muted); font-size: 1.04rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; list-style: none; padding: 0; margin: 2rem 0 0; }
.stats li { padding: 1rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.stats strong { display: block; font-family: var(--font-head); font-weight: 400; font-size: 1.6rem; color: var(--heading); line-height: 1.1; }
.stats span { font-size: .85rem; color: var(--muted); }

/* ---------- Cómo comprar ---------- */
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.way { padding: 2rem; border-radius: var(--radius); background: var(--tint); border: 1px solid var(--line); transition: transform .25s ease, background-color .25s ease; }
.way:hover { transform: translateY(-4px); background: var(--tint-strong); }
.way p { color: var(--muted); }
.way__icon { background: var(--accent); color: var(--white); }

/* ---------- Opiniones ---------- */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.review {
  margin: 0; padding: 1.8rem; border-radius: var(--radius);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
}
.review p { font-size: 1.05rem; }
.reviews:empty { display: none; }
.section--dark .section__head { margin-bottom: 0; }
.section--dark .reviews { margin-top: clamp(32px, 5vw, 52px); }
.section__sub--light { color: var(--green-100); margin-bottom: 1.8rem; }
.review footer { color: var(--green-300); font-size: .9rem; font-weight: 600; }
.stars { color: #cfe6c9; letter-spacing: .15em; margin-bottom: .8rem; }

/* ---------- Tienda ---------- */
.visit { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.info { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 1.2rem; }
.info li { display: flex; gap: 1rem; align-items: flex-start; }
.info .icon { width: 22px; height: 22px; color: var(--green-500); margin-top: 3px; }
.info strong { display: block; }
.info span { color: var(--muted); }
.visit__map { border-radius: var(--radius); overflow: hidden; min-height: 360px; border: 1px solid var(--line); }
.visit__map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }
.visit__actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.map-ph {
  height: 100%; min-height: 360px; display: grid; place-content: center; justify-items: center; gap: .6rem;
  color: var(--icon-text); font-weight: 600;
  background:
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(29,58,42,.06) 38px 39px),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(29,58,42,.06) 38px 39px),
    var(--tint);
}
.map-ph .icon { width: 40px; height: 40px; }

/* ---------- Llamada final ---------- */
.cta { padding: 0 0 clamp(64px, 9vw, 112px); }
.cta__inner {
  text-align: center; color: var(--white);
  padding: clamp(44px, 7vw, 80px) clamp(24px, 5vw, 64px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 15% 20%, rgba(156,195,163,.35), transparent 45%),
    linear-gradient(135deg, var(--green-700), var(--green-900));
}
.cta__inner p { color: var(--green-100); font-size: 1.08rem; max-width: 32em; margin: 0 auto 1.8rem; }

/* ---------- Pie ---------- */
.footer { background: var(--green-900); color: var(--green-100); padding: 56px 0 0; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 2rem; align-items: start; padding-bottom: 40px; }
.footer__tag { margin-top: 1rem; color: var(--green-300); font-size: .95rem; }
.footer__nav { display: grid; gap: .5rem; }
.footer__nav a { text-decoration: none; color: var(--green-100); font-size: .95rem; }
.footer__nav a:hover { color: var(--white); }
.social { display: flex; gap: .6rem; }
.social a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18); color: var(--white); transition: background-color .2s ease;
}
.social a:hover { background: var(--green-700); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; font-size: .85rem; color: var(--green-300); }

/* ---------- Botón del carrito (encabezado) ---------- */
.cart-btn {
  position: relative; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--heading);
  transition: border-color .2s ease, transform .2s ease;
}
.cart-btn:hover { border-color: var(--green-500); }
.cart-btn.is-bump { animation: bump .45s ease; }
@keyframes bump { 30% { transform: scale(1.18); } 60% { transform: scale(.94); } }
.cart-btn__count {
  position: absolute; top: -5px; right: -5px;
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--green-500); color: #fff; font-size: .72rem; font-weight: 800;
  border: 2px solid var(--bg);
}
.cart-btn__count[hidden] { display: none; }

/* ---------- Panel "Mi pedido" ---------- */
.cart-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(8, 18, 12, .5); backdrop-filter: blur(2px); opacity: 0; transition: opacity .3s ease; }
.cart-overlay.is-open { opacity: 1; }
.cart-overlay[hidden] { display: none; }
.cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90;
  width: min(440px, 100%);
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  box-shadow: -20px 0 50px -20px rgba(0,0,0,.45);
  transform: translateX(100%); visibility: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), visibility .35s;
}
.cart.is-open { transform: none; visibility: visible; }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); }
.cart__head h2 { font-size: 1.6rem; margin: 0; color: var(--heading); }
.cart__close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--tint); color: var(--heading); cursor: pointer; display: grid; place-items: center; }
.cart__close:hover { background: var(--tint-strong); }
.cart__body { flex: 1; overflow-y: auto; padding: 1.2rem 1.4rem; overscroll-behavior: contain; }

.cart__empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.cart__empty .icon { width: 48px; height: 48px; color: var(--green-300); margin: 0 auto 1rem; }
.cart__empty[hidden] { display: none; }

.cart__items { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: .8rem; }
.cart-item {
  display: grid; grid-template-columns: 56px 1fr auto; gap: .8rem; align-items: center;
  padding: .7rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line);
}
.cart-item img { width: 56px; height: 70px; object-fit: cover; border-radius: 8px; background: var(--tint); }
.cart-item__name { display: block; font-weight: 700; font-size: .92rem; line-height: 1.3; }
.cart-item__price { display: block; margin-top: .15rem; }
.cart-item__var { display: block; font-size: .8rem; color: var(--muted); }
.cart-item__price { font-size: .85rem; color: var(--leaf-text); font-weight: 700; }
.cart-item__side { display: grid; justify-items: end; gap: .45rem; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 30px; height: 30px; border: 0; background: transparent; color: var(--heading); font-size: 1.05rem; cursor: pointer; }
.qty button:hover { background: var(--tint); }
.qty span { min-width: 24px; text-align: center; font-weight: 700; font-size: .9rem; }
.cart-item__remove { border: 0; background: none; color: var(--muted); font: 600 .75rem var(--font-body); cursor: pointer; padding: 0; text-decoration: underline; }
.cart-item__remove:hover { color: #c0392b; }

.cart__form h3 { color: var(--heading); margin: .4rem 0 .9rem; }
.cart__form[hidden], .cart__ship[hidden], .cart__foot[hidden], .cart__sent[hidden], [id="c-agency-other-wrap"][hidden] { display: none; }
.field { display: grid; gap: .35rem; margin: 0 0 .9rem; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-size: .82rem; font-weight: 700; color: var(--ink); padding: 0; margin-bottom: .1rem; }
.field input, .field select, .field textarea {
  width: 100%; font: 500 .95rem var(--font-body); color: var(--ink);
  padding: .75rem .9rem; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--surface);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(74,138,87,.2); }
.field .is-invalid { border-color: #c0392b; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.choice__opt { position: relative; cursor: pointer; }
.choice__opt input { position: absolute; opacity: 0; pointer-events: none; }
.choice__opt span {
  display: block; text-align: center; padding: .75rem .5rem; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: .88rem;
  transition: border-color .2s ease, background-color .2s ease;
}
.choice__opt input:checked + span { border-color: var(--green-500); background: var(--tint-strong); color: var(--heading); box-shadow: inset 0 0 0 1px var(--green-500); }
.choice__opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(74,138,87,.3); }
.cart__ship { padding: 1rem; margin: 0 0 .9rem; border-radius: var(--radius-sm); background: var(--tint); border: 1px solid var(--line); }
.cart__ship .field:last-of-type { margin-bottom: .6rem; }
.cart__note { font-size: .8rem; color: var(--muted); margin: 0; }
.form-error { color: #c0392b; font-size: .85rem; font-weight: 600; margin: 0; }
:root[data-theme="dark"] .form-error, :root[data-theme="dark"] .cart-item__remove:hover { color: #ff8a7a; }
:root[data-theme="dark"] .field .is-invalid { border-color: #ff8a7a; }

.cart__foot { padding: 1rem 1.4rem 1.2rem; border-top: 1px solid var(--line); background: var(--surface); display: grid; gap: .7rem; }
.cart__total { display: flex; justify-content: space-between; align-items: baseline; }
.cart__total span { color: var(--muted); font-weight: 600; }
.cart__total strong { font-size: 1.5rem; color: var(--heading); }
.btn--block { width: 100%; }
.cart__clear { border: 0; background: none; color: var(--muted); font: 600 .82rem var(--font-body); cursor: pointer; text-decoration: underline; }

.cart__sent { flex: 1; display: grid; align-content: center; justify-items: center; text-align: center; gap: .4rem; padding: 2rem 1.6rem; }
.cart__sent-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--green-500); color: #fff; margin-bottom: .6rem; }
.cart__sent-icon svg { width: 36px; height: 36px; }
.cart__sent h3 { font-family: var(--font-head); font-weight: 400; font-size: 1.8rem; color: var(--heading); margin: 0; }
.cart__sent p { color: var(--muted); }
.cart__sent .btn { margin-top: 1rem; }

body.cart-locked { overflow: hidden; }

/* ---------- Aviso ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 70;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: .8rem 1.2rem; border-radius: 999px;
  background: var(--green-800); color: #fff; font-weight: 600; font-size: .9rem;
  box-shadow: var(--shadow); transition: opacity .25s ease, transform .25s ease;
  max-width: calc(100% - 120px); text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast__link { color: inherit; font-weight: 800; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
:root[data-theme="dark"] .toast { background: #2c5a39; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-500); color: var(--white);
  box-shadow: 0 12px 28px -8px rgba(18,38,27,.55);
  transition: transform .2s ease, background-color .2s ease;
}
.wa-float:hover { transform: scale(1.08); background: var(--green-600); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Animación al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .products, .reviews { grid-template-columns: repeat(2, 1fr); }
  .checks { grid-template-columns: 1fr; }
  .varieties__grid { grid-template-columns: 1fr; }
  .ways, .features__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .social { grid-column: 1 / -1; }
}

/* ---------- Celular ---------- */
@media (max-width: 820px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 1rem 20px 1.5rem;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgba(18,38,27,.35);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav__cta { margin-top: 1rem; }

  .hero__grid, .story, .visit, .cacao, .origin { grid-template-columns: 1fr; }
  .cacao__media, .story__media { max-width: 420px; margin-inline: auto; width: 100%; }
  .hero__media { max-width: 460px; margin-inline: auto; width: 100%; }
  .hero__tag { left: 12px; bottom: 16px; }
  .story__media { order: 2; }
}

@media (max-width: 600px) {
  .container { width: calc(100% - 32px); }
  .reviews { grid-template-columns: 1fr; }
  .products { gap: .9rem; }
  .product__body { padding: 1rem; }
  .product__body p { font-size: .86rem; }
  .product__foot { flex-direction: column; align-items: stretch; gap: .6rem; }
  .product__foot .btn { width: 100%; }
  .price { font-size: 1.1rem; }
  .stats { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 100%; }
  .logo__text { font-size: 1.25rem; }
}
