* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f4f2fb;
  color: #222;
}
.topbar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding: 14px 22px;
  background: linear-gradient(90deg, #5b2ee5, #c026d3 55%, #ec4899);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .crown { font-size: 34px; }
.brand h1 { margin: 0; font-size: 24px; letter-spacing: .5px; }
.brand p { margin: 0; font-size: 12px; opacity: .85; }
.userbox { display: flex; align-items: center; gap: 10px; }
.saldo-chip {
  background: #ffd700; color: #3b2f00; font-weight: 700;
  padding: 8px 14px; border-radius: 999px; font-size: 14px;
}
.btn {
  border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer;
  font-weight: 700; font-size: 14px;
}
.btn-light { background: #fff; color: #5b2ee5; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid #fff; }
.btn-primary {
  background: linear-gradient(90deg, #5b2ee5, #ec4899); color: #fff; width: 100%;
}
.btn-buy {
  background: #16a34a; color: #fff; width: 100%; margin-top: 8px;
}
.btn-mp {
  background: #009ee3; color: #fff; width: 100%; margin-top: 8px;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
main { max-width: 1100px; margin: 0 auto; padding: 18px; }
.hero { text-align: center; padding: 18px 10px 6px; }
.hero h2 { margin: 6px 0; font-size: 26px; color: #3b1d8f; }
.hero p { color: #555; margin: 4px 0 10px; }
.hero-note {
  display: inline-block; background: #fff7cc; border: 1px solid #f0d24a;
  padding: 8px 14px; border-radius: 10px; font-size: 14px;
}
.card {
  background: #fff; border-radius: 14px; padding: 18px; margin: 16px 0;
  box-shadow: 0 2px 10px rgba(60, 30, 120, .08);
}
.auth-panel { max-width: 420px; margin: 16px auto; }
.auth-panel input {
  display: block; width: 100%; margin: 8px 0; padding: 11px 12px;
  border: 1px solid #ccc; border-radius: 10px; font-size: 15px;
}
.muted { color: #777; font-size: 13px; }
.center { text-align: center; }
.error { color: #c00; font-size: 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 6px; }
.filters button {
  border: 1px solid #c9b8f5; background: #fff; color: #5b2ee5;
  border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 600;
}
.filters button.active { background: #5b2ee5; color: #fff; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px;
  margin-top: 14px;
}
.product {
  background: #fff; border-radius: 14px; padding: 16px;
  box-shadow: 0 2px 10px rgba(60, 30, 120, .08);
  border-top: 5px solid #5b2ee5;
  display: flex; flex-direction: column;
}
.product.cat-VIDEO { border-top-color: #e11d48; }
.product.cat-COMBOS { border-top-color: #f59e0b; }
.product.cat-MUSICA { border-top-color: #16a34a; }
.product.cat-IA { border-top-color: #0ea5e9; }
.product h3 { margin: 0 0 4px; font-size: 16px; }
.product .plat { color: #777; font-size: 13px; margin: 0 0 8px; }
.product .dur { font-size: 13px; color: #444; }
.product .price { font-size: 24px; font-weight: 800; color: #3b1d8f; margin: 10px 0 2px; }
.product .price small { font-size: 13px; font-weight: 600; color: #777; }
.orders { list-style: none; padding: 0; margin: 0; }
.orders li {
  padding: 10px 4px; border-bottom: 1px solid #eee;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.badge {
  background: #fef3c7; color: #92400e; border-radius: 999px; padding: 2px 10px; font-size: 12px;
}
.badge.pagado { background: #dcfce7; color: #166534; }
footer { text-align: center; padding: 26px 12px 40px; color: #666; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #222; color: #fff; padding: 12px 20px; border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.3); max-width: 90vw; text-align: center; z-index: 10;
}
