/* ==========================================================================
   SISTEMA DE DISEÑO - TIENDAS DULCE BEBÉ
   Estilo: Cozy Premium - Logotipo Oficial (Celeste Turquesa & Rosa Bebé)
   ========================================================================== */

/* 1. RESET Y CONFIGURACIÓN DE FUENTES */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.4s ease, border-color 0.4s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

:root {
  /* Fuentes */
  --font-rounded: 'Quicksand', sans-serif;
  --font-sans: 'Outfit', sans-serif;

  /* Sombras Premium */
  --shadow-sm: 0 4px 6px -1px rgba(76, 224, 229, 0.08), 0 2px 4px -1px rgba(76, 224, 229, 0.04);
  --shadow-md: 0 10px 15px -3px rgba(76, 224, 229, 0.12), 0 4px 6px -2px rgba(76, 224, 229, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(76, 224, 229, 0.15), 0 10px 10px -5px rgba(76, 224, 229, 0.04);
  --shadow-inner: inset 0 2px 4px 0 rgba(76, 224, 229, 0.06);

  /* Transición estándar */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 2. VARIABLES DE TEMA CROMÁTICO (ENFOQUE LOGOTIPO: CELESTE #4CE0E5 & ROSA #FCA5D9) */
body.theme-unisex {
  --bg-main: 182, 40%, 98%;         /* Fondo levísimo turquesa-crema */
  --bg-card: 0, 0%, 100%;
  --bg-accent: 182, 50%, 96%;       /* Celeste turquesa pastel sutil */
  
  --primary: 182, 65%, 45%;         /* Celeste turquesa del logo, optimizado para lectura */
  --primary-light: 182, 74%, 90%;   /* Celeste turquesa suave */
  --primary-hover: 182, 74%, 38%;
  
  --text-dark: 200, 25%, 25%;       /* Pizarra oscuro */
  --text-muted: 200, 12%, 50%;
  
  --color-girl: 330, 90%, 82%;      /* Rosa #FCA5D9 (Ears) */
  --color-boy: 182, 74%, 60%;       /* Celeste #4CE0E5 (Logo BG) */
  --border-color: hsla(var(--primary), 0.15);
  --border-color-focus: hsla(var(--primary), 0.45);
}

body.theme-girl {
  --bg-main: 330, 30%, 98%;        /* Fondo rosa levísimo */
  --bg-card: 0, 0%, 100%;
  --bg-accent: 330, 50%, 96%;      /* Rosa pastel suave */
  
  --primary: 330, 70%, 55%;        /* Rosa del logo para contraste */
  --primary-light: 330, 90%, 92%;  /* Rosa pastel */
  --primary-hover: 330, 70%, 45%;
  
  --text-dark: 330, 25%, 25%;      /* Plum oscuro */
  --text-muted: 330, 10%, 50%;
  
  --color-girl: 330, 90%, 82%;
  --color-boy: 182, 74%, 60%;
  --border-color: hsla(var(--primary), 0.15);
  --border-color-focus: hsla(var(--primary), 0.45);
}

body.theme-boy {
  --bg-main: 182, 30%, 98%;        /* Fondo celeste levísimo */
  --bg-card: 0, 0%, 100%;
  --bg-accent: 182, 50%, 96%;      /* Celeste pastel suave */
  
  --primary: 182, 65%, 45%;        /* Celeste turquesa del logo */
  --primary-light: 182, 74%, 90%;
  --primary-hover: 182, 74%, 38%;
  
  --text-dark: 182, 30%, 25%;      /* Turquesa oscuro */
  --text-muted: 182, 12%, 50%;
  
  --color-girl: 330, 90%, 82%;
  --color-boy: 182, 74%, 60%;
  --border-color: hsla(var(--primary), 0.15);
  --border-color-focus: hsla(var(--primary), 0.45);
}

/* 2.5 STUNNING DARK MODE (OVERRIDE VARIABLES) */
body.dark-mode {
  --text-dark: 180, 20%, 95%;       /* Blanco crema de alta legibilidad */
  --text-muted: 180, 8%, 68%;       /* Gris claro */
  --border-color: hsla(var(--primary), 0.25);
  --border-color-focus: hsla(var(--primary), 0.6);
}

body.dark-mode.theme-unisex {
  --bg-main: 182, 16%, 10%;        /* Turquesa marino profundo */
  --bg-card: 182, 14%, 13%;        /* Slate carbón oscuro */
  --bg-accent: 182, 12%, 17%;      /* Contenedor oscuro */
  
  --primary: 182, 74%, 60%;         /* Celeste turquesa vibrante logo */
  --primary-light: 182, 35%, 19%;   /* Acento apagado de fondo */
  --primary-hover: 182, 74%, 70%;
}

body.dark-mode.theme-girl {
  --bg-main: 330, 16%, 10%;        /* Berenjena profundo */
  --bg-card: 330, 14%, 13%;        /* Berenjena oscuro */
  --bg-accent: 330, 12%, 17%;      /* Contenedor berenjena */
  
  --primary: 330, 90%, 82%;         /* Rosa vibrante logo */
  --primary-light: 330, 35%, 19%;   /* Acento apagado de fondo rosa */
  --primary-hover: 330, 90%, 88%;
}

body.dark-mode.theme-boy {
  --bg-main: 182, 16%, 10%;        /* Celeste turquesa oscuro */
  --bg-card: 182, 14%, 13%;
  --bg-accent: 182, 12%, 17%;
  
  --primary: 182, 74%, 60%;         /* Celeste turquesa del logo */
  --primary-light: 182, 35%, 19%;
  --primary-hover: 182, 74%, 70%;
}

/* 3. ESTILOS BASE Y SCROLLBAR */
body {
  font-family: var(--font-sans);
  background-color: hsl(var(--bg-main));
  color: hsl(var(--text-dark));
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-rounded);
  font-weight: 700;
  color: hsl(var(--text-dark));
}

/* Scrollbar personalizado súper tierno y minimalista */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: hsl(var(--bg-main));
}
::-webkit-scrollbar-thumb {
  background: hsl(var(--primary-light));
  border-radius: 10px;
  border: 2px solid hsl(var(--bg-main));
}
::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--primary));
}

.hidden {
  display: none !important;
}

/* Loader inicial */
.app-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  gap: 1.5rem;
  background-color: hsl(var(--bg-main));
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid hsl(var(--primary-light));
  border-top: 4px solid hsl(var(--primary));
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.app-loader p {
  font-family: var(--font-rounded);
  color: hsl(var(--text-muted));
  font-size: 1.1rem;
  font-weight: 500;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   ESTRUCTURA Y VISTAS DE CLIENTE
   ========================================================================== */

/* HEADER & NAVBAR */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: hsla(var(--bg-card), 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

/* Contenedor del logo con el fondo turquesa oficial de la imagen */
.logo-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: #4CE0E5; /* Celeste/Turquesa exacto de la imagen */
  border-radius: 12px;       /* Redondeado tipo avatar de instagram */
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.logo-text-container {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-family: var(--font-rounded);
  font-weight: 700;
  font-size: 1.35rem;
  color: #17A2A6; /* Color turquesa oscuro con excelente legibilidad */
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.logo-slogan {
  font-size: 0.75rem;
  color: hsl(var(--text-muted));
  font-weight: 500;
  margin-top: 0.1rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Selector de temas cromáticos */
.theme-selector {
  display: flex;
  background-color: rgba(76, 224, 229, 0.1);
  padding: 0.25rem;
  border-radius: 50px;
  gap: 0.25rem;
}

.theme-btn {
  border: none;
  background: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  position: relative;
}

.theme-btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid transparent;
  transform: scale(0.8);
  opacity: 0;
  transition: var(--transition-smooth);
}

.theme-btn.active::after {
  border-color: hsl(var(--primary));
  transform: scale(1.15);
  opacity: 1;
}

.theme-btn-unisex { background-color: #E2F5F6; } /* Mezcla pastel */
.theme-btn-girl { background-color: #FEE7F2; }   /* Rosa del logo pastel */
.theme-btn-boy { background-color: #E2FAFB; }    /* Celeste del logo pastel */

/* Botón Conmutador de Modo Oscuro Premium */
.dark-mode-toggle-btn {
  border: none;
  background-color: hsl(var(--primary-light));
  color: hsl(var(--primary));
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.dark-mode-toggle-btn:hover {
  background-color: hsl(var(--primary));
  color: white;
  transform: scale(1.08) rotate(15deg);
  box-shadow: 0 8px 16px -4px hsla(var(--primary), 0.3);
}

.dark-mode-toggle-btn i {
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
  color: hsl(var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode-toggle-btn:hover i {
  transform: rotate(-15deg);
  color: white !important;
}

/* Botones de navegación */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  color: hsl(var(--text-dark));
  background-color: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.nav-link:hover {
  background-color: hsl(var(--bg-accent));
  color: hsl(var(--primary));
}

.nav-link.admin-btn {
  background-color: #FFEFEF;
  color: #FF5E5E;
  border: 1px solid rgba(255,94,94,0.15);
}

.nav-link.admin-btn:hover {
  background-color: #FF5E5E;
  color: white;
}

/* HERO SECTION */
.hero {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.hero-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  background-color: hsl(var(--bg-accent));
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}

.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.4;
}

.shape-1 {
  width: 250px;
  height: 250px;
  background-color: hsl(var(--color-girl));
  top: -50px;
  left: -50px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background-color: hsl(var(--color-boy));
  bottom: -80px;
  right: -50px;
}

.hero-content {
  padding: 4rem 3rem;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: hsl(var(--bg-card));
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: hsl(var(--primary));
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid var(--border-color);
}

.hero-title {
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -1px;
}

.hero-title span {
  color: hsl(var(--primary));
}

.hero-desc {
  font-size: 1.1rem;
  color: hsl(var(--text-muted));
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background-color: hsl(var(--primary));
  color: white;
  padding: 0.85rem 1.8rem;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 20px -10px hsl(var(--primary));
  text-decoration: none;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px hsl(var(--primary));
  background-color: hsl(var(--primary-hover));
}

.hero-image-container {
  position: relative;
  height: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 70%);
}

.hero-image-wrapper {
  position: relative;
  width: 85%;
  height: 85%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 6px solid hsl(var(--bg-card));
  transform: rotate(2deg);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-decorations {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.decor-icon {
  position: absolute;
  background: hsl(var(--bg-card));
  border: 1px solid var(--border-color);
  padding: 0.6rem;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  font-size: 1.5rem;
}

.decor-1 { top: 15%; left: 10%; transform: rotate(-15deg); }
.decor-2 { bottom: 20%; right: 10%; transform: rotate(15deg); }

/* CONTENEDOR DE LA TIENDA */
.store-container {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.section-subtitle {
  color: hsl(var(--primary));
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.section-title {
  font-size: 2rem;
  letter-spacing: -0.5px;
}

/* BARRA DE FILTROS Y BÚSQUEDA */
.toolbar {
  background-color: hsl(var(--bg-card));
  padding: 1.25rem;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}

.toolbar-top {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  border-radius: 50px;
  border: 1.5px solid rgba(76, 224, 229, 0.25);
  background-color: hsl(var(--bg-main));
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: hsl(var(--text-dark));
  outline: none;
}

.search-input:focus {
  border-color: hsl(var(--primary));
  background-color: hsl(var(--bg-card));
  box-shadow: 0 0 0 4px hsl(var(--primary-light));
}

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

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-label {
  font-size: 0.9rem;
  color: hsl(var(--text-muted));
  font-weight: 500;
  white-space: nowrap;
}

.sort-select {
  padding: 0.8rem 2rem 0.8rem 1rem;
  border-radius: 50px;
  border: 1.5px solid rgba(76, 224, 229, 0.25);
  background-color: hsl(var(--bg-main));
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: hsl(var(--text-dark));
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2317A2A6' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}

.sort-select:focus {
  border-color: hsl(var(--primary));
  background-color: hsl(var(--bg-card));
}

/* Filtros por Categoría */
.category-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-btn {
  border: 1px solid rgba(76, 224, 229, 0.25);
  background-color: hsl(var(--bg-main));
  color: hsl(var(--text-dark));
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-btn:hover {
  background-color: hsl(var(--bg-accent));
  border-color: hsl(var(--primary-light));
}

.filter-btn.active {
  background-color: hsl(var(--primary));
  color: white;
  border-color: hsl(var(--primary));
  box-shadow: 0 4px 10px -4px hsl(var(--primary));
}

.results-count {
  font-size: 0.9rem;
  color: hsl(var(--text-muted));
  font-weight: 500;
  margin-left: auto;
}

/* PRODUCT GRID */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

/* PRODUCT CARD */
.product-card {
  background-color: hsl(var(--bg-card));
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: hsl(var(--primary-light));
}

.product-card-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* Ratio 1:1 Cuadrado */
  background-color: hsl(var(--bg-accent));
  overflow: hidden;
}

.product-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

/* Insignias de la Tarjeta */
.card-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 3;
}

.card-badge {
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
  color: white;
}

/* Categorías basadas en paleta rosa/celeste */
.badge-ropa { background-color: #FF8BCA; }   /* Rosa del logo */
.badge-calzado { background-color: #1FBEC4; } /* Celeste del logo */
.badge-juegos { background-color: #E2B65E; }  /* Ocre cálido complementario */
.badge-cuidado { background-color: #8DCDC1; } /* Menta complementario */

.badge-out-of-stock {
  background: linear-gradient(135deg, #FF8B8B, #FF5E5E) !important;
  color: white !important;
}

.badge-low-stock {
  background: linear-gradient(135deg, #FFB26B, #FF8E25) !important;
  color: white !important;
}

.theme-tag-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background-color: hsl(var(--bg-accent));
  color: hsl(var(--text-dark));
  border: 1px solid var(--border-color);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  z-index: 3;
}

/* Detalles de la Tarjeta */
.product-card-details {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card-category {
  font-size: 0.8rem;
  color: hsl(var(--text-muted));
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

.product-card-title {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px dashed hsla(var(--primary), 0.25);
}

.product-card-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: hsl(var(--primary));
  font-family: var(--font-rounded);
}

.product-card-action {
  border: none;
  background-color: hsl(var(--bg-accent));
  color: hsl(var(--text-dark));
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-action:hover {
  background-color: hsl(var(--primary));
  color: white;
  transform: scale(1.1);
}

/* ESTADO SIN RESULTADOS */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 2rem;
  background-color: hsl(var(--bg-card));
  border-radius: 32px;
  border: 2px dashed rgba(76, 224, 229, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.no-results-icon {
  width: 70px;
  height: 70px;
  background-color: hsl(var(--bg-accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--text-muted));
  font-size: 2rem;
}

.no-results h3 {
  font-size: 1.5rem;
}

.no-results p {
  color: hsl(var(--text-muted));
  max-width: 400px;
}

.reset-filter-btn {
  background-color: hsl(var(--primary));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.reset-filter-btn:hover {
  background-color: hsl(var(--primary-hover));
}

/* ==========================================================================
   MODAL DE DETALLE DE PRODUCTO
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(23, 162, 166, 0.4); /* Glassmorphism en tono turquesa logo */
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.modal-container {
  background-color: hsl(var(--bg-card));
  width: 100%;
  max-width: 800px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  position: relative;
  animation: scaleIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

@keyframes scaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: hsl(var(--bg-accent));
  border: 1px solid var(--border-color);
  color: hsl(var(--text-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.modal-close-btn:hover {
  background-color: hsl(var(--bg-card));
  color: #FF5E5E;
  transform: rotate(90deg);
}

.modal-image-panel {
  position: relative;
  background-color: hsl(var(--bg-accent));
}

.modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 400px;
}

.modal-content-panel {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  max-height: 90vh;
}

.modal-title {
  font-size: 1.8rem;
  line-height: 1.2;
}

.modal-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.modal-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.5rem 0;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.modal-price {
  font-size: 2rem;
  font-weight: 700;
  color: hsl(var(--primary));
  font-family: var(--font-rounded);
}

.modal-stock-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.stock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.stock-in { background-color: #6BCB77; color: #409B4D; }
.stock-low { background-color: #FFB26B; color: #D87A15; }
.stock-out { background-color: #FF6B6B; color: #D84A4A; }

/* Colores adaptativos de texto de stock para alta legibilidad en modo claro y oscuro */
.stock-text-stock-in { color: #2e7d32; font-weight: 600; }
.stock-text-stock-low { color: #d84315; font-weight: 600; }
.stock-text-stock-out { color: #c62828; font-weight: 600; }

body.dark-mode .stock-text-stock-in { color: #81c784; }
body.dark-mode .stock-text-stock-low { color: #ffb74d; }
body.dark-mode .stock-text-stock-out { color: #e57373; }

.modal-desc-title {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.modal-desc {
  color: hsl(var(--text-muted));
  font-size: 0.95rem;
  line-height: 1.5;
}

.product-specs {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background-color: hsl(var(--bg-accent));
  padding: 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
}

.spec-label {
  color: hsl(var(--text-muted));
  font-weight: 500;
}

.spec-val {
  font-weight: 600;
}

.modal-footer-msg {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: hsl(var(--primary-light));
  color: hsl(var(--primary));
  padding: 0.85rem 1.25rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  justify-content: center;
  border: 1px dashed hsl(var(--primary));
}

/* ==========================================================================
   PORTAL DE SEGURIDAD (ADMIN LOGIN GATEWAY)
   ========================================================================== */
.admin-login-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 2rem 1.5rem;
}

.admin-login-card {
  background-color: hsl(var(--bg-card));
  border-radius: 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 440px;
  padding: 3rem 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: scaleIn 0.3s ease;
}

.admin-lock-icon {
  width: 64px;
  height: 64px;
  background-color: hsl(var(--primary-light));
  border-radius: 50%;
  color: hsl(var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.admin-login-card h2 {
  font-size: 1.75rem;
  letter-spacing: -0.5px;
}

.admin-login-card p {
  color: hsl(var(--text-muted));
  font-size: 0.95rem;
}

.admin-login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.pass-wrapper {
  position: relative;
  width: 100%;
}

.pass-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  border-radius: 50px;
  border: 1.5px solid rgba(76, 224, 229, 0.25);
  background-color: hsl(var(--bg-main));
  font-family: var(--font-sans);
  font-size: 1rem;
  color: hsl(var(--text-dark));
  outline: none;
}

.pass-input:focus {
  border-color: hsl(var(--primary));
  background-color: hsl(var(--bg-card));
  box-shadow: 0 0 0 4px hsl(var(--primary-light));
}

.pass-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: hsl(var(--text-muted));
}

.admin-login-btn {
  width: 100%;
  background-color: hsl(var(--primary));
  color: white;
  border: none;
  padding: 0.85rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.admin-login-btn:hover {
  background-color: hsl(var(--primary-hover));
}

.login-error-msg {
  color: #FF5E5E;
  font-size: 0.9rem;
  font-weight: 600;
  background-color: #FFEFEF;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  width: 100%;
}

/* ==========================================================================
   PANEL DE ADMINISTRACIÓN
   ========================================================================== */
.admin-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Encabezado del Panel */
.admin-header {
  background-color: hsl(var(--bg-card));
  padding: 1.5rem 2rem;
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-title-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-title-badge {
  background-color: #1E88E5;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}

.btn-secondary {
  background-color: hsl(var(--bg-accent));
  color: hsl(var(--text-dark));
  border: 1px solid rgba(76, 224, 229, 0.25);
}

.btn-secondary:hover {
  background-color: rgba(76, 224, 229, 0.2);
}

.btn-danger-outline {
  background-color: transparent;
  color: #FF5E5E;
  border: 1.5px solid rgba(255, 94, 94, 0.3);
}

.btn-danger-outline:hover {
  background-color: #FFEFEF;
  border-color: #FF5E5E;
}

/* ANALÍTICAS - DASHBOARD METRICS */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.metric-card {
  background-color: hsl(var(--bg-card));
  padding: 1.5rem;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.metric-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.icon-blue { background-color: #E0F7FA; color: #00ACC1; }
.icon-orange { background-color: #FFF3E0; color: #FB8C00; }
.icon-green { background-color: #E8F5E9; color: #43A047; }
.icon-pink { background-color: #FCE4EC; color: #D81B60; }

.metric-details {
  display: flex;
  flex-direction: column;
}

.metric-value {
  font-family: var(--font-rounded);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
}

.metric-title {
  font-size: 0.85rem;
  color: hsl(var(--text-muted));
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* LISTADO DE INVENTARIO Y ACCIONES */
.inventory-section {
  background-color: hsl(var(--bg-card));
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.inventory-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.inventory-table-wrapper {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

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

.inventory-table th {
  background-color: hsl(var(--bg-accent));
  padding: 1rem;
  font-family: var(--font-rounded);
  font-weight: 700;
  color: hsl(var(--text-dark));
  border-bottom: 1px solid hsla(var(--primary), 0.25);
}

.inventory-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid hsla(var(--primary), 0.1);
  vertical-align: middle;
}

.inventory-table tr:hover {
  background-color: rgba(76, 224, 229, 0.03);
}

.product-row-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.product-row-img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  background-color: hsl(var(--bg-accent));
}

.product-row-name {
  font-weight: 600;
}

.product-row-cat {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: hsl(var(--text-muted));
  background-color: hsl(var(--bg-accent));
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
  display: inline-block;
  margin-top: 0.15rem;
}

/* Entradas de edición rápida en tabla (inline edits) */
.table-input-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  max-width: 110px;
}

.table-input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 1.9rem;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  outline: none;
  background-color: hsl(var(--bg-main));
  color: hsl(var(--text-dark));
}

.table-input:focus {
  border-color: hsl(var(--primary));
  background-color: hsl(var(--bg-card));
  box-shadow: 0 0 0 2px hsl(var(--primary-light));
}

.input-currency-prefix {
  position: absolute;
  left: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: hsl(var(--text-muted));
}

.stock-input-wrapper {
  max-width: 90px;
}

.stock-input {
  padding: 0.5rem;
  text-align: center;
}

/* Alertas de Stock en Tabla */
.table-stock-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.delete-product-btn {
  background: none;
  border: none;
  color: hsl(var(--text-muted));
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-product-btn:hover {
  background-color: #FFEFEF;
  color: #FF5E5E;
}

.edit-product-btn {
  background: none;
  border: none;
  color: hsl(var(--text-muted));
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-product-btn:hover {
  background-color: hsl(var(--primary-light));
  color: hsl(var(--primary));
}

/* FORMS - AÑADIR PRODUCTO FORM */
.admin-drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(23, 162, 166, 0.3);
  backdrop-filter: blur(4px);
  z-index: 250;
  display: flex;
  justify-content: flex-end;
}

.admin-drawer {
  background-color: hsl(var(--bg-card));
  width: 100%;
  max-width: 500px;
  height: 100vh;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
  animation: slideLeft 0.3s ease;
}

@keyframes slideLeft {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

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

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

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: hsl(var(--text-dark));
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1.5px solid hsla(var(--primary), 0.25);
  background-color: hsl(var(--bg-main));
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: hsl(var(--text-dark));
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: hsl(var(--primary));
  background-color: hsl(var(--bg-card));
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.form-btn-submit {
  flex: 1;
  background-color: hsl(var(--primary));
  color: white;
  border: none;
  padding: 0.8rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
}

.form-btn-submit:hover {
  background-color: hsl(var(--primary-hover));
}

/* NOTIFICACIÓN NOTY (TOAST) */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background-color: #2b3436; /* Cozy charcoal slate legible everywhere */
  color: white;
  padding: 0.85rem 1.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid rgba(76, 224, 229, 0.15);
  animation: slideInUp 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
}

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

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

.toast-success { border-left: 5px solid #6BCB77; }
.toast-error { border-left: 5px solid #FF6B6B; }
.toast-info { border-left: 5px solid #00ACC1; }

/* ==========================================================================
   CARRITO DE COMPRAS Y PEDIDOS A WHATSAPP
   ========================================================================== */

/* Contenedor del botón del carrito con el badge */
.cart-toggle-btn {
  position: relative;
  border: none;
  background-color: hsl(var(--primary-light));
  color: hsl(var(--primary));
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-bounce);
  border: 1px solid var(--border-color);
}

.cart-toggle-btn:hover {
  background-color: hsl(var(--primary));
  color: white;
  transform: scale(1.08);
  box-shadow: 0 8px 16px -4px hsla(var(--primary), 0.3);
}

.cart-toggle-btn:hover i {
  color: white !important;
}

/* Badge flotante de cantidad en el carrito */
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: hsl(var(--primary));
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: 2px solid hsl(var(--bg-card));
  font-family: var(--font-sans);
}

.cart-badge.bounce {
  animation: cartBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cartBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* Botón rápido "Añadir" en tarjetas de producto */
.btn-quick-add {
  border: none;
  background-color: hsl(var(--primary-light));
  color: hsl(var(--primary));
  padding: 0.45rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-smooth);
}

.btn-quick-add:hover:not(:disabled) {
  background-color: hsl(var(--primary));
  color: white;
  transform: scale(1.05);
}

.btn-quick-add:disabled {
  background-color: hsl(var(--bg-accent));
  color: hsl(var(--text-muted));
  opacity: 0.6;
  cursor: not-allowed;
}

/* Botón grande "Añadir" en el Modal de Detalles */
.modal-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  background-color: hsl(var(--primary));
  color: white;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 8px 16px -6px hsla(var(--primary), 0.4);
  transition: var(--transition-smooth);
}

.modal-add-btn:hover:not(:disabled) {
  background-color: hsl(var(--primary-hover));
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -6px hsla(var(--primary), 0.5);
}

.modal-add-btn:disabled {
  background-color: hsl(var(--bg-accent));
  color: hsl(var(--text-muted));
  box-shadow: none;
  cursor: not-allowed;
}

/* Estructura del Drawer/Bandeja del Carrito */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(23, 162, 166, 0.3);
  backdrop-filter: blur(4px);
  z-index: 250;
  display: flex;
  justify-content: flex-end;
  animation: fadeIn 0.3s ease;
}

.cart-drawer {
  background-color: hsl(var(--bg-card));
  width: 100%;
  max-width: 440px;
  height: 100vh;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: hidden;
  animation: slideLeft 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border-left: 1px solid var(--border-color);
}

.cart-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border-color);
}

.cart-drawer-title {
  font-family: var(--font-rounded);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: hsl(var(--text-dark));
}

.cart-items-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-right: 0.25rem;
}

/* Scrollbar específico para el carrito */
.cart-items-container::-webkit-scrollbar {
  width: 6px;
}
.cart-items-container::-webkit-scrollbar-track {
  background: transparent;
}
.cart-items-container::-webkit-scrollbar-thumb {
  background: hsl(var(--primary-light));
  border-radius: 10px;
}

/* Estado Vacío del Carrito */
.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  gap: 1rem;
  color: hsl(var(--text-muted));
  padding: 2rem;
}

.cart-empty-icon {
  width: 80px;
  height: 80px;
  background-color: hsl(var(--bg-accent));
  color: hsl(var(--primary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  border: 1.5px dashed var(--border-color);
}

.cart-empty-state h3 {
  font-size: 1.25rem;
  color: hsl(var(--text-dark));
}

.cart-empty-state p {
  font-size: 0.9rem;
  max-width: 260px;
}

/* Fila de Producto en el Carrito */
.cart-item-row {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed hsla(var(--primary), 0.15);
  align-items: center;
}

.cart-item-img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background-color: hsl(var(--bg-accent));
  border: 1px solid var(--border-color);
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: hsl(var(--text-dark));
  line-height: 1.3;
}

.cart-item-price {
  font-family: var(--font-rounded);
  font-weight: 700;
  font-size: 0.95rem;
  color: hsl(var(--primary));
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

/* Controles de Cantidad */
.cart-qty-selector {
  display: flex;
  align-items: center;
  background-color: hsl(var(--bg-accent));
  border-radius: 50px;
  padding: 0.2rem;
  border: 1px solid var(--border-color);
}

.cart-qty-btn {
  border: none;
  background: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
  color: hsl(var(--text-dark));
  transition: var(--transition-smooth);
}

.cart-qty-btn:hover:not(:disabled) {
  background-color: hsl(var(--primary-light));
  color: hsl(var(--primary));
}

.cart-qty-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cart-qty-num {
  font-size: 0.85rem;
  font-weight: 700;
  width: 26px;
  text-align: center;
  font-family: var(--font-rounded);
}

.cart-remove-btn {
  border: none;
  background: none;
  color: hsl(var(--text-muted));
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.cart-remove-btn:hover {
  background-color: #FFEFEF;
  color: #FF5E5E;
}

.cart-stock-warning {
  font-size: 0.75rem;
  color: #FF8E25;
  font-weight: 600;
  margin-top: 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Panel de Resumen de Compra */
.cart-summary-panel {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-summary-label {
  font-weight: 600;
  color: hsl(var(--text-muted));
  font-size: 0.95rem;
}

.cart-summary-value {
  font-family: var(--font-rounded);
  font-weight: 700;
  font-size: 1.5rem;
  color: hsl(var(--primary));
}

/* Botón de Enlace a WhatsApp de Alta Fidelidad */
.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  border: none;
  padding: 0.9rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 6px 16px -4px rgba(37,211,102,0.4);
  text-decoration: none;
  transition: var(--transition-bounce);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(37,211,102,0.5);
  filter: brightness(1.05);
}

.btn-whatsapp:active {
  transform: translateY(0);
}

/* ==========================================================================
   DISEÑO RESPONSIVO (RESPONSIVE RULES)
   ========================================================================== */
@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: 1fr;
  }
  .hero-content {
    padding: 3rem 2rem;
  }
  .hero-image-container {
    min-height: 300px;
    padding-bottom: 2rem;
  }
  .hero-image-wrapper {
    width: 70%;
    height: 300px;
  }
  .modal-container {
    grid-template-columns: 1fr;
    max-height: 85vh;
  }
  .modal-close-btn {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
  }
  .modal-img {
    height: 250px;
    min-height: 250px;
  }
  .modal-content-panel {
    padding: 1.5rem;
  }
}

@media (max-width: 600px) {
  .logo-text {
    font-size: 1.15rem;
  }
  .logo-icon-wrapper {
    width: 36px;
    height: 36px;
  }
  .theme-selector {
    display: none; /* Ocultar selector en móviles ultra pequeños o adaptarlo */
  }
  .hero-title {
    font-size: 2.25rem;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .toolbar-top {
    flex-direction: column;
    align-items: stretch;
  }
  .sort-wrapper {
    justify-content: space-between;
  }
  .results-count {
    display: none;
  }
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-actions {
    width: 100%;
    justify-content: space-between;
  }
}
