:root {
  --bg: #06120c;
  --surface: #0b1f15;
  --surface-2: #11291d;
  --line: rgba(238, 245, 234, .10);
  --text: #eef5ea;
  --muted: #a9bda8;
  --primary: #053d2b;
  --green: #53a43f;
  --green-ink: #9fdc8c;
  --green-soft: rgba(83, 164, 63, .16);
  --pink: #e198a6;
  --pink-soft: rgba(225, 152, 166, .14);
  --amber: #f5b400;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --radius: 18px;
  --display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f7f0;
    --surface: #ffffff;
    --surface-2: #e9f1e5;
    --line: rgba(15, 42, 28, .10);
    --text: #0f2a1c;
    --muted: #587060;
    --primary: #053d2b;
    --green: #2f7d32;
    --green-ink: #1f6b2a;
    --green-soft: rgba(47, 125, 50, .12);
    --pink: #b9506a;
    --pink-soft: rgba(185, 80, 106, .10);
    --shadow: 0 8px 24px rgba(15, 42, 28, .10);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--body);
  max-width: 680px;
  margin-inline: auto;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
svg { fill: currentColor; }

/* ---------- Encabezado y búsqueda ---------- */
.top { padding: calc(14px + env(safe-area-inset-top)) 16px 0; }
.bar {
  position: sticky; top: 0; z-index: 5;
  padding: 10px 16px 12px;
  background: linear-gradient(var(--bg) 88%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { border-radius: 10px; }
.brand-sub { font-size: 12px; color: var(--muted); line-height: 1; }
.kicker { color: var(--pink); font-weight: 700; font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; }
#install { margin-left: auto; }
h1 {
  font: 800 clamp(26px, 7.5vw, 34px)/1.05 var(--display);
  letter-spacing: -.03em; margin: 14px 0 12px;
}
.search {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 4px 6px 4px 14px; box-shadow: var(--shadow);
}
.search:focus-within { border-color: var(--green); }
.search .ico { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  padding: 12px 4px; font-size: 17px;
}
.search input::-webkit-search-cancel-button { display: none; }
.icon-btn {
  width: 42px; height: 42px; flex: none; border: 0; border-radius: 12px;
  background: transparent; display: grid; place-items: center; color: var(--muted);
}
.icon-btn svg { width: 22px; height: 22px; }
.mic { background: var(--primary); color: #fff; }
.mic.on { background: var(--pink); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px var(--pink-soft); } }

.chips {
  display: flex; gap: 8px; margin: 12px -16px 0; padding: 0 16px 2px;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 7px 12px; font-size: 14px; font-weight: 500; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.chip.auto { border-color: var(--pink); background: var(--pink-soft); color: var(--text); }

/* ---------- Resultados ---------- */
main { padding: 6px 16px 0; }
.for {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  color: var(--muted); font-size: 14px; margin: 6px 0 14px;
}
.for b { color: var(--text); font-weight: 700; }
.section-title { font: 800 20px/1.2 var(--display); letter-spacing: -.02em; margin: 26px 0 10px; }
.section-sub { color: var(--muted); font-size: 14px; margin: -6px 0 12px; }

.card {
  display: grid; grid-template-columns: 96px 1fr; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; margin-bottom: 12px; position: relative; text-align: left; width: 100%;
}
.card:active { transform: scale(.99); }
.thumb {
  aspect-ratio: 1; border-radius: 14px; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, var(--surface-2), var(--bg));
  display: grid; place-items: center;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.card h3 { font: 800 18px/1.15 var(--display); margin: 2px 0 2px; letter-spacing: -.01em; }
.tagline { color: var(--muted); font-size: 14px; line-height: 1.3; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 6px; }
.badge {
  font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-ink);
}
.badge.dim { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.badge.all { background: var(--pink); color: #2a0d14; }
.why { font-size: 13px; color: var(--muted); line-height: 1.35; }
.why b { color: var(--text); font-weight: 700; }
.price-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.price { font-weight: 700; }
.socio { font-size: 13px; color: var(--green-ink); }
.add {
  margin-left: auto; width: 38px; height: 38px; border-radius: 12px; border: 0;
  background: var(--primary); color: #fff; font-size: 22px; line-height: 1; flex: none;
}
.add.in { background: var(--green); }
.top-pick {
  position: absolute; top: -9px; right: 12px; font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; background: var(--pink); color: #2a0d14; padding: 3px 8px; border-radius: 999px;
}

.combo {
  border-radius: calc(var(--radius) + 2px); padding: 2px; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--pink), var(--green));
}
.combo-in { background: var(--surface); border-radius: var(--radius); padding: 14px; }
.combo h2 { font: 800 20px/1.15 var(--display); margin: 2px 0 2px; }
.combo-items { display: grid; gap: 10px; margin: 12px 0; }
.combo-item { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; border: 0; background: none; padding: 0; text-align: left; }
.combo-item .thumb { border-radius: 12px; }
.combo-item b { font-family: var(--display); font-size: 16px; }
.combo-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.combo-foot .totals { line-height: 1.2; }
.plus { color: var(--pink); font-weight: 800; text-align: center; margin: -6px 0; }

.btn {
  border: 0; border-radius: 14px; padding: 12px 16px; font-weight: 700;
  background: var(--primary); color: #fff; display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn.wide { width: 100%; }
.btn.alt { background: var(--surface-2); color: var(--text); }
.btn.wa { background: #1fa855; }
.ghost { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--green-ink); }
.combo-foot .btn { margin-left: auto; }

.empty { text-align: center; color: var(--muted); padding: 24px 8px; }
.examples { display: grid; gap: 10px; margin: 6px 0 4px; }
.example {
  text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 14px;
  padding: 12px 14px; font-weight: 500; display: flex; gap: 10px; align-items: center;
}
.example span { color: var(--muted); margin-left: auto; }
.hint { color: var(--muted); font-size: 14px; margin: 18px 0 8px; }

.disclaimer { color: var(--muted); font-size: 12px; line-height: 1.45; padding: 24px 16px 8px; opacity: .85; }

/* ---------- Botón de lista ---------- */
.fab {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 6;
  border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 700;
  background: var(--green); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  display: flex; gap: 10px; align-items: center; white-space: nowrap;
}
.fab .count { background: #fff; color: var(--primary); border-radius: 999px; padding: 0 8px; font-size: 13px; }

/* ---------- Hojas (detalle y lista) ---------- */
.sheet {
  border: 0; padding: 0; margin: 0; width: 100%; max-width: 680px; height: 100%; max-height: 100%;
  margin-inline: auto; background: var(--bg); color: var(--text);
}
.sheet::backdrop { background: rgba(0, 0, 0, .6); }
.sheet[open] { animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.sheet-bar {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.sheet-bar .t { font-weight: 700; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { padding: 0 16px calc(110px + env(safe-area-inset-bottom)); }
.sheet-cta {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 680px; margin-inline: auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%);
}

.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 14px -16px 0; padding: 0 16px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery .thumb { flex: 0 0 86%; scroll-snap-align: center; border-radius: 22px; max-height: 360px; }
.gallery .thumb:only-child { flex-basis: 100%; }
.d-kicker { margin-top: 16px; }
.d-name { font: 800 32px/1 var(--display); letter-spacing: -.03em; margin: 6px 0 4px; }
.d-tag { color: var(--muted); font-size: 17px; }
.d-price { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 4px; }
.d-price .price { font-size: 24px; font-family: var(--display); }
.save { color: var(--pink); font-weight: 700; font-size: 14px; }
.d-sec { margin-top: 22px; }
.d-sec h3 { font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--pink); margin: 0 0 10px; }
.d-sec p { margin: 0; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.ticks li::before { content: "✓"; color: var(--green-ink); font-weight: 800; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.tile .tg { display: block; font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--pink); font-weight: 700; }
.tile .nm { font-weight: 700; line-height: 1.25; }
.callout { background: var(--pink-soft); border-left: 3px solid var(--pink); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
summary { font-weight: 700; cursor: pointer; }
details p { color: var(--muted); font-size: 14px; margin-top: 8px; }
.links { display: grid; gap: 8px; }
.link-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; text-decoration: none; color: inherit;
}
.link-row .thumb { width: 44px; border-radius: 10px; flex: none; }
.link-row .go { margin-left: auto; color: var(--muted); }
.video { position: relative; border-radius: 16px; overflow: hidden; display: block; background: var(--surface); aspect-ratio: 16 / 9; }
.video img { width: 100%; height: 100%; object-fit: cover; }
.video .play {
  position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; gap: 6px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
}

/* Lista */
.l-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.l-item .thumb { border-radius: 12px; }
.l-item b { font-family: var(--display); }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; }
.stepper span { min-width: 22px; text-align: center; font-weight: 700; }
.totals-box { background: var(--surface); border-radius: 16px; padding: 14px; margin: 16px 0; display: grid; gap: 4px; }
.totals-box .big { font: 800 26px/1.1 var(--display); }
.field { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 6px 0 14px; }
.actions { display: grid; gap: 8px; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 20;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; max-width: 90vw; text-align: center;
}

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