/* Tokens — se sobreescriben desde JS leyendo CONFIG.company.primaryColor */
:root {
  --brand: #1e40af;
  --brand-ink: #ffffff;
  --bg: #fafaf9;
  --surface: #ffffff;
  --ink: #1c1917;
  --muted: #78716c;
  --border: #e7e5e4;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --max: 980px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0a09;
    --surface: #1c1917;
    --ink: #fafaf9;
    --muted: #a8a29e;
    --border: #292524;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  --bg: #0c0a09;
  --surface: #1c1917;
  --ink: #fafaf9;
  --muted: #a8a29e;
  --border: #292524;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 16px 160px; /* 160px bottom = espacio para el widget flotante */
}

/* ───── Hero ───── */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 16px 8px;
  text-align: center;
}
.hero__emoji {
  font-size: 48px;
  line-height: 1;
}
.hero__title {
  font-size: clamp(28px, 5vw, 44px);
  margin: 12px 0 4px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero__sub {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}

.pitch {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 20px;
  margin: 20px 0;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}
.pitch strong { color: var(--ink); }
.pitch .mic-ico { font-size: 24px; }

/* ───── Cards ───── */
.stage > * + * { margin-top: 20px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.product-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
}
@media (max-width: 560px) {
  .product-card { grid-template-columns: 1fr; }
}
.product-card__img {
  background: #e7e5e4 center/cover no-repeat;
  min-height: 180px;
}
.product-card__body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.product-card__name {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}
.product-card__price {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand);
  margin: 4px 0 0;
}
.product-card__desc {
  color: var(--muted);
  font-size: 15px;
  margin: 2px 0 0;
}
.product-card__tags {
  margin-top: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tag {
  background: color-mix(in oklab, var(--brand) 10%, transparent);
  color: var(--brand);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

/* ───── Grid ───── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.grid .card {
  padding: 14px;
  cursor: default;
}
.grid .card h3 { margin: 10px 0 2px; font-size: 16px; }
.grid .card p { margin: 0; font-size: 14px; color: var(--muted); }

/* ───── Cart ───── */
.cart { padding: 20px 22px; }
.cart h2 { margin: 0 0 10px; font-size: 18px; }
.cart ul { list-style: none; margin: 0; padding: 0; }
.cart li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}
.cart li:last-child { border-bottom: 0; }
.cart .total {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 2px solid var(--ink);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  font-size: 18px;
}

/* ───── Action buttons ───── */
.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn {
  border: 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .06s ease, filter .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand);
  color: var(--brand-ink);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-whatsapp {
  background: #25D366;
  color: #fff;
}
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}

/* ───── Widget ───── */
.widget-mount {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 50;
}

/* ───── Overlay ───── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 20px;
}
.overlay[hidden] { display: none; }
.overlay-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  max-width: 460px;
  width: 100%;
  padding: 32px 28px 28px;
  position: relative;
}
.overlay-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: 0;
  font-size: 28px;
  cursor: pointer;
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.overlay-close:hover { background: var(--border); }

/* ───── Footer ───── */
footer {
  max-width: var(--max);
  margin: 32px auto 100px;
  padding: 0 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
footer a { color: var(--brand); text-decoration: none; }
