  /* ==========================================
   INDICADOR DE CAMBIO DE PRECIO
   ========================================== */

/* Contenedor del indicador de cambio de precio */
.price-change-indicator {
  position: absolute;
  bottom: 15px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 15;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
  cursor: pointer;
}

/* Indicador para descuentos (verde hacia abajo) */
.price-change-indicator.discount {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.price-change-indicator.discount:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Indicador para aumentos (rojo hacia arriba) */
.price-change-indicator.increase {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.price-change-indicator.increase:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Ícono de la flecha */
.price-change-indicator i {
  font-size: 13px;
  line-height: 1;
}

/* Texto del porcentaje */
.price-change-indicator span {
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

/* Animación sutil al aparecer */
.price-change-indicator {
  animation: priceIndicatorFadeIn 0.3s ease-out;
}

@keyframes priceIndicatorFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Ajustes para cards mini */
.product-card.mini .price-change-indicator {
  bottom: 8px;
  right: 8px;
  padding: 4px 6px;
  font-size: 10px;
}

.product-card.mini .price-change-indicator i {
  font-size: 10px;
}

.product-card.mini .price-change-indicator span {
  font-size: 9px;
}

/* Responsive para móvil */
@media (max-width: 480px) {
  .price-change-indicator {
    bottom: 8px;
    right: 8px;
    padding: 4px 6px;
    font-size: 10px;
    gap: 3px;
  }
  
  .price-change-indicator i {
    font-size: 10px;
  }
  
  .price-change-indicator span {
    font-size: 9px;
  }
}

/* Asegurar que esté por encima de otros elementos */
.product-card {
  position: relative;
  overflow: visible;
}

/* Badge de cambio de precio en quick view */
.quick-view-price-change {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 6;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.quick-view-price-change.discount {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.quick-view-price-change.increase {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.quick-view-price-change i {
  font-size: 14px;
}

.quick-view-price-change span {
  font-size: 11px;
  font-weight: 800;
}

.product-card .mini-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 12;
}

/* Ajuste para evitar solapamiento con botones de acción en mobile */
@media (max-width: 768px) {
  .price-change-indicator {
    bottom: 45px; /* Subir un poco para evitar overlap con botones */
    right: 8px;
  }
}

/* Mejoras para mejor visibilidad */
.price-change-indicator {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  min-width: 45px;
  justify-content: center;
}

/* Efecto pulse sutil para llamar la atención */
.price-change-indicator.discount {
  animation: priceIndicatorFadeIn 0.3s ease-out, discountPulse 2s ease-in-out infinite;
}

.price-change-indicator.increase {
  animation: priceIndicatorFadeIn 0.3s ease-out, increasePulse 2s ease-in-out infinite;
}

@keyframes discountPulse {
  0%, 100% { 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(16, 185, 129, 0.4); 
  }
  50% { 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 4px rgba(16, 185, 129, 0.1); 
  }
}

@keyframes increasePulse {
  0%, 100% { 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(239, 68, 68, 0.4); 
  }
  50% { 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 4px rgba(239, 68, 68, 0.1); 
  }
}

/* Ocultar el pulse en hover para evitar distracción */
.price-change-indicator:hover {
  animation: none !important;
}
/* 
 * MatScann - Redesign based on the mockup with enhanced functionality
 * Yellow/Black/White color scheme
 */
/* Mejoras para los filtros en el modal móvil */
#modal-filters-content .sidebar-filters {
  width: 100%;
  display: block !important; /* Forzar visualización en el modal */
}

#modal-filters-content .sidebar-section {
  margin-bottom: 15px;
  border-left: 5px solid var(--primary-yellow);
  background-color: var(--bg-gray);
}

#modal-filters-content .filter-content {
  max-height: none !important; /* Permitir que los contenidos se expandan completamente */
  overflow-y: visible !important;
  padding: 10px 15px !important;
}

/* Asegurar que los componentes de Algolia se muestren correctamente */
#modal-filters-content .ais-RefinementList,
#modal-filters-content .ais-NumericMenu {
  margin-bottom: 10px;
}

#modal-filters-content .ais-RefinementList-item,
#modal-filters-content .ais-NumericMenu-item {
  margin-bottom: 8px;
  display: flex !important;
  align-items: center;
}

#modal-filters-content .ais-RefinementList-checkbox,
#modal-filters-content .ais-NumericMenu-radio {
  margin-right: 8px;
}

/* Estilos para el badge de filtros */
.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-red);
  color: white;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 5px;
}

/* Mejora el texto en chips de filtros activos */
.filter-chip {
  background: #f0f4ff;
  color: var(--text-dark);
  font-weight: 500;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.chip-remove {
  margin-left: 6px;
  font-size: 18px;
  line-height: 1;
  font-weight: bold;
  color: var(--text-light);
}

/* Hacer que el pie del modal sea más visible */
.custom-modal-footer {
  padding: 16px;
  border-top: 1px solid #ddd;
  background: white;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  bottom: 0;
}

/* Mejorar el botón de aplicar */
.custom-apply-btn {
  width: 100%;
  background: var(--primary-yellow);
  color: var(--primary-black);
  border: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.custom-apply-btn:hover {
  background: #e6b400;
}

/* Hacer que el contador de filtros sea más visible */
.custom-filter-count {
  background: var(--primary-black);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 14px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Asegurarse de que los filtros móviles solo aparezcan en móvil */
@media (min-width: 769px) {
  .mobile-controls {
    display: none !important;
  }
}

/* Aumentar la altura máxima del contenido del modal en dispositivos pequeños */
@media (max-height: 700px) {
  .custom-modal-body {
    max-height: 65vh;
  }
}
/* ==========================================
   1. RESET & VARIABLES
   ========================================== */
:root {
  --primary-yellow: #FFC800;
  --primary-black: #1A1A1A;
  --accent-red: #EE3A43;
  --text-dark: #000000;
  --text-medium: #333333;
  --text-light: #555555;
  --bg-light: #FFFFFF;
  --bg-gray: #F5F5F5;
  --border-light: #E0E0E0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 3px 8px rgba(0, 0, 0, 0.08);
  --radius-sm: 4px;
  --radius-md: 8px;
  --transition: all 0.2s ease-out;
  --font-family: 'Montserrat', sans-serif;
}

/* ==========================================
   2. GLOBAL STYLES
   ========================================== */
body {
  font-family: var(--font-family);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
}

/* ==========================================
   3. BANNER SECTION WITH CATEGORY BANNER
   ========================================== */
.banner-container {
  margin-top: 150px;
  overflow: hidden;
  transform: translateY(-100%);
  opacity: 0;
  height: 0;
  margin-bottom: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              margin-bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity, height;
}

.banner-container.show {
  transform: translateY(0);
  opacity: 1;
  height: 200px;
  margin-bottom: 30px;
}
.banner {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 200px;
}

#categoryBanner {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: translate3d(0, 0, 0); /* Aceleración por hardware */
  backface-visibility: hidden;
  will-change: transform;
}

.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 2rem;
}

.banner-content {
  z-index: 1;
}



/* ==========================================
   4. TOP CONTROLS (LOGO, SEARCH, SORT)
   ========================================== */
.top-controls {
  margin-bottom: 20px;
}

.logo-search-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.matscann-logo {
  width: 160px;
}

.matscann-logo img {
  width: 100%;
  height: auto;
}

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

.matscann-search {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}

.search-button {
  position: absolute;
  right: 0;
  top: 0;
  height: 40px;
  width: 40px;
  background-color: var(--primary-yellow);
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--primary-black);
  font-size: 16px;
}

/* Search history dropdown */
.search-history {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 10px;
  z-index: 100;
  display: none;
  margin-top: 5px;
}

.search-history.visible {
  display: block;
  animation: fadeInDown 0.2s ease-out;
}

.search-history h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text-medium);
}

.search-history ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}

.search-history li {
  padding: 8px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.search-history li:hover {
  background-color: var(--bg-gray);
}

#clear-history {
  background: none;
  border: none;
  color: var(--text-light);
  text-decoration: underline;
  font-size: 12px;
  padding: 0;
  float: right;
}

.sorting-control {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.sort-select {
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background-color: var(--bg-light);
  font-family: var(--font-family);
  font-size: 14px;
  cursor: pointer;
  outline: none;
}

/* ==========================================
   5. MAIN CONTENT AREA (SIDEBAR + PRODUCTS)
   ========================================== */
.matscann-main-content {
  padding: 20px 0 40px;
  transition: padding-top 0.3s ease;
}

.main-content-area {
  display: flex;
  gap: 30px;
}

/* ==========================================
   6. SIDEBAR FILTERS
   ========================================== */
.sidebar-filters {
  width: 240px;
  flex-shrink: 0;
}

.sidebar-section {
  margin-bottom: 15px;
  border-left: 5px solid #ff9c00;
  background-color: var(--bg-gray);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  cursor: pointer;
  background-color: var(--bg-gray);
  border-bottom: 1px solid transparent; /* Add transparent border initially */
  transition: background-color 0.2s ease;
}

.sidebar-header:hover {
  background-color: #e9e9e9; /* Slightly darker on hover */
}

.sidebar-header.active {
  border-bottom-color: var(--border-light); /* Show border when active */
  background-color: #ebebeb; /* Slightly darker when active */
}

.sidebar-header.active + .filter-content {
  max-height: 300px !important; /* Altura máxima razonable */
  overflow-y: auto !important;
  padding: 10px 15px 15px !important;
}

.sidebar-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-black);
}

.arrow-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
  font-weight: bold;
  color: var(--text-medium);
}

.arrow-icon.expanded {
  transform: rotate(90deg);
  color: var(--primary-black); /* Darker color when expanded */
}

.filter-content {
  overflow-y: auto !important;
  max-height: none !important; /* Importante: eliminar el límite de altura en estado cerrado */
  padding: 0 15px 15px !important;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
  transition: max-height 0.3s ease, padding 0.3s ease !important; 
}

.filter-content.collapsed {
  max-height: 0 !important;
  padding: 0 15px 0 !important;
  overflow: hidden !important;
}

.filter-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 5px;
  height: 15px;
  background: linear-gradient(to top, var(--bg-light) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  display: none;
}

.filter-content::-webkit-scrollbar-thumb {
  background-color: var(--primary-yellow);
  border-radius: 3px;
}

.filter-content::-webkit-scrollbar {
  width: 6px;
  background-color: var(--bg-light);
  border-radius: 3px;
}

.filter-content::-webkit-scrollbar-thumb:hover {
  background-color: #e6b400;
}

.filter-item {
  padding: 8px 15px;
  font-size: 13px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.filter-item:hover {
  background-color: rgba(255, 200, 0, 0.05);
}

.filter-item-selected {
  background-color: rgba(255, 200, 0, 0.15);
  font-weight: 500;
}

.filter-item input[type="checkbox"] {
  margin-right: 8px;
}

.filter-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-light);
}

.filter-count-indicator {
  font-size: 15px;
  color: var(--accent-red);
  margin-left: 5px;
  font-weight: bold;
}

/* Promo Banner */
.promo-banner {
    padding: 0;
    margin: 0;
}

.promo-banner img {
    display: block;
    width: 100%;
    height: auto;
}

/* ==========================================
   7. PRODUCTS GRID
   ========================================== */
.products-grid {
  flex: 1;
}

/* Comparison banner */
.comparison-banner {
  background-color: var(--primary-yellow);
  border-radius: var(--radius-md);
  padding: 15px;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease;
}

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

.comparison-info {
  font-weight: 600;
  color: var(--primary-black);
}

.comparison-info span {
  font-weight: 700;
  font-size: 18px;
  margin-right: 4px;
}

.comparison-actions {
  display: flex;
  gap: 10px;
}

.primary-button {
  background-color: var(--primary-black);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-weight: 600;
  transition: var(--transition);
}

.primary-button:hover:not(:disabled) {
  background-color: #333;
}

.primary-button:disabled {
  background-color: #999;
  cursor: not-allowed;
}

.secondary-button {
  background-color: white;
  color: var(--primary-black);
  border: 1px solid var(--primary-black);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-weight: 600;
  transition: var(--transition);
}

.secondary-button:hover:not(:disabled) {
  background-color: #f5f5f5;
}

.secondary-button:disabled {
  border-color: #ccc;
  color: #999;
  cursor: not-allowed;
}

.products-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-card .favorite-btn {
  position: absolute;
  top: 10px;    /* Ajusta el valor según convenga */
  right: 10px;  /* Ajusta el valor según convenga */
  z-index: 10;  /* Para que quede por encima de otros elementos */
}

.favorite-btn {
  background-color:rgb(255, 255, 255);
  /* Otros estilos */
}

.favorite-btn.active {
  background-color: #1A1A1A; /* o prueba con #C0392B */
}

.product-card {
  background-color: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  position: relative;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.product-card.mini {
  grid-column: span 1;
}

.product-image-container {
  position: relative;
  padding: 15px;
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.product-card.mini .product-image-container {
  height: 150px;
}

.product-image {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
}

.product-card.mini .product-image {
  max-height: 120px;
}

.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--accent-red);
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.product-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.product-card.mini .product-info {
  height: calc(100% - 150px - 30px);
  padding: 12px;
}

.product-name {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card.mini .product-name {
  font-size: 13px;
  -webkit-line-clamp: 1;
  margin-bottom: 4px;
}

.product-meta {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.product-card.mini .product-meta {
  margin-bottom: 5px;
}

.product-retailer, .product-brand {
  margin: 3px 0;
}

.product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
}

.product-card.mini .product-price {
  font-size: 15px;
}

.action-buttons {
  display: flex;
  gap: 5px;
}

.mini-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 5;
}

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color:rgb(199, 199, 199);
  color: white;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.action-btn:hover {
  background-color: #f8af3c;
}

.action-btn.active {
  background-color: #f8af3c !important;
}

.product-card.mini .action-btn {
  width: 28px;
  height: 28px;
  font-size: 12px;
  background-color: white;
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
}

.product-card.mini .action-btn:hover {
  background-color: var(--accent-red);
  color: white;
}

.product-card.mini .action-btn.active {
  background-color: var(--accent-red);
  color: white;
}

/* No results message */
#no-results-message {
  text-align: center;
  padding: 40px 20px;
  background-color: var(--bg-gray);
  border-radius: var(--radius-md);
  margin-bottom: 30px;
}

#no-results-message h2 {
  margin-top: 0;
  font-size: 24px;
  color: var(--text-dark);
}

#no-results-message p {
  margin-bottom: 20px;
  color: var(--text-medium);
}

/* Recently viewed section */
.recently-viewed-section {
  margin-top: 40px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-left: 15px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background-color: var(--primary-yellow);
}

.recently-viewed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 15px;
}

/* ==========================================
   8. PAGINATION
   ========================================== */
.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.pagination-item {
  margin: 0 3px;
}

.pagination-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-light);
  border: 1px solid var(--border-light);
  color: var(--text-medium);
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination-link:hover {
  background-color: var(--primary-yellow);
  color: var(--primary-black);
}

.pagination-selected .pagination-link {
  background-color: var(--primary-yellow);
  color: var(--primary-black);
  border-color: var(--primary-yellow);
}

/* ==========================================
   9. MOBILE FILTER CONTROLS
   ========================================== */
.mobile-filter-controls {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-light);
  padding: 10px 15px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.filter-button {
  background-color: var(--primary-yellow);
  color: var(--primary-black);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 15px;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-badge {
  background-color: var(--accent-red);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-left: 5px;
}

.active-filters-container {
  margin-top: 10px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 5px;
}

.active-filters {
  display: flex;
  gap: 10px;
}

.filter-chip {
  background-color: var(--bg-gray);
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.remove-filter {
  background: none;
  border: none;
  color: var(--text-medium);
  font-size: 18px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

/* ==========================================
   10. MODALS (FILTER, QUICK VIEW, COMPARE)
   ========================================== */
.filter-modal,
.product-modal,
.compare-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
}

.filter-modal.active,
.product-modal.active,
.compare-modal.active {
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.filter-modal.active .modal-backdrop,
.product-modal.active .modal-backdrop,
.compare-modal.active .modal-backdrop {
  opacity: 1;
}

.modal-container {
  position: fixed;
  background-color: var(--bg-light);
  transition: transform 0.3s ease;
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Filter modal specific */
.filter-modal .modal-container {
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 15px 15px 0 0;
  transform: translateY(100%);
}

.filter-modal.active .modal-container {
  transform: translateY(0);
}

.product-modal.active .modal-container {
  opacity: 1;
}

.product-modal .close-modal-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  color: white;
  font-size: 24px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.product-modal .close-modal-btn:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* Compare modal specific */
.compare-modal .modal-container {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  border-radius: var(--radius-md);
  width: 95%;
  max-width: 1000px;
  opacity: 0;
}

.compare-modal.active .modal-container {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.close-modal-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-medium);
  cursor: pointer;
}

.modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--border-light);
}

.apply-filters-btn {
  width: 100%;
  background-color: var(--primary-yellow);
  color: var(--primary-black);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.filter-count {
  background-color: var(--primary-black);
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

/* Quick view content */
.quick-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.quick-view-image {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-gray);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
}

.quick-view-image img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.quick-view-details {
  display: flex;
  flex-direction: column;
}

.quick-view-name {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 15px;
  line-height: 1.3;
}

.quick-view-meta {
  margin-bottom: 15px;
}

.quick-view-brand, .quick-view-retailer {
  margin: 5px 0;
  color: var(--text-medium);
}

.quick-view-price {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary-black);
}

.quick-view-description {
  margin-bottom: 30px;
}

.quick-view-description h3 {
  font-size: 16px;
  margin: 0 0 10px;
}

.quick-view-description p {
  color: var(--text-medium);
  margin: 0;
  line-height: 1.6;
}

.quick-view-actions {
  margin-top: auto;
}

.view-details-btn {
  width: 100%;
  margin-bottom: 15px;
}

.quick-view-secondary-actions {
  display: flex;
  gap: 15px;
}

.quick-view-secondary-actions .action-btn {
  flex: 1;
  background-color: transparent;
  color: var(--text-medium);
  border: 1px solid var(--border-light);
  width: auto;
  height: auto;
  padding: 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.quick-view-secondary-actions .action-btn:hover {
  background-color: var(--bg-gray);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 15px;
  text-align: center;
  border: 1px solid var(--border-light);
  word-break: break-word; /* Evita que textos largos se corten */
}

.comparison-table th {
  background-color: var(--bg-gray);
  font-weight: 600;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  text-align: left;
  background-color: var(--bg-gray);
  font-weight: 600;
  width: 150px;
}

.comparison-product-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.header-image-container {
  width: 80px;
  height: 80px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comparison-product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.comparison-product-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  padding: 0 5px;
  white-space: normal;
  text-align: center;
}

.remove-from-comparison {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--accent-red);
  transition: color 0.2s ease;
}

.comparison-price {
  font-weight: 700;
  font-size: 16px;
  color: var(--primary-black);
}

.compare-feature {
  text-align: left;
  background-color: var(--bg-gray);
  font-weight: 600;
  width: 150px;
}

.compare-product {
  vertical-align: top;
}

/* Botón para "Ver producto" */
.view-product-btn {
  display: inline-block;
  background-color: var(--primary-yellow);
  color: var(--primary-black);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.view-product-btn:hover {
  background-color: var(--primary-black);
  color: white;
}
/* ==========================================
   11. ANIMATIONS
   ========================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ==========================================
   12. RESPONSIVE ADJUSTMENTS
   ========================================== */
@media (max-width: 991px) {
  .logo-search-container {
    flex-wrap: wrap;
  }
  
  .matscann-logo {
    width: 140px;
  }
  
  .search-container {
    order: 3;
    max-width: 100%;
    width: 100%;
    margin-top: 15px;
  }
  
  .products-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .quick-view-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .quick-view-image {
    max-height: 250px;
  }
  
  .banner-title {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .main-content-area {
    flex-direction: column;
  }
  
  .sidebar-filters {
    width: 100%;
    display: none;
  }
  
  .mobile-filter-controls {
    display: block;
  }
  
  .products-grid {
    margin-bottom: 70px; /* Space for fixed filter bar */
  }
  
  .products-list {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
  }
  
  .product-image-container {
    height: 160px;
  }
  
  .banner-title {
    font-size: 2.5rem;
  }
  
  .modal-content .sidebar-filters {
    display: block;
    margin-bottom: 0;
  }
  
  .modal-content .promo-banner {
    display: none;
  }
  
  .comparison-table th:first-child,
  .comparison-table td:first-child {
    width: 100px;
  }
  
  .comparison-product-name {
    font-size: 12px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .products-list {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  
  .product-image-container {
    height: 140px;
  }
  
  .product-name {
    font-size: 14px;
  }
  
  .product-description {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }
  
  .product-price {
    font-size: 16px;
  }
  
  .action-btn {
    width: 28px;
    height: 28px;
  }
  
  .banner-title {
    font-size: 2rem;
  }
  
  .quick-view-name {
    font-size: 20px;
  }
  
  .quick-view-price {
    font-size: 24px;
  }
  
  .comparison-product-image {
    max-width: 50px;
    max-height: 50px;
  }
  
  .comparison-product-name {
    font-size: 11px;
    height: 28px;
  }
  
  .view-product-btn {
    padding: 4px 8px;
    font-size: 12px;
  }
}

/* ==========================================
   13. ALGOLIA WIDGET ADJUSTMENTS
   ========================================== */
.ais-Hits-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ais-Pagination-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: center;
}

.ais-RefinementList-item {
  margin-bottom: 5px;
}

.ais-RefinementList-checkbox {
  margin-right: 8px;
}

.ais-RefinementList-count {
  display: none !important;
}
.ais-NumericMenu-count {
  display: none !important;
}
.ais-SearchBox-form {
  position: relative;
  width: 100%;
}

.ais-SearchBox-input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 12px;
  border: 2px solid #343a40;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}

.ais-SearchBox-reset,
.ais-SearchBox-submit {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
}

.ais-SearchBox-submit {
  right: 0;
}

.ais-SearchBox-reset {
  right: 30px;
}

.ais-RefinementList-showMore {
  background: none;
  border: none;
  color: var(--primary-black);
  font-size: 12px;
  padding: 5px 15px;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 5px;
}

.ais-RefinementList-showMore--disabled {
  display: none;
}

.ais-SortBy-select {
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background-color: var(--bg-light);
  font-family: var(--font-family);
  font-size: 14px;
  cursor: pointer;
  outline: none;
}

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

.comparison-info {
  font-weight: 600;
  color: var(--primary-black);
}

.comparison-info span {
  font-weight: 700;
  font-size: 18px;
  margin-right: 4px;
}

.comparison-actions {
  display: flex;
  gap: 10px;
}

/* Estilos para el modal de filtros móvil */
.mobile-controls {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}

.mobile-search {
  padding: 16px 16px 8px;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 4px 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  border: 1px solid #eee;
  transition: all 0.2s ease;
}

.search-wrapper:focus-within {
  background: white;
  border-color: #2962ff40;
  box-shadow: 0 4px 12px rgba(41, 98, 255, 0.1);
}

.search-icon {
  color: #2962ff;
  font-size: 18px;
  margin-right: 12px;
}

.mobile-search-input {
  flex: 1;
  border: none;
  padding: 12px 0;
  font-size: 16px;
  background: transparent;
  color: #333;
  outline: none;
}

.mobile-search-input::placeholder {
  color: #999;
  font-size: 15px;
}

.mobile-search-clear {
  opacity: 0;
  border: none;
  background: none;
  padding: 8px;
  color: #666;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.mobile-search-input:not(:placeholder-shown) + .mobile-search-clear {
  opacity: 1;
}

.mobile-filter-section {
  padding: 8px 16px;
  border-top: 1px solid #f0f0f0;
}

.filter-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.mobile-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid #e0e0e0;
  padding: 8px 16px;
  border-radius: 8px;
  color: #2962ff;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
}

@media (max-width: 768px) {
  .filter-buttons {
    display: flex;
    justify-content: center;
    padding: 0 15px; /* Opcional, para dar margen lateral */
  }
  .mobile-filter-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center; /* Centra el contenido horizontalmente */
  }
}


.mobile-filter-btn:active {
  transform: scale(0.98);
}

.filter-badge {
  background: #2962ff15;
  color: #2962ff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.active-filters-scroll {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.active-filters-scroll::-webkit-scrollbar {
  display: none;
}

.active-filters {
  display: flex;
  gap: 8px;
  padding-bottom: 4px;
}

.filter-chip {
  background: #f0f4ff;
  color: #2962ff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border: 1px solid #2962ff20;
}
.chip-remove {
  border: none;
  background: none;
  color: #2962ff;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.custom-modal-filters {
  position: fixed;
  inset: 0;
  z-index: 9999;
  visibility: hidden;
  -webkit-tap-highlight-color: transparent;
}

.custom-modal-filters * {
  box-sizing: border-box;
  font-family: inherit;
}

.custom-modal-active {
  visibility: visible;
}

.custom-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.custom-modal-active .custom-modal-backdrop {
  opacity: 1;
}

.custom-modal-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  max-height: 90vh;
  overflow: hidden;
}

.custom-modal-active .custom-modal-container {
  transform: translateY(0);
}

.custom-modal-handle {
  position: relative;
  padding: 12px;
  display: flex;
  justify-content: center;
  cursor: grab;
}

.custom-modal-handle::after {
  content: '';
  width: 36px;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
}

.custom-modal-header {
  padding: 0 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
}

.custom-modal-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.custom-modal-actions {
  display: flex;
  gap: 12px;
}

.custom-reset-btn,
.custom-close-btn {
  background: none;
  border: none;
  padding: 8px;
  color: #666;
  cursor: pointer;
  transition: color 0.2s;
}

.custom-reset-btn:hover,
.custom-close-btn:hover {
  color: #333;
}

.custom-modal-body {
  padding: 16px;
  overflow-y: auto;
  max-height: calc(90vh - 200px);
}

.custom-modal-footer {
  padding: 16px;
  border-top: 1px solid #f0f0f0;
  background: #fff;
  position: sticky;
  bottom: 0;
}

.custom-apply-btn {
  width: 100%;
  background: #2962ff;
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.custom-apply-btn:hover {
  background: #1e4bd8;
}

.custom-filter-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 14px;
}

#modal-filters-content .sidebar-section {
  width: 100%;
  border-left: 5px solid var(--primary-yellow);
  background-color: var(--bg-gray);
  margin-bottom: 15px;
}

@media (max-width: 480px) {
  .custom-modal-container {
    border-radius: 16px 16px 0 0;
  }

  .custom-modal-title {
    font-size: 16px;
  }

  .custom-apply-btn {
    padding: 12px;
    font-size: 15px;
  }
}

@media (min-width: 769px) {
  .mobile-controls {
    display: none;
  }
}
@media (max-width: 767.98px) {
  .main-content {
    margin-top: 70px;
  }
}
/* Estilos específicos para los botones del modal */
.modal-favorite-btn.active {
  background-color: #1A1A1A !important;
  color: white !important;
}

.modal-favorite-btn:not(.active) {
  background-color: #c7c7c7 !important;
  color: white !important;
}

.modal-compare-btn.active {
  background-color: #f8af3c !important;
  color: black !important;
}

.modal-compare-btn:not(.active) {
  background-color: transparent !important;
  color: var(--text-medium) !important;
  border: 1px solid var(--border-light) !important;
}

/* Asegurar que los iconos tengan el color correcto */
.modal-favorite-btn.active i {
  color: white !important;
}

.modal-favorite-btn:not(.active) i {
  color: white !important;
}

.quick-view-secondary-actions .action-btn {
  flex: 1;
  width: auto !important;
  height: auto !important;
  padding: 10px !important;
  border-radius: var(--radius-sm) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}
/* Contenedor de descripción con altura máxima y scroll */
.description-container {
  max-height: 120px;
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
  position: relative;
}

.description-container::-webkit-scrollbar {
  width: 4px;
}

.description-container::-webkit-scrollbar-thumb {
  background-color: var(--border-light);
  border-radius: 4px;
}

.description-container::-webkit-scrollbar-track {
  background-color: transparent;
}

.description-container p {
  margin: 0;
  color: var(--text-medium);
  line-height: 1.6;
  font-size: 14px;
}

/* Contenedor de características técnicas con altura máxima y scroll */
.specs-table-container {
  max-height: 150px;
  overflow-y: auto;
  margin-top: 10px;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
  position: relative;
}

.specs-table-container::-webkit-scrollbar {
  width: 4px;
}

.specs-table-container::-webkit-scrollbar-thumb {
  background-color: var(--border-light);
  border-radius: 4px;
}

.specs-table-container::-webkit-scrollbar-track {
  background-color: transparent;
}

/* Estilos para la tabla de características técnicas */
.quick-view-specs {
  margin-bottom: 25px;
  background-color: var(--bg-gray);
  padding: 20px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary-yellow);
  position: relative;
}

.quick-view-specs h3 {
  font-size: 16px;
  margin: 0 0 15px;
  color: var(--primary-black);
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-view-specs h3::before {
  font-size: 18px;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr {
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.specs-table tr:last-child {
  border-bottom: none;
}

.specs-table td {
  padding: 8px 5px;
  font-size: 14px;
}

.spec-name {
  font-weight: 600;
  color: var(--text-dark);
  width: 40%;
}

.spec-value {
  color: var(--text-medium);
}

/* Indicador de scroll */
.scroll-indicator-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 10px;
  height: 25px;
  background: linear-gradient(to top, var(--bg-gray) 30%, rgba(245, 245, 245, 0));
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s ease;
  z-index: 5;
}

.quick-view-description .scroll-indicator-bottom {
  background: linear-gradient(to top, var(--bg-gray) 30%, rgba(245, 245, 245, 0));
}

/* Estilos específicos para los botones del modal */
.modal-favorite-btn.active {
  background-color: #1A1A1A !important;
  color: white !important;
}

.modal-favorite-btn:not(.active) {
  background-color: #c7c7c7 !important;
  color: white !important;
}

.modal-compare-btn.active {
  background-color: #f8af3c!important;
  color: black !important;
}

.modal-compare-btn:not(.active) {
  background-color: transparent !important;
  color: var(--text-medium) !important;
  border: 1px solid var(--border-light) !important;
}

/* Asegurar que los iconos tengan el color correcto */
.modal-favorite-btn.active i {
  color: white !important;
}

.modal-favorite-btn:not(.active) i {
  color: white !important;
}

.quick-view-secondary-actions .action-btn {
  flex: 1;
  width: auto !important;
  height: auto !important;
  padding: 10px !important;
  border-radius: var(--radius-sm) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}
/* Ocultar elementos del comparador en móvil */
@media (max-width: 768px) {
  /* Ocultar botones de comparar */
  .compare-btn {
    display: none !important;
  }
  
  /* Ocultar banner de comparación */
  #comparison-banner {
    display: none !important;
  }
  
  /* Ocultar modal de comparación */
  #compare-modal {
    display: none !important;
  }
  
  /* Ajustar el espacio en botones cuando compare-btn está oculto */
  .quick-view-secondary-actions {
    justify-content: center !important;
  }
  
  .quick-view-secondary-actions .favorite-btn {
    flex: 0 1 auto !important;
    min-width: 140px !important;
  }
}
/* Contenedor de descripción con altura máxima y scroll */
.description-container {
  max-height: 120px;
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
  position: relative;
}

.description-container::-webkit-scrollbar {
  width: 4px;
}

.description-container::-webkit-scrollbar-thumb {
  background-color: var(--border-light);
  border-radius: 4px;
}

.description-container::-webkit-scrollbar-track {
  background-color: transparent;
}

.description-container p {
  margin: 0;
  color: var(--text-medium);
  line-height: 1.6;
  font-size: 14px;
}

/* Contenedor de características técnicas con altura máxima y scroll */
.specs-table-container {
  max-height: 150px;
  overflow-y: auto;
  margin-top: 10px;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
  position: relative;
}

.specs-table-container::-webkit-scrollbar {
  width: 4px;
}

.specs-table-container::-webkit-scrollbar-thumb {
  background-color: var(--border-light);
  border-radius: 4px;
}

.specs-table-container::-webkit-scrollbar-track {
  background-color: transparent;
}

/* Estilos para la tabla de características técnicas */
.quick-view-specs {
  margin-bottom: 25px;
  background-color: var(--bg-gray);
  padding: 20px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary-yellow);
  position: relative;
}

.quick-view-specs h3 {
  font-size: 16px;
  margin: 0 0 15px;
  color: var(--primary-black);
  display: flex;
  align-items: center;
  gap: 8px;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr {
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.specs-table tr:last-child {
  border-bottom: none;
}

.specs-table td {
  padding: 8px 5px;
  font-size: 14px;
}

.spec-name {
  font-weight: 600;
  color: var(--text-dark);
  width: 40%;
}

.spec-value {
  color: var(--text-medium);
}

/* Indicador de scroll */
.scroll-indicator-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 10px;
  height: 25px;
  background: linear-gradient(to top, var(--bg-gray) 30%, rgba(245, 245, 245, 0));
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s ease;
  z-index: 5;
}

.quick-view-description .scroll-indicator-bottom {
  background: linear-gradient(to top, var(--bg-gray) 30%, rgba(245, 245, 245, 0));
}

/* Estilos específicos para los botones del modal */
.modal-favorite-btn.active {
  background-color: #1A1A1A !important;
  color: white !important;
}

.modal-favorite-btn:not(.active) {
  background-color: #c7c7c7 !important;
  color: white !important;
}

.modal-compare-btn.active {
  background-color: #EE3A43 !important;
  color: white !important;
}

.modal-compare-btn:not(.active) {
  background-color: transparent !important;
  color: var(--text-medium) !important;
  border: 1px solid var(--border-light) !important;
}

/* Asegurar que los iconos tengan el color correcto */
.modal-favorite-btn.active i {
  color: white !important;
}

.modal-favorite-btn:not(.active) i {
  color: white !important;
}

.quick-view-secondary-actions .action-btn {
  flex: 1;
  width: auto !important;
  height: auto !important;
  padding: 10px !important;
  border-radius: var(--radius-sm) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

/* Ajustes para versión móvil de los botones de acción */
.quick-view-secondary-actions.mobile-actions {
  justify-content: center !important;
}

.quick-view-secondary-actions.mobile-actions .modal-favorite-btn {
  flex: 0 1 auto !important;
  min-width: 140px !important;
}

/* Ocultar elementos del comparador en móvil */
@media (max-width: 768px) {
  /* Ocultar botones de comparar */
  .compare-btn {
    display: none !important;
  }
  
  /* Ocultar banner de comparación */
  #comparison-banner {
    display: none !important;
  }
  
  /* Ocultar modal de comparación */
  #compare-modal {
    display: none !important;
  }
}
/* Ocultar elementos del comparador y quick view en móvil */
@media (max-width: 768px) {
  /* Ocultar botones de comparar y vista rápida */
  .compare-btn,
  .quick-view-btn {
    display: none !important;
  }
  
  /* Ocultar banner de comparación */
  #comparison-banner {
    display: none !important;
  }
  
  /* Ocultar modal de comparación */
  #compare-modal {
    display: none !important;
  }
  
  /* Ajustar espaciado cuando los botones no están presentes */
  .action-buttons {
    justify-content: flex-end !important;
  }
  
  /* Si solo queda el botón de favoritos, darle más espacio */
  .action-buttons .favorite-btn {
    margin-left: auto !important;
  }
}

.discount-green {
  background-color: #438900; /* Verde para descuentos */
}

.discount-red {
  background-color: #dc3545; /* Rojo para subida de precios */
}
/* ==========================================
   ESTILOS PROFESIONALES MEJORADOS PARA PRODUCTOS
   Diseño moderno y elegante con enfoque en UX/UI
   ========================================== */

/* ==========================================
   PRODUCTOS NO DISPONIBLES - DISEÑO PROFESIONAL
   ========================================== */

/* Contenedor principal del producto no disponible */
/* ==========================================
   ESTILOS OPTIMIZADOS - SIN EFECTOS PESADOS
   Diseño profesional con mejor rendimiento
   ========================================== */

/* ==========================================
   PRODUCTOS NO DISPONIBLES - VERSIÓN OPTIMIZADA
   ========================================== */

/* Contenedor principal del producto no disponible */
.product-card.product-unavailable {
  position: relative;
  opacity: 0.75;
  background: #ffffff;
  transition: opacity 0.2s ease;
}

.product-card.product-unavailable:hover {
  opacity: 0.85;
}

/* Badge sutil en la esquina */
.product-card.product-unavailable::before {
  content: 'NO DISPONIBLE';
  position: absolute;
  top: 12px;
  left: 12px;
  background: #dc3545;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.unavailable-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgb(248 249 250 / 61%);
  border-radius: inherit;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none; /* PERMITIR CLICS A TRAVÉS DEL OVERLAY */
}

.product-card.product-unavailable:hover .unavailable-overlay {
  opacity: 1;
  visibility: visible;
}
/* Badge de hover mejorado */
.unavailable-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: #dc3545;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.unavailable-badge i {
  font-size: 16px;
}

/* Quick View - Overlay para productos no disponibles */
.quick-view-unavailable-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(248, 249, 250, 0.95);
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
}

.quick-view-unavailable-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  background: #dc3545;
  border-radius: 8px;
  color: white;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.quick-view-unavailable-badge i {
  font-size: 20px;
}

/* ==========================================
   ESTILOS PARA COTIZACIÓN OPTIMIZADOS
   ========================================== */

/* Contenedor para mensaje de cotización en cards */
.product-quote-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    background: #333;
    border-radius: 8px;
    margin-top: 12px;
    bottom: 10px;
    position: relative;
}
.quote-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.quote-label i {
  font-size: 16px;
  color: #93c5fd;
}

/* Versión para cards mini */
.product-card.mini .product-quote-container {
  padding: 10px 14px;
  margin-top: 8px;
}

.product-card.mini .quote-label {
  font-size: 11px;
  gap: 6px;
}

.product-card.mini .quote-label i {
  font-size: 14px;
}

/* Estilos para Quick View - Cotización */
.quote-price-container {
  margin-bottom: 25px;
  padding: 24px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  border-radius: 12px;
  text-align: center;
  position: relative;
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.3);
}

.quote-price-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #60a5fa;
  border-radius: 0 0 4px 4px;
}

.quote-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.quote-message i {
  font-size: 24px;
  color: #93c5fd;
}

.quote-message span {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quote-subtitle {
  font-size: 14px;
  color: #bfdbfe;
  font-weight: 500;
}

/* Efectos hover simples para cotización */
.product-card:hover .product-quote-container {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
}

/* ==========================================
   ESTILOS PARA PRODUCTOS NO DISPONIBLES EN QUICK VIEW
   ========================================== */

.unavailable-price-container {
  margin-bottom: 25px;
  padding: 24px;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border-radius: 12px;
  text-align: center;
  position: relative;
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.unavailable-price-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #f87171;
  border-radius: 0 0 4px 4px;
}

.unavailable-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.unavailable-message i {
  font-size: 24px;
  color: #fca5a5;
}

.unavailable-message span {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.unavailable-subtitle {
  font-size: 14px;
  color: #fca5a5;
  font-weight: 500;
}

/* ==========================================
   ESTILOS PARA PRECIOS NORMALES OPTIMIZADOS
   ========================================== */

/* Contenedor para la sección de precio */
.price-section {
  width: 100%;
  margin-top: auto;
}

/* Contenedor del precio */
.product-price-container {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  flex-direction: column;
}
/* Etiqueta "Desde:" */
.price-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f3f4f6;
  padding: 3px 6px;
  border-radius: 4px;
}

/* Precio principal */
.product-price {
  font-size: 18px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}

/* Quick View estilos */
.quick-view-price-container {
  margin-bottom: 25px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 4px solid #ffc800;
}

.quick-view-price-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.quick-view-price-label {
  font-size: 16px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quick-view-price {
  font-size: 32px;
  font-weight: 900;
  color: #111827;
  line-height: 1;
}

.quick-view-price-original {
  font-size: 18px;
  color: #9ca3af;
  text-decoration: line-through;
  margin-left: 8px;
}

/* Versión mini para cards pequeñas */
.product-card.mini .product-price-container {
  padding-top: 6px;
}

.product-card.mini .price-label {
  font-size: 10px;
  padding: 2px 5px;
}

.product-card.mini .product-price {
  font-size: 15px;
}

/* ==========================================
   ESTILOS PARA SIDEBAR OPTIMIZADOS
   ========================================== */

/* Estilos optimizados para el sidebar */
.filter-content {
  overflow-y: auto !important;
  max-height: none !important;
  padding: 0 15px 15px !important;
  scrollbar-width: thin;
  scrollbar-color: #ffc800 transparent;
  transition: max-height 0.3s ease !important; 
}

/* Cuando la sección está cerrada */
.filter-content.collapsed {
  max-height: 0 !important;
  padding: 0 15px 0 !important;
  overflow: hidden !important;
}

/* Estilos para el contenedor cuando está activo/abierto */
.sidebar-header.active + .filter-content {
  max-height: 300px !important;
  overflow-y: auto !important;
  padding: 10px 15px 15px !important;
}

/* Estilizar las barras de desplazamiento */
.filter-content::-webkit-scrollbar {
  width: 4px;
}

.filter-content::-webkit-scrollbar-thumb {
  background: #ffc800;
  border-radius: 4px;
}

.filter-content::-webkit-scrollbar-track {
  background-color: transparent;
}

/* Ocultar botones de "Mostrar más" */
.ais-RefinementList-showMore,
.ais-Menu-showMore,
.ais-HierarchicalMenu-showMore {
  display: none !important;
}

/* Opciones seleccionadas */
.filter-item-selected {
  background: rgba(255, 200, 0, 0.15) !important;
  font-weight: 600 !important;
  border-left: 3px solid #ffc800;
  padding-left: 12px !important;
}

/* Contador de elementos */
.filter-count {
  margin-left: auto;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 2px 6px;
  font-size: 11px !important;
  color: #6b7280 !important;
  font-weight: 600;
}

/* Ícono de expansión simple */
.arrow-icon {
  transition: transform 0.2s ease;
  color: #6b7280;
  font-size: 14px;
}

.arrow-icon.expanded {
  transform: rotate(90deg);
  color: #111827;
}

.sidebar-header.active .arrow-icon {
  transform: rotate(90deg);
  color: #111827;
}

/* ==========================================
   QUICK VIEW MODAL OPTIMIZADO
   ========================================== */

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-modal.active { 
  visibility: visible; 
}

.product-modal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-modal.active .modal-backdrop { 
  opacity: 1; 
}

.product-modal .modal-container {
  position: relative;
  background: #ffffff;
  transition: all 0.3s ease;
  border-radius: 12px;
  width: 90%;
  max-width: 1200px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(20px) scale(0.95);
  opacity: 0;
}

.product-modal.active .modal-container {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.product-modal .close-modal-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  color: #111827;
  font-size: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  transition: all 0.2s ease;
}

.product-modal .close-modal-btn:hover {
  background: #dc3545;
  color: white;
  transform: scale(1.1);
}

.product-modal .modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #ffc800 transparent;
}

.product-modal .modal-content::-webkit-scrollbar { 
  width: 6px; 
}

.product-modal .modal-content::-webkit-scrollbar-thumb {
  background: #ffc800;
  border-radius: 6px;
}

/* Quick view content styles */
.quick-view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 400px;
}

.quick-view-image {
  position: relative;
  background: #f9fafb;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px;
  overflow: hidden;
  border-right: 1px solid #e5e7eb;
}

.quick-view-image img {
  max-width: 100%;
  max-height: 350px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.quick-view-image:hover img { 
  transform: scale(1.05); 
}

.quick-view-image .discount-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: #dc3545;
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  z-index: 5;
}

.quick-view-details {
  padding: 40px;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #ffffff;
}

.quick-view-name {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 15px;
  line-height: 1.3;
  color: #111827;
}

.quick-view-meta {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-view-brand, .quick-view-retailer, .quick-view-sku {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 6px 12px;
  background: #f3f4f6;
  border-radius: 20px;
  font-size: 13px;
}

.quick-view-brand strong, .quick-view-retailer strong, .quick-view-sku strong {
  margin-left: 5px;
  color: #111827;
  font-weight: 700;
}

.quick-view-description {
  margin-bottom: 25px;
  background: #f9fafb;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #ffc800;
}

.quick-view-description h3 {
  font-size: 16px;
  margin: 0 0 10px;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.quick-view-description h3 i { 
  font-size: 18px; 
  color: #ffc800;
}

.quick-view-description p {
  color: #6b7280;
  margin: 0;
  line-height: 1.6;
  font-size: 14px;
}

.quick-view-actions { 
  margin-top: auto; 
}

.view-details-btn {
  width: 100%;
  margin-bottom: 15px;
  background: #ffc800;
  color: #111827;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-details-btn:hover {
  background: #e6b400;
  transform: translateY(-1px);
}

.view-details-btn::after {
  content: '→';
  font-size: 18px;
  transition: transform 0.2s ease;
}

.view-details-btn:hover::after { 
  transform: translateX(4px); 
}

.quick-view-secondary-actions {
  display: flex;
  gap: 12px;
}

.quick-view-secondary-actions .action-btn {
  flex: 1;
  background: transparent;
  color: #6b7280;
  border: 1px solid #d1d5db;
  width: auto !important;
  height: auto !important;
  padding: 10px 14px !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  font-weight: 600;
  transition: all 0.2s ease;
}

.quick-view-secondary-actions .action-btn:hover {
  background: #f3f4f6;
  border-color: #ffc800;
}

.quick-view-secondary-actions .action-btn i { 
  font-size: 16px; 
}

/* ==========================================
   RESPONSIVE OPTIMIZADO
   ========================================== */

@media (max-width: 768px) {
  .quote-price-container {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .quote-message span {
    font-size: 18px;
  }
  
  .quote-message i {
    font-size: 22px;
  }

  .quick-view-grid {
    grid-template-columns: 1fr;
  }

  .quick-view-image {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px;
  }

  .quick-view-details {
    padding: 25px;
  }

  .quick-view-name {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .product-quote-container {
    padding: 10px 12px;
    margin-top: 6px;
  }
  
  .quote-label {
    font-size: 10px;
    gap: 6px;
  }
  
  .quote-label i {
    font-size: 14px;
  }

  .product-price-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  
  .price-label {
    font-size: 10px;
    padding: 2px 4px;
  }
  
  .product-price {
    font-size: 16px;
  }

  .unavailable-badge {
    padding: 12px 16px;
    font-size: 12px;
    gap: 8px;
  }
}

/* ==========================================
   DESACTIVAR ANIMACIONES PESADAS
   ========================================== */

/* Eliminar todas las animaciones pesadas */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* Estilos para el spinner de carga */
.comparison-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  padding: 40px;
}

.spinner-container {
  text-align: center;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-yellow);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

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

.spinner-container p {
  color: var(--text-medium);
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.comparison-error {
  text-align: center;
  padding: 40px;
  color: var(--text-medium);
}

.retry-btn {
  background: var(--primary-yellow);
  color: var(--primary-black);
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 15px;
}

.retry-btn:hover {
  background: #e6b400;
}

/* Mejorar los estilos existentes */
.price-info {
  text-align: center;
  padding: 8px;
}

.price-amount {
  font-weight: 700;
  font-size: 16px;
  color: var(--primary-black);
  margin-bottom: 4px;
}

.price-retailer {
  font-size: 12px;
  color: var(--text-medium);
  font-weight: 500;
  background-color: var(--bg-gray);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.no-price {
  font-style: italic;
  color: var(--text-light);
  font-size: 14px;
  padding: 8px;
}