/* ============ MAGIC CENTER — magiccenter.pe ============ */
:root {
  --bg: #0a0a0e;
  --bg-2: #111118;
  --card: #16161f;
  --card-border: #26262f;
  --gold: #d9a53a;
  --gold-2: #f0c060;
  --text: #f5f5f7;
  --muted: #a1a1aa;
  --green: #25d366;
  --green-dark: #128c4a;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 14, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img.fenix { height: 42px; width: auto; }
.brand img.wordmark { height: 30px; width: auto; }
.nav { display: flex; gap: 22px; font-size: 14px; color: var(--muted); }
.nav a:hover { color: var(--gold-2); }
.btn-wsp-mini {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--green); color: #04240f; font-weight: 600; font-size: 14px;
  padding: 8px 16px; border-radius: 99px; white-space: nowrap;
}
.btn-wsp-mini:hover { background: #2ee574; }

/* ---------- Difuminado estilo Apple (blobs de color desenfocados) ---------- */
.blob {
  position: absolute; border-radius: 50%; pointer-events: none;
  opacity: 0.55; z-index: 0; transform: translateZ(0);
}
.blob.gold   { background: radial-gradient(circle, rgba(217, 165, 58, 0.34) 0%, transparent 70%); }
.blob.purple { background: radial-gradient(circle, rgba(124, 78, 220, 0.30) 0%, transparent 70%); }
.blob.blue   { background: radial-gradient(circle, rgba(56, 130, 246, 0.24) 0%, transparent 70%); }
.blob.pink   { background: radial-gradient(circle, rgba(220, 78, 158, 0.20) 0%, transparent 70%); }
section, .hero { position: relative; overflow: hidden; }
section > .container, .hero > .container { position: relative; z-index: 1; }

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 70px;
  background: var(--bg);
  text-align: center;
}
.hero .blob { width: 520px; height: 520px; }
.hero .fenix-bg {
  position: absolute; right: -80px; top: 50%; transform: translateY(-50%);
  height: 420px; opacity: 0.09; pointer-events: none;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 58px); font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.12; margin-bottom: 18px;
}
.hero h1 .gold {
  background: linear-gradient(100deg, var(--gold) 20%, var(--gold-2) 50%, var(--gold) 80%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub {
  font-size: clamp(16px, 2.4vw, 20px); color: var(--muted);
  max-width: 640px; margin: 0 auto 34px;
}
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(100deg, var(--gold), var(--gold-2));
  color: #1d1503; font-weight: 700; font-size: 16px;
  padding: 14px 30px; border-radius: 99px;
  box-shadow: 0 8px 28px rgba(217, 165, 58, 0.35);
  transition: transform 0.15s ease;
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-wsp {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--green); color: #04240f; font-weight: 700; font-size: 16px;
  padding: 14px 30px; border-radius: 99px;
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.28);
  transition: transform 0.15s ease;
}
.btn-wsp:hover { transform: translateY(-2px); }

/* ---------- Trust bar ---------- */
.trust {
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  background: var(--bg-2);
}
.trust-inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; padding: 22px 0;
}
.trust-item { display: flex; align-items: center; gap: 12px; justify-content: center; }
.trust-item .ico { font-size: 24px; }
.trust-item b { display: block; font-size: 14px; }
.trust-item span { font-size: 12.5px; color: var(--muted); }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.sec-head { text-align: center; margin-bottom: 40px; }
.sec-head .kicker {
  color: var(--gold-2); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 10px;
}
.sec-head h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 700; letter-spacing: -0.01em; }
.sec-head p { color: var(--muted); max-width: 560px; margin: 12px auto 0; font-size: 15.5px; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-direction: column; gap: 14px; align-items: center; margin-bottom: 36px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.chip {
  background: var(--card); border: 1px solid var(--card-border); color: var(--muted);
  font-size: 14px; font-weight: 500; padding: 8px 18px; border-radius: 99px;
  cursor: pointer; transition: all 0.15s ease; font-family: inherit;
}
.chip:hover { border-color: var(--gold); color: var(--text); }
.chip.active { background: var(--gold); border-color: var(--gold); color: #1d1503; font-weight: 700; }
.chip-row.cond .chip.active { background: var(--text); border-color: var(--text); color: #111; }

/* ---------- Product grid ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 18px;
}
.card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(217, 165, 58, 0.45); box-shadow: 0 12px 40px rgba(217, 165, 58, 0.08); }
.card .imgbox {
  background: linear-gradient(160deg, #ffffff, #eef0f4);
  border-radius: 12px; aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  padding: 14px; margin-bottom: 4px; overflow: hidden;
}
.card .imgbox img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  transition: transform 0.25s ease;
}
.card:hover .imgbox img { transform: scale(1.06); }
.card .top { display: flex; justify-content: space-between; align-items: center; }
.badge {
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  padding: 4px 10px; border-radius: 99px; text-transform: uppercase;
}
.badge.nuevo { background: rgba(217, 165, 58, 0.15); color: var(--gold-2); border: 1px solid rgba(217, 165, 58, 0.4); }
.badge.seminuevo { background: rgba(96, 165, 250, 0.12); color: #7cb8fb; border: 1px solid rgba(96, 165, 250, 0.35); }
.card .year { font-size: 12.5px; color: var(--muted); }
.card h3 { font-size: 18px; font-weight: 700; line-height: 1.25; }
.card .desc { font-size: 13.5px; color: var(--muted); flex-grow: 1; }
.card .colors { font-size: 12.5px; color: #8f8f98; }
.card .note { font-size: 12px; color: #d0a23f; }
.card .price { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.card .warranty { font-size: 12px; color: var(--muted); }
.card .btn-card {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; border: 1.5px solid var(--green); color: var(--green);
  font-weight: 700; font-size: 14px; padding: 10px; border-radius: 10px;
  transition: all 0.15s ease; margin-top: 4px;
}
.card .btn-card:hover { background: var(--green); color: #04240f; }
.empty-msg { text-align: center; color: var(--muted); padding: 40px 0; display: none; }

.igv-note {
  text-align: center; margin-top: 26px; font-size: 13.5px; color: var(--muted);
}
.igv-note a { color: var(--gold-2); }

/* ---------- Seminuevos strip ---------- */
.strip {
  background: linear-gradient(100deg, rgba(217, 165, 58, 0.08), rgba(90, 60, 180, 0.07));
  border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.strip .item b { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 6px; }
.strip .item p { font-size: 13.5px; color: var(--muted); }

/* ---------- Servicio técnico ---------- */
#servicio { background: var(--bg-2); border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); }
.serv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 34px; }
.serv-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 20px;
}
.serv-card .ico { font-size: 26px; margin-bottom: 10px; }
.serv-card b { display: block; font-size: 15.5px; margin-bottom: 5px; }
.serv-card p { font-size: 13.5px; color: var(--muted); }
.center { text-align: center; }

/* ---------- Tienda ---------- */
.tienda-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 34px; align-items: center; }
.tienda-fotos { display: grid; gap: 14px; }
.tienda-fotos img { border-radius: var(--radius); border: 1px solid var(--card-border); }
.tienda-info h3 { font-size: 24px; margin-bottom: 16px; }
.tienda-info .row { display: flex; gap: 12px; margin-bottom: 14px; font-size: 15px; }
.tienda-info .row .ico { flex-shrink: 0; }
.tienda-info .row span { color: var(--muted); }
.tienda-info .row b { color: var(--text); font-weight: 600; }
.maps-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 8px;
  border: 1.5px solid var(--gold); color: var(--gold-2); font-weight: 600; font-size: 14px;
  padding: 10px 22px; border-radius: 99px; transition: all 0.15s ease;
}
.maps-btn:hover { background: var(--gold); color: #1d1503; }

/* ---------- Pagos ---------- */
.pay-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.pay-pill {
  background: var(--card); border: 1px solid var(--card-border);
  padding: 10px 20px; border-radius: 99px; font-size: 14px; color: var(--muted);
}

/* ---------- Footer ---------- */
.footer { background: #07070a; border-top: 1px solid var(--card-border); padding: 46px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 34px; margin-bottom: 30px; }
.footer h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-2); margin-bottom: 14px; }
.footer p, .footer a { font-size: 14px; color: var(--muted); }
.footer .flinks { display: flex; flex-direction: column; gap: 8px; }
.footer a:hover { color: var(--gold-2); }
.footer .brandline { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer .brandline img { height: 36px; }
.legal { border-top: 1px solid var(--card-border); padding-top: 20px; text-align: center; font-size: 12.5px; color: #6b6b74; }

/* ---------- WhatsApp flotante ---------- */
.wsp-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--green); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  transition: transform 0.15s ease;
}
.wsp-float:hover { transform: scale(1.08); }
.wsp-float svg { width: 30px; height: 30px; fill: #04240f; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .trust-inner { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .trust-item { justify-content: flex-start; }
  .strip { grid-template-columns: 1fr; }
  .tienda-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero .fenix-bg { height: 300px; right: -120px; }
  section { padding: 54px 0; }
}

/* ---------- Móvil: catálogo compacto a 2 columnas ---------- */
@media (max-width: 640px) {
  .container { padding: 0 14px; }
  .hero { padding: 54px 0 46px; }
  .hero p.sub { margin-bottom: 26px; }
  .hero-ctas { flex-direction: column; align-items: stretch; padding: 0 10px; }
  .btn-primary, .btn-wsp { justify-content: center; }

  /* Filtros deslizables con el dedo */
  .filters { align-items: stretch; margin-bottom: 24px; }
  .chip-row {
    flex-wrap: nowrap; justify-content: flex-start;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 6px; margin: 0 -14px; padding-left: 14px; padding-right: 14px;
    scrollbar-width: none;
  }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; padding: 7px 15px; font-size: 13px; }

  /* Tarjetas compactas 2 por fila */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { padding: 11px; gap: 6px; border-radius: 13px; }
  .card .imgbox { border-radius: 9px; padding: 8px; aspect-ratio: 1 / 0.82; }
  .card .top { flex-wrap: wrap; gap: 3px; }
  .badge { font-size: 8.5px; padding: 3px 7px; letter-spacing: 0.05em; }
  .card .year { font-size: 10px; }
  .card h3 { font-size: 13.5px; line-height: 1.2; }
  .card .desc { font-size: 11px; line-height: 1.35; }
  .card .colors { font-size: 10px; }
  .card .note { font-size: 10px; }
  .card .price { font-size: 17.5px; }
  .card .warranty { font-size: 9.5px; }
  .card .btn-card { font-size: 11.5px; padding: 8px 4px; gap: 5px; border-radius: 8px; }
  .card .btn-card svg { width: 13px; height: 13px; }

  .sec-head h2 { font-size: 24px; }
  .sec-head { margin-bottom: 26px; }
  .serv-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .serv-card { padding: 14px; }
  .serv-card .ico { font-size: 21px; margin-bottom: 6px; }
  .serv-card b { font-size: 13.5px; }
  .serv-card p { font-size: 11.5px; }
  .pay-pill { font-size: 12.5px; padding: 8px 14px; }
  .wsp-float { width: 52px; height: 52px; right: 14px; bottom: 14px; }
  .igv-note { font-size: 12.5px; padding: 0 6px; }
}
