/**
 * Baru Products Filter System - CSS
 *
 * Estilos para el sistema de filtros de productos Baru
 * Incluye soporte para subcategorías
 */

/* Contenedor principal del filtro */
.baru-filter-container {
  margin-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  width: 100%;
}

/* Fila superior para categorías y filtro */
.baru-top-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

/* Menú de categorías (botones) */
.baru-category-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.baru-category-button {
  padding: 8px 15px;
  border-radius: 50px;
  background-color: #f0f0f0;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
}

.baru-category-button:hover {
  background-color: #e0e0e0;
}

.baru-category-button.active {
  background-color: #7f2d54;
  color: white;
}

/* Contenedor de subcategorías - fila separada debajo de las categorías */
.baru-subcategories-row {
  width: 100%;
  display: none;
  margin-top: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
  animation: fadeIn 0.3s ease-in-out;
}

.baru-subcategories-row.visible {
  display: flex;
}

/* Botones de subcategoría */
.baru-subcategory-button {
  padding: 6px 12px;
  border-radius: 50px;
  background-color: #f9f3f6;
  color: #555;
  font-size: 0.9em;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #eee;
}

.baru-subcategory-button:hover {
  background-color: #f0e5eb;
}

.baru-subcategory-button.active {
  background-color: #a75a7b;
  color: white;
}

/* Animación para las subcategorías */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Menú desplegable de etiquetas */
.baru-tag-filter {
  position: relative;
  display: inline-block;
}

.baru-tag-dropdown {
  padding: 8px 15px;
  border-radius: 50px;
  background-color: #f0f0f0;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
  font-weight: 500;
  border: 1px solid transparent;
  font-size: 12px !important;
}

.baru-tag-dropdown:hover {
  background-color: #e0e0e0;
}

.baru-tag-dropdown.active {
  background-color: #7f2d54;
  color: white;
}

.baru-tag-dropdown i {
  font-size: 12px !important;
}

.baru-tag-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  margin-top: 5px;
  background-color: white;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  z-index: 1000;
  padding: 10px 0;
  max-height: 350px;
  overflow-y: auto;
}

.baru-tag-dropdown-content.show {
  display: block;
}

/* Opciones en el menú desplegable */
.baru-tag-item {
  padding: 10px 15px;
  text-decoration: none;
  display: block;
  color: #333;
  transition: background-color 0.2s;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px !important;
  line-height: 1em !important;
}

.baru-tag-item:hover {
  background-color: #f5f5f5;
}

.baru-tag-item.active {
  background-color: #f0e5eb;
  font-weight: bold;
}

.baru-tag-item i {
  font-size: 12px !important;
  width: 18px;
  text-align: center;
}

/* Mensaje de no productos */
.baru-no-products-message {
  grid-column: 1 / -1;
  padding: 30px;
  text-align: center;
  background-color: #f9f9f9;
  border-radius: 8px;
  margin: 20px 0;
  font-weight: 500;
  color: #555;
}

/* Iconos en los botones */
.baru-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

/* Títulos dinámicos de categorías - coinciden con los títulos originales */
.baru-dynamic-category-title {
  font-size: 1.5em;
  font-weight: 600;
  color: #7f2d54;
  margin: 30px 0 20px 0;
  padding: 0 0 8px 0;
  line-height: 1.3;
  text-align: center;
  border: none;
  border-bottom: 2px solid #7f2d54;
  background: none;
  grid-column: 1 / -1;
  width: 100%;
}

/* Specific styling for subcategory titles */
.baru-dynamic-category-title.subcategory {
  font-family: "Red Hat Display", sans-serif;
  font-size: 60px;
  font-weight: 700;
  font-style: italic;
  color: #666666;
  line-height: 34px;
  border-bottom: 1px solid #ddd;
  margin: 25px 0 15px 0;
  padding: 0 0 5px 0;
}

/* Ajustes responsive para títulos dinámicos */
@media (max-width: 768px) {
  .baru-filter-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .baru-top-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
  }

  .baru-category-menu {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-wrap: nowrap;
  }

  .baru-subcategories-row {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .baru-tag-filter {
    width: 100%;
	font-size: 12px !important;  
  }

  .baru-tag-dropdown {
    width: 100%;
    justify-content: space-between;
	font-size: 12px !important; 
	background-color: #d0d0d0 !important;
  }

  .baru-tag-dropdown-content {
    width: 100%;
    max-width: 100%;
  }

  .baru-dynamic-category-title {
    font-size: 1.3em;
    margin: 25px 0 15px 0;
  }

  /* Responsive styling for subcategory titles */
  .baru-dynamic-category-title.subcategory {
    font-size: 45px;
    line-height: 28px;
    margin: 20px 0 12px 0;
  }
}

@media (max-width: 480px) {
  .baru-category-button {
    padding: 6px 12px;
    font-size: 12px;
  }

  .baru-subcategory-button {
    padding: 5px 10px;
    font-size: 13px;
  }

  .baru-tag-dropdown {
    padding: 6px 12px;
    font-size: 12px !important;
  }

  .baru-tag-item {
    padding: 8px 12px;
    font-size: 12px !important;
  }

  .baru-dynamic-category-title {
    margin: 20px 0 12px 0 !important;
    font-family: "Red Hat Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    font-style: italic !important;
    line-height: 34px !important;
    color: #666666 !important;
    margin: 20px 0 10px 0 !important;
    padding: 10px 0 !important;
    text-align: center !important;
  }

  /* Mobile responsive styling for subcategory titles */
  .baru-dynamic-category-title.subcategory {
    font-family: "Red Hat Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    font-style: italic !important;
    line-height: 34px !important;
    color: #666666 !important;
    margin: 20px 0 10px 0 !important;
    padding: 10px 0 !important;
    text-align: center !important;
  }
}