/* ============================================================================
   🎨 PRODUCTS.CSS - LIMPIO (Sin estilos de Product Card)
   ============================================================================
   ✅ Solo estilos de categorías, filtros, búsqueda y layout general
   ❌ SIN estilos de .block2, .block2-pic, .product-title, .precios-container
   
   NOTA: Los estilos de tarjetas de producto están en productCard.css
   ============================================================================ */

/* ============================================================================
   🔍 BREADCRUMBS
   ============================================================================ */
.bread-crumb {
  font-size: 14px;
  padding: 15px 0;
}

.bread-crumb a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s;
}

.bread-crumb a:hover {
  color: #333;
}

/* ============================================================================
   📱 BOTONES MÓVIL EN BREADCRUMB (Solo iconos)
   ============================================================================ */
.btn-icon-mobile {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #e0e0e0;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-mobile i {
  font-size: 20px;
  color: #333;
}

.btn-icon-mobile:hover {
  background: #f8f8f8;
  border-color: #333;
}

.btn-icon-mobile:active {
  background: #333;
}

.btn-icon-mobile:active i {
  color: white;
}

/* ============================================================================
   🏷️ BARRA SUPERIOR: CATEGORÍAS
   ============================================================================ */
.categories-section {
  border: 1px solid #e0e0e0;
  padding: 15px;
  border-radius: 4px;
  background: #fff;
}

/* Header con título + subtítulo en una línea */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 15px;
  text-align: left;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #333;
  white-space: nowrap;
}

.section-subtitle {
  font-size: 13px;
  font-weight: 400;
  color: #999;
  font-style: italic;
  line-height: 1.4;
}

/* Wrapper de categorías */
.categories-wrapper {
  position: relative;
  padding: 0 40px;
}

.categories-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 5px 0;
}

.categories-bar::-webkit-scrollbar {
  display: none;
}

/* Botones de categorías */
.category-btn {
  flex-shrink: 0;
  padding: 8px 20px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: #333;
}

.category-btn:hover {
  border-color: #333;
  background: #f8f8f8;
}

.category-btn.active {
  background: #333;
  color: white;
  border-color: #333;
  font-weight: 600;
}

/* Botones de scroll */
.cat-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cat-scroll-btn:hover {
  background: #333;
  color: white;
  border-color: #333;
}

.cat-scroll-btn.left {
  left: 0;
}

.cat-scroll-btn.right {
  right: 0;
}

/* ============================================================================
   📘 BOTÓN COMPARTIR
   ============================================================================ */
.btn-compartir {
  width: 100%;
  padding: 12px 20px;
  border: 1px solid #e0e0e0;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-compartir:hover {
  background: #f8f8f8;
  border-color: #333;
}

.btn-compartir i {
  font-size: 16px;
  transition: transform 0.3s;
}

/* ============================================================================
   ⚙️ BOTÓN FILTRAR
   ============================================================================ */
.btn-filtrar {
  width: 100%;
  padding: 12px 20px;
  border: 1px solid #e0e0e0;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 3%;
}

.btn-filtrar:hover {
  background: #f8f8f8;
  border-color: #333;
}

.btn-filtrar i {
  font-size: 18px;
  transition: transform 0.3s;
}

.btn-filtrar.active i {
  transform: rotate(180deg);
}

/* ============================================================================
   🎛️ PANEL DE FILTROS (SIDEBAR)
   ============================================================================ */
.panel-filtros {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 20px;
  background: #fff;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.filter-header {
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.filter-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: #333;
}

.filter-section {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.filter-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.filter-subtitle {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #333;
}

/* Botón cerrar (móvil) */
.btn-close-filters {
  background: none;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.btn-close-filters:hover {
  background: #fee;
  color: #e74c3c;
}

/* ============================================================================
   🏷️ SUBCATEGORÍAS (CHIPS)
   ============================================================================ */
.subcategories-wrapper {
  position: relative;
}

.subcategories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 5px;
}

.subcategories-list::-webkit-scrollbar {
  width: 5px;
}

.subcategories-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.subcategories-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.subcategories-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.subcategory-tag {
  padding: 6px 14px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 13px;
  white-space: nowrap;
  display: inline-block;
}

.subcategory-tag:hover {
  background: #f8f8f8;
  border-color: #333;
}

.subcategory-tag.active {
  background: #333;
  color: white;
  border-color: #333;
  font-weight: 600;
}

/* Botones de scroll para subcategorías */
.scroll-btn {
  display: none;
}

/* ============================================================================
   🔍 CAJA DE BÚSQUEDA
   ============================================================================ */
.search-section {
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 10px 40px 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: #333;
  box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.1);
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 18px;
  pointer-events: none;
}

/* ============================================================================
   📦 GRID DE PRODUCTOS
   ============================================================================ */
.products-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 20px;
  min-height: 400px;
}

.products-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

/* ============================================================================
   🔄 BOTÓN CARGAR MÁS
   ============================================================================ */
.btn-cargar-mas {
  padding: 12px 40px;
  border: 1px solid #333;
  background: transparent;
  color: #333;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-cargar-mas:hover {
  background: #333;
  color: white;
}

.btn-cargar-mas:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================================
   ✨ ANIMACIONES
   ============================================================================ */
.panel-filtros {
  animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* ============================================================================
   📱 RESPONSIVE - TABLET
   ============================================================================ */
@media (max-width: 991px) {
  /* En tablet, botones van debajo de categorías */
  .btn-compartir,
  .btn-filtrar {
    width: 100%;
    margin-bottom: 10px;
  }

  /* En tablet, siempre 3 columnas */
  .products-column-full .isotope-item,
  .products-column-compact .isotope-item {
    width: 33.333%;
  }

  /* Sidebar como overlay lateral */
  #filters-column {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    max-width: 90vw;
    height: 100%;
    background: white;
    z-index: 9999;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0,0,0,0.2);
    transition: left 0.3s ease;
  }

  #filters-column.show {
    left: 0;
  }

  .panel-filtros {
    height: 100%;
    border: none;
    border-radius: 0;
    padding: 20px;
  }

  /* Botón cerrar visible */
  .btn-close-filters {
    display: flex !important;
  }

  /* Overlay oscuro */
  .filters-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    display: none;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.3s ease;
  }

  .filters-overlay.show {
    display: block;
  }
}

/* ============================================================================
   📱 RESPONSIVE - MÓVIL
   ============================================================================ */
@media (max-width: 767px) {
  .cat-scroll-btn,
  .scroll-btn {
    display: none !important;
  }

  .categories-wrapper {
    padding: 0;
  }

  .categories-bar {
    padding: 5px 10px;
  }

  .category-btn,
  .subcategory-tag {
    font-size: 12px;
    padding: 6px 12px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .section-title {
    font-size: 16px;
  }

  .section-subtitle {
    font-size: 12px;
    line-height: 1.3;
  }

  .filter-title {
    font-size: 16px;
  }

  .panel-filtros {
    padding: 15px;
  }

  /* ✅ PRODUCTOS EN 1 COLUMNA EN MÓVIL */
  .products-column-full .isotope-item,
  .products-column-compact .isotope-item {
    width: 100% !important;
  }

  .btn-filtrar,
  .btn-compartir {
    font-size: 13px;
    padding: 10px 20px;
    width: 100%;
  }

  #filters-column {
    width: 280px;
  }
}

/* ============================================================================
   🎨 UTILIDADES
   ============================================================================ */
.text-center {
  text-align: center;
}

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.mb-3 { margin-bottom: 1rem; }
.ms-2 { margin-left: 0.5rem; }

.text-muted {
  color: #6c757d;
}

.small {
  font-size: 0.875rem;
}

/* ============================================================================
   ♿ ACCESIBILIDAD
   ============================================================================ */
.btn-filtrar:focus,
.btn-compartir:focus,
.btn-close-filters:focus,
.category-btn:focus,
.subcategory-tag:focus {
  outline: 2px solid #6c7ae0;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================================
   📝 NOTAS
   ============================================================================
   
   Este archivo ya NO contiene estilos de:
   - .block2 (tarjeta de producto)
   - .block2-pic (imagen de producto)
   - .block2-txt (texto de producto)
   - .badge-categoria (badge)
   - .product-code (código)
   - .product-title (título)
   - .precios-container (precios)
   - .precio-general, .precio-mayor, .precio-docena
   
   Todos esos estilos están ahora en: productCard.css
   
   ============================================================================ */