/* ==========================================================================
   BlueNetworks — Tienda Privada Partner Gold Hikvision + Soluciones (v4)
   Diseño Moderno Storefront (Costa Verde Editorial + Acento Hikvision #D71920)
   ========================================================================== */
:root {
  --bn-marino: #0b1b34;
  --bn-marino-soft: #132a52;
  --bn-confianza: #1d4ed8;
  --bn-accion: #0284c7;
  --hik-red: #d71920;
  --hik-red-dark: #b91c1c;
  --hik-red-soft: #fef2f2;
  --bn-superficie: #faf9f6;
  --bn-stage: #f6f8fb;
  --bn-borde: rgba(11, 27, 52, 0.11);
  --bn-borde-soft: rgba(11, 27, 52, 0.07);
  --bn-texto: #0b1b34;
  --bn-muted: #475569;
  --bn-wa: #15803d;
  --bn-wa-hover: #166534;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 12px rgba(11, 27, 52, 0.05);
  --shadow-md: 0 16px 38px rgba(11, 27, 52, 0.10);
  --shadow-lg: 0 24px 56px rgba(11, 27, 52, 0.16);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; overflow-x: clip;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--bn-texto); background: #ffffff; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: "Plus Jakarta Sans", "Inter", sans-serif; color: var(--bn-marino); letter-spacing: -0.022em; }
a { color: var(--bn-confianza); }
img { max-width: 100%; display: block; }
.container { width: min(1280px, calc(100% - 32px)); margin: 0 auto; }

/* ===== BARRA DE PRUEBAS LOCAL ===== */
.local-demo-bar { background: #071021; color: #e2e8f0; font-size: 0.76rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.local-demo-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; }
.local-demo-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.demo-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; text-decoration: none;
  background: rgba(255,255,255,.1); color: #f8fafc; border: 1px solid rgba(255,255,255,.18);
}
.demo-pill:hover, .demo-pill.is-active { background: var(--bn-confianza); border-color: #60a5fa; color: #fff; }
.demo-pill--home { background: rgba(21,128,61,.3); border-color: rgba(74,222,128,.45); }

/* ===== TOP BAR DELGADA PARTNER GOLD ===== */
.store-top-strip { background: var(--bn-marino); color: #cbd5e1; font-size: 0.77rem; border-bottom: 2px solid var(--hik-red); }
.store-top-strip-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.hik-gold-pill { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: #f8fafc; }
.hik-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hik-red); box-shadow: 0 0 0 3px rgba(215,25,32,.3); }
.store-top-links { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.store-top-links a { color: #cbd5e1; text-decoration: none; font-weight: 600; }
.store-top-links a:hover { color: #ffffff; }

/* ===== HEADER MODERNO CON MEGA-MENÚ ===== */
.portal-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bn-borde);
}
.portal-header-inner { display: flex; align-items: center; gap: 10px; padding: 10px 0; position: relative; }
.portal-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.portal-brand img { height: 28px; width: auto; }
.portal-brand-badge { display: inline-flex; flex-direction: column; border-left: 2px solid var(--hik-red); padding-left: 8px; line-height: 1.1; }
.portal-brand-badge strong { font-size: 0.82rem; color: var(--bn-marino); font-weight: 800; }
.portal-brand-badge span { font-size: 0.64rem; color: var(--hik-red); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }

/* Navegación + Mega-Menús */
.store-nav { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; flex-shrink: 0; }
.nav-item { position: relative; }
.nav-trigger, .nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 9px; border-radius: 999px; border: 0; background: transparent;
  font-family: inherit; font-size: 0.82rem; font-weight: 700; color: var(--bn-marino);
  text-decoration: none; cursor: pointer; transition: 0.15s ease; white-space: nowrap;
}
.nav-trigger:hover, .nav-link:hover { background: var(--bn-stage); color: var(--bn-confianza); }
.mega-drop {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 100;
  background: #ffffff; border: 1px solid var(--bn-borde); border-radius: 18px;
  box-shadow: var(--shadow-lg); padding: 20px 22px; min-width: 720px;
}
.mega-drop--narrow { min-width: 340px; padding: 14px 16px; }
.nav-item:hover .mega-drop, .nav-item:focus-within .mega-drop, .nav-item.is-open .mega-drop { display: block; }
.mega-cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mega-col h4 {
  margin: 0 0 10px; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--hik-red-dark); padding-bottom: 6px; border-bottom: 1px solid var(--bn-borde-soft);
}
.mega-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mega-list a {
  display: block; padding: 6px 8px; border-radius: 9px; text-decoration: none;
  color: var(--bn-marino); font-size: 0.82rem; font-weight: 700; line-height: 1.25;
}
.mega-list a small { display: block; font-size: 0.73rem; font-weight: 500; color: var(--bn-muted); margin-top: 1px; }
.mega-list a:hover { background: #eff6ff; color: var(--bn-confianza); }
.mega-foot {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--bn-borde-soft);
  display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--bn-muted);
}
.mega-foot a { font-weight: 700; text-decoration: none; }

.header-search {
  flex: 1 1 160px; min-width: 135px; max-width: 280px; display: flex; align-items: center;
  background: var(--bn-stage); border: 1.5px solid #cbd5e1; border-radius: 999px;
  padding: 2px 3px 2px 12px; transition: 0.15s ease;
}
.header-search:focus-within { background: #fff; border-color: var(--bn-confianza); box-shadow: 0 0 0 3px rgba(29,78,216,.12); }
.header-search input { flex: 1; border: 0; background: transparent; font-family: inherit; font-size: 0.82rem; color: var(--bn-marino); outline: none; min-width: 0; }
.header-search button { border: 0; background: var(--bn-marino); color: #fff; font-weight: 700; font-size: 0.76rem; padding: 6px 12px; border-radius: 999px; cursor: pointer; flex-shrink: 0; }
.header-search button:hover { background: var(--hik-red); }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; font-family: inherit;
  font-weight: 700; font-size: 0.82rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: 0.16s ease; white-space: nowrap;
}
.btn-primary { background: var(--bn-confianza); color: #fff !important; border-color: var(--bn-confianza); }
.btn-primary:hover { background: var(--bn-marino); border-color: var(--bn-marino); }
.btn-hik { background: var(--hik-red); color: #fff !important; border-color: var(--hik-red); }
.btn-hik:hover { background: var(--hik-red-dark); border-color: var(--hik-red-dark); }
.btn-outline { background: #fff; color: var(--bn-marino) !important; border-color: #cbd5e1; }
.btn-outline:hover { background: var(--bn-stage); border-color: #94a3b8; }
.btn-wa { background: var(--bn-wa); color: #fff !important; border-color: var(--bn-wa); }
.btn-wa:hover { background: var(--bn-wa-hover); }
.btn-soft { background: #eff6ff; color: #1e40af !important; border-color: #bfdbfe; }
.btn-soft:hover { background: #dbeafe; }

.cart-btn { background: var(--bn-marino); color: #fff !important; }
.cart-btn:hover { background: var(--bn-confianza); }
.cart-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px;
  padding: 0 5px; border-radius: 999px; background: var(--hik-red); color: #fff; font-size: 0.72rem; font-weight: 800;
}
.tier-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700; background: #dcfce7; color: #166534; border: 1px solid #86efac; white-space: nowrap;
}
.tier-chip--pending { background: #fef3c7; color: #92400e; border-color: #fcd34d; }

/* ===== LANDING PRIVADA MODERNA (INVITADOS SIN SESIÓN APROBADA) ===== */
.landing-hero {
  background:
    radial-gradient(circle at 86% 14%, rgba(215, 25, 32, 0.06) 0%, rgba(255,255,255,0) 42%),
    radial-gradient(circle at 10% 80%, rgba(29, 78, 216, 0.06) 0%, rgba(255,255,255,0) 46%),
    linear-gradient(180deg, #faf9f6 0%, #ffffff 100%);
  border-bottom: 1px solid var(--bn-borde);
  padding: 36px 0 40px;
}
.landing-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr); gap: 36px; align-items: center; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 800; background: var(--hik-red-soft); color: var(--hik-red-dark);
  border: 1px solid #fecaca; margin-bottom: 14px;
}
.landing-hero h1 { margin: 0 0 12px; font-size: clamp(1.9rem, 3.4vw, 2.85rem); line-height: 1.09; }
.landing-lead { margin: 0 0 22px; font-size: 1.02rem; color: #334155; max-width: 56ch; }
.trust-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.trust-pill {
  background: #ffffff; border: 1px solid var(--bn-borde); border-radius: 14px; padding: 12px 13px;
  box-shadow: var(--shadow-sm);
}
.trust-pill strong { display: block; font-size: 0.9rem; color: var(--bn-marino); margin-bottom: 2px; }
.trust-pill span { font-size: 0.76rem; color: var(--bn-muted); line-height: 1.35; display: block; }

.login-hero-card {
  background: #ffffff; border: 1px solid var(--bn-borde); border-top: 4px solid var(--hik-red);
  border-radius: 22px; padding: 26px 28px; box-shadow: var(--shadow-lg);
}
.login-hero-card h2 { margin: 0 0 4px; font-size: 1.25rem; }
.login-hero-card p { margin: 0 0 16px; font-size: 0.86rem; color: var(--bn-muted); }

/* ===== LEYENDA PERMANENTE DE PRECIOS DE REFERENCIA ===== */
.price-legend-bar {
  background: #eff6ff; border-bottom: 1px solid #bfdbfe; color: #1e3a8a;
  font-size: 0.81rem; padding: 9px 0;
}
.price-legend-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

/* ===== DEPARTAMENTOS VISUALES ESTILO TIENDA MODERNA ===== */
.cat-shelf { background: #ffffff; border-bottom: 1px solid var(--bn-borde-soft); padding: 26px 0 28px; }
.cat-shelf-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.cat-shelf-head h2 { margin: 0; font-size: 1.22rem; }
.cat-cards-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.cat-tile {
  background: var(--bn-stage); border: 1px solid transparent; border-radius: 16px;
  padding: 13px 10px; text-decoration: none; display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: 7px; transition: 0.18s ease;
}
.cat-tile:hover, .cat-tile.is-active {
  background: #ffffff; border-color: var(--hik-red); box-shadow: var(--shadow-md); transform: translateY(-2px);
}
.cat-tile-img {
  width: 72px; height: 58px; background: #ffffff; border-radius: 12px; padding: 6px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(11,27,52,.05);
}
.cat-tile-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cat-tile strong { font-size: 0.78rem; color: var(--bn-marino); line-height: 1.2; }
.cat-tile span { font-size: 0.7rem; color: var(--bn-muted); font-weight: 700; }

/* ===== ESCAPARATE BLOQUEADO (LANDING) ===== */
.locked-showcase { background: var(--bn-superficie); padding: 38px 0; border-bottom: 1px solid var(--bn-borde); }
.locked-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.locked-card {
  background: #ffffff; border: 1px solid var(--bn-borde); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.locked-card-media { aspect-ratio: 4/3; background: var(--bn-stage); padding: 18px; display: flex; align-items: center; justify-content: center; }
.locked-card-media img { max-height: 100%; max-width: 100%; object-fit: contain; }
.locked-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.locked-pill {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  background: var(--bn-stage); border-radius: 10px; padding: 8px 10px; font-size: 0.76rem; color: var(--bn-muted);
}

/* ===== MODO TIENDA COMPLETO (USUARIOS REGISTRADOS Y APROBADOS) ===== */
.catalog-layout {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 26px;
  padding: 24px 0 46px; align-items: start; background: #ffffff;
}
.filters-panel {
  background: var(--bn-superficie); border: 1px solid var(--bn-borde);
  border-radius: 18px; padding: 18px; position: sticky; top: 82px;
}
.filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--bn-borde-soft); }
.filters-head h2 { margin: 0; font-size: 0.95rem; }
.filters-clear { font-size: 0.78rem; font-weight: 700; text-decoration: none; }
.filter-group { margin-bottom: 12px; }
.filter-group label { display: block; font-size: 0.73rem; font-weight: 700; color: var(--bn-marino); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.filter-group select, .filter-group input[type="text"] {
  width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid #cbd5e1;
  background: #ffffff; font-family: inherit; font-size: 0.84rem; color: var(--bn-marino);
}
.filter-check { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: #334155; margin: 7px 0; cursor: pointer; }

.results-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.results-count { font-size: 0.9rem; color: var(--bn-muted); }
.results-count strong { color: var(--bn-marino); }

.products-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.prod-card {
  background: #ffffff; border: 1px solid var(--bn-borde); border-radius: 18px;
  overflow: hidden; display: flex; flex-direction: column; transition: 0.2s ease;
}
.prod-card:hover { transform: translateY(-3px); border-color: #93c5fd; box-shadow: var(--shadow-md); }
.prod-media {
  position: relative; aspect-ratio: 4 / 3; background: var(--bn-stage);
  padding: 18px; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.prod-media img { max-height: 100%; max-width: 100%; object-fit: contain; transition: transform 0.25s ease; }
.prod-card:hover .prod-media img { transform: scale(1.04); }
.prod-badges-top { position: absolute; top: 10px; left: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 7px; font-size: 0.68rem; font-weight: 700; }
.badge-fam { background: #ffffff; color: #1e40af; border: 1px solid #dbeafe; }
.badge-pdf { background: var(--hik-red-soft); color: var(--hik-red-dark); border: 1px solid #fecaca; }
.badge-tech { background: #f1f5f9; color: #334155; }

.prod-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; gap: 7px; }
.prod-sku { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; font-weight: 700; color: var(--hik-red-dark); }
.prod-title { margin: 0; font-size: 0.92rem; line-height: 1.34; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-title a { color: var(--bn-marino); text-decoration: none; }
.prod-title a:hover { color: var(--bn-confianza); }
.prod-attrs { display: flex; flex-wrap: wrap; gap: 5px; }
.attr-pill { font-size: 0.7rem; padding: 2px 7px; border-radius: 6px; background: var(--bn-stage); color: #334155; font-weight: 600; }

.prod-price-box { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--bn-borde-soft); }
.price-live { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.price-amount { font-family: "Plus Jakarta Sans", sans-serif; font-size: 1.32rem; font-weight: 800; color: var(--bn-marino); }
.price-iva { font-size: 0.71rem; color: var(--bn-muted); font-weight: 600; }
.price-ref-note { font-size: 0.69rem; color: #64748b; margin-top: 2px; }
.price-consult { font-size: 0.84rem; font-weight: 800; color: #0369a1; }
.stock-line { font-size: 0.74rem; font-weight: 600; margin-top: 3px; }
.stock-amplio, .stock-disponible { color: #15803d; }
.stock-pocas { color: #b45309; }
.stock-bajo_pedido, .stock-consultar { color: #64748b; }
.prod-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 9px; }
.prod-actions .btn { padding: 8px 12px; font-size: 0.8rem; }

/* ===== SOLUCIONES BLUENETWORKS ===== */
.solutions-showcase { background: var(--bn-superficie); border-top: 1px solid var(--bn-borde); padding: 48px 0 54px; }
.sol-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.sol-head h2 { margin: 6px 0 6px; font-size: clamp(1.45rem, 2.5vw, 1.95rem); }
.sol-head p { margin: 0; color: #475569; max-width: 62ch; font-size: 0.94rem; }
.sol-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 30px; }
.sol-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sol-card { background: #ffffff; border: 1px solid var(--bn-borde); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: 0.18s ease; }
.sol-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #93c5fd; }
.sol-card-img { aspect-ratio: 16 / 10; overflow: hidden; background: #0b1b34; }
.sol-card-img img { width: 100%; height: 100%; object-fit: cover; }
.sol-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; gap: 6px; }
.sol-tag { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--hik-red-dark); }
.sol-tag--blue { color: var(--bn-confianza); }
.sol-card h3 { margin: 0; font-size: 1rem; line-height: 1.28; }
.sol-card p { margin: 0; font-size: 0.85rem; color: #475569; line-height: 1.48; }
.sol-card-links { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.81rem; font-weight: 700; }
.sol-card-links a { text-decoration: none; }
.sol-card-links a:hover { text-decoration: underline; }

/* ===== FORMULARIOS, LEGAL, DETAIL, CARRITO, FOOTER ===== */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 26px; }
.page-link { padding: 8px 13px; border-radius: 10px; background: #fff; border: 1px solid var(--bn-borde); color: var(--bn-marino); font-weight: 700; font-size: 0.84rem; text-decoration: none; }
.page-link.is-active, .page-link:hover { background: var(--bn-confianza); border-color: var(--bn-confianza); color: #fff; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.83rem; color: var(--bn-muted); padding: 18px 0 12px; }
.breadcrumb a { color: var(--bn-confianza); text-decoration: none; font-weight: 600; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 30px; background: #fff; border: 1px solid var(--bn-borde); border-radius: 22px; padding: 28px; box-shadow: var(--shadow-sm); }
.detail-gallery-main { aspect-ratio: 4/3; background: var(--bn-stage); border-radius: 16px; padding: 22px; display: flex; align-items: center; justify-content: center; }
.detail-gallery-main img { max-height: 100%; max-width: 100%; object-fit: contain; }
.detail-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.detail-thumb { width: 64px; height: 64px; padding: 4px; border-radius: 10px; border: 1px solid var(--bn-borde); background: #fff; cursor: pointer; }
.detail-thumb img { width: 100%; height: 100%; object-fit: contain; }
.specs-card, .legal-doc { margin: 24px auto 48px; background: #fff; border: 1px solid var(--bn-borde); border-radius: 20px; padding: 28px 32px; }
.legal-doc { max-width: 880px; }
.legal-doc h2 { font-size: 1.15rem; margin-top: 22px; }
.specs-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.specs-table tr { border-bottom: 1px solid var(--bn-borde-soft); }
.specs-table th { text-align: left; padding: 10px 12px 10px 0; color: var(--bn-muted); width: 34%; font-weight: 600; }
.specs-table td { padding: 10px 0; color: var(--bn-marino); font-weight: 500; }

.auth-wrap { max-width: 680px; margin: 32px auto 56px; background: #fff; border: 1px solid var(--bn-borde); border-radius: 22px; padding: 30px 32px; box-shadow: var(--shadow-md); }
.steps-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 20px; }
.step-mini { background: var(--bn-stage); border: 1px solid var(--bn-borde-soft); border-radius: 12px; padding: 11px 12px; font-size: 0.78rem; color: #334155; }
.step-mini strong { display: block; color: var(--bn-marino); font-size: 0.81rem; margin-bottom: 2px; }
.form-grid { display: grid; gap: 13px; }
.form-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field label { display: block; font-size: 0.81rem; font-weight: 700; color: var(--bn-marino); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border-radius: 11px; border: 1px solid #cbd5e1;
  background: var(--bn-stage); font-family: inherit; font-size: 0.9rem; color: var(--bn-marino);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: #fff; border-color: var(--bn-confianza); box-shadow: 0 0 0 3px rgba(29,78,216,.12); }
.alert { padding: 12px 15px; border-radius: 12px; font-size: 0.87rem; margin-bottom: 16px; }
.alert-err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.hero-status-card { background: #fff; border: 1px solid var(--bn-borde); border-radius: 14px; padding: 15px 16px; }

/* Drawer Carrito */
.drawer-backdrop { display: none; position: fixed; inset: 0; z-index: 120; background: rgba(11,27,52,.45); }
.drawer-backdrop.is-open { display: block; }
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: #fff; z-index: 130; transform: translateX(100%); transition: transform 0.22s ease; display: flex; flex-direction: column; box-shadow: -12px 0 36px rgba(11,27,52,.18); }
.cart-drawer.is-open { transform: translateX(0); }
.drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--bn-borde); display: flex; align-items: center; justify-content: space-between; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-foot { padding: 16px 20px; border-top: 1px solid var(--bn-borde); background: var(--bn-superficie); }
.cart-item-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--bn-borde-soft); }
.cart-item-row img { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--bn-borde-soft); border-radius: 8px; padding: 4px; }
.qty-box { display: inline-flex; align-items: center; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; }
.qty-box button { border: 0; background: var(--bn-stage); width: 26px; height: 26px; cursor: pointer; font-weight: 700; }
.qty-box span { min-width: 28px; text-align: center; font-size: 0.84rem; font-weight: 700; }

/* ===== WIDGET DE CHAT EN VIVO (CONECTADO A ADMIN, TELEGRAM Y BLINK+) ===== */
.chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 110;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 18px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--bn-marino); color: #ffffff; font-family: inherit;
  font-weight: 700; font-size: 0.88rem; box-shadow: 0 12px 30px rgba(11, 27, 52, 0.28);
  transition: 0.18s ease;
}
.chat-fab:hover { background: var(--hik-red); transform: translateY(-2px); }
.chat-fab-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; }
.chat-panel {
  display: none; position: fixed; right: 20px; bottom: 78px; z-index: 115;
  width: min(370px, calc(100vw - 24px)); max-height: 540px;
  background: #ffffff; border: 1px solid var(--bn-borde); border-radius: 20px;
  box-shadow: var(--shadow-lg); overflow: hidden; flex-direction: column;
}
.chat-panel.is-open { display: flex; }
.chat-head {
  background: var(--bn-marino); color: #ffffff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.chat-head strong { display: block; font-size: 0.92rem; }
.chat-head span { font-size: 0.74rem; color: #93c5fd; }
.chat-close { background: rgba(255,255,255,.14); border: 0; color: #fff; border-radius: 8px; padding: 4px 10px; cursor: pointer; font-weight: 700; }
.chat-messages { flex: 1; overflow-y: auto; padding: 14px; background: var(--bn-stage); display: flex; flex-direction: column; gap: 9px; min-height: 220px; max-height: 310px; }
.chat-msg { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 0.83rem; line-height: 1.42; }
.chat-msg--client { align-self: flex-end; background: var(--bn-confianza); color: #ffffff; border-bottom-right-radius: 4px; }
.chat-msg--agent, .chat-msg--bot { align-self: flex-start; background: #ffffff; color: var(--bn-marino); border: 1px solid var(--bn-borde); border-bottom-left-radius: 4px; }
.chat-msg small { display: block; font-size: 0.68rem; opacity: 0.75; margin-bottom: 2px; font-weight: 700; }
.chat-quick-row { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 12px; background: #ffffff; border-top: 1px solid var(--bn-borde-soft); }
.chat-quick-btn { font-size: 0.72rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; border: 1px solid #cbd5e1; background: var(--bn-stage); color: var(--bn-marino); cursor: pointer; }
.chat-quick-btn:hover { border-color: var(--bn-confianza); background: #eff6ff; }
.chat-form { padding: 10px 12px; background: #ffffff; border-top: 1px solid var(--bn-borde-soft); display: grid; gap: 7px; }
.chat-form input { padding: 8px 10px; border-radius: 9px; border: 1px solid #cbd5e1; font-family: inherit; font-size: 0.82rem; }
.chat-input-row { display: flex; gap: 6px; }
.chat-input-row input { flex: 1; }

/* ===== FOOTER COMPLETO CON LEGALES (DESPEJADO PARA BOTÓN CHAT) ===== */
.portal-footer { background: var(--bn-marino); color: #cbd5e1; padding: 40px 0 82px; }
.portal-footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.12); }
.portal-footer h4 { color: #ffffff; margin: 0 0 10px; font-size: 0.88rem; }
.portal-footer a { color: #93c5fd; text-decoration: none; font-size: 0.84rem; }
.portal-footer a:hover { text-decoration: underline; }
.portal-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 16px; font-size: 0.78rem; color: #94a3b8; }

@media (max-width: 1120px) {
  .cat-cards-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .products-grid, .locked-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sol-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mega-drop { min-width: 560px; }
}
@media (max-width: 900px) {
  .landing-grid, .catalog-layout, .detail-grid { grid-template-columns: 1fr; }
  .sol-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-header-inner { flex-wrap: wrap; gap: 8px; }
  .store-nav { order: 3; width: 100%; flex-wrap: wrap; overflow: visible; gap: 4px; }
  .store-nav .nav-trigger, .store-nav .nav-link { padding: 6px 8px; font-size: 0.79rem; }
  .mega-drop { position: fixed; left: 12px; right: 12px; min-width: 0; max-height: 70vh; overflow-y: auto; }
  .mega-cols-3 { grid-template-columns: 1fr; }
  .header-search { order: 4; max-width: 100%; width: 100%; }
  .filters-panel { position: static; }
  .portal-footer-grid { grid-template-columns: 1fr 1fr; }
  .trust-pills, .form-two, .steps-mini { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .store-top-links { display: none; }
  .cat-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .products-grid, .locked-grid, .sol-grid-3, .sol-grid-4, .portal-footer-grid { grid-template-columns: 1fr; }
  .portal-brand-badge { display: none; }
  .header-actions { flex-wrap: wrap; width: 100%; margin-left: 0; gap: 6px; }
  .header-actions .btn { padding: 7px 11px; font-size: 0.78rem; }
  .header-actions .cart-btn { margin-left: auto; }
  .chat-fab { right: 14px; bottom: 14px; padding: 10px 14px; font-size: 0.82rem; }
}
