/* Prime Templates · sistema visual
   Tokens en :root; cada página reutiliza los mismos componentes. */

:root {
  --brand: #1a7f4f;
  --brand-dark: #0f5c37;
  --brand-glow: #2fbf76;
  --brand-soft: #eaf5ee;
  --ink: #0e1a13;
  --ink-2: #22332a;
  --muted: #5f6b63;
  --line: #e2e7df;
  --line-soft: #eef1ec;
  --bg: #f6f7f3;
  --card: #ffffff;
  --danger: #c0392b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(14, 26, 19, .04), 0 10px 30px -12px rgba(14, 26, 19, .12);
  --shadow-lift: 0 2px 4px rgba(14, 26, 19, .05), 0 28px 60px -22px rgba(14, 26, 19, .28);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -.005em; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.2; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.error { color: var(--danger); }

/* Cabecera */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid rgba(14, 26, 19, .06);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { text-decoration: none; font-weight: 600; font-size: .95rem; padding: 9px 14px; border-radius: 10px; color: var(--ink); white-space: nowrap; transition: background .2s var(--ease); }
.nav a:not(.cart-pill):hover { background: rgba(14, 26, 19, .05); }
.nav a[aria-current="page"]:not(.cart-pill) { background: rgba(14, 26, 19, .06); }
.nav .cart-pill { background: var(--ink); color: #fff; display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; }
.nav .cart-pill:hover { background: var(--ink-2); }
#cart-count {
  background: var(--brand-glow); color: #06180e; border-radius: 999px; min-width: 22px; height: 22px;
  padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 800;
}
#cart-count[hidden] { display: none; }

/* Botones */
.btn {
  appearance: none; border: 0; border-radius: var(--radius-sm); padding: 14px 22px; min-height: 48px;
  background: var(--brand); color: #fff; font: inherit; font-weight: 650; letter-spacing: -.01em; cursor: pointer;
  text-decoration: none; text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 22px -10px rgba(26, 127, 79, .7);
  transition: background .2s var(--ease), transform .08s, box-shadow .2s var(--ease);
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-block { width: 100%; }
.btn-dark { background: var(--ink); box-shadow: 0 8px 22px -10px rgba(14, 26, 19, .6); }
.btn-dark:hover { background: var(--ink-2); }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { min-height: 40px; padding: 9px 16px; font-size: .92rem; border-radius: 10px; }
.btn.is-added { background: var(--brand-soft); color: var(--brand-dark); box-shadow: none; }

/* Portada */
.hero {
  position: relative; overflow: hidden; color: #eef5f0;
  background:
    radial-gradient(900px 520px at 88% -18%, rgba(47, 191, 118, .34), transparent 62%),
    radial-gradient(700px 420px at -8% 120%, rgba(26, 127, 79, .32), transparent 60%),
    linear-gradient(180deg, #0b1711 0%, #0e1f16 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; padding-top: 104px; padding-bottom: 104px; }
.eyebrow { color: #7fe0a8; font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 16px; }
.hero h1 { color: #fff; font-size: clamp(2.5rem, 5.4vw, 4.1rem); line-height: 1.02; letter-spacing: -.04em; max-width: 14ch; margin: 0 0 22px; }
.lead { color: rgba(238, 245, 240, .72); font-size: 1.12rem; max-width: 50ch; margin: 0 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn { background: var(--brand-glow); color: #06180e; box-shadow: 0 10px 30px -10px rgba(47, 191, 118, .8); }
.hero .btn:hover { background: #5fd69a; }
.hero .btn-ghost { background: rgba(255, 255, 255, .04); color: #fff; border: 1px solid rgba(255, 255, 255, .2); box-shadow: none; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; color: rgba(238, 245, 240, .66); font-size: .92rem; }
.trust span::before { content: "✓"; color: var(--brand-glow); font-weight: 800; margin-right: 6px; }
.hero .trust { color: rgba(238, 245, 240, .66); }

.hero-visual { display: flex; justify-content: center; }
.sheet {
  position: relative; width: 100%; max-width: 440px; background: #fff; color: var(--ink);
  border-radius: 18px; padding: 18px 18px 22px; transform: rotate(-1.5deg);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06);
}
.sheet-bar { display: flex; align-items: center; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.sheet-bar i { width: 10px; height: 10px; border-radius: 50%; display: block; background: #e3e7df; }
.sheet-bar i:nth-child(1) { background: #f1a09a; }
.sheet-bar i:nth-child(2) { background: #f3d37a; }
.sheet-bar i:nth-child(3) { background: #8fd4a9; }
.sheet-bar em { margin-left: auto; font-style: normal; font-size: .78rem; color: var(--muted); }
.sheet-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; padding: 11px 6px; border-bottom: 1px solid #f0f3ee; font-size: .92rem; font-variant-numeric: tabular-nums; }
.sheet-row span:not(:first-child) { text-align: right; }
.sheet-row.head { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sheet-row.total { border-bottom: 0; font-weight: 800; color: var(--brand-dark); background: var(--brand-soft); border-radius: 10px; margin-top: 8px; }
.sheet-chip {
  position: absolute; right: -14px; bottom: -16px; background: var(--ink); color: #fff; font-size: .82rem; font-weight: 650;
  padding: 9px 14px; border-radius: 999px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5);
}

/* Secciones */
section.block { padding: 96px 0; }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); letter-spacing: -.03em; margin: 0 0 8px; }
.section-head p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 28px; }
.search {
  flex: 1 1 280px; min-height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  padding: 0 16px; font: inherit; color: var(--ink); box-shadow: var(--shadow);
}
.search:focus { outline: 3px solid rgba(26, 127, 79, .18); border-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px;
  padding: 9px 16px; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: #c9d2c6; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Catálogo */
.grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.empty { color: var(--muted); padding: 40px 0; text-align: center; grid-column: 1 / -1; }
.empty h2 { color: var(--ink); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.card-media { aspect-ratio: 4 / 3; background: linear-gradient(145deg, #f1f8f3 0%, #dcefe3 100%); overflow: hidden; display: block; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tag { align-self: flex-start; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-dark); background: var(--brand-soft); padding: 4px 10px; border-radius: 999px; }
.card h3 { margin: 2px 0 0; font-size: 1.18rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { color: var(--brand-dark); }
.card .desc { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.bullets { margin: 4px 0 0; padding: 0; list-style: none; font-size: .9rem; display: grid; gap: 4px; }
.bullets li::before { content: "✓"; color: var(--brand); font-weight: 800; margin-right: 8px; }
.card-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price small { display: block; font-size: .72rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }

/* Cómo funciona */
.steps { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow); }
.step b {
  display: inline-flex; width: 40px; height: 40px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--ink); color: #fff; font-weight: 800; margin-bottom: 18px;
}
.step h3 { margin: 0 0 8px; font-size: 1.12rem; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }

/* Pie */
footer.site-footer { background: #0b1711; color: rgba(238, 245, 240, .6); margin-top: 0; }
footer.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; padding-top: 40px; padding-bottom: 40px; font-size: .9rem; }
footer.site-footer span:first-child { color: #eef5f0; font-weight: 650; }

/* Página de producto */
.crumbs { font-size: .88rem; color: var(--muted); margin: 28px 0 0; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.pdp { display: grid; gap: 40px; grid-template-columns: 1fr; margin-top: 24px; }
@media (min-width: 900px) { .pdp { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 64px; align-items: start; } }
.pdp-media { border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(145deg, #f1f8f3 0%, #dcefe3 100%); box-shadow: var(--shadow); }
.pdp-media img { width: 100%; height: auto; }
.pdp-info { position: sticky; top: 96px; }
.pdp-info h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); letter-spacing: -.03em; margin: 14px 0 12px; }
.pdp-info .desc { color: var(--muted); font-size: 1.08rem; margin: 0 0 24px; }
.pdp-price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.pdp-price strong { font-size: 2.4rem; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pdp-price span { color: var(--muted); font-size: .92rem; }
.pdp-tax { font-size: .86rem; color: var(--muted); margin: 0 0 26px; }
.pdp-list { list-style: none; padding: 20px 0 0; margin: 0 0 28px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.pdp-list li { display: flex; gap: 10px; font-size: .97rem; }
.pdp-list li::before { content: "✓"; color: var(--brand); font-weight: 800; }
.buy { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: stretch; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.stepper button {
  appearance: none; border: 0; background: transparent; width: 44px; height: 48px; font: inherit; font-size: 1.2rem; cursor: pointer; color: var(--ink);
}
.stepper button:hover { background: var(--bg); }
.stepper span { min-width: 40px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.buy .btn { min-height: 48px; }
.pdp-note { display: flex; gap: 10px; align-items: center; margin-top: 18px; font-size: .88rem; color: var(--muted); }
.pdp-note svg { color: var(--brand); flex: none; }
.related { margin: 88px 0 0; }
.related h2 { font-size: 1.6rem; margin: 0 0 22px; }
.related .grid { gap: 22px; }
.pdp-error { text-align: center; padding: 80px 0; }

/* Carrito */
.page-title { font-size: clamp(1.8rem, 3vw, 2.3rem); letter-spacing: -.03em; margin: 40px 0 28px; }
.two-col { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; padding-bottom: 96px; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.summary { position: sticky; top: 96px; }
.summary h2 { margin: 0 0 14px; font-size: 1.1rem; }
.cart-row {
  display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--line-soft);
}
.cart-row:first-child { padding-top: 0; }
.cart-row:last-child { border-bottom: 0; padding-bottom: 0; }
.cart-row img { width: 112px; height: 80px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.cart-row h3 { margin: 0 0 4px; font-size: 1.02rem; }
.cart-row .muted { font-size: .88rem; }
.cart-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.cart-actions .stepper button { width: 36px; height: 36px; font-size: 1.05rem; }
.cart-actions .stepper span { min-width: 30px; }
.link-btn { appearance: none; background: none; border: 0; color: var(--danger); font: inherit; font-size: .9rem; cursor: pointer; padding: 6px 0; font-weight: 600; }
.line-total { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.totals { margin-top: 6px; }
.totals .row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.totals .row.total { color: var(--ink); font-size: 1.25rem; font-weight: 800; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 16px; }
.totals .row.total small { display: block; font-weight: 500; font-size: .76rem; color: var(--muted); }
.reassure { margin: 16px 0 0; font-size: .86rem; color: var(--muted); }
.summary .btn { margin-top: 18px; }

/* Checkout */
body.checkout-page { background: #fff; }
.checkout-layout { max-width: 1180px; margin: 0 auto; min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.checkout-form { order: 1; padding: 28px 20px 64px; }
.checkout-summary { order: -1; background: #f5f7f2; padding: 28px 20px; border-bottom: 1px solid var(--line); }
@media (min-width: 960px) {
  .checkout-layout { grid-template-columns: minmax(0, 1fr) 440px; }
  .checkout-form { order: 1; padding: 48px 64px; }
  .checkout-summary { order: 2; border-bottom: 0; border-left: 1px solid var(--line); padding: 48px 44px; }
}
.checkout-form .inner, .checkout-summary .inner { max-width: 500px; }
.checkout-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; }
.checkout-header .brand img { height: 30px; }
.checkout-header a.back { font-size: .9rem; color: var(--muted); text-decoration: none; font-weight: 600; }
.checkout-header a.back:hover { color: var(--ink); }
.progress { display: flex; gap: 8px; list-style: none; margin: 0 0 32px; padding: 0; font-size: .85rem; color: var(--muted); }
.progress li { flex: 1; display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 3px solid var(--line); font-weight: 600; }
.progress li span {
  width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--line); color: var(--ink); font-size: .78rem; font-weight: 800; flex: none;
}
.progress li.done, .progress li.current { border-top-color: var(--brand); color: var(--ink); }
.progress li.done span { background: var(--brand); color: #fff; }
.progress li.current span { background: var(--ink); color: #fff; }
.checkout-title { font-size: 1.8rem; letter-spacing: -.03em; margin: 0 0 26px; }
.label { display: block; font-size: .9rem; font-weight: 650; margin: 0 0 8px; }
.field {
  width: 100%; min-height: 52px; border-radius: var(--radius-sm); border: 1px solid #d6dcd2; background: #fff;
  padding: 0 16px; font: inherit; color: var(--ink);
}
.field:focus { outline: 3px solid rgba(26, 127, 79, .18); border-color: var(--brand); }
.field[readonly] { background: #f5f7f2; color: var(--muted); cursor: default; }
.field-hint { margin: 8px 0 0; font-size: .85rem; color: var(--muted); }
.form-group { margin-bottom: 26px; }
.section-title { font-size: 1rem; font-weight: 750; margin: 0 0 14px; }
#payment-element { min-height: 240px; }
.pay-error { color: var(--danger); font-size: .92rem; margin: 12px 0 0; min-height: 1.2em; }
.secure-note {
  display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px;
  border: 1px solid #cfe5d8; border-radius: 14px; background: var(--brand-soft); font-size: .9rem; line-height: 1.45; color: var(--muted);
}
.secure-note svg { flex: none; color: var(--brand); }
.secure-note strong { color: var(--ink); font-weight: 650; }
.summary-kicker { color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 8px; }
.summary-amount { font-size: 2.8rem; font-weight: 800; letter-spacing: -.03em; margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.summary-items { color: var(--ink); font-size: .95rem; margin: 0 0 24px; }
.checkout-summary .totals { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px; }
.checkout-summary .reassure { margin-top: 18px; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff; animation: spin .8s linear infinite; display: none;
}
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Resultado del pago */
.result { max-width: 680px; margin: 56px auto 96px; padding: 0 20px; }
.result .panel { padding: 40px; text-align: left; }
.result h1 { margin: 6px 0 10px; font-size: 2rem; letter-spacing: -.03em; }
.result p { color: var(--muted); margin: 0 0 18px; }
.result .ok {
  display: inline-flex; align-items: center; gap: 8px; color: var(--brand-dark); background: var(--brand-soft);
  font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px;
}
.downloads { display: grid; gap: 10px; margin-top: 22px; }
.result .fine { margin-top: 22px; font-size: .9rem; }

/* Móvil */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; padding-top: 64px; padding-bottom: 72px; }
  .hero-visual { order: 2; }
  .sheet { transform: none; max-width: 100%; }
  .sheet-chip { right: 12px; bottom: -14px; }
  section.block { padding: 64px 0; }
  .pdp-info { position: static; }
  .summary { position: static; }
}
@media (max-width: 520px) {
  .hero h1 { font-size: 2.3rem; }
  .sheet-row { font-size: .84rem; }
  .nav a:not(.cart-pill) { display: none; }
  .cart-row { grid-template-columns: 84px minmax(0, 1fr); }
  .cart-row img { width: 84px; height: 60px; }
  .cart-row .line-total { grid-column: 2; }
  .result .panel { padding: 26px; }
}
