/* ==========================================================================
   BASTION AI - BAGS WORLD MLS COLOMBIA
   SISTEMA DE DISEÑO OFICIAL: MODO OSCURO DE LUJO + GRID MATRIX DE FONDO
   ========================================================================== */

:root {
  --bg-main: #06070a;
  --bg-surface: #0e1117;
  --bg-surface-elevated: #151922;
  --bg-glass: rgba(14, 17, 23, 0.88);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(230, 25, 46, 0.45);
  
  --primary-red: #e6192e;
  --primary-red-hover: #ff2a40;
  --primary-red-glow: rgba(230, 25, 46, 0.35);
  
  --primary-gold: #e3c274;
  --primary-gold-hover: #f5eccd;
  --primary-gold-glow: rgba(227, 194, 116, 0.3);
  
  --accent-blue: #38bdf8;
  --accent-emerald: #10b981;
  --accent-purple: #a855f7;
  --whatsapp-green: #25d366;
  --whatsapp-green-hover: #20ba59;
  
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-card: 0 14px 35px -8px rgba(0, 0, 0, 0.85);
  --shadow-glow-red: 0 0 25px rgba(230, 25, 46, 0.35);
  --shadow-glow-gold: 0 0 25px rgba(227, 194, 116, 0.28);
  --shadow-glow-wa: 0 0 25px rgba(37, 211, 102, 0.35);
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-brand: 'Montserrat', sans-serif;
}

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

/* ==========================================================================
   BODY & DARK LUXURY BACKGROUND (SOLO PATTERN - SIN CUADRÍCULA)
   ========================================================================== */
body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  background-image: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(230, 25, 46, 0.12), transparent 75%);
  background-size: 100% 100%;
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 90px;
  overflow-x: hidden;
}

/* Canvas Background Interactivo */
#black-hole-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
}

/* Malla de Puntos Adicional */
.dot-pattern-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  mask-image: radial-gradient(ellipse at 50% 30%, rgba(0,0,0,1) 40%, rgba(0,0,0,0.05) 90%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, rgba(0,0,0,1) 40%, rgba(0,0,0,0.05) 90%);
}

.app-wrapper {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   TOP BAR HUD & MULTI-ROLE SWITCHER
   ========================================================================== */
.top-demo-hud {
  background: rgba(8, 10, 15, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.hud-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-logo-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(230, 25, 46, 0.6));
  background: transparent;
  transition: transform 0.2s ease;
}

.hud-logo-img:hover {
  transform: scale(1.08) rotate(4deg);
}

.hud-title {
  font-size: 17px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
  font-family: var(--font-brand);
}

.hud-title span {
  color: var(--primary-red);
  font-weight: 900;
  text-shadow: 0 0 14px rgba(230, 25, 46, 0.7);
}

.role-switcher-tabs {
  display: flex;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.role-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.role-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.role-tab-btn.active {
  background: linear-gradient(135deg, var(--primary-red) 0%, #a80f20 100%);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(230, 25, 46, 0.5);
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-session-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-session-btn:hover {
  border-color: var(--primary-red);
  box-shadow: 0 0 14px rgba(230, 25, 46, 0.35);
  transform: translateY(-1px);
}

.auth-icon-badge {
  font-size: 14px;
}

.auth-role-pill {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.quick-auth-btn {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main);
}

.quick-auth-btn:hover {
  border-color: var(--primary-red);
  background: rgba(230, 25, 46, 0.08);
  transform: translateX(3px);
}

.auth-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 1px solid transparent;
}

.store-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-select {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

.hud-select:focus {
  border-color: var(--primary-red);
}

.btn-reset-demo {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset-demo:hover {
  color: #fff;
  border-color: var(--text-secondary);
}

/* ==========================================================================
   STORE HEADER (MARCA BLANCA)
   ========================================================================== */
.store-header {
  background: linear-gradient(180deg, rgba(14, 17, 23, 0.95) 0%, rgba(6, 7, 10, 0.8) 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 28px 20px;
}

.store-header-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.store-info-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.store-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(14, 17, 23, 0.9);
  border: 2px solid var(--primary-red);
  box-shadow: 0 0 20px rgba(230, 25, 46, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 4px;
}

.store-meta h1 {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-verified {
  font-size: 10px;
  font-weight: 800;
  color: #ffffff;
  background: #10b981;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.store-meta p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 4px;
  max-width: 750px;
}

.store-location-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--primary-gold);
  margin-top: 6px;
  background: rgba(227, 194, 116, 0.08);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(227, 194, 116, 0.25);
}

.btn-wa-header {
  background: #25d366;
  border: none;
  color: #000000;
  font-weight: 800;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-wa-header:hover {
  background: #20ba59;
  box-shadow: var(--shadow-glow-wa);
  transform: translateY(-2px);
}

/* ==========================================================================
   MAIN WRAPPER & BRAND FILTER BAR
   ========================================================================== */
.main-wrapper {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px;
}

.brand-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}

.brand-chip-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.5px;
}

.brand-chip-btn:hover {
  color: #fff;
  border-color: rgba(230, 25, 46, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.brand-chip-btn.active {
  background: linear-gradient(135deg, rgba(230, 25, 46, 0.25) 0%, rgba(230, 25, 46, 0.1) 100%);
  border-color: var(--primary-red);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(230, 25, 46, 0.35);
}

/* ==========================================================================
   FILTER CARD & SIZING PILLS
   ========================================================================== */
.filter-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 26px;
  box-shadow: var(--shadow-card);
}

.filter-header-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-header-title h2 {
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}

.filter-header-title h2 span {
  color: var(--primary-red);
}

.active-results-badge {
  font-size: 12px;
  color: var(--primary-gold);
  background: rgba(227, 194, 116, 0.12);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(227, 194, 116, 0.3);
  font-weight: 800;
}

.filter-row-section {
  margin-bottom: 14px;
}

.filter-row-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.size-pills-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.size-pill-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.size-pill-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.size-pill-btn.active {
  background: var(--primary-red);
  color: #ffffff;
  font-weight: 900;
  border-color: var(--primary-red);
  box-shadow: 0 0 14px rgba(230, 25, 46, 0.4);
}

.search-inputs-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 768px) {
  .search-inputs-grid {
    grid-template-columns: 1fr;
  }
}

.search-box-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.search-input-field {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 13px;
  padding: 10px 14px 10px 38px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s ease;
}

.search-input-field:focus {
  border-color: var(--primary-red);
}

.select-group-wrapper {
  display: flex;
  gap: 8px;
}

.custom-select {
  flex: 1;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}

.custom-select:focus {
  border-color: var(--primary-red);
}

/* ==========================================================================
   PRODUCTS GRID & LUXURY CARDS
   ========================================================================== */
.products-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-card);
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(230, 25, 46, 0.5);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.9), var(--shadow-glow-red);
}

.product-image-box {
  position: relative;
  width: 100%;
  height: 260px;
  background: #080a0f;
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.category-tag {
  font-size: 10px;
  font-weight: 800;
  background: rgba(14, 17, 23, 0.9);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 6px;
}

.product-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.price-box {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.price-val {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
}

.btn-card-wa {
  background: linear-gradient(135deg, var(--primary-red) 0%, #a80f20 100%);
  border: none;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(230, 25, 46, 0.35);
}

.btn-card-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(230, 25, 46, 0.55);
}

/* ==========================================================================
   ADMIN PANELS (STORE & SUPPLIER)
   ========================================================================== */
.admin-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 20px;
  flex-wrap: wrap;
}

.admin-heading-title {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin-top: 4px;
}

.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(230, 25, 46, 0.15);
  color: var(--primary-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-number {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

.table-container-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.table-responsive-box {
  overflow-x: auto;
}

.mls-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.mls-data-table th {
  padding: 12px 14px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-subtle);
}

.mls-data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.td-product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.td-product-thumb {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.td-product-name {
  font-weight: 700;
  color: #fff;
}

.td-product-sku {
  font-size: 11px;
  color: var(--text-muted);
}

.table-input-price {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  width: 110px;
  outline: none;
}

.margin-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.margin-high {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.margin-normal {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Switch Toggle */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 20px;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider-round {
  background-color: var(--primary-red);
}

input:checked + .slider-round:before {
  transform: translateX(16px);
  background-color: #fff;
}

.btn-action-sm {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-sm:hover {
  border-color: var(--primary-red);
  color: #fff;
}

/* ==========================================================================
   ROI CALCULATOR & DIRECTORY
   ========================================================================== */
.roi-calc-box {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.85), var(--shadow-glow-red);
}

.roi-calc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.roi-range-slider {
  accent-color: var(--primary-red);
  cursor: pointer;
}

.directory-grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.store-directory-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.store-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.store-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--primary-red);
  color: var(--primary-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.store-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.store-card-location {
  font-size: 11px;
  color: var(--text-muted);
}

.store-card-body {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.95);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-backdrop.open .modal-dialog {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
}

.btn-close-modal:hover {
  color: #ffffff;
}

/* Forms inside Modals */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary-red);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-red) 0%, #a80f20 100%);
  border: none;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 800;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(230, 25, 46, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 25, 46, 0.6);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

/* Colorway Chips */
.colorway-chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.colorway-badge-chip {
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.colorway-badge-chip:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.colorway-badge-chip.active {
  border-color: var(--primary-gold);
  color: #ffffff;
  background: rgba(227, 194, 116, 0.16);
  box-shadow: 0 0 12px rgba(227, 194, 116, 0.3);
}

.colorway-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-gold);
  display: inline-block;
}

/* ==========================================================================
   FLOATING CART & CART DRAWER
   ========================================================================== */
.floating-cart-bar {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: linear-gradient(135deg, #0e1117 0%, #171c26 100%);
  border: 1.5px solid var(--primary-gold);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(227, 194, 116, 0.3);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
}

.floating-cart-bar.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.floating-cart-bar:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.9), 0 0 25px rgba(227, 194, 116, 0.45);
}

.cart-pill-icon {
  background: var(--primary-gold);
  color: #000;
  font-weight: 900;
  font-size: 13px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-pill-details {
  display: flex;
  flex-direction: column;
}

.cart-pill-count {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.cart-pill-total {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-emerald);
}

.cart-pill-btn-action {
  background: linear-gradient(135deg, var(--primary-gold) 0%, #b8860b 100%);
  color: #000;
  font-weight: 900;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.cart-items-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 250px;
  overflow-y: auto;
  margin: 16px 0;
  padding-right: 6px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface-elevated);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.cart-item-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.cart-item-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.cart-item-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary-gold);
}

.cart-item-remove {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
}

.reservation-timer-box {
  background: rgba(227, 194, 116, 0.12);
  border: 1px solid rgba(227, 194, 116, 0.35);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-gold);
  margin-bottom: 14px;
}

.dispatch-mode-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.dispatch-radio-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.dispatch-radio-card:hover, .dispatch-radio-card.selected {
  border-color: var(--primary-gold);
  background: rgba(227, 194, 116, 0.08);
}

.dispatch-radio-card input[type="radio"] {
  accent-color: var(--primary-gold);
  margin-top: 3px;
}

/* ==========================================================================
   TOASTS
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 75px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: rgba(14, 17, 23, 0.95);
  border: 1px solid var(--primary-red);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(230, 25, 46, 0.35);
  backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease forwards;
}

@keyframes toastSlideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   BASTION AI OFFICIAL WATERMARK (MANDATORY RULE)
   ========================================================================== */
.bastion-watermark {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 9999;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: rgba(243, 232, 207, 0.85);
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid rgba(201, 154, 60, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
  user-select: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  text-decoration: none;
}
.bastion-watermark strong {
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #ffffff;
}
.bastion-watermark .sparkle {
  color: #e3c274;
  font-size: 12px;
}
.bastion-watermark:hover {
  color: #ffffff;
  border-color: rgba(227, 194, 116, 0.85);
  box-shadow: 0 0 16px rgba(201, 154, 60, 0.4);
  transform: translateY(-2px);
}
@media (max-width: 600px) {
  .bastion-watermark {
    bottom: 14px;
    left: 12px;
    font-size: 10px;
    padding: 5px 14px;
  }
}
@media print {
  .bastion-watermark { display: none !important; }
}

/* ==========================================================================
   BARRA DE CLIENTE B2B PRIVADO (BAGS WORLD / BOUTIQUE PARTNER)
   ========================================================================== */
.client-auth-hud {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 99;
  padding: 8px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.client-auth-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==========================================================================
   CORNER TAGS & DIRECTORY FILTERING (BASTION AI SAAS - LUXURY DARK)
   ========================================================================== */
.corner-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.corner-tag-partner {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}
.corner-tag-supplier {
  background: rgba(227, 194, 116, 0.15);
  color: #e3c274;
  border: 1px solid rgba(227, 194, 116, 0.45);
}

.btn-filter-role {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-filter-role.active {
  background: var(--primary-gold) !important;
  color: #000000 !important;
  border-color: var(--primary-gold) !important;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(227, 194, 116, 0.4);
}

.btn-report-period {
  transition: all 0.2s ease;
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.btn-report-period.active {
  background: var(--primary-gold) !important;
  color: #000000 !important;
  border-color: var(--primary-gold) !important;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(227, 194, 116, 0.35);
}

.campaign-badge-pill {
  background: linear-gradient(135deg, #e6192e, #b91c1c);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(230, 25, 46, 0.35);
}


/* ==========================================================================
   SISTEMA DE 3 TEMAS INTERNOS (LLAMATIVOS, MODERNOS Y COOL)
   ========================================================================== */

/* TEMA 1: Obsidian & Royal Gold (Predeterminado - Alta Marroquinería de Lujo) */
[data-theme="obsidian-gold"], :root {
  --bg-main: #06070a;
  --bg-surface: #0e1117;
  --bg-surface-elevated: #151922;
  --bg-glass: rgba(14, 17, 23, 0.88);
  --border-subtle: rgba(227, 194, 116, 0.22);
  --border-accent: rgba(230, 25, 46, 0.45);
  
  --primary-red: #e6192e;
  --primary-red-hover: #ff2a40;
  --primary-red-glow: rgba(230, 25, 46, 0.35);
  
  --primary-gold: #e3c274;
  --primary-gold-hover: #f5eccd;
  --primary-gold-glow: rgba(227, 194, 116, 0.3);
  
  --accent-blue: #38bdf8;
  --accent-emerald: #10b981;
  --accent-purple: #a855f7;
  --theme-dot-color: rgba(227, 194, 116, 0.45);
  --theme-radial-glow: rgba(230, 25, 46, 0.12);
  --theme-name: "👑 Obsidian Gold";
}

/* TEMA 2: Cyber Velvet & Neon Rose (Vanguardista, Neón Eléctrico y Street Luxury) */
[data-theme="cyber-velvet"] {
  --bg-main: #090614;
  --bg-surface: #110c26;
  --bg-surface-elevated: #1a1338;
  --bg-glass: rgba(17, 12, 38, 0.90);
  --border-subtle: rgba(255, 42, 133, 0.30);
  --border-accent: rgba(0, 240, 255, 0.55);
  
  --primary-red: #ff2a85; /* Rosa Neón Eléctrico */
  --primary-red-hover: #ff55a3;
  --primary-red-glow: rgba(255, 42, 133, 0.45);
  
  --primary-gold: #00f0ff; /* Cyan Luminoso Eléctrico */
  --primary-gold-hover: #66f6ff;
  --primary-gold-glow: rgba(0, 240, 255, 0.4);
  
  --accent-blue: #00f0ff;
  --accent-emerald: #10b981;
  --accent-purple: #bd00ff;
  --theme-dot-color: rgba(0, 240, 255, 0.45);
  --theme-radial-glow: rgba(255, 42, 133, 0.16);
  --theme-name: "⚡ Cyber Velvet";
}

/* TEMA 3: Emerald Mirage & Royal Mint (Verde Esmeralda Colombiana & Menta Glow) */
[data-theme="emerald-mirage"] {
  --bg-main: #030d09;
  --bg-surface: #071912;
  --bg-surface-elevated: #0d281d;
  --bg-glass: rgba(7, 25, 18, 0.90);
  --border-subtle: rgba(5, 255, 161, 0.28);
  --border-accent: rgba(245, 158, 11, 0.55);
  
  --primary-red: #05ffa1; /* Menta Neón Radiante */
  --primary-red-hover: #50ffbe;
  --primary-red-glow: rgba(5, 255, 161, 0.45);
  
  --primary-gold: #f59e0b; /* Oro Ámbar Imperial */
  --primary-gold-hover: #fbbf24;
  --primary-gold-glow: rgba(245, 158, 11, 0.35);
  
  --accent-blue: #06b6d4;
  --accent-emerald: #05ffa1;
  --accent-purple: #10b981;
  --theme-dot-color: rgba(5, 255, 161, 0.45);
  --theme-radial-glow: rgba(5, 255, 161, 0.14);
  --theme-name: "🌿 Emerald Mirage";
}

/* Selector de Tema UI */
.theme-selector-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-subtle);
  transition: all 0.2s ease;
}
.theme-selector-wrapper:hover {
  border-color: var(--primary-gold);
}
.theme-selector-select {
  background: transparent;
  color: #ffffff;
  border: none;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}
.theme-selector-select option {
  background: #0b0f19;
  color: #ffffff;
}

/* Floating Quick Theme Toggle Button */
.btn-floating-theme-switch {
  position: fixed;
  bottom: 84px;
  right: 20px;
  z-index: 9980;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 4px 18px rgba(0,0,0,0.55);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn-floating-theme-switch:hover {
  border-color: var(--primary-gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.7), 0 0 16px var(--primary-gold-glow);
}

/* =========================================================================
   EMPLEADO DIGITAL 24/7 (SISTEMA IA DE ATENCIÓN Y VENTAS DE BOLSOS)
   ========================================================================= */
.floating-empleado-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9985;
  background: linear-gradient(135deg, #090d16 0%, #1e293b 100%);
  color: #ffffff;
  border: 1.5px solid var(--border-accent);
  border-radius: 999px;
  padding: 8px 16px 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px var(--primary-red-glow);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-family: inherit;
}

.floating-empleado-btn:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: var(--primary-red);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 24px var(--primary-red-glow);
}

.bot-avatar-badge {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(230, 25, 46, 0.15);
  border: 1.5px solid var(--primary-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.bot-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #090d16;
  box-shadow: 0 0 6px #22c55e;
}

.bot-label-pill {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.bot-title {
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.bot-status {
  font-size: 10px;
  color: #4ade80;
  font-weight: 600;
}

/* Chat container inside modal */
.empleado-chat-wrapper {
  display: flex;
  flex-direction: column;
  height: 480px;
  max-height: 70vh;
}

.empleado-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #090d16;
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 88%;
  animation: fadeInMsg 0.2s ease-out;
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg.bot {
  align-self: flex-start;
}

.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1e293b;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.chat-msg.user .chat-msg-avatar {
  background: var(--primary-red);
}

.chat-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.45;
}

.chat-msg.bot .chat-msg-bubble {
  background: #141a26;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top-left-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.chat-msg.user .chat-msg-bubble {
  background: var(--bg-surface-elevated);
  color: #ffffff;
  border: 1px solid var(--primary-gold);
  border-top-right-radius: 4px;
}

.empleado-quick-actions {
  padding: 10px 14px;
  background: #0e1117;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
}

.quick-action-chip {
  background: #1a2233;
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.quick-action-chip:hover {
  background: var(--primary-gold);
  color: #000000;
  border-color: var(--primary-gold);
}

.empleado-chat-input-bar {
  padding: 12px 14px;
  background: #0e1117;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
  align-items: center;
}

.copier-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.copier-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
  transition: all 0.2s;
}

.copier-card:hover {
  border-color: var(--primary-gold);
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

@media (max-width: 600px) {
  .floating-empleado-btn {
    bottom: 14px;
    right: 12px;
    padding: 6px 12px 6px 8px;
    gap: 8px;
  }
  .btn-floating-theme-switch {
    bottom: 74px;
    right: 12px;
    font-size: 10px;
    padding: 5px 10px;
  }
  .bot-avatar-badge {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }
  .bot-title {
    font-size: 10px;
  }
  .bot-status {
    font-size: 9px;
  }
}


/* =========================================================================
   ÚNICO BOTÓN MAESTRO PARA ALTERNAR TEMAS VISUALES
   ========================================================================= */
.btn-floating-theme-switch {
  position: fixed;
  bottom: 84px;
  right: 20px;
  z-index: 9980;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  user-select: none;
}
.btn-floating-theme-switch:hover {
  border-color: var(--primary-gold);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.7), 0 0 16px var(--primary-gold-glow);
}


/* ==========================================================================
   OPTIMIZACIONES ULTRA-FLUIDAS PARA DISPOSITIVOS MÓVILES (BAGS WORLD MLS)
   ADAPTADO DE SNEAKER WORLD MLS CON APLICACIÓN A MARROQUINERÍA Y TEMAS
   ========================================================================== */

@media (max-width: 768px) {
  /* Layout Containers */
  .main-wrapper {
    padding: 12px 10px;
  }

  /* HUD Superior Supremo (Admin) */
  .top-demo-hud {
    padding: 8px 12px;
  }
  .hud-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .hud-brand {
    justify-content: space-between;
    width: 100%;
  }
  .role-switcher-tabs {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 3px;
    display: flex;
    gap: 4px;
  }
  .role-switcher-tabs::-webkit-scrollbar {
    display: none;
  }
  .role-tab-btn {
    font-size: 11px;
    padding: 6px 10px;
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Client Auth HUD (Bodega / Boutique Partner) */
  .client-auth-hud {
    padding: 8px 12px;
  }
  .client-auth-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .client-auth-container > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
  }
  .btn-action-sm {
    font-size: 11px;
    padding: 6px 10px;
  }

  /* Storefront Header */
  .store-header {
    padding: 14px 12px;
  }
  .store-header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .store-info-left {
    gap: 12px;
  }
  .store-avatar {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
  #storefront-name {
    font-size: 18px;
    line-height: 1.25;
  }
  #storefront-tagline {
    font-size: 11px;
  }
  .store-header-cta {
    width: 100%;
  }
  .btn-wa-header {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 13px;
  }

  /* Barra de Categorías / Filtros - Deslizamiento suave */
  .category-filter-bar {
    gap: 6px;
    padding-bottom: 6px;
    margin-bottom: 14px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overflow-x: auto;
    display: flex;
  }
  .category-filter-bar::-webkit-scrollbar {
    display: none;
  }
  .category-chip-btn {
    padding: 6px 12px;
    font-size: 11px;
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Card de Filtros */
  .filter-card {
    padding: 14px 12px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
  }
  .search-inputs-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
  }

  /* Dashboard de Bodega y Partner */
  .admin-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
  }
  .admin-heading-title {
    font-size: 18px;
  }
  .admin-top-bar > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .admin-top-bar > div:last-child button {
    width: 100%;
    justify-content: center;
  }

  /* Stats Cards Grid */
  .stats-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }
  .stats-cards-grid .stat-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .stat-card {
    padding: 12px 10px;
    gap: 10px;
  }
  .stat-icon-badge {
    width: 36px;
    height: 36px;
    font-size: 18px;
    border-radius: 8px;
  }
  .stat-number {
    font-size: 16px;
  }
  .stat-label {
    font-size: 10px;
    line-height: 1.2;
  }

  /* Tablas de Datos con Scroll Horizontal Limpio */
  .table-container-card {
    padding: 14px 10px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
  }
  .table-responsive-box {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border-radius: 8px;
  }
  .mls-data-table {
    min-width: 600px;
  }
  .mls-data-table th,
  .mls-data-table td {
    padding: 10px 8px;
    font-size: 12px;
  }

  /* Modales en Móvil - Bottom Sheet Nativo */
  .modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }
  .modal-dialog {
    max-height: 88vh;
    padding: 18px 14px;
    border-radius: 20px 20px 14px 14px;
    width: 100%;
    max-width: 100%;
    transform: translateY(20px);
    overflow-y: auto;
  }
  .modal-backdrop.open .modal-dialog {
    transform: translateY(0);
  }
}

/* ==========================================================================
   GRILLA DE 2 COLUMNAS PARA SMARTPHONES (MAX 640PX)
   ========================================================================== */
@media (max-width: 640px) {
  .products-grid-layout {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .product-card {
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  }
  .product-card:hover {
    transform: none; /* Evita parpadeos táctiles en móvil */
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  }

  .product-image-box {
    height: 148px;
  }

  .product-badges {
    top: 6px;
    left: 6px;
    right: 6px;
    gap: 4px;
  }
  .category-tag {
    font-size: 8px;
    padding: 2px 5px;
  }
  .sku-tag {
    font-size: 8px;
    padding: 2px 4px;
  }
  .campaign-badge-pill {
    display: none;
  }

  .product-body {
    padding: 10px 8px;
  }

  .product-name {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 32px;
  }

  .product-desc {
    display: none; /* Oculto en grilla móvil; visible en modal de detalle */
  }

  .product-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px solid var(--border-subtle);
  }

  .price-box {
    width: 100%;
  }
  .price-label {
    font-size: 8px !important;
    letter-spacing: 0.2px;
  }
  .price-val {
    font-size: 14px !important;
    font-weight: 900;
  }

  .btn-card-wa {
    width: 100%;
    justify-content: center;
    padding: 7px 8px;
    font-size: 11px;
    border-radius: 8px;
  }

  /* Ajuste de Botón Flotante de Tema en Móvil */
  .btn-floating-theme-switch {
    bottom: 58px;
    right: 12px;
    font-size: 10.5px;
    padding: 6px 12px;
  }

  /* Carrito flotante en móvil */
  .floating-cart-bar {
    bottom: 58px;
    left: 12px;
    padding: 6px 12px;
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .stats-cards-grid {
    grid-template-columns: 1fr;
  }
  .products-grid-layout {
    gap: 6px !important;
  }
  .product-image-box {
    height: 130px;
  }
}

