/* =====================================================
   SempaiOFC Store — Light & Violet (ShopAll-inspired)
   ===================================================== */

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

:root {
  /* Surfaces */
  --bg:        #F6F6FB;
  --bg-soft:   #F1F1F7;
  --bg-card:   #FFFFFF;
  --bg-hover:  #FAFAFE;
  --ink:       #0F0F1E;
  --ink-2:     #2D2D45;
  --muted:     #8B8B9E;
  --muted-2:   #B5B5C4;
  --line:      rgba(15, 15, 30, 0.06);
  --line-2:    rgba(15, 15, 30, 0.1);

  /* Brand */
  --primary:        #7C5CFC;
  --primary-dark:   #5A3FE8;
  --primary-light:  #9577FF;
  --primary-soft:   rgba(124, 92, 252, 0.12);
  --primary-softer: rgba(124, 92, 252, 0.05);
  --primary-grad:   linear-gradient(135deg, #9577FF 0%, #7C5CFC 100%);

  /* Status */
  --success:      #22C55E;
  --success-soft: rgba(34, 197, 94, 0.12);
  --warn:         #F59E0B;
  --warn-soft:    rgba(245, 158, 11, 0.14);
  --info:         #3B82F6;
  --info-soft:    rgba(59, 130, 246, 0.12);
  --danger:       #EF4444;
  --danger-soft:  rgba(239, 68, 68, 0.12);

  /* Pastels — used for product card backgrounds */
  --pastel-lilac:  #E8E4FF;
  --pastel-mint:   #DCF7E8;
  --pastel-pink:   #FDE2E2;
  --pastel-peach:  #FCE9D0;
  --pastel-sky:    #DBEAFE;
  --pastel-cream:  #FEF3C7;
  --pastel-rose:   #FCE7F3;

  /* Geometry */
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(15,15,30,0.05);
  --shadow:    0 4px 14px rgba(15,15,30,0.06);
  --shadow-lg: 0 12px 32px rgba(15,15,30,0.08);
  --shadow-purple: 0 8px 24px rgba(124, 92, 252, 0.25);

  /* Fonts */
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Aliases (compat con páginas existentes) */
  --gold: var(--primary);
  --gold-light: var(--primary-light);
  --gold-dark: var(--primary-dark);
  --gold-gradient: var(--primary-grad);
  --bg-alt: var(--bg-soft);
  --bg-glass: var(--primary-softer);
  --text-dim: var(--muted);
  --muted-light: var(--muted);
  --line-strong: var(--line-2);
  --cyan: var(--primary);
  --magenta: var(--primary);
  --lime: var(--primary);
  --purple: var(--primary);
  --pink: var(--primary);
  --yellow: var(--primary);
  --glow-gold: 0 0 0 0 transparent;
}

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

html, body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: 15px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.2;
}
h1 { font-size: 1.65rem; font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; }

a { color: var(--primary); text-decoration: none; transition: color 140ms; }
a:hover { color: var(--primary-dark); }

code { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.88em; color: var(--ink-2); }

small { color: var(--muted); font-size: 0.82rem; }

/* ============= LAYOUT ============= */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* ============= PROMO STRIP (público) ============= */
.promo-strip {
  background: var(--primary-grad);
  color: #fff;
  padding: 9px 0;
  font-weight: 600;
  font-size: 0.86rem;
  text-align: center;
  letter-spacing: 0.005em;
  position: relative;
  z-index: 50;
}
.promo-strip strong { font-weight: 800; }

/* ============= NAVBAR PÚBLICO ============= */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  position: sticky; top: 0;
  z-index: 40;
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.navbar-brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.navbar-brand .mark {
  width: 38px; height: 38px;
  background: var(--primary-grad);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: 10px;
  box-shadow: var(--shadow-purple);
}
.navbar-brand .jp {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.navbar-links {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.navbar-links a {
  padding: 9px 14px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.92rem;
  border-radius: 9px;
  transition: all 140ms;
}
.navbar-links a:hover {
  color: var(--primary);
  background: var(--primary-softer);
}

.cart-icon {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  background: var(--primary-softer);
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 140ms;
}
.cart-icon:hover { background: var(--primary); color: #fff; }
.cart-icon svg { width: 18px; height: 18px; }
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--bg-card);
}

/* ============= HERO CAROUSEL ============= */
.hero-carousel { padding: 24px 0; }
.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius-xl);
  position: relative;
  background: var(--bg-card);
  box-shadow: var(--shadow);
}
.carousel-track {
  display: flex;
  transition: transform 600ms cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}
.carousel-slide {
  min-width: 100%;
  height: 340px;
  position: relative;
  display: flex; align-items: center;
  padding: 0 56px;
  overflow: hidden;
}
.carousel-slide::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 65%);
}
.carousel-content { position: relative; z-index: 2; max-width: 560px; color: #fff; }
.carousel-tag {
  display: inline-block;
  background: rgba(255,255,255,0.95);
  color: var(--primary-dark);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.carousel-content h2 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.15;
}
.carousel-content p {
  font-size: 1rem;
  color: rgba(255,255,255,0.92);
  margin-bottom: 22px;
}
.carousel-dots {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 3;
}
.carousel-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 200ms;
  padding: 0;
}
.carousel-dots button.active {
  background: #fff;
  width: 24px;
  border-radius: 4px;
}
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  color: var(--ink);
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 600;
  z-index: 3;
  transition: all 160ms;
  box-shadow: var(--shadow);
}
.carousel-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.05); }
.carousel-arrow.prev { left: 18px; }
.carousel-arrow.next { right: 18px; }

@media (max-width: 700px) {
  .carousel-slide { height: 260px; padding: 0 24px; }
  .carousel-arrow { width: 34px; height: 34px; }
}

/* ============= BRANDS STRIP (plataformas) ============= */
.brands-strip {
  padding: 30px 0 10px;
}
.brands-strip .title {
  text-align: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.brands-grid {
  display: flex; gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.brand-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  text-decoration: none;
  color: var(--ink-2);
  transition: transform 200ms;
}
.brand-item:hover { transform: translateY(-3px); }
.brand-item .icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.brand-item .icon.has-image { font-size: 0; }
.brand-item .label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-2);
}

/* ============= SECTION TITLES ============= */
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 36px 0 18px;
  gap: 16px; flex-wrap: wrap;
}
.section-title h2 { font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.section-title small {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ============= BUTTONS ============= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--ink-2);
  cursor: pointer;
  transition: all 160ms;
  text-decoration: none !important;
  white-space: nowrap;
}
.btn:hover {
  background: var(--bg-soft);
  border-color: var(--line-2);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(124, 92, 252, 0.25);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(124, 92, 252, 0.35);
  color: #fff;
}
.btn-dark {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn-dark:hover { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.btn-danger, .btn-coral {
  background: #fff;
  color: var(--danger);
  border-color: var(--danger-soft);
}
.btn-danger:hover, .btn-coral:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line-2);
}
.btn-ghost:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-softer);
}
.btn-yellow {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-yellow:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-success {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
}
.btn-success:hover { background: #1DB854; border-color: #1DB854; color: #fff; }
.btn-sm { padding: 7px 13px; font-size: 0.8rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============= CATEGORY CHIPS ============= */
.cat-filter {
  display: flex; gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.cat-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 140ms;
}
.cat-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.cat-chip.active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 600;
}

/* ============= PRODUCT GRID (estilo ShopAll) ============= */
.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 220ms;
  display: flex; flex-direction: column;
  position: relative;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-2);
}
.product-hero {
  height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.6rem;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.product-hero.has-image { font-size: 0; }
.product-hero .destacado-tag {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.92);
  color: var(--warn);
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  z-index: 2;
  box-shadow: var(--shadow-sm);
}
.product-hero .stock-tag {
  position: absolute; bottom: 10px; right: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  z-index: 2;
  background: rgba(255,255,255,0.92);
}
.stock-tag.on  { color: var(--success); }
.stock-tag.off { color: var(--danger); }

.product-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex; flex-direction: column; gap: 4px;
}
.product-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.product-cat-mini {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.product-desc {
  display: none; /* compacto estilo ShopAll, descripción no se muestra en grid */
}
.product-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary);
  line-height: 1;
}
.price-unit {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 500;
  display: block;
  margin-top: 2px;
}

/* ============= CART PAGE ============= */
.cart-wrap {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
  margin: 24px 0;
}
.cart-items { display: flex; flex-direction: column; gap: 10px; }
.cart-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.cart-item .thumb {
  width: 60px; height: 60px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .info h3 { font-size: 0.98rem; margin-bottom: 2px; }
.cart-item .info small { color: var(--muted); }
.cart-item .qty-wrap {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg-soft);
  border-radius: 9px;
  padding: 3px;
}
.cart-item .qty-wrap button {
  background: transparent;
  border: none;
  color: var(--primary);
  width: 28px; height: 28px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 7px;
}
.cart-item .qty-wrap button:hover { background: var(--bg-card); }
.cart-item .qty-wrap .qty {
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  font-size: 0.9rem;
}
.cart-item .subtotal {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--primary);
  font-size: 1.05rem;
  min-width: 90px;
  text-align: right;
}
.cart-summary {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: sticky; top: 90px;
  box-shadow: var(--shadow-sm);
}
.cart-summary h3 { margin-bottom: 14px; }
.cart-summary .line {
  display: flex; justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.93rem;
}
.cart-summary .line:last-of-type { border-bottom: none; }
.cart-summary .total {
  padding-top: 12px;
  margin-top: 8px;
  border-top: 2px solid var(--ink);
  display: flex; justify-content: space-between;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
}
.cart-summary .total .amount { color: var(--primary); }

@media (max-width: 900px) {
  .cart-wrap { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-item { flex-wrap: wrap; }
  .cart-item .subtotal { min-width: auto; width: 100%; text-align: left; }
}

/* ============= WHATSAPP FAB ============= */
.wa-float {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  z-index: 99;
  animation: wa-pulse 2.2s infinite;
  transition: transform 160ms;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }
@keyframes wa-pulse {
  0%   { box-shadow: 0 6px 20px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0.55); }
  70%  { box-shadow: 0 6px 20px rgba(37,211,102,0.4), 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 6px 20px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0); }
}

/* ============= AUTH PAGES ============= */
.auth-wrap {
  min-height: calc(100vh - 80px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: 4px; }
.auth-card p.muted { margin-bottom: 18px; }

/* ============= FORMS ============= */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.84rem;
  color: var(--ink-2);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 14px;
  font: inherit;
  font-family: var(--font-body);
  font-size: 0.93rem;
  color: var(--ink);
  background: var(--bg-card);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  outline: none;
  transition: all 140ms;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field textarea { min-height: 90px; resize: vertical; }
.field input[type="color"] { padding: 4px; height: 42px; }
.field input[type="file"] { padding: 9px 14px; cursor: pointer; }
.field input[type="file"]::file-selector-button {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: none;
  padding: 6px 12px;
  border-radius: 7px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  margin-right: 12px;
  cursor: pointer;
}

/* ============= ALERTS ============= */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid;
}
.alert-success {
  background: var(--success-soft);
  border-color: var(--success-soft);
  color: #15803D;
}
.alert-error {
  background: var(--danger-soft);
  border-color: var(--danger-soft);
  color: #B91C1C;
}
.alert-info {
  background: var(--primary-softer);
  border-color: var(--primary-soft);
  color: var(--primary-dark);
}

/* ============= TABLES (estilo ShopAll) ============= */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: auto;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
table.data th, table.data td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
table.data th {
  background: transparent;
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover td { background: var(--bg-hover); }
table.data tbody td { color: var(--ink-2); }

/* ============= STATUS PILLS (estilo ShopAll • Completed) ============= */
.estado {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.estado::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.estado-pendiente { color: var(--warn);    background: var(--warn-soft); }
.estado-pagado    { color: var(--info);    background: var(--info-soft); }
.estado-entregado { color: var(--success); background: var(--success-soft); }
.estado-cancelado { color: var(--danger);  background: var(--danger-soft); }

.badge {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
}

/* ============= ADMIN APP SHELL ============= */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--bg);
}

/* Sidebar */
.sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex; flex-direction: column;
  gap: 16px;
  position: sticky; top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 6px 8px 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}
.sidebar-brand .brand-icon {
  width: 36px; height: 36px;
  background: var(--primary-grad);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 800;
  border-radius: 9px;
  box-shadow: var(--shadow-purple);
}
.store-selector {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: var(--bg-soft);
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}
.store-selector .avatar {
  width: 28px; height: 28px;
  background: var(--primary-grad);
  color: #fff;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
}
.store-selector .caret { margin-left: auto; color: var(--muted); }

.sidebar-section {
  display: flex; flex-direction: column;
  gap: 1px;
}
.sidebar-label {
  padding: 14px 12px 8px;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted-2);
  text-transform: uppercase;
}
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.92rem;
  transition: all 140ms;
  position: relative;
}
.sidebar-item:hover { background: var(--bg-soft); color: var(--ink); }
.sidebar-item.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
}
.sidebar-item.active::before {
  content: "";
  position: absolute;
  left: -14px; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.sidebar-item .icon {
  font-size: 1.05rem; width: 22px; text-align: center;
}
.sidebar-item .badge-count {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
}
.sidebar-item.logout {
  color: var(--danger);
  margin-top: 8px;
}
.sidebar-item.logout:hover {
  background: var(--danger-soft);
  color: var(--danger);
}
.sidebar-spacer { flex: 1; }
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.sidebar-user .avatar {
  width: 36px; height: 36px;
  background: var(--primary-grad);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar-user .info { flex: 1; min-width: 0; }
.sidebar-user .info .name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user .info small {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block;
}

/* Topbar admin */
.app-main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
  padding: 14px 28px;
  display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0;
  z-index: 30;
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.breadcrumb .sep { color: var(--muted-2); }
.topbar-search {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}
.topbar-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 10px;
  outline: none;
}
.topbar-search input:focus {
  background: var(--bg-card);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.topbar-search::before {
  content: "🔍";
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.55;
}
.topbar-actions {
  display: flex; align-items: center; gap: 8px;
}
.topbar-icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-soft);
  border: none;
  border-radius: 9px;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 1rem;
  transition: all 140ms;
  position: relative;
  text-decoration: none;
}
.topbar-icon:hover { background: var(--primary-soft); color: var(--primary); }
.topbar-icon .dot {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--bg-card);
}
.topbar-profile {
  width: 36px; height: 36px;
  background: var(--primary-grad);
  color: #fff;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.app-content {
  padding: 24px 28px;
  flex: 1;
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto;
    flex-direction: row; flex-wrap: wrap;
    padding: 12px;
    border-right: none; border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .sidebar-brand { width: 100%; padding: 4px 8px 0; }
  .store-selector { width: 100%; }
  .sidebar-section { width: 100%; flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .sidebar-label { width: 100%; padding: 8px 0 4px; }
  .sidebar-item { flex: 1 1 auto; padding: 8px 12px; font-size: 0.85rem; }
  .sidebar-item.active::before { display: none; }
  .sidebar-user { width: 100%; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .topbar-search { width: 100%; max-width: none; order: 3; }
  .app-content { padding: 18px 16px; }
}

/* Compatibilidad con admin antiguo */
.admin-layout { /* deprecated: ahora usa .app-shell */
  display: grid;
  grid-template-columns: 240px 1fr;
}
.admin-sidebar, .admin-content { /* fallback */ }
.admin-content { padding: 24px 28px; }

/* ============= STAT CARDS (estilo ShopAll) ============= */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute; top: 0; left: 0; height: 3px; width: 60px;
  background: var(--primary);
  border-radius: 0 0 6px 0;
}
.stat-card.purple::before, .stat-card.p::before { background: var(--primary); }
.stat-card.success::before, .stat-card.lime::before, .stat-card.v::before { background: var(--success); }
.stat-card.warn::before, .stat-card.yellow::before, .stat-card.d::before { background: var(--warn); }
.stat-card.danger::before, .stat-card.coral::before { background: var(--danger); }
.stat-card.cyan::before, .stat-card.c::before { background: var(--info); }
.stat-card.pink::before, .stat-card.m::before { background: #EC4899; }

.stat-card .label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 6px;
}
.stat-card .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--ink);
  line-height: 1;
}
.stat-card .trend {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--success);
  font-weight: 500;
}
.stat-card .trend.down { color: var(--danger); }

/* ============= CARDS ============= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.card-glow {
  background: var(--bg-card);
  border: 1px solid var(--primary-soft);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  position: relative;
}
.card-glow::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--primary-grad);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Hero banner upgrade-style (encima del dashboard) */
.banner-cta {
  background: var(--primary-grad);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-purple);
  flex-wrap: wrap;
}
.banner-cta-icon {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.banner-cta-text { flex: 1; min-width: 200px; }
.banner-cta-text h3 { color: #fff; margin-bottom: 2px; font-size: 1rem; font-weight: 700; }
.banner-cta-text p { color: rgba(255,255,255,0.88); font-size: 0.86rem; }
.banner-cta .btn {
  background: #fff;
  color: var(--primary-dark);
  border-color: #fff;
  font-weight: 700;
}
.banner-cta .btn:hover { background: rgba(255,255,255,0.92); color: var(--primary-dark); }

/* ============= CRED CARD (panel de cliente) ============= */
.cred-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.cred-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--primary-grad);
}
.cred-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.cred-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 14px; }
.cred-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-soft);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 6px;
  gap: 10px;
}
.cred-row span:first-child {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.83rem;
  min-width: 90px;
}
.cred-row code {
  color: var(--ink);
  font-weight: 600;
  word-break: break-all;
  flex: 1;
  text-align: center;
}
.copy-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  font-family: var(--font-body);
  font-size: 0.72rem;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
  transition: all 140ms;
}
.copy-btn:hover { background: var(--primary-dark); }

/* ============= FOOTER (público) ============= */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--line);
  padding: 40px 0 24px;
  margin-top: 60px;
}
.footer h3 { font-size: 0.95rem; margin-bottom: 12px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--primary); }
.footer p { margin-bottom: 6px; font-size: 0.88rem; color: var(--muted); }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 24px;
}
.footer-copy {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--muted);
}

/* ============= UTILITIES ============= */
.mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 30px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; } .mb-4 { margin-bottom: 30px; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 700px) {
  .panel-pago-grid { grid-template-columns: 1fr !important; justify-items: center; }
  /* ============= NAVBAR RESPONSIVE ============= */
@media (max-width: 700px) {
  .navbar { padding: 10px 0; }
  .navbar .container { gap: 8px; flex-wrap: nowrap; }

  .navbar-brand {
    font-size: 1rem;
    gap: 8px;
    flex-shrink: 0;
  }
  .navbar-brand .mark {
    width: 32px; height: 32px;
    font-size: 0.95rem;
  }
  .navbar-brand .jp { display: none; }

  .navbar-links {
    gap: 2px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .navbar-links::-webkit-scrollbar { display: none; }

  .navbar-links a {
    padding: 7px 10px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .cart-icon {
    padding: 7px 10px;
    font-size: 0.82rem;
  }
  .cart-icon span:not(.cart-badge) { display: none; }
  .cart-icon svg { width: 20px; height: 20px; }

  .promo-strip { font-size: 0.78rem; padding: 7px 12px; }
}

/* Animaciones */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-carousel, .grid-products, .auth-card, .app-content, .brands-strip, .banner-cta, .stats {
  animation: rise 400ms ease-out both;
}
.grid-products > * { animation: rise 400ms ease-out both; }
.grid-products > *:nth-child(1) { animation-delay: .04s; }
.grid-products > *:nth-child(2) { animation-delay: .08s; }
.grid-products > *:nth-child(3) { animation-delay: .12s; }
.grid-products > *:nth-child(4) { animation-delay: .16s; }
.grid-products > *:nth-child(5) { animation-delay: .20s; }
.grid-products > *:nth-child(6) { animation-delay: .24s; }
.grid-products > *:nth-child(7) { animation-delay: .28s; }
.grid-products > *:nth-child(8) { animation-delay: .32s; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(15,15,30,0.12); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(15,15,30,0.2); }

details > summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--primary);
  list-style: none;
  padding: 6px 0;
  user-select: none;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+ "; color: var(--primary); font-weight: 700; }
details[open] > summary::before { content: "− "; }
