/* =====================================================
   TIENDITAS — MODERN UI v3.0
   Premium redesign: light only, vibrant, mobile-first
   ===================================================== */

/* ── Google Fonts ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────────── */
:root {
  /* Brand – Vibrante coral-rosa a violeta */
  --brand:        #7c3aed;
  --brand-dark:   #5b21b6;
  --brand-light:  #c4b5fd;
  --brand-2:      #06b6d4;
  --brand-2-dark: #0891b2;
  --accent:       #f59e0b;
  --accent-rose:  #f43f5e;

  /* Gradientes principal */
  --grad-brand:   linear-gradient(135deg, #7c3aed 0%, #a855f7 60%, #ec4899 100%);
  --grad-warm:    linear-gradient(135deg, #f59e0b, #ef4444);
  --grad-cyan:    linear-gradient(135deg, #06b6d4, #3b82f6);
  --grad-hero:    linear-gradient(135deg, #fdf4ff 0%, #faf5ff 40%, #f0fdff 100%);

  /* Fondos – SOLO CLARO */
  --bg:           #f8f5ff;
  --bg-soft:      #fdfcff;
  --surface:      #ffffff;
  --surface-2:    #faf9ff;
  --surface-3:    #f3f0ff;

  /* Bordes */
  --border:       #ede8fb;
  --border-dark:  #d5cef5;

  /* Texto */
  --text-main:    #1a1535;
  --text-sub:     #5b5580;
  --text-muted:   #9590b5;

  /* Sombras con tinte violeta */
  --shadow-xs:    0 1px 3px rgba(124,58,237,.06);
  --shadow-sm:    0 2px 8px rgba(124,58,237,.10);
  --shadow-md:    0 6px 24px rgba(124,58,237,.13);
  --shadow-lg:    0 14px 44px rgba(124,58,237,.18);
  --shadow-xl:    0 24px 64px rgba(124,58,237,.22);
  --shadow-brand: 0 8px 28px rgba(124,58,237,.38);

  /* Radios */
  --r-xs:   .35rem;
  --r-sm:   .6rem;
  --r-md:   1rem;
  --r-lg:   1.4rem;
  --r-xl:   2rem;
  --r-2xl:  2.8rem;
  --r-pill: 9999px;

  /* Transiciones */
  --t-fast:   130ms cubic-bezier(.4,0,.2,1);
  --t-base:   240ms cubic-bezier(.4,0,.2,1);
  --t-slow:   400ms cubic-bezier(.4,0,.2,1);
  --t-spring: 350ms cubic-bezier(.34,1.56,.64,1);

  /* Navbar */
  --nav-h: 66px;
}

/* ── Reset & Base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 15px;
  min-height: 100vh;
  /* Forzar modo claro */
  color-scheme: light;
}

/* Forzar modo claro en todo */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:           #f8f5ff !important;
    --bg-soft:      #fdfcff !important;
    --surface:      #ffffff !important;
    --surface-2:    #faf9ff !important;
    --surface-3:    #f3f0ff !important;
    --border:       #ede8fb !important;
    --border-dark:  #d5cef5 !important;
    --text-main:    #1a1535 !important;
    --text-sub:     #5b5580 !important;
    --text-muted:   #9590b5 !important;
  }
  body {
    background: #f8f5ff !important;
    color: #1a1535 !important;
  }
}

/* ── Scrollbar ────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--brand-light); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ── Tipografía ───────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}
a { color: var(--brand); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--brand-dark); }
p { color: var(--text-sub); }

/* ═══════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════ */
.navbar {
  height: var(--nav-h);
  background: rgba(255,255,255,.95) !important;
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-bottom: 1.5px solid var(--border) !important;
  box-shadow: 0 2px 16px rgba(124,58,237,.06);
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: box-shadow var(--t-base), background var(--t-base);
}
.navbar.scrolled {
  background: rgba(255,255,255,.98) !important;
  box-shadow: 0 4px 28px rgba(124,58,237,.13);
}

/* Brand */
.navbar-brand {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-main) !important;
  transition: transform var(--t-spring);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.navbar-brand:hover { transform: scale(1.04); color: var(--text-main) !important; }
.navbar-brand .bi {
  font-size: 1.4rem;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.navbar-brand strong {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Badge Beta */
.badge-brand {
  background: var(--grad-brand);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: .22em .6em;
  border-radius: var(--r-pill);
  vertical-align: middle;
  -webkit-text-fill-color: #fff;
}

/* Nav links */
.navbar-nav .nav-link {
  font-weight: 600;
  font-size: .93rem;
  color: var(--text-sub) !important;
  padding: .45rem .9rem;
  border-radius: var(--r-pill);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  display: flex;
  align-items: center;
  gap: .35rem;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  background: rgba(124,58,237,.09);
  color: var(--brand) !important;
  transform: translateY(-1px);
}
.navbar-nav .nav-link .bi { font-size: 1rem; }

/* Avatar pill */
.navbar .avatar {
  width: 36px; height: 36px;
  object-fit: cover;
  border-radius: 50%;
  border: 2.5px solid var(--brand-light);
  transition: border-color var(--t-fast), transform var(--t-spring);
}
.navbar .avatar:hover { border-color: var(--brand); transform: scale(1.08); }

/* Notification dot */
.notification-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 10px; height: 10px;
  background: var(--accent-rose);
  border-radius: 50%;
  border: 2.5px solid var(--surface);
  animation: pulse-dot 2.2s infinite;
}
@keyframes pulse-dot {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.35); opacity: .7; }
}

/* Dropdown */
.dropdown-toggle::after { display: none !important; }
.dropdown-menu {
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: .6rem;
  min-width: 210px;
  animation: dd-in var(--t-base) both;
  transform-origin: top right;
  background: var(--surface);
}
@keyframes dd-in {
  from { opacity: 0; transform: scale(.92) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.dropdown-item {
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-sub);
  padding: .55rem .9rem;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.dropdown-item:hover {
  background: rgba(124,58,237,.09);
  color: var(--brand);
  transform: translateX(3px);
}
.dropdown-divider { border-color: var(--border); margin: .45rem 0; }

/* Mobile toggler */
.navbar-toggler {
  border: 2px solid var(--border) !important;
  border-radius: var(--r-md) !important;
  padding: .38rem .55rem;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.navbar-toggler:hover {
  border-color: var(--brand-light) !important;
  background: rgba(124,58,237,.06);
}
.navbar-toggler:focus { box-shadow: none !important; }

/* Mobile nav collapse */
@media (max-width: 991px) {
  .navbar .navbar-collapse {
    background: var(--surface);
    border-top: 1.5px solid var(--border);
    border-radius: 0 0 var(--r-xl) var(--r-xl);
    padding: .9rem;
    box-shadow: var(--shadow-lg);
    margin-top: .3rem;
    animation: slide-down .26s cubic-bezier(.4,0,.2,1) both;
  }
  @keyframes slide-down {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .navbar-nav .nav-link {
    padding: .65rem 1rem;
    border-radius: var(--r-md);
    font-size: .97rem;
  }
  .navbar-nav .nav-link:hover {
    transform: none;
    padding-left: 1.25rem;
  }
}
.navbar .dropdown-menu { z-index: 2000; }

/* ═══════════════════════════════════════════════
   BOTONES
═══════════════════════════════════════════════ */
.btn {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: .01em;
  border-radius: var(--r-pill) !important;
  padding: .52rem 1.3rem;
  transition: background var(--t-base), box-shadow var(--t-base), transform var(--t-spring), border-color var(--t-fast);
  border: none;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(.96) !important; }

/* Efecto ripple opcional */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--t-fast);
}
.btn:hover::after { background: rgba(255,255,255,.08); }

.btn-brand {
  background: var(--grad-brand);
  color: #fff !important;
  box-shadow: 0 4px 18px rgba(124,58,237,.38);
  -webkit-text-fill-color: #fff;
}
.btn-brand:hover {
  box-shadow: 0 8px 28px rgba(124,58,237,.50);
  transform: translateY(-2px);
  color: #fff !important;
}

.btn-outline-secondary {
  border: 2px solid var(--border-dark) !important;
  color: var(--text-sub) !important;
  background: transparent;
}
.btn-outline-secondary:hover {
  border-color: var(--brand-light) !important;
  color: var(--brand) !important;
  background: rgba(124,58,237,.05);
  transform: translateY(-1px);
}

.btn-outline-primary {
  border: 2px solid var(--brand) !important;
  color: var(--brand) !important;
  background: transparent;
}
.btn-outline-primary:hover {
  background: var(--brand);
  color: #fff !important;
  transform: translateY(-1px);
}

.btn-outline-danger {
  border: 2px solid #ef4444 !important;
  color: #ef4444 !important;
  background: transparent;
}
.btn-outline-danger:hover {
  background: #ef4444;
  color: #fff !important;
}

.btn-sm { padding: .32rem .9rem; font-size: .84rem; }
.btn-lg { padding: .72rem 1.9rem; font-size: 1.05rem; }
.btn-gl { border-radius: var(--r-pill) !important; }

/* ═══════════════════════════════════════════════
   BUSCADOR PILL
═══════════════════════════════════════════════ */
.search-pill {
  background: var(--surface);
  border: 2px solid var(--border-dark);
  border-radius: var(--r-pill) !important;
  padding: .4rem .4rem .4rem 1.15rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.search-pill:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(124,58,237,.12), var(--shadow-sm);
}
.search-pill .bi-search { color: var(--brand-light); font-size: 1rem; }
.search-pill .search-input {
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-main);
  width: 100%;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: .95rem;
}
.search-pill .search-input::placeholder { color: var(--text-muted); }
.search-pill .btn { padding: .38rem 1.05rem; font-size: .87rem; }
.search-pill--wide { width: 100%; max-width: none; }
.search-pill--wide .search-input { width: 100%; flex: 1; }

/* ═══════════════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════════════ */
.hero {
  background: var(--grad-hero);
  border-radius: var(--r-2xl);
  padding: 3.5rem !important;
  overflow: hidden;
  position: relative;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-md);
}
/* Decoración de fondo */
.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.10), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,.09), transparent 70%);
  pointer-events: none;
}
.hero h1 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -1px;
}
.hero h1 span {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .lead {
  font-size: 1.05rem;
  color: var(--text-sub);
  max-width: 500px;
  font-weight: 400;
}

@media (max-width: 768px) {
  .hero { padding: 2rem !important; border-radius: var(--r-xl); }
  .hero h1 { font-size: 2rem; letter-spacing: -.5px; }
  .hero .lead { font-size: .97rem; }
}

/* ═══════════════════════════════════════════════
   CARDS DE PRODUCTO / TIENDA
═══════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  overflow: visible;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
  color: inherit;
}
.card-product {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.card-product:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-light);
}
.card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.card-product .card-body { min-height: 110px; }
.card-product .card-img-top {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* Contenedor 1:1 */
.aspect-1-1 {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--surface-3);
}
.aspect-1-1 > img,
.aspect-1-1 .img-cover {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.card-product:hover .aspect-1-1 > img,
.card-product:hover .aspect-1-1 .img-cover {
  transform: scale(1.07);
}

/* Etiqueta del producto */
.card-product .title-upper {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  font-size: .88rem;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}
.card-product .h6 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .92rem;
  font-weight: 700;
  color: var(--text-main);
}
.card-product .text-muted,
.card-product .small.text-muted {
  color: var(--text-muted) !important;
  font-size: .8rem;
}
.card-product .fw-bold { font-size: 1.05rem; }

/* Precio con gradiente */
.price-tag {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.card-product .fw-bold[style*="--brand"] {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Overlay gradient en cards */
.card-product .aspect-1-1::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(26,21,53,.25), transparent);
  pointer-events: none;
  border-radius: 0;
}

/* ═══════════════════════════════════════════════
   BADGES
═══════════════════════════════════════════════ */
.badge {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  font-size: .7rem;
  border-radius: var(--r-pill);
  padding: .27em .7em;
  letter-spacing: .03em;
}
.badge.bg-danger { background: linear-gradient(135deg, #f43f5e, #ef4444) !important; }
.badge.bg-success { background: linear-gradient(135deg, #22c55e, #16a34a) !important; }
.badge.bg-primary { background: var(--grad-brand) !important; }

/* ═══════════════════════════════════════════════
   ENCABEZADOS DE SECCIÓN
═══════════════════════════════════════════════ */
.section-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}
.section-title {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}
h3.h6.text-uppercase.text-muted {
  font-size: .72rem !important;
  font-weight: 700 !important;
  letter-spacing: .08em;
  color: var(--text-muted) !important;
}

/* Line decorativa para secciones */
.section-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.section-header .section-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: rgba(124,58,237,.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.section-header .section-icon .bi { color: var(--brand); font-size: 1rem; }

/* ═══════════════════════════════════════════════
   ALERTS
═══════════════════════════════════════════════ */
.alert {
  border: none;
  border-radius: var(--r-lg);
  font-size: .93rem;
  font-weight: 500;
  padding: .9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}
.alert-success {
  background: rgba(34,197,94,.10);
  color: #15803d;
  border-left: 4px solid #22c55e;
}
.alert-danger {
  background: rgba(244,63,94,.10);
  color: #be123c;
  border-left: 4px solid #f43f5e;
}
.alert-warning {
  background: rgba(245,158,11,.10);
  color: #b45309;
  border-left: 4px solid #f59e0b;
}
.alert-info {
  background: rgba(6,182,212,.10);
  color: #0e7490;
  border-left: 4px solid #06b6d4;
}
.rounded-2xl { border-radius: var(--r-lg) !important; }

/* ═══════════════════════════════════════════════
   FORMULARIOS
═══════════════════════════════════════════════ */
.form-control, .form-select {
  border: 2px solid var(--border);
  border-radius: var(--r-md) !important;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: .92rem;
  color: var(--text-main);
  background: var(--surface);
  padding: .6rem 1rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(124,58,237,.12);
  outline: none;
  background: var(--surface);
  color: var(--text-main);
}
.form-control:hover:not(:focus), .form-select:hover:not(:focus) {
  border-color: var(--border-dark);
}
.form-label {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 600;
  font-size: .88rem;
  color: var(--text-sub);
  margin-bottom: .4rem;
}
.form-text { font-size: .8rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════
   AVATAR
═══════════════════════════════════════════════ */
.avatar {
  width: 40px; height: 40px;
  object-fit: cover;
  border-radius: 50%;
  border: 2.5px solid var(--border);
}

/* ═══════════════════════════════════════════════
   STORE HERO
═══════════════════════════════════════════════ */
.store-hero { background: transparent !important; border: none !important; }
.store-hero .store-logo-lg {
  width: 200px; height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 5px solid var(--surface);
  box-shadow: var(--shadow-lg);
}
.store-hero .store-name {
  font-family: 'Outfit', system-ui, sans-serif;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .6px;
  margin-top: .3rem;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.store-banner {
  max-height: 300px;
  object-fit: cover;
  width: 100%;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
}

/* ═══════════════════════════════════════════════
   FAB CHAT
═══════════════════════════════════════════════ */
#chat-fab {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 1050;
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: 0 6px 28px rgba(124,58,237,.50);
  transition: transform var(--t-spring), box-shadow var(--t-base);
  color: #fff !important;
  font-size: 1.4rem;
  -webkit-text-fill-color: #fff;
}
#chat-fab:hover {
  transform: scale(1.12) translateY(-3px);
  box-shadow: 0 10px 38px rgba(124,58,237,.60);
  color: #fff !important;
}
#chat-fab .notif {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 22px; height: 22px;
  border-radius: var(--r-pill);
  background: var(--accent-rose);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: none;
  align-items: center; justify-content: center;
  padding: 0 5px;
  border: 2.5px solid var(--surface);
  -webkit-text-fill-color: white;
}
#chat-fab.show .notif { display: flex; }

/* ═══════════════════════════════════════════════
   CHAT BUBBLES
═══════════════════════════════════════════════ */
.chat-bubble {
  background: var(--surface-3);
  border-radius: 1.1rem 1.1rem 1.1rem .25rem;
  padding: .8rem 1.05rem;
  font-size: .92rem;
  border: 1px solid var(--border);
}
.chat-bubble.me {
  background: linear-gradient(135deg, rgba(124,58,237,.12), rgba(6,182,212,.08));
  border-radius: 1.1rem 1.1rem .25rem 1.1rem;
  border-color: rgba(124,58,237,.15);
}

/* ═══════════════════════════════════════════════
   KPI CARDS (VENDOR DASHBOARD)
═══════════════════════════════════════════════ */
.kpi-chart { min-height: 280px; }
.kpi-chart canvas { display: block; width: 100%; height: 260px !important; max-height: 420px; }
.card-link-wrap .card {
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.card-link-wrap:hover .card {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* ═══════════════════════════════════════════════
   MODAL / BACKDROP
═══════════════════════════════════════════════ */
.td-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26,21,53,.40);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1040;
  opacity: 0;
  transition: opacity var(--t-base);
  pointer-events: none;
}
.td-modal-backdrop.show {
  opacity: 1;
  pointer-events: all;
}
.modal-content {
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  background: var(--surface);
}
.modal-header {
  border-bottom: 1.5px solid var(--border);
  padding: 1.3rem 1.6rem;
}
.modal-footer {
  border-top: 1.5px solid var(--border);
  padding: 1.1rem 1.6rem;
}

/* ═══════════════════════════════════════════════
   TABS / PILLS
═══════════════════════════════════════════════ */
.nav-tabs {
  border-bottom: 2px solid var(--border);
  gap: .3rem;
}
.nav-tabs .nav-link {
  border: none;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-muted);
  padding: .65rem 1.1rem;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.nav-tabs .nav-link:hover { color: var(--brand); }
.nav-tabs .nav-link.active {
  color: var(--brand) !important;
  border-bottom-color: var(--brand);
  background: transparent;
}
.nav-pills .nav-link {
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-sub);
  transition: background var(--t-fast), color var(--t-fast);
}
.nav-pills .nav-link.active {
  background: var(--grad-brand);
  color: #fff;
  -webkit-text-fill-color: #fff;
}

/* ═══════════════════════════════════════════════
   TABLAS
═══════════════════════════════════════════════ */
.table {
  color: var(--text-main);
  font-size: .9rem;
}
.table th {
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.table td { border-color: var(--border); vertical-align: middle; }
.table-hover tbody tr:hover { background: rgba(124,58,237,.03); }

/* ═══════════════════════════════════════════════
   SKELETON LOADING
═══════════════════════════════════════════════ */
@keyframes shimmer {
  from { background-position: -500px 0; }
  to   { background-position: 500px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #ede9fe 25%, #f5f3ff 50%, #ede9fe 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}

/* ═══════════════════════════════════════════════
   ANIMACIONES
═══════════════════════════════════════════════ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
  animation: fade-up .5s cubic-bezier(.4,0,.2,1) both;
}
.fade-up-d1 { animation-delay: .06s; }
.fade-up-d2 { animation-delay: .12s; }
.fade-up-d3 { animation-delay: .18s; }
.fade-up-d4 { animation-delay: .24s; }

@keyframes float1 {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-10px); }
}
@keyframes float2 {
  0%,100% { transform: translateY(0px) rotate(-2deg); }
  50%      { transform: translateY(-7px) rotate(2deg); }
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
footer.border-top {
  border-top: 1.5px solid var(--border) !important;
  background: var(--surface);
  margin-top: 3rem;
}
footer .container {
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}
footer .text-muted {
  color: var(--text-muted) !important;
  font-size: .88rem;
}
footer .link-secondary {
  color: var(--text-muted) !important;
  font-size: .88rem;
  font-weight: 600;
  transition: color var(--t-fast), transform var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
footer .link-secondary:hover {
  color: var(--brand) !important;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════
   SOCIAL BUTTONS / LIKES
═══════════════════════════════════════════════ */
.social-round .btn { border-radius: var(--r-pill) !important; }
.btn-like { border-radius: var(--r-pill) !important; }

/* ═══════════════════════════════════════════════
   BOTÓN CORAZÓN FLOTANTE
═══════════════════════════════════════════════ */
.btn-heart-float {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.95);
  color: #fca5a5;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.16);
  transition: transform var(--t-spring), background var(--t-base), color var(--t-base);
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.btn-heart-float:hover { transform: scale(1.18); }
.btn-heart-float.liked {
  background: linear-gradient(135deg, #f43f5e, #ef4444) !important;
  color: #fff !important;
}
.btn-heart-float i { font-size: 1.15rem; }

/* ═══════════════════════════════════════════════
   UTILIDADES
═══════════════════════════════════════════════ */
.rounded-2xl  { border-radius: var(--r-lg) !important; }
.rounded-3xl  { border-radius: var(--r-xl) !important; }
.bg-surface   { background: var(--surface) !important; }
.bg-surface-2 { background: var(--surface-2) !important; }
.text-brand   { color: var(--brand) !important; }
.border-brand { border-color: var(--brand-light) !important; }
.upper-bold   { text-transform: uppercase; font-weight: 700; font-family: 'Outfit', system-ui, sans-serif; }
.owner-small  { font-size: .85rem; color: var(--text-muted); }
.store-search { border-radius: var(--r-pill) !important; }
.ratio .img-cover { width:100%; height:100%; object-fit:cover; display:block; }
.report-card  { border-left: 4px solid var(--brand); border-radius: var(--r-md); }

/* Chips de categorías */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--surface-3);
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  padding: .3rem .85rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.chip:hover, .chip.active {
  background: rgba(124,58,237,.1);
  border-color: var(--brand-light);
  color: var(--brand);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════
   PRODUCT DETAIL PAGE
═══════════════════════════════════════════════ */
.product-gallery-card { position: sticky; top: calc(var(--nav-h) + 2rem); }
.product-info-sticky { position: sticky; top: calc(var(--nav-h) + 1.2rem); }

.badge-category {
  background: var(--surface-3);
  color: var(--brand);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: .45rem .9rem;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
}
.store-link-pill {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 600;
  padding: .35rem .8rem;
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: all var(--t-fast);
}
.store-link-pill:hover { border-color: var(--brand-light); color: var(--brand); }

.product-title-lg {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1;
  color: var(--text-main);
  letter-spacing: -1px;
}

.price-section { display: flex; align-items: center; }
.price-hero {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 2.3rem;
  color: var(--brand);
  letter-spacing: -0.5px;
}
.price-old {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 500;
}
.badge-discount {
  background: #fef2f2;
  color: #ef4444;
  font-weight: 800;
  font-size: .85rem;
  padding: .25rem .6rem;
  border-radius: var(--r-sm);
}

.stat-mini { font-size: .88rem; font-weight: 600; color: var(--text-sub); }

.product-description {
  font-size: 1.05rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.comment-box-card {
  background: var(--surface-2);
  border: 4px dashed var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}
.alert-soft-brand {
  background: rgba(124,58,237,.06);
  border: 1px solid rgba(124,58,237,.1);
  color: var(--brand);
  padding: 1rem 1.25rem;
  border-radius: var(--r-md);
}

/* ═══════════════════════════════════════════════
   STORE PROFILE PAGE
═══════════════════════════════════════════════ */
.store-profile-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}
.store-profile-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 120px;
  background: var(--grad-brand);
  opacity: 0.08;
}
.store-profile-inner { position: relative; z-index: 1; padding: 2rem; }

.store-logo-wrapper { width: 120px; height: 120px; border-radius: 50%; padding: 4px; background: #fff; box-shadow: var(--shadow-md); }
.store-logo-wrapper.has-status { background: var(--grad-brand); }
.store-logo-lg { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #fff; }

.store-name { font-family: 'Outfit', sans-serif; font-weight: 900; font-size: 1.75rem; color: var(--text-main); letter-spacing: -0.5px; }

.store-category-badge {
  background: rgba(124,58,237,.08);
  color: var(--brand);
  font-size: .75rem;
  font-weight: 700;
  padding: .3rem .75rem;
  border-radius: var(--r-sm);
}

.store-description { font-size: .95rem; color: var(--text-sub); max-width: 600px; line-height: 1.6; }

.store-stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: .8rem 0; }
.stat-item { font-size: .85rem; color: var(--text-muted); }
.stat-item strong { color: var(--text-main); font-size: 1rem; margin-right: .2rem; }

.social-btn {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  transition: transform var(--t-spring), filter var(--t-fast);
  text-decoration: none;
}
.social-btn:hover { transform: translateY(-3px); filter: brightness(1.1); color: #fff; }
.social-facebook { background: #1877f2; }
.social-instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-whatsapp { background: #25d366; }
.social-tiktok { background: #000; }
.social-x { background: #000; }
.social-website { background: var(--brand); }
.social-telegram { background: #0088cc; }
.social-custom { background: var(--text-sub); }

.btn-follow {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  border-radius: var(--r-md);
  padding: .7rem 1.5rem;
  border: none;
  transition: all var(--t-fast);
}
.btn-follow:hover { background: var(--brand-dark); transform: translateY(-2px); box-shadow: var(--shadow-brand); }
.btn-follow--active { background: var(--surface-3); color: var(--brand); border: 1.5px solid var(--brand-light); }

.btn-like-store {
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--r-md);
  transition: all var(--t-fast);
}
.btn-like-store:hover { border-color: var(--accent-rose); color: var(--accent-rose); }
.btn-like-store--active { background: #fff1f2; border-color: var(--accent-rose); color: var(--accent-rose); }

.btn-outline-brand {
  color: var(--brand);
  border: 1.5px solid var(--brand);
  background-color: transparent;
}
.btn-outline-brand:hover {
  color: #fff;
  background-color: var(--brand);
  border-color: var(--brand);
  box-shadow: var(--shadow-brand);
}

/* ═══════════════════════════════════════════════
   BOTTOM NAV MOBILE (opcional)
═══════════════════════════════════════════════ */
.bottom-nav {
  display: none;
}
@media (max-width: 575px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(20px);
    border-top: 1.5px solid var(--border);
    z-index: 1020;
    justify-content: space-around;
    align-items: center;
    padding: .5rem 0 calc(.5rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(124,58,237,.10);
  }
  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    color: var(--text-muted);
    font-size: .65rem;
    font-weight: 600;
    font-family: 'Outfit', system-ui, sans-serif;
    padding: .3rem .5rem;
    border-radius: var(--r-md);
    transition: color var(--t-fast), background var(--t-fast);
    min-width: 56px;
    text-decoration: none;
  }
  .bottom-nav a .bi { font-size: 1.35rem; }
  .bottom-nav a:hover,
  .bottom-nav a.active {
    color: var(--brand);
    background: rgba(124,58,237,.08);
  }
  /* Espacio para el bottom nav */
  body { padding-bottom: 72px; }
  /* Ocultar FAB en móvil si hay bottom nav */
  #chat-fab { bottom: 84px; right: 14px; width: 50px; height: 50px; font-size: 1.2rem; }
}

/* ═══════════════════════════════════════════════
   CONTAINER
═══════════════════════════════════════════════ */
.container { padding-left: 1rem; padding-right: 1rem; }

/* ═══════════════════════════════════════════════
   RESPONSIVE GENERAL
═══════════════════════════════════════════════ */
@media (max-width: 575px) {
  .hero { padding: 1.6rem !important; border-radius: var(--r-lg); }
  .hero h1 { font-size: 1.75rem; }
  .card-product:hover { transform: translateY(-3px); }
  .btn-lg { padding: .62rem 1.4rem; font-size: .97rem; }
  /* Grilla más estrecha en phones */
  .col-6 { padding-left: .45rem; padding-right: .45rem; }
  .g-3 { --bs-gutter-x: .75rem; --bs-gutter-y: .75rem; }
}

@media (min-width: 576px) and (max-width: 991px) {
  .hero { padding: 2.5rem !important; }
}
