/* ============ Paleta (tomada de la referencia) ============ */
:root {
  --negro: #111111;
  --negro-2: #1c1c1c;
  --linea-oscura: #2e2e2e;
  --crema: #f3efe6;
  --papel: #faf8f3;
  --naranja: #ff6a1f;
  --amarillo: #ffd43b;
  --azul: #3d6df2;
  --lila: #a99bf0;
  --gris: #6b6b6b;
  --gris-claro: #a3a3a3;
  --wa: #1fa855;        /* Verde WhatsApp: SOLO para el botón de WhatsApp */
  --wa-hover: #188f47;

  --radio: 18px;
  --radio-sm: 12px;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --marker: "Permanent Marker", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--negro);
  background: var(--negro);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body[data-screen="servientrega"] { background: var(--crema); }
[hidden] { display: none !important; }
a { color: inherit; }
button, input { font: inherit; }

/* ============ Pantallas ============ */
.screen {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 20px 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}
.screen--dark { background: var(--negro); color: #fff; }
.screen--light { background: var(--crema); color: var(--negro); }
#inicio { padding-bottom: 40px; }

/* ============ Bienvenida ============ */
.brand { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 32px; }
.brand__name { font-weight: 800; font-size: 1.35rem; letter-spacing: .02em; }
.brand__star { width: 26px; height: 26px; color: var(--amarillo); }

.hero-title {
  font-size: clamp(2.1rem, 9vw, 2.6rem);
  line-height: 1.12;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -.01em;
}
.hl { position: relative; color: var(--naranja); display: inline-block; }
.hl svg { position: absolute; left: -2%; bottom: -10px; width: 104%; height: 14px; color: var(--naranja); }
.lead { color: var(--gris-claro); margin: 18px 0 28px; font-size: 1rem; }
.lead--tight { margin: 4px 0 20px; font-size: .95rem; }

.method-list { display: grid; gap: 14px; }
.method {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  min-height: 96px;
  padding: 18px 20px;
  border-radius: var(--radio);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.method:hover { transform: translateY(-2px); }
.method:active { transform: scale(.98); }
.method:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.method--yellow { background: var(--amarillo); color: var(--negro); }
.method--blue { background: var(--azul); color: var(--negro); }
.method__icon { width: 44px; height: 44px; flex: none; }
.method__icon svg { width: 100%; height: 100%; }
.method__text { flex: 1; display: grid; }
.method__text strong { font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.method__text small { font-size: .9rem; opacity: .8; }
.method__arrow { font-size: 2rem; font-weight: 600; line-height: 1; }

.sticker {
  position: absolute; top: -14px; right: 14px;
  background: var(--papel); color: var(--azul);
  font-family: var(--marker); font-size: .9rem;
  padding: 4px 12px;
  border: 2px solid var(--negro);
  border-radius: 10px;
  transform: rotate(-6deg);
  box-shadow: 2px 3px 0 var(--negro);
}

.footer-cta {
  text-align: center; margin: 36px 0 0;
  font-family: var(--marker); font-size: 1rem; letter-spacing: .06em; text-transform: uppercase;
}
.footer-cta span { color: var(--naranja); margin: 0 8px; }

.deco { position: absolute; pointer-events: none; }
.deco--lines-l { width: 34px; left: -6px; bottom: 120px; color: var(--azul); }
.deco--star-b { width: 34px; right: 18px; bottom: 26px; color: var(--amarillo); transform: rotate(14deg); }

/* ============ Encabezado de páginas internas ============ */
.topbar { display: flex; align-items: center; margin: 4px 0 16px; }
.back {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 16px 0 12px;
  border: 2px solid var(--negro); border-radius: 999px;
  font-weight: 600; text-decoration: none; font-size: 1.2rem; line-height: 1;
}
.back span { font-size: .95rem; }
.back--dark { border-color: #fff; }
.back:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }

.page-title { position: relative; display: inline-block; font-size: 2.2rem; font-weight: 800; margin: 0 0 18px; line-height: 1.1; }
.page-title svg { position: absolute; left: 0; bottom: -12px; width: 70%; height: 12px; color: var(--naranja); }

/* ============ Servientrega ============ */
.promo { position: relative; margin: 8px 6px 28px; }
.promo__brush {
  position: absolute; inset: -10px -14px 6px -10px;
  background: var(--azul);
  border-radius: 40% 12% 30% 14% / 20% 40% 18% 30%;
  transform: rotate(-3deg);
}
.promo__card {
  position: relative;
  display: grid;
  background: var(--naranja);
  border-radius: var(--radio);
  padding: 18px 22px 20px;
  transform: rotate(-1.5deg);
  box-shadow: 0 10px 20px rgba(0,0,0,.18);
}
.promo__tag {
  justify-self: start;
  font-family: var(--marker); font-size: .95rem; text-transform: uppercase;
  background: var(--papel); padding: 2px 12px; border-radius: 6px; transform: rotate(-3deg);
  margin-bottom: 6px;
}
.promo__price { font-size: 3.2rem; font-weight: 800; line-height: 1; }
.promo__sub { font-weight: 500; }

.block { margin: 0 0 24px; }
.label { display: block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px; color: var(--negro); }
.label--dark { color: #fff; }

.qty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.qty {
  min-height: 52px;
  border: 2px solid var(--negro); border-radius: 999px;
  background: transparent; color: var(--negro);
  font-weight: 700; font-size: 1.05rem; cursor: pointer;
  transition: background .12s, color .12s;
}
.qty:hover { background: rgba(0,0,0,.06); }
.qty[aria-checked="true"] { background: var(--naranja); border-color: var(--naranja); color: var(--negro); }
.qty:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }

.result { background: var(--papel); border-radius: var(--radio); padding: 18px 20px; border: 2px solid var(--negro); }
.big-total { font-size: 3.4rem; font-weight: 800; line-height: 1; margin: 0 0 8px; letter-spacing: -.02em; }
.big-total small { display: block; font-size: 1.1rem; font-weight: 700; color: var(--naranja); margin-top: 6px; letter-spacing: 0; }
.breakdown { margin: 0; color: var(--gris); font-weight: 500; }
.alert {
  margin: 14px 0 0; padding: 12px 14px;
  background: rgba(255,106,31,.12); border-left: 4px solid var(--naranja);
  border-radius: 8px; font-size: .95rem;
}

.input {
  width: 100%; min-height: 54px;
  padding: 0 18px;
  border: 2px solid var(--negro); border-radius: var(--radio-sm);
  background: var(--papel); color: var(--negro); font-size: 1rem;
}
.input:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(61,109,242,.25); }

.note {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: var(--radio); padding: 16px 18px; margin: 0 0 24px;
}
.note svg { width: 24px; height: 24px; flex: none; margin-top: 2px; }
.note p { margin: 0; font-size: .95rem; }
.note--yellow { background: var(--amarillo); color: var(--negro); transform: rotate(-.6deg); }

/* ============ Cooperativa ============ */
.search { position: relative; }
.search svg { position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: var(--gris-claro); }
.input--dark { background: var(--negro-2); color: #fff; border-color: var(--linea-oscura); padding-left: 48px; }
.input--dark::placeholder { color: var(--gris-claro); }
.input--dark:focus { border-color: var(--azul); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  min-height: 44px; padding: 0 18px;
  border: 2px solid #fff; border-radius: 999px;
  background: transparent; color: #fff;
  font-weight: 600; cursor: pointer;
}
.chip:hover { background: rgba(255,255,255,.08); }
.chip[aria-pressed="true"] { background: var(--naranja); border-color: var(--naranja); color: var(--negro); }
.chip:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; }

.others { margin: 12px 0 0; font-size: .9rem; color: var(--gris-claro); }
.others button { background: none; border: 0; padding: 4px 2px; color: #fff; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 500; }

.results-title { font-size: 1.35rem; font-weight: 800; margin: 0 0 4px; }
.results-sub { color: var(--gris-claro); margin: 0 0 12px; font-size: .9rem; }
.hint { color: var(--gris-claro); margin: 0; padding: 18px; border: 2px dashed var(--linea-oscura); border-radius: var(--radio); text-align: center; }

.coop-list { display: grid; gap: 0; }
.coop {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 12px; min-height: 72px;
  background: transparent; color: #fff; text-align: left;
  border: 2px solid transparent; border-bottom-color: var(--linea-oscura);
  border-radius: 0; cursor: pointer;
}
.coop:last-child { border-bottom-color: transparent; }
.coop[aria-checked="true"] { border: 2px solid #fff; border-radius: var(--radio-sm); background: var(--negro-2); }
.coop:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; }
.coop__icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--negro); }
.coop__icon svg { width: 24px; height: 24px; }
.coop__body { flex: 1; min-width: 0; }
.coop__name { display: block; font-weight: 600; font-size: 1rem; }
.coop__tag {
  display: inline-block; margin-top: 4px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  background: var(--amarillo); color: var(--negro); padding: 2px 8px; border-radius: 999px;
}
.coop__price { font-weight: 800; font-size: 1.35rem; }
.coop__price small { display: block; font-size: .7rem; font-weight: 500; color: var(--gris-claro); text-align: right; }

.notfound { background: var(--negro-2); border: 2px solid var(--naranja); border-radius: var(--radio); padding: 18px; }
.notfound strong { display: block; font-size: 1.1rem; margin-bottom: 6px; }
.notfound p { margin: 0; color: #ddd; }

.stepper { display: inline-flex; align-items: center; gap: 6px; border: 2px solid #fff; border-radius: 999px; padding: 4px; }
.stepper__btn {
  width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: #fff; color: var(--negro);
  font-size: 1.5rem; font-weight: 700; cursor: pointer; line-height: 1;
}
.stepper__btn:disabled { opacity: .3; cursor: default; }
.stepper__value { min-width: 110px; text-align: center; font-weight: 700; font-size: 1.1rem; }

#cooperativa .note--yellow.is-warning { outline: 3px solid var(--naranja); outline-offset: 3px; }

/* ============ Botón de WhatsApp ============ */
.sticky-cta {
  position: sticky; bottom: 0;
  margin: 0 -20px; padding: 18px 20px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(243,239,230,0), var(--crema) 35%);
}
.sticky-cta--dark { background: linear-gradient(to bottom, rgba(17,17,17,0), var(--negro) 35%); }
.btn-wa {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 58px; padding: 0 20px;
  background: var(--wa); color: #fff;
  border-radius: 999px; text-decoration: none;
  font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 6px 16px rgba(31,168,85,.35);
  transition: background .15s, transform .15s;
}
.btn-wa:hover { background: var(--wa-hover); }
.btn-wa:active { transform: scale(.98); }
.btn-wa:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; }
.btn-wa svg { width: 26px; height: 26px; flex: none; }

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