/* ============ TOKENS ============ */
:root {
  /* Verdes tomados del logo de TuCajaClick (#36a560) */
  --green-900: #0e3520;
  --green-800: #1a5c35;
  --green-700: #237f45;
  --green-600: #2c9353;
  --green-500: #36a560;
  --green-100: #d8f1e0;
  --green-50:  #eef8f1;
  --brand-dark: #3d3e40; /* gris oscuro del logo */

  --bg: #f8faf8;
  --surface: #ffffff;
  --text: #222326;
  --muted: #5f6662;
  --border: #e1e8e3;
  --danger: #dc2626;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(5, 59, 42, .04), 0 12px 32px -12px rgba(5, 59, 42, .14);
  --maxw: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ BOTONES ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  border: 0;
  border-radius: 999px;
  background: var(--green-700);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  padding: .8em 1.4em;
  transition: background .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 8px 20px -8px rgba(35, 127, 69, .6);
}
.btn:hover { background: var(--green-800); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--green-100); outline-offset: 2px; }
.btn--sm { padding: .55em 1.1em; font-size: .9rem; box-shadow: none; }
.btn--lg { padding: 1em 1.8em; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn--ghost {
  background: transparent;
  color: var(--green-700);
  box-shadow: inset 0 0 0 2px var(--green-100);
}
.btn--ghost:hover { background: var(--green-50); }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* ============ HEADER ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 250, 248, .85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
}
.logo__icon { width: 40px; height: 40px; display: block; }
.logo__text {
  font-family: "Montserrat", "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--brand-dark);
}
.logo__text strong { color: var(--green-500); font-weight: 700; }

/* ============ HERO ============ */
.hero { padding: 56px 0 72px; overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero__media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border-radius: 32px;
  background: linear-gradient(160deg, var(--green-50), var(--green-100));
}
.hero__blob {
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(54, 165, 96, .32), transparent 70%);
  filter: blur(10px);
}
.product {
  position: relative;
  width: 58%;
  height: auto;
  filter: drop-shadow(0 30px 30px rgba(5, 59, 42, .25));
  animation: float 5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-12px) rotate(2deg); }
}

.badge {
  display: inline-block;
  padding: .35em .9em;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-800);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.hero__info h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 800;
  margin: 16px 0 14px;
}
.lead { color: var(--muted); font-size: 1.08rem; margin: 0 0 24px; max-width: 46ch; }

.price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.price__now { font-size: 2.6rem; font-weight: 800; color: var(--green-700); letter-spacing: -0.03em; }
.price__old { color: var(--muted); text-decoration: line-through; font-size: 1.1rem; }
.price__tag {
  background: var(--green-700);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: .25em .6em;
  border-radius: 8px;
}

.checks { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; font-weight: 500; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--green-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23237f45' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.microcopy { color: var(--muted); font-size: .88rem; margin: 12px 0 0; }

/* ============ FEATURES ============ */
.features { padding: 0 0 80px; }
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .25s, box-shadow .25s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--green-50);
  margin-bottom: 18px;
}
.feature__icon svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: var(--green-700);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature h3 { font-size: 1.1rem; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ============ ORDER ============ */
.order {
  padding: 88px 0;
  background: var(--green-900);
  color: #e6f4ee;
  scroll-margin-top: 68px;
}
.order__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}
.order__intro h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); color: #fff; margin-bottom: 12px; }
.order__intro > p { color: #a9d6b8; margin: 0 0 28px; max-width: 40ch; }

.summary {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  padding: 8px 22px;
  background: rgba(255, 255, 255, .04);
}
.summary__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.summary__row:last-child { border-bottom: 0; }
.summary__total { font-weight: 800; font-size: 1.2rem; color: #fff; }
.summary__total span:last-child { color: #8ee0a8; }

/* Form card */
.form, .success {
  background: var(--surface);
  color: var(--text);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35);
}
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 16px;
}
.form__section {
  grid-column: 1 / -1;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--green-700);
  margin-top: 6px;
}
.form__section:not(:first-child) { margin-top: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .88rem; font-weight: 600; }
.opt { color: var(--muted); font-weight: 400; }

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: .98rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75em .9em;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #9aa9a2; }
.field input:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(54, 165, 96, .16);
}

.honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.error { display: none; color: var(--danger); font-size: .8rem; }
.field.is-invalid input { border-color: var(--danger); background: #fef6f6; }
.field.is-invalid .error { display: block; }

/* Stepper */
.field--qty { flex-direction: row; align-items: center; justify-content: space-between; }
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
}
.stepper__btn {
  width: 42px; height: 42px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green-700);
  cursor: pointer;
}
.stepper__btn:hover { background: var(--green-50); }
.field .stepper input {
  width: 48px;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: center;
  font-weight: 700;
  box-shadow: none;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Consent */
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: .86rem;
  color: var(--muted);
  cursor: pointer;
}
.consent input { accent-color: var(--green-700); width: 18px; height: 18px; margin-top: 2px; flex: none; }
.error--consent { grid-column: 1 / -1; margin-top: -8px; }
.form.consent-invalid .error--consent { display: block; }

.form .btn--block { grid-column: 1 / -1; margin-top: 6px; }

/* Success */
.success { text-align: center; padding: 48px 32px; }
.success[hidden], .form[hidden] { display: none; }
.success__icon {
  width: 72px; height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-100);
  animation: pop .45s cubic-bezier(.2, 1.4, .4, 1);
}
.success__icon svg {
  width: 36px; height: 36px;
  fill: none; stroke: var(--green-700); stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
}
.success h2 { font-size: 1.8rem; margin-bottom: 10px; }
.success p { color: var(--muted); margin: 0 0 8px; }
.success__ref { margin-bottom: 24px !important; }
.success .btn { margin-top: 16px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ============ FOOTER ============ */
.footer { padding: 40px 0 32px; font-size: .85rem; color: var(--muted); }
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.footer__logo { width: 240px; max-width: 70%; height: auto; display: block; }

/* ============ RESPONSIVE ============ */
@media (max-width: 880px) {
  .hero { padding: 32px 0 56px; }
  .hero__grid, .order__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__media { max-width: 440px; width: 100%; margin: 0 auto; }
  .features__grid { grid-template-columns: 1fr; }
  .order { padding: 64px 0; }
}
@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .form { grid-template-columns: 1fr; padding: 24px 20px; }
  .price__now { font-size: 2.2rem; }
  .hero__info .btn--lg { width: 100%; }
}

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