/* ══════════════════════════════════════════════════════
   HIKVISION STORE ZAPOPAN — Estilos
   Basado en SERVITEG con extensiones para login,
   panel admin, cupones, Hot Sale y checkout
   ══════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --navy:    #1a1a1a;
  --blue:    #c00000;
  --accent:  #e40000;
  --bright:  #ff4444;
  --white:   #ffffff;
  --gray-50: #f8fafc;
  --gray-100:#f0f4f8;
  --gray-200:#e2e8f0;
  --gray-400:#94a3b8;
  --gray-600:#475569;
  --gray-800:#1e293b;
  --green:   #16a34a;
  --red:     #dc2626;
  --orange:  #ea580c;
  --hotsale: #e40000;

  --font-display: 'Inter', sans-serif;
  --font-body:    'Inter', sans-serif;
  --radius:    6px;
  --radius-lg: 12px;
  --shadow:    0 2px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ── Contenedor ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }

/* ══════════════════════════════════════════════════════
   HOT SALE BAR
   ══════════════════════════════════════════════════════ */
.hotsale-bar {
  background: var(--hotsale);
  color: white;
  text-align: center;
  padding: .5rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .02em;
}

/* ══════════════════════════════════════════════════════
   TOPBAR
   ══════════════════════════════════════════════════════ */
.topbar { /* navy background */
  background: var(--navy);
  color: rgba(255,255,255,.7);
  font-size: .8rem;
  padding: .4rem 0;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.topbar-links { display: flex; gap: 1rem; }
.topbar-links a { color: rgba(255,255,255,.7); }
.topbar-links a:hover { color: white; text-decoration: none; }

/* ══════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════ */
.main-header { border-bottom: 3px solid var(--accent);
  background: white;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-lg);
}
.header-inner {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
}
.logo { color: var(--navy);
  display: flex; align-items: center; gap: .6rem;
  color: white; font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 800;
  text-decoration: none; white-space: nowrap;
}
.logo-img { height: 45px; width: auto; object-fit: contain; }
.logo:hover { text-decoration: none; opacity: .9; }

/* Búsqueda */
.search-form { display: flex; gap: 0; width: 100%; min-width: 0; }
.search-input {
  flex: 1; padding: .6rem 1rem;
  border: none; border-radius: var(--radius) 0 0 var(--radius);
  font-size: .95rem; outline: none;
  min-width: 0;
}
.search-btn {
  background: var(--accent); color: white;
  border: none; padding: .6rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer; font-size: 1rem;
}
.search-btn:hover { background: var(--bright); }

/* Acciones header */
.header-actions { display: flex; align-items: center; gap: .5rem; }
.btn-cuenta {
  color: var(--gray-600); font-size: .85rem;
  display: flex; align-items: center; gap: .3rem;
  padding: .4rem .7rem; border-radius: var(--radius);
}
.btn-cuenta:hover { color: white; background: rgba(255,255,255,.1); text-decoration: none; }
.btn-wa-header {
  background: #25d366; color: white;
  padding: .5rem 1rem; border-radius: var(--radius);
  font-weight: 700; font-size: .85rem;
  white-space: nowrap;
}
.btn-wa-header:hover { background: #128c7e; text-decoration: none; }
.cart-trigger {
  background: none; border: 2px solid var(--gray-200);
  color: var(--navy); padding: .4rem .8rem;
  border-radius: var(--radius); cursor: pointer;
  font-size: .95rem; position: relative;
}
.cart-trigger:hover { border-color: white; }
.cart-badge {
  background: var(--hotsale); color: white;
  border-radius: 50%; padding: 0 .35rem;
  font-size: .7rem; font-weight: 700;
  display: none;
}
.cart-badge.show { display: inline; }

/* ══════════════════════════════════════════════════════
   NAV CATEGORÍAS
   ══════════════════════════════════════════════════════ */
.cat-nav {
  background: #1a1a1a;
  overflow-x: scroll;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
.cat-nav::-webkit-scrollbar { height: 3px; }
.cat-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }
.cat-nav-inner { display: flex; padding: 0 1rem; width: max-content; min-width: 100%; }
.cat-nav-item {
  color: rgba(255,255,255,.7);
  padding: .7rem 1rem;
  font-size: .85rem; font-weight: 600;
  display: inline-block;
  border-bottom: 2px solid transparent;
  transition: all .2s;
}
.cat-nav-item:hover, .cat-nav-item.active {
  color: white; border-bottom-color: var(--bright);
  text-decoration: none;
}

/* ══════════════════════════════════════════════════════
   CONTENIDO PRINCIPAL
   ══════════════════════════════════════════════════════ */
.main-content { min-height: calc(100vh - 300px); }

/* ══════════════════════════════════════════════════════
   LAYOUT TIENDA
   ══════════════════════════════════════════════════════ */
.store-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
}

/* Sidebar */
.sidebar {
  position: sticky; top: 120px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}
.sidebar-section { margin-bottom: 1.5rem; }
.sidebar-title {
  font-weight: 700; font-size: .75rem;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--gray-400); margin-bottom: .5rem;
  padding: 0 .75rem;
}
.sidebar-item {
  display: block; padding: .45rem .75rem;
  border-radius: var(--radius); font-size: .9rem;
  color: var(--gray-600); transition: all .15s;
}
.sidebar-item:hover { background: var(--gray-100); color: var(--navy); text-decoration: none; }
.sidebar-item.active { background: var(--accent); color: white; font-weight: 600; }
.sidebar-subitem { padding-left: 1.5rem; font-size: .85rem; }

/* ══════════════════════════════════════════════════════
   GRID DE PRODUCTOS
   ══════════════════════════════════════════════════════ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.product-card {
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.product-card > a { display: block; text-decoration: none; color: inherit; }
.product-card-img {
  width: 100%; height: 180px; object-fit: contain;
  padding: .75rem; background: white;
}
.product-card-img-placeholder {
  height: 180px; display: flex; align-items: center;
  justify-content: center; font-size: 3rem;
  color: var(--gray-200); background: var(--gray-50);
}
.product-card-body { padding: .75rem; }
.product-card-brand {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  color: var(--accent); letter-spacing: .05em; margin-bottom: .2rem;
}
.product-card-name {
  font-size: .85rem; font-weight: 600; color: var(--navy);
  line-height: 1.3; margin-bottom: .3rem;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.product-card-model { font-size: .75rem; color: var(--gray-400); margin-bottom: .4rem; }
.product-card-price { font-size: 1rem; font-weight: 800; color: var(--navy); }
.product-card-price-original {
  font-size: .8rem; color: var(--gray-400);
  text-decoration: line-through; margin-right: .4rem;
}
.product-card-price-hotsale { color: var(--hotsale); }
.product-card-stock { font-size: .75rem; margin-top: .3rem; font-weight: 600; }
.stock-yes { color: var(--green); }
.stock-no  { color: var(--red); }
.btn-card {
  width: 100%; padding: .5rem;
  background: var(--accent); color: white;
  border: none; border-radius: var(--radius);
  font-weight: 700; font-size: .82rem;
  cursor: pointer; margin-top: .5rem;
}
.btn-card:hover { background: var(--blue); }
.btn-card:disabled { background: var(--gray-200); color: var(--gray-400); cursor: not-allowed; }

/* ══════════════════════════════════════════════════════
   PRECIO CON DESCUENTO
   ══════════════════════════════════════════════════════ */
.precio-usuario { color: var(--green); font-weight: 800; }
.precio-badge {
  background: var(--hotsale); color: white;
  font-size: .65rem; font-weight: 700;
  padding: .1rem .4rem; border-radius: 20px;
  vertical-align: middle; margin-left: .3rem;
}

/* ══════════════════════════════════════════════════════
   PÁGINA DE PRODUCTO
   ══════════════════════════════════════════════════════ */
.product-page { display: grid; grid-template-columns: 1fr; gap: 2rem; padding: 1.5rem 0; }
.product-top  { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.product-gallery { position: sticky; top: 120px; }
.gallery-main {
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 1rem;
  display: flex; align-items: center; justify-content: center;
  min-height: 350px;
}
.gallery-main img { max-height: 320px; object-fit: contain; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.gallery-thumb {
  width: 64px; height: 64px;
  border: 2px solid var(--gray-200); border-radius: var(--radius);
  padding: .25rem; cursor: pointer; overflow: hidden;
}
.gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }

.product-info { display: flex; flex-direction: column; gap: 1rem; }
.product-brand-row { display: flex; align-items: center; gap: .75rem; }
.product-brand-name { font-weight: 800; color: var(--accent); font-size: .9rem; text-transform: uppercase; }
.product-brand.logo { color: var(--navy); height: 30px; object-fit: contain; }
.product-title { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--navy); line-height: 1.2; }
.product-model { font-size: .85rem; color: var(--gray-400); }
.product-warranty { font-size: .85rem; color: var(--green); font-weight: 600; }

.product-price-box {
  background: var(--gray-100); border-radius: var(--radius-lg);
  padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem;
}
.product-price-main { font-family: var(--font-display); font-size: 2rem; font-weight: 900; color: var(--navy); }
.product-price-usuario { font-size: 1.1rem; color: var(--green); font-weight: 700; }
.product-price-note { font-size: .8rem; color: var(--gray-400); }
.product-stock-badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem .75rem; border-radius: 20px;
  font-size: .82rem; font-weight: 700;
}
.product-stock-badge.yes { background: #dcfce7; color: var(--green); }
.product-stock-badge.no  { background: #fee2e2; color: var(--red); }

.product-actions { display: flex; flex-direction: column; gap: .75rem; }
.qty-row { display: flex; align-items: center; gap: .75rem; }
.qty-label { font-size: .9rem; color: var(--gray-600); }
.qty-control { display: flex; align-items: center; border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.qty-btn { background: var(--gray-100); border: none; padding: .4rem .8rem; font-size: 1.1rem; cursor: pointer; }
.qty-btn:hover { background: var(--gray-200); }
.qty-input { width: 50px; border: none; text-align: center; font-size: .95rem; padding: .4rem 0; }

.btn-primary {
  background: var(--accent); color: white;
  padding: .75rem 1.5rem; border: none;
  border-radius: var(--radius); font-weight: 700;
  font-size: 1rem; cursor: pointer; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
}
.btn-primary:hover { background: var(--blue); text-decoration: none; }
.btn-primary:disabled { background: var(--gray-200); color: var(--gray-400); cursor: not-allowed; }

.btn-whatsapp {
  background: #25d366; color: white;
  padding: .75rem 1.5rem; border-radius: var(--radius);
  font-weight: 700; font-size: 1rem; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  border: none; cursor: pointer;
}
.btn-whatsapp:hover { background: #128c7e; text-decoration: none; }

.btn-secondary {
  background: white; color: var(--gray-600);
  border: 1px solid var(--gray-200);
  padding: .6rem 1.2rem; border-radius: var(--radius);
  cursor: pointer; font-size: .9rem; width: 100%;
}
.btn-secondary:hover { background: var(--gray-100); }

/* Secciones de producto */
.product-sections { display: flex; flex-direction: column; gap: 1rem; }
.product-section { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }
.product-section-title {
  background: var(--gray-100); padding: .75rem 1.25rem;
  font-weight: 700; font-size: .9rem; color: var(--navy);
  border-bottom: 1px solid var(--gray-200);
}
.product-section-body { padding: 1.25rem; }
.specs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.spec-item { background: var(--gray-50); padding: .6rem .75rem; border-radius: var(--radius); }
.spec-label { font-size: .72rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .05em; }
.spec-value { font-weight: 600; font-size: .9rem; color: var(--navy); margin-top: .1rem; }
.carac-list { display: flex; flex-direction: column; gap: .4rem; }
.carac-list li { font-size: .88rem; color: var(--gray-600); padding-left: 1rem; position: relative; }
.carac-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.recursos-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.recurso-btn {
  background: var(--gray-100); border: 1px solid var(--gray-200);
  padding: .4rem .9rem; border-radius: var(--radius);
  font-size: .85rem; color: var(--navy);
}
.recurso-btn:hover { background: var(--gray-200); }

/* ══════════════════════════════════════════════════════
   CARRITO DRAWER
   ══════════════════════════════════════════════════════ */
.cart-drawer {
  position: fixed; right: -400px; top: 0; height: 100%;
  width: 380px; background: white; z-index: 1000;
  box-shadow: -4px 0 20px rgba(0,0,0,.15);
  transition: right .3s ease;
  display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }
.cart-drawer-inner { display: flex; flex-direction: column; height: 100%; }
.cart-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.4); z-index: 999;
}
.cart-overlay.show { display: block; }
.cart-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--gray-200);
  background: var(--navy); color: white;
}
.cart-header h3 { font-size: 1rem; font-weight: 700; }
.cart-close { background: none; border: none; color: white; font-size: 1.2rem; cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; padding: .75rem; }
.cart-item {
  display: grid; grid-template-columns: 60px 1fr auto;
  gap: .75rem; align-items: center;
  padding: .75rem 0; border-bottom: 1px solid var(--gray-100);
}
.cart-item-img { width: 60px; height: 60px; object-fit: contain; border-radius: var(--radius); background: var(--gray-50); }
.cart-item-name { font-size: .85rem; font-weight: 600; color: var(--navy); }
.cart-item-precio { font-size: .82rem; color: var(--accent); font-weight: 700; }
.cart-item-remove { background: none; border: none; color: var(--gray-400); cursor: pointer; font-size: 1.1rem; }
.cart-item-remove:hover { color: var(--red); }
.cart-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--gray-200); display: flex; flex-direction: column; gap: .75rem; }
.cart-total { font-size: 1.1rem; font-weight: 700; color: var(--navy); text-align: center; }

/* Cupón en carrito */
.cupon-row { display: flex; gap: .5rem; }
.cupon-input {
  flex: 1; padding: .5rem .75rem;
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  font-size: .85rem; text-transform: uppercase;
}
.btn-cupon {
  background: var(--navy); color: white;
  border: none; padding: .5rem .9rem;
  border-radius: var(--radius); cursor: pointer;
  font-size: .82rem; font-weight: 700;
}
.cupon-msg { font-size: .82rem; text-align: center; min-height: 1rem; }
.cupon-msg.ok  { color: var(--green); }
.cupon-msg.err { color: var(--red); }
.cart-wa-btn, .cart-mp-btn { text-align: center; }

/* ══════════════════════════════════════════════════════
   FORMULARIOS — LOGIN / REGISTRO
   ══════════════════════════════════════════════════════ */
.auth-page {
  min-height: calc(100vh - 300px);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
}
.auth-box {
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 2rem;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.auth-title {
  font-family: var(--font-display); font-size: 1.6rem;
  font-weight: 900; color: var(--navy);
  margin-bottom: 1.5rem; text-align: center;
}
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-weight: 600; font-size: .88rem; color: var(--gray-600); margin-bottom: .35rem; }
.form-input {
  width: 100%; padding: .65rem .9rem;
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  font-size: .95rem; transition: border-color .2s;
}
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30,111,197,.1); }
.form-input.error { border-color: var(--red); }
.form-error { font-size: .78rem; color: var(--red); margin-top: .25rem; }
.form-hint  { font-size: .78rem; color: var(--gray-400); margin-top: .25rem; }
.btn-submit {
  width: 100%; padding: .8rem;
  background: var(--accent); color: white;
  border: none; border-radius: var(--radius);
  font-weight: 700; font-size: 1rem; cursor: pointer;
  margin-top: .5rem;
}
.btn-submit:hover { background: var(--blue); }
.auth-links { text-align: center; margin-top: 1rem; font-size: .88rem; color: var(--gray-600); }
.auth-links a { font-weight: 600; }

/* Alertas */
.alert {
  padding: .75rem 1rem; border-radius: var(--radius);
  margin-bottom: 1rem; font-size: .88rem; font-weight: 600;
}
.alert-success { background: #dcfce7; color: var(--green); border: 1px solid #86efac; }
.alert-error   { background: #fee2e2; color: var(--red);   border: 1px solid #fca5a5; }
.alert-info    { background: #dbeafe; color: var(--accent); border: 1px solid #93c5fd; }

/* ══════════════════════════════════════════════════════
   MI CUENTA / PEDIDOS
   ══════════════════════════════════════════════════════ */
.cuenta-layout {
  display: grid; grid-template-columns: 220px 1fr;
  gap: 1.5rem; padding: 1.5rem 0;
}
.cuenta-nav { display: flex; flex-direction: column; gap: .25rem; }
.cuenta-nav-item {
  padding: .6rem .9rem; border-radius: var(--radius);
  color: var(--gray-600); font-size: .9rem; font-weight: 500;
}
.cuenta-nav-item:hover { background: var(--gray-100); text-decoration: none; }
.cuenta-nav-item.active { background: var(--accent); color: white; }
.cuenta-content { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem; }
.cuenta-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; color: var(--navy); margin-bottom: 1.25rem; }

/* Tabla de pedidos */
.tabla { width: 100%; border-collapse: collapse; }
.tabla th { background: var(--gray-100); padding: .6rem .9rem; text-align: left; font-size: .82rem; color: var(--gray-600); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tabla td { padding: .7rem .9rem; border-bottom: 1px solid var(--gray-100); font-size: .88rem; }
.tabla tr:hover td { background: var(--gray-50); }
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 20px; font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.badge-nuevo      { background: #dbeafe; color: var(--accent); }
.badge-pagado     { background: #dcfce7; color: var(--green); }
.badge-enviado    { background: #fef9c3; color: #854d0e; }
.badge-entregado  { background: #dcfce7; color: var(--green); }
.badge-cancelado  { background: #fee2e2; color: var(--red); }
.badge-pendiente  { background: var(--gray-100); color: var(--gray-600); }

/* ══════════════════════════════════════════════════════
   CHECKOUT
   ══════════════════════════════════════════════════════ */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 1.5rem; padding: 1.5rem 0; align-items: start; }
.checkout-box { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem; }
.checkout-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; color: var(--navy); margin-bottom: 1rem; }
.checkout-resumen-item { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--gray-100); font-size: .9rem; }
.checkout-total { font-size: 1.1rem; font-weight: 800; color: var(--navy); padding-top: .75rem; }
.pago-opciones { display: flex; flex-direction: column; gap: .75rem; margin: 1rem 0; }
.pago-opcion { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; border: 2px solid var(--gray-200); border-radius: var(--radius-lg); cursor: pointer; }
.pago-opcion:has(input:checked) { border-color: var(--accent); background: #eff6ff; }
.pago-opcion input { accent-color: var(--accent); }
.pago-opcion-label { font-weight: 600; font-size: .9rem; }
.pago-opcion-desc { font-size: .78rem; color: var(--gray-400); }

/* ══════════════════════════════════════════════════════
   ADMIN PANEL
   ══════════════════════════════════════════════════════ */
.admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0; min-height: calc(100vh - 200px); overflow-x: hidden; }
.admin-sidebar { background: var(--navy); padding: 1rem 0; }
.admin-nav-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.4); padding: .75rem 1rem .3rem; }
.admin-nav-item { display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem; color: rgba(255,255,255,.7); font-size: .88rem; font-weight: 500; }
.admin-nav-item:hover { background: rgba(255,255,255,.08); color: white; text-decoration: none; }
.admin-nav-item.active { background: var(--accent); color: white; }
.admin-content { padding: 1.5rem; background: var(--gray-50); min-width: 0; overflow-x: hidden; width: 100%; }
.admin-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 900; color: var(--navy); margin-bottom: 1.25rem; }
.admin-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.25rem; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.25rem; }
.stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 900; color: var(--navy); }
.stat-label { font-size: .8rem; color: var(--gray-400); margin-top: .2rem; }

/* ══════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--navy); color: white;
  padding: .75rem 1.5rem; border-radius: var(--radius-lg);
  font-size: .9rem; font-weight: 600; z-index: 2000;
  transition: transform .3s ease; pointer-events: none;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }

/* ══════════════════════════════════════════════════════
   WHATSAPP FLOAT
   ══════════════════════════════════════════════════════ */
.whatsapp-float {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  background: #25d366; color: white;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; z-index: 900;
  box-shadow: 0 4px 12px rgba(37,211,102,.4);
  transition: transform .2s;
}
.whatsapp-float:hover { transform: scale(1.1); text-decoration: none; }

/* ══════════════════════════════════════════════════════
   HERO Y SECCIONES HOME
   ══════════════════════════════════════════════════════ */
.home-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: white; padding: 3rem 1rem; text-align: center; border-radius: var(--radius-lg);
  margin: 1.5rem 0;
}
.home-hero h1 { font-family: var(--font-display); font-size: 2.5rem; font-weight: 900; margin-bottom: .75rem; }
.home-hero h1 span { color: var(--bright); }
.home-hero p { font-size: 1.05rem; color: rgba(255,255,255,.8); margin-bottom: 1.5rem; }
.home-hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary {
  background: var(--accent); color: white;
  padding: .8rem 2rem; border-radius: var(--radius);
  font-weight: 700; font-size: 1rem;
}
.btn-hero-primary:hover { background: var(--bright); text-decoration: none; }
.btn-hero-secondary {
  background: #25d366; color: white;
  padding: .8rem 2rem; border-radius: var(--radius);
  font-weight: 700; font-size: 1rem;
}
.btn-hero-secondary:hover { background: #128c7e; text-decoration: none; }

.section-title {
  font-family: var(--font-display); font-size: 1.5rem;
  font-weight: 900; color: var(--navy);
  margin: 1.5rem 0 1rem; padding-bottom: .5rem;
  border-bottom: 3px solid var(--accent);
}
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem; margin: 1.5rem 0;
}
.feature-item {
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 1rem;
  display: flex; align-items: flex-start; gap: .75rem;
}
.feature-icon { font-size: 1.5rem; }
.feature-title { font-weight: 700; font-size: .92rem; color: var(--navy); }
.feature-desc  { font-size: .8rem; color: var(--gray-400); margin-top: .1rem; }

.cats-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.cat-card {
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 1.25rem .75rem;
  text-align: center; transition: all .2s;
}
.cat-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.cat-card-icon { font-size: 2rem; margin-bottom: .5rem; }
.cat-card-name { font-size: .82rem; font-weight: 700; color: var(--navy); }

/* ══════════════════════════════════════════════════════
   PAGINACIÓN
   ══════════════════════════════════════════════════════ */
.pagination { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; padding: 1.5rem 0; }
.page-btn {
  padding: .45rem .85rem; border: 1px solid var(--gray-200);
  border-radius: var(--radius); font-size: .88rem;
  color: var(--gray-600); background: white;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.page-btn.active { background: var(--accent); color: white; border-color: var(--accent); font-weight: 700; }

/* ══════════════════════════════════════════════════════
   BREADCRUMB
   ══════════════════════════════════════════════════════ */
.breadcrumb { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--gray-400); padding: .75rem 0; }
.breadcrumb a { color: var(--accent); }
.breadcrumb .sep { color: var(--gray-300); }
.breadcrumb .current { color: var(--gray-600); font-weight: 600; }

/* ══════════════════════════════════════════════════════
   ESTADO VACÍO
   ══════════════════════════════════════════════════════ */
.state-box { text-align: center; padding: 3rem 1rem; }
.state-icon { font-size: 3rem; margin-bottom: 1rem; }
.state-box h3 { font-size: 1.2rem; color: var(--navy); margin-bottom: .5rem; }
.state-box p { color: var(--gray-400); font-size: .9rem; }

/* ══════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════ */
.site-footer { background: var(--navy); color: rgba(255,255,255,.7); margin-top: 3rem; }
.footer-inner {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.5rem; padding: 2.5rem 1rem;
}
.footer-col h3 { color: white; font-size: .9rem; font-weight: 700; margin-bottom: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-col ul { display: flex; flex-direction: column; gap: .35rem; }
.footer-col ul li a { color: rgba(255,255,255,.6); font-size: .85rem; }
.footer-col ul li a:hover { color: white; text-decoration: none; }
.footer-col p { font-size: .85rem; margin-bottom: .35rem; }
.footer-col p a { color: rgba(255,255,255,.6); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1rem;
}
.footer-bottom .container {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: .5rem;
  font-size: .78rem; color: rgba(255,255,255,.4);
}
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: white; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .store-layout { grid-template-columns: 200px 1fr; }
  .product-top  { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .cuenta-layout { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
}

@media (max-width: 768px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .search-form  { grid-column: 1 / -1; order: 3; }
  .store-layout { grid-template-columns: 1fr; }
  .sidebar      { display: none; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .home-hero h1 { font-size: 1.8rem; }
  .cart-drawer  { width: 100%; right: -100%; }
  .topbar-links { display: none; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .cats-grid     { grid-template-columns: repeat(3, 1fr); }
}

/* ══════════════════════════════════════════════════════
   DESCRIPCIÓN HTML DE SYSCOM
   ══════════════════════════════════════════════════════ */
.desc-html img { max-width: 100%; height: auto; border-radius: var(--radius); margin: .5rem 0; }
.desc-html ul  { padding-left: 1.2rem; margin: .5rem 0; }
.desc-html li  { margin-bottom: .3rem; font-size: .88rem; }
.desc-html iframe { max-width: 100%; border-radius: var(--radius); }
.desc-html table { width: 100%; border-collapse: collapse; font-size: .85rem; margin: .75rem 0; }
.desc-html td, .desc-html th { padding: .5rem .75rem; border: 1px solid var(--gray-200); }
.desc-html th  { background: var(--gray-100); font-weight: 700; }
.desc-html h1, .desc-html h2, .desc-html h3 { color: var(--navy); margin: .75rem 0 .4rem; }
.desc-html p   { margin-bottom: .5rem; }
.desc-html a   { color: var(--accent); }

/* ══════════════════════════════════════════════════════
   ADMIN RESPONSIVE — MENÚ HAMBURGUESA
   ══════════════════════════════════════════════════════ */
.admin-menu-toggle {
  display: none;
  background: var(--accent);
  color: white;
  border: none;
  padding: .5rem .9rem;
  border-radius: var(--radius);
  font-size: 1.1rem;
  cursor: pointer;
  margin-bottom: 1rem;
}
.admin-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 998;
}
.admin-sidebar-overlay.show { display: block; }

@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr !important;
  }
  .admin-sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100%;
    width: 240px;
    z-index: 999;
    transition: left .3s ease;
    overflow-y: auto;
  }
  .admin-sidebar.open {
    left: 0;
    display: block !important;
  }
  .admin-menu-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
  }
  .admin-content {
    max-width: 100vw !important;
    overflow-x: hidden;
  }
}

/* ══════════════════════════════════════════════════════
   DROPDOWN SUBCATEGORÍAS — DESKTOP & MOBILE
   ══════════════════════════════════════════════════════ */
.cat-nav-dropdown {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.cat-nav-arrow {
  font-size: .65rem;
  margin-left: .3rem;
  opacity: .7;
  transition: transform .2s;
  display: inline-block;
}

/* ── Desktop: mostrar link, ocultar botón móvil ── */
.cat-nav-trigger-desktop { display: inline-flex; align-items: center; }
.cat-nav-trigger-mobile  { display: none; }

/* ── Desktop dropdown ── */
.cat-nav-submenu {
  display: none;
  position: fixed;
  top: auto;
  left: auto;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.08);
  border-top: 2px solid var(--accent);
  border-radius: 0 0 8px 8px;
  min-width: 230px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 2000;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.cat-nav-dropdown:hover .cat-nav-submenu { display: block; }
.cat-nav-dropdown:hover .cat-nav-arrow   { transform: rotate(180deg); opacity: 1; }

.cat-nav-submenu-item {
  display: block;
  padding: .6rem 1rem;
  color: rgba(255,255,255,.7);
  font-size: .82rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .15s, color .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.cat-nav-submenu-all {
  font-weight: 700;
  color: var(--accent) !important;
  border-bottom: 1px solid rgba(255,255,255,.1) !important;
}
.cat-nav-submenu-item:hover {
  background: rgba(255,255,255,.07);
  color: white;
}
.cat-nav-submenu::-webkit-scrollbar { width: 3px; }
.cat-nav-submenu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }

/* ══════════════════════════════════════════════════════
   BOTTOM SHEET — MÓVIL
   ══════════════════════════════════════════════════════ */
.cat-bottom-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1100;
  backdrop-filter: blur(2px);
}
.cat-bottom-overlay.show { display: block; }

.cat-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border-radius: 16px 16px 0 0;
  z-index: 1101;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.cat-bottom-sheet.open { transform: translateY(0); }

.cat-bottom-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-weight: 700;
  color: white;
  font-size: 1rem;
}
#cat-bottom-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: 1.1rem;
  cursor: pointer;
  padding: .25rem .5rem;
}

.cat-bottom-links {
  overflow-y: auto;
  padding: .5rem 0 2rem;
}
.cat-bottom-link {
  display: block;
  padding: .85rem 1.25rem;
  color: rgba(255,255,255,.8);
  font-size: .95rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .15s;
}
.cat-bottom-link:first-child {
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.cat-bottom-link:active { background: rgba(255,255,255,.08); }

@media (max-width: 768px) {
  /* Ocultar versión desktop, mostrar botón móvil */
  .cat-nav-trigger-desktop { display: none !important; }
  .cat-nav-trigger-mobile  {
    display: inline-flex !important;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: rgba(255,255,255,.7);
    padding: .7rem 1rem;
    white-space: nowrap;
    text-decoration: none;
    font-weight: 500;
    transition: color .2s, background .2s;
  }
  .cat-nav-trigger-mobile:hover,
  .cat-nav-trigger-mobile.active {
    color: white;
    background: rgba(255,255,255,.08);
  }
  /* Nunca mostrar dropdown en móvil */
  .cat-nav-submenu { display: none !important; }
}

/* ══════════════════════════════════════════════════════
   SUBMENU NIVEL 3 — DESKTOP
   ══════════════════════════════════════════════════════ */
.cat-nav-submenu-item-wrapper {
  position: relative;
}
.cat-nav-submenu3 {
  display: none;
  position: fixed;
  background: #222;
  border: 1px solid rgba(255,255,255,.08);
  border-left: 2px solid var(--accent);
  border-radius: 0 8px 8px 0;
  min-width: 230px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 2001;
  box-shadow: 4px 8px 32px rgba(0,0,0,.5);
  /* Pseudo-puente para no perder el hover al cruzar el gap */
  padding-left: 8px;
  margin-left: -8px;
}
/* nivel3 controlado 100% por JS — sin CSS hover */
.cat-nav-submenu3-item {
  display: block;
  padding: .6rem 1rem;
  color: rgba(255,255,255,.7);
  font-size: .82rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .15s, color .15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.cat-nav-submenu3-item:first-child {
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.cat-nav-submenu3-item:hover {
  background: rgba(255,255,255,.07);
  color: white;
}
.cat-nav-submenu3::-webkit-scrollbar { width: 3px; }
.cat-nav-submenu3::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }

/* Botón dentro del bottom sheet (subcats con nivel 3) */
.cat-bottom-link-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: .95rem;
  color: rgba(255,255,255,.8);
  padding: .85rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.cat-bottom-link-btn:active { background: rgba(255,255,255,.08); }

@media (max-width: 768px) {
  .product-gallery { position: static !important; top: auto !important; }
}
