/* ============================================================
   KAIKY IMPORTACIONES — Stylesheet principal
   Colores: negro #0a0e1a | azul #00aaff | cian #00d4ff | plata #c8d6e5
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;500;600;700&family=Inter:wght@400;500&display=swap');

:root {
  --bg:        #0a0e1a;
  --surface:   #111827;
  --surface2:  #1a2235;
  --surface3:  #212d42;
  --blue:      #00aaff;
  --cyan:      #00d4ff;
  --silver:    #c8d6e5;
  --border:    rgba(0,170,255,.18);
  --border2:   rgba(0,170,255,.35);
  --text:      #e8f0fe;
  --muted:     #7a8ba0;
  --success:   #00d68f;
  --warn:      #ffaa00;
  --danger:    #ff4757;
  --info:      #00aaff;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow:    0 4px 24px rgba(0,0,0,.5);
  --glow:      0 0 20px rgba(0,170,255,.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

h1,h2,h3,h4,h5 {
  font-family: 'Exo 2', sans-serif;
  font-weight: 600;
  color: var(--silver);
}

a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--cyan); }

img { max-width: 100%; display: block; }

/* ── Layout ─────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
  background: rgba(17,24,39,.95);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(12px);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; gap: 16px;
}
.navbar-logo img { height: 150px; width: auto; }
.navbar-logo span {
  font-family: 'Exo 2', sans-serif; font-size: 11px;
  color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px;
  display: block; margin-top: 2px;
}

.navbar-nav { display: flex; align-items: center; gap: 4px; }
.navbar-nav a {
  color: var(--muted); font-size: 13px; font-weight: 500;
  padding: 6px 14px; border-radius: 8px; transition: all .2s;
}
.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--blue); background: rgba(0,170,255,.1);
}

.navbar-right { display: flex; align-items: center; gap: 10px; }

.cart-btn {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 14px; color: var(--silver); font-size: 13px;
  cursor: pointer; transition: all .2s; display: flex; align-items: center; gap: 6px;
}
.cart-btn:hover { border-color: var(--blue); color: var(--blue); }
.cart-badge {
  position: absolute; top: -5px; right: -5px;
  background: var(--danger); color: #fff; font-size: 9px; font-weight: 700;
  border-radius: 50%; width: 17px; height: 17px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}

.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px; transition: all .2s;
}
.user-btn:hover { border-color: var(--blue); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #0055cc, #00aaff);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.user-name { font-size: 12px; font-weight: 500; }

.dropdown {
  display: none; position: absolute; top: 110%; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); min-width: 180px;
  box-shadow: var(--shadow); z-index: 200; overflow: hidden;
}
.dropdown.open { display: block; }
.dropdown a {
  display: block; padding: 10px 16px; font-size: 13px; color: var(--muted);
  transition: all .2s;
}
.dropdown a:hover { background: var(--surface2); color: var(--blue); }
.dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ── Botones ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s; border: none; text-decoration: none;
  font-family: 'Exo 2', sans-serif;
}
.btn-primary {
  background: linear-gradient(90deg, #0055cc, #00aaff);
  color: #fff; box-shadow: 0 2px 12px rgba(0,170,255,.3);
}
.btn-primary:hover { box-shadow: 0 4px 20px rgba(0,170,255,.5); transform: translateY(-1px); color: #fff; }
.btn-outline {
  background: transparent; border: 1px solid var(--border2);
  color: var(--blue);
}
.btn-outline:hover { background: rgba(0,170,255,.1); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-full { width: 100%; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
}
.card-hover { transition: border-color .2s, transform .2s, box-shadow .2s; }
.card-hover:hover {
  border-color: var(--blue); transform: translateY(-3px);
  box-shadow: var(--glow);
}

/* ── Producto card ───────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.product-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all .25s; display: flex; flex-direction: column;
}
.product-card:hover {
  border-color: var(--blue); transform: translateY(-4px);
  box-shadow: var(--glow);
}
.product-card .img-wrap {
  height: 160px; background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-card .img-wrap .icon-placeholder { font-size: 52px; }
.product-card .card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-card .cat-tag {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .8px; color: var(--blue); margin-bottom: 6px;
}
.product-card .product-name {
  font-size: 14px; font-weight: 600; color: var(--silver);
  margin-bottom: 4px; line-height: 1.4;
}
.product-card .product-price {
  font-family: 'Exo 2', sans-serif; font-size: 18px; font-weight: 700;
  color: var(--cyan); margin-top: auto; padding-top: 8px;
}
.product-card .price-old {
  font-size: 12px; color: var(--muted); text-decoration: line-through; margin-right: 6px;
}
.product-card .stock-badge {
  font-size: 10px; color: var(--muted); margin-top: 2px;
}
.product-card .stock-low { color: var(--warn); }
.product-card .stock-out { color: var(--danger); }
.product-card .card-actions { padding: 0 14px 14px; }

/* ── Badge destacado ─────────────────────────────────────── */
.badge-featured {
  position: absolute; top: 10px; left: 10px;
  background: linear-gradient(90deg, #0055cc, #00aaff);
  color: #fff; font-size: 9px; font-weight: 700;
  padding: 3px 8px; border-radius: 20px; text-transform: uppercase;
  letter-spacing: .8px;
}

/* ── Formularios ────────────────────────────────────────────*/
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .6px;
}
.form-control {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; color: var(--text);
  font-size: 14px; font-family: 'Inter', sans-serif;
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,170,255,.15); }
.form-control::placeholder { color: var(--muted); }
select.form-control option { background: var(--surface2); }
textarea.form-control { resize: vertical; min-height: 90px; }

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: 8px; font-size: 13px;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.alert-success { background: rgba(0,214,143,.1); border: 1px solid rgba(0,214,143,.3); color: var(--success); }
.alert-error    { background: rgba(255,71,87,.1);  border: 1px solid rgba(255,71,87,.3);  color: var(--danger);  }
.alert-info     { background: rgba(0,170,255,.1);  border: 1px solid rgba(0,170,255,.3);  color: var(--blue);    }
.alert-warn     { background: rgba(255,170,0,.1);  border: 1px solid rgba(255,170,0,.3);  color: var(--warn);    }

/* ── Tabla admin ─────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.table th {
  text-align: left; padding: 10px 14px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td {
  padding: 12px 14px; border-bottom: 1px solid rgba(0,170,255,.06);
  vertical-align: middle;
}
.table tr:hover td { background: rgba(0,170,255,.03); }

/* ── Status badges ───────────────────────────────────────── */
.status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.status::before { content: '●'; font-size: 8px; }
.status-success { background: rgba(0,214,143,.12); color: var(--success); border: 1px solid rgba(0,214,143,.25); }
.status-info    { background: rgba(0,170,255,.12);  color: var(--blue);    border: 1px solid rgba(0,170,255,.25);  }
.status-primary { background: rgba(0,212,255,.12);  color: var(--cyan);    border: 1px solid rgba(0,212,255,.25);  }
.status-warn    { background: rgba(255,170,0,.12);  color: var(--warn);    border: 1px solid rgba(255,170,0,.25);  }
.status-danger  { background: rgba(255,71,87,.12);  color: var(--danger);  border: 1px solid rgba(255,71,87,.25);  }

/* ── Section title ───────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-family: 'Exo 2', sans-serif; font-size: 20px;
  font-weight: 700; color: var(--silver);
}
.section-title span { color: var(--blue); }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #060c18 0%, #0d1a2e 50%, #060c18 100%);
  padding: 60px 20px;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -50%; left: -20%;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,170,255,.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-title {
  font-family: 'Exo 2', sans-serif; font-size: 38px; font-weight: 700;
  color: #fff; line-height: 1.2; margin-bottom: 12px;
}
.hero-title span { color: var(--cyan); }
.hero-sub { font-size: 16px; color: var(--muted); margin-bottom: 28px; max-width: 500px; }

/* ── Stats cards ─────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 12px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; text-align: center;
}
.stat-val {
  font-family: 'Exo 2', sans-serif; font-size: 26px; font-weight: 700; color: var(--cyan);
}
.stat-lbl { font-size: 11px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .6px; }

/* ── Sidebar filtros ─────────────────────────────────────── */
.shop-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
.sidebar { position: sticky; top: 80px; }
.sidebar-section { margin-bottom: 20px; }
.sidebar-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 10px; }
.filter-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 7px; cursor: pointer;
  font-size: 13px; color: var(--muted); transition: all .2s;
  text-decoration: none;
}
.filter-item:hover, .filter-item.active {
  background: rgba(0,170,255,.1); color: var(--blue);
}

/* ── Carrito ─────────────────────────────────────────────── */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.cart-item-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
}
.cart-item-img { width: 60px; height: 60px; background: var(--surface2); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 600; color: var(--silver); }
.cart-item-price { font-size: 12px; color: var(--muted); margin-top: 2px; }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-btn { width: 28px; height: 28px; background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; color: var(--blue); cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.qty-btn:hover { border-color: var(--blue); background: rgba(0,170,255,.1); }
.qty-num { font-size: 14px; font-weight: 600; min-width: 22px; text-align: center; }
.cart-subtotal { font-size: 15px; font-weight: 700; color: var(--cyan); min-width: 70px; text-align: right; }

.order-summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; position: sticky; top: 80px; }
.summary-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding: 6px 0; }
.summary-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; color: var(--cyan); border-top: 1px solid var(--border); padding-top: 14px; margin-top: 8px; }

/* ── Tracking progress ───────────────────────────────────── */
.tracking-bar { display: flex; align-items: center; gap: 0; margin: 16px 0; }
.tracking-step { flex: 1; text-align: center; position: relative; }
.tracking-step::before {
  content: ''; position: absolute; top: 11px; left: 50%;
  width: 100%; height: 3px; background: var(--surface3); z-index: 0;
}
.tracking-step:last-child::before { display: none; }
.tracking-step .dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface3); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; position: relative; z-index: 1; margin: 0 auto 6px;
}
.tracking-step.done .dot { background: var(--blue); border-color: var(--blue); color: #fff; }
.tracking-step.done::before { background: var(--blue); }
.tracking-step .step-lbl { font-size: 10px; color: var(--muted); }
.tracking-step.done .step-lbl { color: var(--blue); }

/* ── Paginación ─────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 30px; }
.page-btn { padding: 7px 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; font-size: 13px; color: var(--muted); cursor: pointer; transition: all .2s; }
.page-btn:hover, .page-btn.active { border-color: var(--blue); color: var(--blue); background: rgba(0,170,255,.1); }

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 30px 20px; margin-top: 60px; text-align: center;
}
.footer-logo img { height: 50px; margin: 0 auto 10px; }
.footer p { font-size: 12px; color: var(--muted); }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* ── Utilidades ─────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.text-cyan   { color: var(--cyan); }
.text-blue   { color: var(--blue); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; } .gap-2 { gap: 8px; } .align-center { align-items: center; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .admin-stats { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 600px) {
  .navbar-nav { display: none; }
  .hero-title { font-size: 26px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2,1fr); }
}
