/* ==========================================================================
   DISEÑO VANGUARDISTA Y SISTEMA DE ESTILOS - E-COMMERCE CON INVENTARIO Y CRM
   ========================================================================== */

:root {
  /* Paleta Clara Premium (Default al abrir la página) */
  --bg-body: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-modal: rgba(255, 255, 255, 0.98);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-focus: #6366f1;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.15);
  
  --stock-green: #10b981;
  --stock-green-bg: rgba(16, 185, 129, 0.12);
  --stock-amber: #d97706;
  --stock-amber-bg: rgba(217, 119, 6, 0.12);
  --stock-red: #ef4444;
  --stock-red-bg: rgba(239, 68, 68, 0.12);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modo Oscuro (Selección Opcional por el Usuario) */
[data-theme="dark"] {
  --bg-body: #0a0e17;
  --bg-surface: #121826;
  --bg-card: rgba(26, 34, 52, 0.75);
  --bg-modal: rgba(18, 24, 38, 0.95);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-glow: rgba(99, 102, 241, 0.25);

  --stock-amber: #f59e0b;
  --stock-amber-bg: rgba(245, 158, 11, 0.15);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

/* Contenedor principal */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem 1.5rem;
}

/* ==========================================================================
   HEADER Y NAVEGACIÓN
   ========================================================================== */

header {
  position: relative;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.nav-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}

.brand-logo-badge {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28), 0 2px 6px rgba(0, 0, 0, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  overflow: hidden;
}

.brand:hover .brand-logo-badge {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 8px 24px rgba(129, 140, 248, 0.45);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-name-text {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 45%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  line-height: 1.2;
}

/* Buscador */
.search-container {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Desplegable Autocompletado de Búsqueda */
.search-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  max-height: 420px;
  overflow-y: auto;
  backdrop-filter: blur(16px);
  padding: 0.5rem 0;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-fast);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(99, 102, 241, 0.15);
}

.search-result-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

.search-result-info {
  flex: 1;
}

.search-result-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.search-result-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Acciones del Header */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-action {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.btn-action:hover {
  background: var(--bg-card);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: white;
  border: none;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-primary-hover), #4338ca);
  transform: translateY(-2px);
}

.cart-badge {
  background: var(--stock-red);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  position: absolute;
  top: -6px;
  right: -6px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   HERO Y BARRA DE CATEGORÍAS
   ========================================================================== */

/* ==========================================================================
   BANNER HERO JUVENIL (2172 x 724 px - Ratio 3:1)
   ========================================================================== */
.hero-banner-juvenil-section {
  width: 100%;
  margin-bottom: 2rem;
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-banner-juvenil-wrapper {
  position: relative;
  width: 90%;
  max-width: 1220px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  background: var(--bg-surface);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  aspect-ratio: 2170 / 725;
  display: block;
}

[data-theme="dark"] .hero-banner-juvenil-wrapper {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), 0 0 30px rgba(239, 68, 68, 0.12);
}

.hero-banner-juvenil-wrapper:hover {
  transform: translateY(-4px) scale(1.006);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.16), 0 8px 24px rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.45);
}

.hero-banner-juvenil-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-banner-juvenil-wrapper:hover .hero-banner-juvenil-img {
  transform: scale(1.015);
}

/* Efecto de resplandor / brillo sutil que recorre el banner en hover */
.hero-banner-sheen {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  transition: left 0.75s ease;
}

.hero-banner-juvenil-wrapper:hover .hero-banner-sheen {
  left: 140%;
}


/* Filtros de Categorías */
.category-nav {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.category-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.6rem 1.4rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.category-chip:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.category-chip.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* ==========================================================================
   TARJETAS DE CATEGORÍA / MARCA (VISTA INICIAL)
   ========================================================================== */

.category-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
}

.category-card-image-wrap {
  position: relative;
  width: 100%;
  height: 260px;
  background: #ffffff;
  overflow: hidden;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .category-card-image-wrap {
  background: #ffffff;
}

.category-card-img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
  transition: transform 0.3s ease-out;
  filter: none !important;
}

.category-card-img.is-product-cutout {
  object-fit: contain !important;
  padding: 1.2rem;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.14)) !important;
}

.category-card:hover .category-card-img {
  transform: scale(1.04) !important;
}

.category-card-badge-top {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 2;
}

.category-card-count-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
  color: white;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.category-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.category-card-tagline {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-primary);
  margin-bottom: 0.35rem;
}

.category-card-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a !important;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.category-card-desc {
  font-size: 0.88rem;
  color: #475569 !important;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
}

.category-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  gap: 1rem;
}

.category-card-price-info {
  display: flex;
  flex-direction: column;
}

.category-card-price-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-card-price-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--stock-green);
}

.btn-open-category {
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.1rem;
  font-size: 0.86rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 12px var(--accent-glow);
  white-space: nowrap;
  flex-shrink: 0;
}

.category-card:hover .btn-open-category {
  background: linear-gradient(135deg, var(--accent-primary-hover), #4338ca);
  transform: translateX(3px);
}

/* Encabezado al entrar a una categoría individual */
.category-view-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.2rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
}

.btn-back-categories {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-back-categories:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  transform: translateX(-3px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.category-view-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.category-view-title-group h2 {
  font-size: 1.35rem;
  font-weight: 800;
}

.category-view-badge-count {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
}

/* Conmutador de Modo de Vista (Showcase vs Mosaico) */
.view-mode-toggle {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.25rem;
  border-radius: 9999px;
  gap: 0.25rem;
  margin-left: auto;
}

.btn-view-mode {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-fast);
}

.btn-view-mode:hover {
  color: var(--text-primary);
}

.btn-view-mode.active {
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* ==========================================================================
   SHOWCASE INTERACTIVO DE PRODUCTOS Y SELECTOR DE SABORES
   ========================================================================== */

.product-showcase-wrapper {
  grid-column: 1 / -1;
  width: 100%;
  margin-bottom: 2rem;
  animation: fadeInShowcase 0.35s ease;
}

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

.showcase-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: box-shadow var(--transition-fast);
}

.showcase-card:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

/* Columna Izquierda: Escenario Visual de Producto */
.showcase-media-panel {
  background: #ffffff;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--border-color);
  overflow: hidden;
}

[data-theme="dark"] .showcase-media-panel {
  background: #ffffff;
}

.showcase-media-badges {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  z-index: 3;
}

.showcase-badge-brand {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.showcase-badge-puffs {
  background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
  color: #ffffff;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.showcase-image-stage {
  position: relative;
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  margin: 0.5rem 0;
}

.showcase-glow-circle {
  display: none;
}

.showcase-img {
  width: 96%;
  height: 96%;
  max-width: 98%;
  max-height: 98%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: opacity 0.2s ease-out, transform 0.25s ease-out;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.18));
  z-index: 2;
}

.showcase-img.is-changing {
  opacity: 0.3;
  transform: scale(0.97);
}

.showcase-media-footer {
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 3;
}

.showcase-flavor-pill {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.showcase-flavor-pill span {
  color: #ffffff !important;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--stock-green);
  box-shadow: 0 0 8px var(--stock-green);
  animation: pulseGreen 1.8s infinite;
  flex-shrink: 0;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Columna Derecha: Información, Selector de Sabores y Compra */
.showcase-details-panel {
  padding: 2.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  justify-content: center;
}

.showcase-category-tagline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-primary);
}

.showcase-sku {
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.showcase-product-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-top: 0.2rem;
}

.showcase-product-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Caja de Precios y Stock */
.showcase-pricing-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(241, 245, 249, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  gap: 1rem;
}

[data-theme="dark"] .showcase-pricing-box {
  background: rgba(0, 0, 0, 0.25);
}

.showcase-price-col {
  display: flex;
  flex-direction: column;
}

.showcase-price-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.showcase-price-amount {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--stock-green);
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.showcase-currency {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.showcase-stock-indicator {
  display: flex;
  align-items: center;
}

/* Sección de Sabores Disponibles */
.showcase-flavors-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.showcase-flavors-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.showcase-flavors-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.showcase-flavors-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
}

.showcase-flavors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.55rem;
  max-height: 230px;
  overflow-y: auto;
  padding: 0.35rem 0.35rem 0.35rem 0.1rem;
}

/* Scrollbar estilizado para la lista de sabores */
.showcase-flavors-grid::-webkit-scrollbar {
  width: 5px;
}
.showcase-flavors-grid::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 9999px;
}
.showcase-flavors-grid::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.35);
  border-radius: 9999px;
}

.showcase-flavor-btn {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  user-select: none;
}

.showcase-flavor-btn:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}

.showcase-flavor-btn.active {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.18);
  box-shadow: 0 0 14px var(--accent-glow);
}

.showcase-flavor-btn.active::after {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.72rem;
  color: var(--accent-primary);
  font-weight: 900;
}

.showcase-flavor-btn.out-stock {
  opacity: 0.45;
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.25);
  cursor: not-allowed;
}

.flavor-btn-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flavor-btn-stock {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.flavor-stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.flavor-stock-dot.in { background: var(--stock-green); }
.flavor-stock-dot.low { background: var(--stock-amber); }
.flavor-stock-dot.out { background: var(--stock-red); }

/* Sección de Cantidad y Agregar al Carrito */
.showcase-purchase-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
}

.showcase-qty-picker {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.showcase-qty-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.quantity-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.btn-qty-step {
  width: 38px;
  height: 42px;
  background: transparent;
  border: none;
  font-size: 1.15rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.btn-qty-step:hover {
  background: var(--bg-card);
  color: var(--accent-primary);
}

.qty-step-input {
  width: 44px;
  height: 42px;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.qty-step-input::-webkit-outer-spin-button,
.qty-step-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-showcase-add {
  flex: 1;
  min-width: 230px;
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: #ffffff;
  border: none;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-showcase-add:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-primary-hover), #4338ca);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px var(--accent-glow);
}

.btn-showcase-add:active:not(:disabled) {
  transform: translateY(0);
}

.btn-showcase-add:disabled {
  background: rgba(100, 116, 139, 0.25);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-showcase-subprice {
  font-size: 0.85rem;
  opacity: 0.9;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

/* Insignias de Confianza */
.showcase-trust-badges {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.trust-pill {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

/* Adaptación Responsive para Móviles y Tablets */
@media (max-width: 960px) {
  .showcase-card {
    grid-template-columns: 1fr;
  }
  
  .showcase-media-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
  }
  
  .showcase-image-stage {
    height: 290px;
  }
  
  .showcase-details-panel {
    padding: 1.5rem;
  }

  .showcase-flavors-grid {
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
    max-height: 200px;
  }
}

@media (max-width: 600px) {
  .view-mode-text {
    display: none;
  }
  
  .showcase-product-title {
    font-size: 1.45rem;
  }
  
  .showcase-purchase-section {
    flex-direction: column;
    align-items: stretch;
  }

  .showcase-qty-picker {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  
  .btn-showcase-add {
    width: 100%;
  }
}

/* ==========================================================================
   GRID DE PRODUCTOS Y TARJETAS
   ========================================================================== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

.product-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-fast);
  position: relative;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.product-image-container {
  width: 100%;
  height: 280px;
  background: #ffffff;
  border-bottom: none;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
}

.product-image {
  width: 94%;
  height: 94%;
  max-width: 94%;
  max-height: 94%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.14));
}

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

.category-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(4px);
  color: #a5b4fc;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
}

.stock-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.stock-badge.in-stock {
  background: var(--stock-green-bg);
  color: var(--stock-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.stock-badge.low-stock {
  background: var(--stock-amber-bg);
  color: var(--stock-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.stock-badge.out-stock {
  background: var(--stock-red-bg);
  color: var(--stock-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.product-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

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

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

.product-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
}

.btn-add-cart {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.btn-add-cart:hover:not(:disabled) {
  background: var(--accent-primary-hover);
  transform: translateY(-2px);
}

.btn-add-cart:disabled {
  background: var(--text-muted);
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================================
   MODALES Y DRAWERS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-content {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.3s ease;
  overflow: hidden;
}

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

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.btn-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  flex: 1;
}

/* Items del Carrito */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.9rem;
  border-radius: var(--radius-sm);
}

.cart-item-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

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

.cart-item-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.cart-item-price {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.2rem;
}

.btn-qty {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
}

.btn-qty:hover {
  background: var(--accent-primary);
  color: white;
}

.qty-number {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 24px;
  text-align: center;
}

.btn-remove {
  color: var(--stock-red);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

.btn-remove:hover {
  background: var(--stock-red-bg);
}

/* Formulario de Checkout */
.checkout-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--border-focus);
}

.cart-summary {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  margin-top: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
}

/* ==========================================================================
   PANEL DE ADMINISTRACIÓN Y CRM
   ========================================================================== */

#product-form {
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

#product-form .form-group {
  min-width: 0;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.admin-tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.admin-table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th {
  background: var(--bg-surface);
  padding: 1rem;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.admin-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.stock-input-inline {
  width: 70px;
  padding: 0.4rem;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 700;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  animation: slideIn 0.3s ease;
}

.toast.success { border-left: 4px solid var(--stock-green); }
.toast.error { border-left: 4px solid var(--stock-red); }
.toast.warning { border-left: 4px solid var(--stock-amber); }

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


/* ==========================================================================
   MÓDULO DE SUBIDA DE IMÁGENES Y CÁMARA PARA PRODUCTOS
   ========================================================================== */

.image-upload-wrapper {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition-fast);
}

.image-upload-zone {
  border: 2px dashed rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-sm);
  padding: 1.5rem 1rem;
  text-align: center;
  background: rgba(99, 102, 241, 0.03);
  transition: all var(--transition-fast);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.image-upload-zone:hover,
.image-upload-zone.dragover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 15px var(--accent-glow);
}

.image-action-buttons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-upload-action {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.btn-upload-action:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

.btn-upload-action.primary {
  background: linear-gradient(135deg, var(--accent-primary), #818cf8);
  color: #fff;
  border: none;
}

.btn-upload-action.primary:hover {
  background: linear-gradient(135deg, var(--accent-primary-hover), #6366f1);
  color: #fff;
}

.image-preview-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}

.image-preview-thumb-container {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.image-preview-thumb-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-preview-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.image-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--stock-green-bg);
  color: var(--stock-green);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  width: fit-content;
}

.image-manual-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.btn-toggle-manual {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.btn-toggle-manual:hover {
  color: var(--accent-primary);
}

/* Modal de Cámara en Vivo */
.camera-live-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.camera-modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  position: relative;
}

.camera-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 70%;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  pointer-events: none;
}

.camera-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   SISTEMA INTEGRAL DE OPTIMIZACIÓN Y RESPONSIVIDAD PARA CELULARES Y TABLETS
   ========================================================================== */

/* Prevenir zoom involuntario y rebote táctil en iOS / Android */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-tap-highlight-color: transparent;
}

/* Evitar que iOS Safari haga zoom al enfocar campos de texto */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Píldora de aviso de tabla deslizable */
.mobile-table-hint {
  display: none;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(99, 102, 241, 0.25);
  margin-bottom: 0.75rem;
  animation: pulseHint 2.5s infinite;
}

@keyframes pulseHint {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; transform: translateX(3px); }
}

/* Barra Flotante Inferior de Navegación Rápida para Celulares */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  z-index: 900;
  padding: 0.4rem 1rem calc(0.4rem + env(safe-area-inset-bottom)) 1rem;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .mobile-bottom-nav {
  background: rgba(18, 24, 38, 0.94);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45);
}

.mobile-nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  cursor: pointer;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  min-width: 58px;
}

.mobile-nav-btn:active {
  transform: scale(0.92);
}

.mobile-nav-btn.active,
.mobile-nav-btn:hover {
  color: var(--accent-primary);
}

.mobile-nav-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.mobile-nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Ocultar barra flotante cuando un modal esté abierto */
body.modal-open .mobile-bottom-nav {
  display: none !important;
}

/* --------------------------------------------------------------------------
   BREAKPOINT: TABLETS Y CELULARES GRANDES (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* Mostrar barra inferior en móviles */
  .mobile-bottom-nav {
    display: flex;
  }
  
  .mobile-table-hint {
    display: flex;
  }

  /* Dejar espacio inferior para la barra flotante */
  .app-container {
    padding: 0 1rem calc(5rem + env(safe-area-inset-bottom)) 1rem;
  }

  /* Header compacto optimizado */
  header {
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
    position: relative;
    top: auto;
    z-index: 100;
  }

  .nav-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
  }

  .brand {
    gap: 0.6rem;
  }

  .brand-logo-badge {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .brand-name-text {
    font-size: 1.3rem;
  }

  .nav-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .nav-actions .btn-action {
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
    min-height: 38px;
  }

  .search-container {
    width: 100%;
    max-width: 100%;
  }

  .search-input {
    padding: 0.65rem 1rem 0.65rem 2.4rem;
    font-size: 0.9rem;
    height: 42px;
  }

  .search-icon {
    left: 0.85rem;
  }

  /* Banner Hero Juvenil en Móvil */
  .hero-banner-juvenil-section {
    margin-bottom: 1.25rem;
  }
  
  .hero-banner-juvenil-wrapper {
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }

  /* Cuadrícula de Marcas y Productos */
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .category-card {
    border-radius: var(--radius-md);
  }

  .category-card-image-wrap {
    height: 220px;
  }

  .category-card-body {
    padding: 1.15rem;
  }

  .category-card-title {
    font-size: 1.2rem;
  }

  .category-card-desc {
    font-size: 0.82rem;
    -webkit-line-clamp: 2;
  }

  .btn-open-category {
    padding: 0.6rem 1rem;
    min-height: 42px;
  }

  /* Encabezado de Vista de Categoría */
  .category-view-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
  }

  .btn-back-categories {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
    min-height: 42px;
  }

  .category-view-title-group {
    justify-content: space-between;
    width: 100%;
  }

  .category-view-title-group h2 {
    font-size: 1.2rem;
  }

  .view-mode-toggle {
    margin-left: 0;
    align-self: flex-end;
  }

  /* Showcase de Sabores */
  .showcase-card {
    grid-template-columns: 1fr;
    border-radius: var(--radius-md);
  }

  .showcase-media-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0.75rem;
  }

  .showcase-image-stage {
    height: 280px;
    margin: 0.4rem 0;
  }

  .showcase-img {
    max-height: 200px;
  }

  .showcase-details-panel {
    padding: 1.15rem 1rem;
  }

  .showcase-product-title {
    font-size: 1.35rem;
  }

  .showcase-flavors-section {
    margin-top: 1rem;
  }

  .showcase-flavors-grid {
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 0.45rem;
    max-height: 210px;
  }

  .showcase-flavor-btn {
    padding: 0.45rem 0.5rem;
    min-height: 52px;
    font-size: 0.78rem;
  }

  .showcase-flavor-btn .flavor-btn-name {
    font-size: 0.8rem;
  }

  .showcase-purchase-section {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 1.25rem;
  }

  .showcase-qty-picker {
    width: 100%;
    justify-content: space-between;
    height: 46px;
  }

  .btn-showcase-add {
    width: 100%;
    height: 50px;
    font-size: 1rem;
    font-weight: 800;
  }

  /* MODALES FULL SCREEN NATIVOS EN CELULARES */
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
  }

  .modal-header {
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    z-index: 50;
    border-bottom: 1px solid var(--border-color);
  }

  .modal-title {
    font-size: 1.15rem;
  }

  .btn-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
  }

  .modal-body {
    padding: 1rem 0.85rem calc(4.5rem + env(safe-area-inset-bottom)) 0.85rem;
    -webkit-overflow-scrolling: touch;
  }

  /* Pestañas del Panel Admin en Barra Deslizable */
  .admin-tabs {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -0.85rem 1rem -0.85rem;
    padding: 0 0.85rem 0.5rem 0.85rem;
    border-bottom: 1px solid var(--border-color);
  }

  .admin-tabs::-webkit-scrollbar {
    display: none;
  }

  .admin-tab-btn {
    flex-shrink: 0;
    padding: 0.6rem 0.95rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    white-space: nowrap;
  }

  .admin-tab-btn.active {
    background: rgba(99, 102, 241, 0.2);
    color: #ffffff;
    border-bottom: 2px solid var(--accent-primary);
  }

  /* Tablas en Celular: Desplazamiento Fluido y Botones Táctiles Grandes */
  .admin-table-container {
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
  }

  .admin-table {
    min-width: 620px;
    font-size: 0.85rem;
  }

  .admin-table th, .admin-table td {
    padding: 0.75rem 0.6rem;
  }

  .stock-input-inline {
    width: 62px;
    height: 40px;
    font-size: 16px !important;
    text-align: center;
    border-radius: 6px;
  }

  .btn-qty {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
  }

  .btn-edit-prod, .btn-delete-prod {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    border-radius: 8px;
  }

  /* Métricas CRM en cuadrícula 2x2 en móvil */
  .crm-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  /* Formulario de Captura de Producto en Celular */
  #product-form {
    padding: 1rem 0.85rem;
    gap: 1rem;
  }

  #product-form div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .form-control {
    font-size: 16px !important;
    padding: 0.75rem 0.9rem;
    min-height: 46px;
    border-radius: var(--radius-sm);
  }

  .image-action-buttons {
    flex-direction: column;
    width: 100%;
    gap: 0.6rem;
  }

  .btn-upload-action {
    width: 100%;
    justify-content: center;
    min-height: 46px;
    font-size: 0.92rem;
    padding: 0.75rem;
  }

  #btn-save-prod {
    min-height: 52px;
    font-size: 1.05rem;
    font-weight: 800;
  }

  /* Carrito y Checkout en Celular */
  .cart-item {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .cart-item-img {
    width: 52px;
    height: 52px;
    min-width: 52px;
  }

  .checkout-form {
    padding: 1rem 0.85rem;
  }

  .checkout-form div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }

  .checkout-form button[type="submit"] {
    min-height: 52px;
    font-size: 1.05rem;
    font-weight: 800;
  }

  /* Toast en Móvil */
  .toast-container {
    bottom: calc(4.5rem + env(safe-area-inset-bottom));
    left: 1rem;
    right: 1rem;
  }

  .toast {
    min-width: unset;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
  }

  /* Modal de Cámara en Vivo en Celular */
  .camera-modal-content {
    width: 95%;
    max-width: 440px;
    padding: 1rem;
    border-radius: var(--radius-md);
  }

  .camera-controls {
    flex-direction: column;
    width: 100%;
    gap: 0.6rem;
  }

  .camera-controls button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   BREAKPOINT: PANTALLAS PEQUEÑAS (iPhone SE, mini, etc. max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .brand-name-text {
    font-size: 1.18rem;
  }

  .nav-actions .btn-action span:not(#theme-icon):not(.cart-badge) {
    display: none; /* Dejar solo icono para que quepan holgadamente */
  }

  .nav-actions .btn-action {
    padding: 0.45rem 0.65rem;
    min-width: 40px;
    justify-content: center;
  }
}

/* ==========================================================================
   DISEÑO DE TARJETAS ESTILO SHOPIFY (TUHUMO.COM)
   ========================================================================== */
.tuhumo-product-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out, border-color 0.25s ease-out;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  position: relative;
  height: 100%;
}

[data-theme="dark"] .tuhumo-product-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.tuhumo-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
  border-color: var(--accent-primary, #3b82f6);
}

.tuhumo-card-media {
  height: 200px;
  background: #ffffff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.tuhumo-badge-cat {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.tuhumo-badge-stock {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  z-index: 2;
}

.tuhumo-badge-stock.in {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tuhumo-badge-stock.low {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tuhumo-badge-stock.out {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.tuhumo-img-box {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tuhumo-product-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.12));
  transition: transform 0.3s ease-out;
}

.tuhumo-product-card:hover .tuhumo-product-img {
  transform: scale(1.08);
}

.tuhumo-card-info {
  padding: 1rem 1.1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tuhumo-brand-tag {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-primary, #6366f1);
  margin-bottom: 0.25rem;
}

.tuhumo-product-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.tuhumo-full-name {
  font-size: 0.8rem;
  color: var(--text-secondary, #64748b);
  margin: 0 0 0.85rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tuhumo-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color, rgba(226, 232, 240, 0.6));
}

.tuhumo-price-box {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}

.tuhumo-price-amount {
  font-size: 1.25rem;
  font-weight: 900;
  color: #10b981;
}

.tuhumo-price-currency {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
}

.btn-tuhumo-action {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.tuhumo-product-card:hover .btn-tuhumo-action {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

.btn-tuhumo-action .btn-arrow {
  transition: transform 0.2s ease;
}

.tuhumo-product-card:hover .btn-tuhumo-action .btn-arrow {
  transform: translateX(3px);
}

.tuhumo-product-card.is-out-stock {
  opacity: 0.75;
}

@media (max-width: 580px) {
  .all-products-image-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.85rem !important;
  }

  .tuhumo-card-media {
    height: 150px;
    padding: 0.5rem;
  }

  .tuhumo-product-title {
    font-size: 0.92rem;
  }

  .tuhumo-price-amount {
    font-size: 1.05rem;
  }

  .btn-tuhumo-action {
    padding: 0.4rem 0.6rem;
    font-size: 0.72rem;
  }
}

/* ==========================================================================
   ESTILOS DINÁMICOS PARA LA GALERÍA COMPLETA ("VER TODOS") Y SUBCATEGORÍAS
   ========================================================================== */
.gallery-brand-jump-bar {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.gallery-brand-jump-bar::-webkit-scrollbar {
  height: 4px;
}

.gallery-brand-jump-bar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 99px;
}

.gallery-subcat-section {
  animation: fadeIn 0.3s ease-out;
}

/* ==========================================================================
   BURBUJA FLOTANTE WHATSAPP CON AVATAR "JOVEN CABALLERO"
   ========================================================================== */
.whatsapp-floating-widget {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  font-family: inherit;
  pointer-events: none;
}

.whatsapp-floating-widget > * {
  pointer-events: auto;
}

/* Ocultar cuando algún modal esté abierto para no estorbar la vista */
body.modal-open .whatsapp-floating-widget {
  display: none !important;
}

/* Tarjeta / Tooltip flotante con la leyenda de bienvenida */
.wa-tooltip-bubble {
  position: relative;
  width: 290px;
  max-width: calc(100vw - 2.5rem);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  animation: waSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform-origin: bottom right;
  transition: transform var(--transition-fast), opacity var(--transition-fast), visibility var(--transition-fast);
}

[data-theme="dark"] .wa-tooltip-bubble {
  background: rgba(18, 24, 38, 0.95);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.wa-tooltip-bubble.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.92);
  pointer-events: none;
}

/* Botón cerrar tooltip */
.wa-tooltip-close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 50%;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.wa-tooltip-close:hover {
  color: var(--text-primary);
  transform: scale(1.15);
}

/* Encabezado del tooltip */
.wa-tooltip-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-right: 1rem;
}

.wa-avatar-badge {
  position: relative;
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
  display: block;
}

.wa-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .wa-status-dot {
  border-color: #121826;
}

.wa-tooltip-meta {
  display: flex;
  flex-direction: column;
}

.wa-tooltip-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.wa-tooltip-status {
  font-size: 0.72rem;
  color: #10b981;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 2px;
}

/* Cuerpo del mensaje */
.wa-tooltip-body {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
}

.wa-tooltip-message {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.wa-tooltip-submessage {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Botón CTA dentro del tooltip */
.wa-tooltip-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff !important;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.wa-tooltip-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  filter: brightness(1.05);
}

/* Botón Flotante Circular (Trigger) */
.wa-float-bubble-btn {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.42), 0 3px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.wa-float-bubble-btn:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.55), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wa-float-bubble-btn:active {
  transform: scale(0.95);
}

.wa-bubble-avatar-wrapper {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-bubble-character-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
  display: block;
}

/* Badge con ícono oficial de WhatsApp */
.wa-bubble-wa-badge {
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #25D366;
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .wa-bubble-wa-badge {
  border-color: #121826;
}

/* Pulso animado sutil */
.wa-bubble-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.65);
  animation: waPulse 2.8s infinite cubic-bezier(0.24, 0, 0.38, 1);
  pointer-events: none;
}

@keyframes waPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.22);
    opacity: 0;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

@keyframes waSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Adaptación responsive para celulares */
@media (max-width: 768px) {
  .whatsapp-floating-widget {
    right: 1rem;
    bottom: calc(4.6rem + env(safe-area-inset-bottom));
  }
  
  .wa-tooltip-bubble {
    width: 260px;
    padding: 0.9rem;
  }
  
  .wa-float-bubble-btn {
    width: 54px;
    height: 54px;
  }
  
  .wa-bubble-avatar-wrapper {
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   VERIFICACIÓN OBLIGATORIA DE MAYORÍA DE EDAD (+18 AÑOS)
   ========================================================================== */
body.age-gate-locked {
  overflow: hidden !important;
  height: 100vh !important;
}

.age-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: ageGateFadeIn 0.3s ease;
}

.age-gate-fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

@keyframes ageGateFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ageGatePop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.age-gate-card {
  position: relative;
  width: 100%;
  max-width: 540px;
  background: var(--bg-surface);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(239, 68, 68, 0.15);
  overflow: hidden;
  animation: ageGatePop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .age-gate-card {
  background: rgba(18, 24, 38, 0.98);
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 45px rgba(239, 68, 68, 0.2);
}

.age-gate-banner-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1600 / 533;
  background: #000000;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.age-gate-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.age-gate-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(6px);
  letter-spacing: 0.5px;
}

.age-gate-body {
  padding: 1.5rem 1.8rem 1.8rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.age-gate-title {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.age-gate-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.6rem;
  max-width: 460px;
}

.age-gate-question {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ef4444;
  margin-bottom: 1.35rem;
}

.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  max-width: 380px;
}

.btn-age-yes {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-age-yes:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.45);
  filter: brightness(1.06);
}

.btn-age-yes:active {
  transform: scale(0.97);
}

.btn-age-no {
  width: 100%;
  background: rgba(239, 68, 68, 0.08);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-age-no:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.6);
  color: #dc2626;
  transform: translateY(-2px);
}

.age-gate-footer-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  line-height: 1.4;
  max-width: 440px;
}

/* Estado 2: Acceso Denegado (Logo TX Rojo y Muchas Gracias) */
.age-gate-denied-card {
  max-width: 480px;
  padding: 2.25rem 2rem;
  text-align: center;
}

.age-gate-denied-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.age-gate-logo-wrap {
  background: #ffffff;
  border: 2px solid rgba(239, 68, 68, 0.45);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.5rem;
  margin-bottom: 1.35rem;
  box-shadow: 0 12px 32px rgba(239, 68, 68, 0.22);
  display: inline-flex;
  justify-content: center;
}

.age-gate-logo-img {
  max-width: 240px;
  height: auto;
  display: block;
}

.age-gate-denied-badge {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #ef4444;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  margin-bottom: 0.85rem;
  display: inline-block;
  letter-spacing: 0.4px;
}

.age-gate-denied-title {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  letter-spacing: -0.5px;
}

.age-gate-denied-message {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 0.5rem;
  max-width: 380px;
}

.age-gate-denied-submessage {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ef4444;
  margin-bottom: 1.6rem;
}

.age-gate-denied-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 320px;
  align-items: center;
}

.btn-age-exit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff !important;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.btn-age-exit:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.btn-age-retry {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition-fast);
  text-decoration: underline;
  padding: 0.3rem 0.5rem;
}

.btn-age-retry:hover {
  color: var(--text-primary);
}

@media (max-width: 600px) {
  .age-gate-card {
    border-radius: var(--radius-md);
  }
  
  .age-gate-body {
    padding: 1.25rem 1.15rem 1.5rem;
  }
  
  .age-gate-title {
    font-size: 1.35rem;
  }
  
  .age-gate-question {
    font-size: 1.05rem;
  }
  
  .age-gate-denied-card {
    padding: 1.75rem 1.25rem;
  }
  
  .age-gate-denied-title {
    font-size: 1.75rem;
  }
}



