:root {
  --navy-900: #0a1628;
  --navy-800: #0f2036;
  --navy-700: #142a46;
  --navy-650: #17304f;
  --line: rgba(255,255,255,.10);
  --line-strong: rgba(255,255,255,.18);
  --text: #eef2f7;
  --muted: #9fb0c3;
  --accent: #fcc81e;
  --accent-ink: #1a1400;
  --verde: #8cc63e;
  --wa: #25d366;
  --radio: 16px;
  --sombra: 0 10px 30px rgba(0,0,0,.35);
  --maxw: 1120px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: var(--navy-900);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10,22,40,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.logo-chip {
  background: #fff;
  border-radius: 10px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  line-height: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.logo-chip .logo { height: 34px; width: auto; }
.main-nav {
  display: flex;
  gap: 18px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}
.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: .95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.main-nav a:hover { color: var(--text); border-bottom-color: var(--accent); }
.cart-btn {
  position: relative;
  background: var(--navy-700);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cart-count {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  min-width: 20px;
  padding: 0 6px;
  font-weight: 800;
  font-size: 12px;
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s, filter .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(1.06); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
  padding: 10px 14px;
  font-size: .9rem;
}
.btn-outline:hover { border-color: var(--accent); }
.btn-install { background: #fff; color: var(--navy-900); margin-top: 14px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1000px 500px at 80% -10%, rgba(252,200,30,.10), transparent 60%),
    radial-gradient(800px 500px at 10% 0%, rgba(29,58,95,.6), transparent 55%),
    linear-gradient(180deg, var(--navy-800), var(--navy-900));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 20px 72px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  border: 1px solid rgba(252,200,30,.35);
  border-radius: 999px;
  padding: 5px 14px;
  margin: 0 0 18px;
}
.hero-title {
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -.5px;
}
.hero-sub {
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  max-width: 640px;
  margin: 0 auto 26px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ios-hint { font-size: .9rem; color: var(--muted); margin: 14px 0 0; }

/* ---------- Secciones ---------- */
.catalogo {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 52px 16px 10px;
}
.sec-head { margin-bottom: 22px; }
.sec-head h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 4px;
  position: relative;
  display: inline-block;
}
.sec-head h2::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 8px;
}
.sec-head p { color: var(--muted); margin: 10px 0 0; }

/* ---------- Grid + Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.card {
  background: var(--navy-700);
  border: 1px solid var(--line);
  border-radius: var(--radio);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sombra);
  transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.card-foto {
  height: 190px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.card-foto img { max-height: 100%; width: auto; object-fit: contain; }
.card-foto.pendiente {
  background: var(--navy-650);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .5px;
}
.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card-tipo {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--accent);
  font-weight: 800;
}
.card-nombre { font-size: 1.1rem; font-weight: 700; margin: 0; }
.card-desc { font-size: .9rem; color: var(--muted); margin: 0; flex: 1; }
.card-precio { font-size: 1.15rem; font-weight: 800; }
.card-precio.cotizar { color: var(--accent); font-size: 1rem; }
.card-acciones { display: flex; gap: 8px; margin-top: 6px; }
.card-acciones .btn-accent,
.card-acciones .btn-wa { flex: 1; padding: 11px 10px; }

/* Existencia */
.existencia-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  margin-top: 8px;
  padding: 0;
  background: none;
  border: none;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
  text-align: left;
}
.existencia-badge.ex-info { color: var(--text); }
.existencia-badge.ex-sin { color: #ff5c5c; }
.modal-existencia { margin-top: 2px; }

.btn-wa { background: var(--wa); color: #06310f; }
.btn-wa:hover { filter: brightness(1.05); }

.estado { color: var(--muted); font-size: .9rem; margin-top: 16px; }

/* ---------- Confianza ---------- */
.confianza {
  background: var(--navy-800);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 56px;
  padding: 48px 16px;
}
.confianza-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.trust {
  background: var(--navy-700);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}
.trust-ico { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.trust h3 { font-size: 1rem; margin: 0 0 6px; }
.trust p { color: var(--muted); font-size: .88rem; margin: 0; }

/* ---------- Overlay ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(3,8,18,.6);
  backdrop-filter: blur(2px);
  z-index: 50;
}
.overlay[hidden] { display: none; }

/* ---------- Carrito ---------- */
.cart-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 92vw);
  background: var(--navy-800);
  border-left: 1px solid var(--line-strong);
  z-index: 60;
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  padding: 18px;
  overflow-y: auto;
}
.cart-panel.open { transform: translateX(0); }
.cart-head { display: flex; align-items: center; justify-content: space-between; }
.cart-head h2 { margin: 0; font-size: 1.25rem; }
.btn-x {
  background: var(--navy-700);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 9px;
}
.cart-items { flex: 1; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.cart-vacio { color: var(--muted); font-size: .95rem; padding: 24px 0; text-align: center; }
.ci {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--navy-700);
}
.ci-top { display: flex; justify-content: space-between; gap: 8px; }
.ci-nombre { font-weight: 700; font-size: .95rem; }
.ci-precio { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.ci-controls { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ci-qty-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--line-strong);
  background: var(--navy-650);
  color: var(--text);
  border-radius: 9px;
  font-size: 1.1rem; font-weight: 700; cursor: pointer;
}
.ci-qty { min-width: 28px; text-align: center; font-weight: 700; }
.ci-quitar { margin-left: auto; background: none; border: none; color: #ff8585; cursor: pointer; font-size: .85rem; }
.cart-total {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 1.2rem; padding: 14px 0; border-top: 1px solid var(--line-strong);
}
.cart-total strong { color: var(--accent); }
.cart-datos { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 14px; }
.cart-datos label { font-size: .85rem; font-weight: 600; margin-top: 6px; color: var(--muted); }
.cart-datos input {
  padding: 11px; border: 1px solid var(--line-strong); border-radius: 10px;
  font-size: 1rem; background: var(--navy-900); color: var(--text);
}
.cart-datos input::placeholder { color: #67788d; }
.btn-wa-full { background: var(--wa); color: #06310f; width: 100%; font-size: 1.05rem; padding: 14px; }
.btn-wa-full:disabled { background: #1a5b33; color: #9fc7ab; cursor: not-allowed; }
.cart-nota { font-size: .78rem; color: var(--muted); margin: 12px 0 0; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3,8,18,.7);
  backdrop-filter: blur(3px);
}
.modal.open { display: flex; }
.modal-box {
  position: relative;
  background: var(--navy-800);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: var(--sombra);
}
.modal-x { position: absolute; top: 14px; right: 14px; }
.modal-foto {
  height: 220px;
  background: #fff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  padding: 14px; margin-bottom: 14px;
}
.modal-foto img { max-height: 100%; width: auto; object-fit: contain; }
.modal-foto.pendiente { background: var(--navy-650); color: var(--muted); font-weight: 700; }
.modal-nombre { font-size: 1.35rem; margin: 6px 0 8px; }
.modal-desc { color: var(--muted); margin: 0 0 14px; }
.modal-precio { font-size: 1.3rem; font-weight: 800; margin-bottom: 16px; }
.modal-precio.cotizar { color: var(--accent); font-size: 1.1rem; }
.modal-add { width: 100%; }

/* ---------- FAB WhatsApp ---------- */
.fab-wa {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 55;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
}
.fab-wa:hover { filter: brightness(1.05); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  border-top: 1px solid var(--line);
  padding: 34px 16px 46px;
  margin-top: 0;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-brand { font-weight: 800; font-size: 1.1rem; margin: 0 0 2px; }
.footer-inner p { margin: 0; color: var(--muted); font-size: .9rem; }
.footer-contacto { display: flex; flex-direction: column; gap: 6px; }
.footer-contacto a { color: var(--text); text-decoration: none; font-size: .92rem; }
.footer-contacto a:hover { color: var(--accent); }
.legal {
  max-width: var(--maxw);
  margin: 22px auto 0;
  color: #6b7d92;
  font-size: .78rem;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 899px) {
  .header-inner { row-gap: 10px; padding: 10px 14px; }
  .header-acciones { order: 2; }
  .main-nav { order: 3; flex: 0 0 100%; justify-content: center; gap: 16px; }
  .main-nav a { font-size: .9rem; }
}
@media (min-width: 600px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .confianza-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: 1fr 1fr 1fr; }
  .confianza-grid { grid-template-columns: repeat(4, 1fr); }
  .header-inner { flex-wrap: nowrap; }
}

/* ---------- Nosotros ---------- */
.nosotros {
  max-width: var(--maxw);
  margin: 56px auto 0;
  padding: 0 16px;
}
.nosotros-inner {
  background: var(--navy-700);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  padding: 28px;
}
.nosotros-inner h2 { margin: 0 0 12px; font-size: clamp(1.3rem, 3vw, 1.8rem); }
.nosotros-inner p { color: var(--muted); margin: 0 0 10px; max-width: 760px; }
.nosotros-inner p:last-child { margin-bottom: 0; }

/* ---------- Specs en modal ---------- */
.modal-specs-wrap {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin: 0 0 14px;
}
.modal-specs-title {
  margin: 0 0 8px;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--accent);
}
.modal-specs { margin: 0; padding-left: 18px; }
.modal-specs li { color: var(--muted); font-size: .9rem; margin-bottom: 5px; }

/* ---------- Footer links ---------- */
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: var(--text); text-decoration: none; font-size: .9rem; }
.footer-links a:hover { color: var(--accent); }

/* ---------- Página legal ---------- */
.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 18px 60px;
}
.legal-page > h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 18px; }
.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 14px 16px;
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 28px;
}
.legal-toc a { color: var(--accent); text-decoration: none; font-size: .92rem; font-weight: 600; }
.legal-toc a:hover { text-decoration: underline; }
.legal-sec {
  background: var(--navy-700);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 18px;
  scroll-margin-top: 90px;
}
.legal-sec h2 {
  margin: 0 0 12px;
  font-size: 1.3rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 6px;
}
.legal-sec p { color: #cdd8e6; margin: 0 0 10px; line-height: 1.6; }
.legal-sec p:last-child { margin-bottom: 0; }
.legal-sec a { color: var(--accent); }
.legal-volver { margin-top: 24px; }
.legal-volver a { color: var(--text); text-decoration: none; font-weight: 600; }
.legal-volver a:hover { color: var(--accent); }

/* ---------- Topbar / Moneda ---------- */
.topbar {
  background: #08111f;
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tc-info { color: var(--muted); font-size: .8rem; }
.moneda-toggle {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
  flex: none;
}
.moneda-btn {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 4px 13px;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}
.moneda-btn.activo { background: var(--accent); color: var(--accent-ink); }
.moneda-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Buscador ---------- */
.buscador-sec { max-width: var(--maxw); margin: 0 auto; padding: 24px 16px 0; }
.buscador {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--navy-700);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 11px 14px;
}
.buscador:focus-within { border-color: var(--accent); }
.buscador-ico { opacity: .7; }
.buscador-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  min-width: 0;
}
.buscador-input::placeholder { color: #67788d; }
.buscador-clear {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
}
.buscador-clear:hover { color: var(--text); }
.sin-resultados { text-align: center; padding: 22px 0; }

/* ---------- Galería (miniaturas) ---------- */
.modal-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 2px; }
.modal-thumb {
  width: 58px;
  height: 58px;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}
.modal-thumb.activo { border-color: var(--accent); }
.modal-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- Header acciones ---------- */
.header-acciones { display: flex; gap: 8px; align-items: center; }

/* ---------- Panel de compra (modal) ---------- */
.card-iva { font-size: .72rem; color: var(--muted); margin-top: -2px; }

.precio-bloque { margin: 8px 0 4px; }
.precio-lista {
  color: var(--muted);
  text-decoration: line-through;
  font-size: .95rem;
}
.precio-final { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.precio-final.cotizar { color: var(--accent); font-size: 1.3rem; }
.precio-iva { font-size: .78rem; color: var(--muted); margin-top: 2px; }

.existencia-bloque { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 2px; }

.compra-acciones { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; }
.cantidad {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  flex: none;
}
.cant-btn {
  width: 40px; height: 44px;
  background: var(--navy-650);
  color: var(--text);
  border: none;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
}
.cant-input {
  width: 46px; height: 44px;
  text-align: center;
  background: var(--navy-900);
  color: var(--text);
  border: none;
  border-left: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  font-size: 1rem;
  font-weight: 700;
}
.compra-acciones .modal-add { flex: 1; }

.compra-sec { display: flex; gap: 10px; margin-bottom: 14px; }
.btn-icono {
  flex: 1;
  background: var(--navy-700);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 10px;
  padding: 10px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-icono:hover { border-color: var(--accent); }
.btn-icono.activo { border-color: #ff6b6b; color: #ff8585; }
.btn-icono.activo .fav-ico { color: #ff6b6b; }

.ci-ver {
  background: var(--navy-650);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
}
.ci-ver:hover { border-color: var(--accent); }
