/**
 * CSS adicional para ajustes visuales del grid de productos CON SUBCATEGORÍAS
 * Añadir en Personalizar > CSS Adicional o en un archivo CSS del tema
 */

.fa-solid {
  font-family: "FontAwesome" !important;
}

/* NAVEGACIÓN PRINCIPAL - ORDEN Y PRESELECCIÓN */
/* Soporte para diferentes tipos de filtros y navegación */
.fusion-filters,
.portfolio-filters,
.filter-buttons,
.fusion-portfolio-filters,
.fusion-button-wrapper,
.isotope-filters {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  justify-content: center;
}

/* Elementos activos del menú */
.fusion-filters .active,
.portfolio-filters .active,
.filter-buttons .active,
.fusion-portfolio-filters .active,
.fusion-button-wrapper .active,
.isotope-filters .active,
.fusion-tabs .fusion-tab.active,
.fusion-tab-nav .active,
[data-tabs] .active,
.avada-tabs .active {
  background-color: #902b55 !important;
  color: white !important;
  border-color: #902b55 !important;
}

/* Hover states */
.fusion-filters a:hover,
.portfolio-filters a:hover,
.filter-buttons a:hover,
.fusion-portfolio-filters a:hover,
.fusion-button-wrapper a:hover,
.isotope-filters a:hover {
  background-color: #902b55 !important;
  color: white !important;
  border-color: #902b55 !important;
}

/* Orden específico usando CSS order */
[data-filter*="menu"]:not([data-filter*="todo"]),
a[href*="menu"]:not([href*="todo"]) {
  order: 1 !important;
}

[data-filter*="canape"],
a[href*="canape"] {
  order: 2 !important;
}

[data-filter*="desayuno"],
a[href*="desayuno"] {
  order: 3 !important;
}

[data-filter*="bebida"],
a[href*="bebida"] {
  order: 4 !important;
}

[data-filter*="todo"],
[data-filter="*"],
a[href*="todo"] {
  order: 5 !important;
}

/* Estilos adicionales para mejorar la apariencia */
.fusion-filters a,
.portfolio-filters a,
.filter-buttons a,
.fusion-portfolio-filters a,
.fusion-button-wrapper a,
.isotope-filters a {
  transition: all 0.3s ease !important;
  padding: 8px 16px !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  display: inline-block !important;
}

/* Asegurar que "Menús" se destaque como seleccionado por defecto */
.fusion-filters a[data-filter*="menu"]:not([data-filter*="todo"]),
.portfolio-filters a[href*="menu"]:not([href*="todo"]),
.filter-buttons a[data-filter*="menu"]:not([data-filter*="todo"]) {
  background-color: #902b55 !important;
  color: white !important;
  border-color: #902b55 !important;
}

/* 🆕 TÍTULOS DE CATEGORÍAS Y SUBCATEGORÍAS */
.baru-category-title {
  text-align: center;
  font-size: 28px;
  font-weight: bold;
  color: #902b55;
  margin: 40px 0 20px 0;
  padding: 10px 0;
  border-bottom: 1px solid #902b55;
  width: 100%;
  grid-column: 1 / -1;
  position: relative;
}

.baru-category-title::before {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: #902b55;
  border-radius: 2px;
}

/* 🆕 TÍTULOS DE SUBCATEGORÍAS */
.baru-subcategory-title {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #666;
  margin: 25px 0 15px 0;
  padding: 8px 0;
  border-bottom: 1px solid #ccc;
  width: 100%;
  grid-column: 1 / -1;
  
  position: relative;
}

.baru-subcategory-title::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 1px;
  background: #ccc;
  border-radius: 1px;
}

/* GRID PRINCIPAL */
.baru-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columnas */
  gap: 20px; /* Espacio entre columnas y filas */
  width: 100%;
  margin: 20px 0;
  justify-items: center; /* Centra los elementos en cada columna */
}

/* WRAPPER DEL PRODUCTO */
.baru-product-wrapper {
  max-width: 350px;
  min-height: 550px;  /* Abans 680px */
  width: 100%;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.baru-product-wrapper:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Ajustes de la imagen */
.baru-product-image-container {
  height: 225px; /* 50% de 350px */
  background-color: #f8f8f8;
  overflow: hidden;
  position: relative;
}

.baru-product-image {
  transition: transform 0.3s ease;
}

.baru-product-wrapper:hover .baru-product-image {
  transform: scale(1.05);
}

/* Ajustes del contenido */
.baru-product-content {
  height: 250px; /* 50% de 350px abans 330px*/
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
	justify-content: flex-end; /* NOU */
}

/* Estilos para el título */
.baru-product-title {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 8px;
  line-height: 1.1;
  min-height: 62px;
  overflow: hidden;
  text-align: center;
  margin-top: 20px;
  margin-bottom: -20px;
  color: #902b55;
	padding-left: 5px !important;
	padding-right: 5px !important;
}

.baru-canapes-display {
  margin-top: 0px !important;
}

.baru-product-title a {
  color: #333;
  text-decoration: none;
}

.baru-product-title a:hover {
  color: #066ea0; /* Color del tema Avada */
}

/* Estilos para el selector de variación */
.baru-product-variation-selector {
  padding: 8px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 10px;
  width: 50%;
  cursor: pointer;
  border: 2px #902b55 solid;
  /*	  font-family: 'FontAwesome' !important; */
  color: #902b55 !important;
  text-align: center;
}

/* Estilos para los botones de variación */
.baru-variation-buttons {
  display: flex;
  justify-content: space-between;
  gap: 0px;
  margin-bottom: 0px;
  width: 200px;
  border-radius: 10px;
}

.baru-variation-button {
  flex: 1;
  padding: 8px 5px;
  text-align: center;
  border: 1px solid #e5e5e5;
  border-radius: 0px;
  cursor: pointer;
  background-color: #f8f8f8;
  font-size: 14px;
  transition: all 0.2s ease;
}

.baru-picoreo-button {
  border-radius: 5px 0px 0px 5px;
  border: 2px #902b55 solid;
}

.baru-paracomer-button {
  border-radius: 0px 5px 5px 0px;
  border: 2px #902b55 solid;
}

.baru-variation-button:hover {
  background-color: #ebebeb;
}

.baru-variation-button.active {
  background-color: #902b55;
  color: white;
  border-color: #902b55;
}

/* Estilos para el selector de cantidad */
.baru-quantity-selector {
  display: flex;
  align-items: center;
  margin-bottom: 00px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  overflow: hidden;
  width: 108px;
  height: 36px;
  margin-top: 00px;
}

.baru-quantity-button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f8f8;
  border: none;
  cursor: pointer;
  font-size: 18px;
  user-select: none;
  font-weight: bold;
}

.baru-quantity-button:hover {
  background-color: #ebebeb;
}

.baru-quantity-input {
  width: 50px;
  height: 36px;
  border: none;
  border-left: 1px solid #e5e5e5;
  border-right: 1px solid #e5e5e5;
  text-align: center;
  font-size: 14px;
}

input.baru-quantity-input {
  width: 55px !important;
  pointer-events: none !important;
  font-weight: 600;
}

/* Estilos para el precio */
.baru-product-price {
  font-size: 18px;
  font-weight: 700;
  margin: 10px 0;
  color: #333;
	margin-bottom: 0px !important; /*  NOU */
}

.baru-product-price del {
  font-weight: 400;
  color: #777;
  margin-right: 5px;
}

.baru-product-price ins {
  text-decoration: none;
  color: #e63946;
}

/* Estilos para el botón de añadir al carrito */
.baru-product-add-to-cart {
  width: 100%;
  padding: 10px 15px;
  background-color: #902b55;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-align: center;
	margin-top: 10px !important;
}

.baru-product-add-to-cart:hover {
  background-color: #000;
}

.baru-product-add-to-cart:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.baru-product-add-to-cart.loading {
  opacity: 0.8;
  cursor: wait;
}

/* Estilos para las badges */
.baru-product-badges {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.baru-badge-sin-gluten,
.baru-badge-vegano,
.baru-badge-nuevo {
  max-height: 30px;
  width: auto;
}

/* Responsive */
@media (max-width: 1200px) {
  .baru-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .baru-product-wrapper {
    max-width: 100%;
  }

  .baru-category-nav {
    gap: 10px;
  }

  .baru-nav-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .baru-category-title {
    font-size: 24px;
  }

  .baru-subcategory-title {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .baru-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .baru-product-title {
    font-size: 14px;
  }

  .baru-product-price {
    font-size: 16px;
  }

  .baru-category-nav {
    gap: 8px;
  }

  .baru-nav-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .baru-category-title {
    font-size: 22px;
    margin: 30px 0 15px 0;
  }

  .baru-subcategory-title {
    font-size: 16px;
    margin: 20px 0 10px 0;
  }
}

@media (max-width: 480px) {
  .baru-products-grid {
    grid-template-columns: 1fr;
  }

  .baru-product-wrapper {
    max-width: 100%;
    margin: 0 auto;
  }

  .baru-category-nav {
    flex-direction: column;
    align-items: center;
  }

  .baru-nav-btn {
    width: 80%;
    max-width: 250px;
  }

  .baru-category-title {
    font-size: 20px;
    margin: 25px 0 10px 0;
  }

  .baru-subcategory-title {
    font-size: 14px;
    margin: 15px 0 8px 0;
  }
}

/* Botón "Qué contiene?" debajo del título */
.baru-que-contiene-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 10px 0 8px 0;
}

.baru-que-contiene-btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 9999px;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  background: #f0c9d3;   /* rosa claro similar a la imagen */
  color: #7a2444;        /* texto burdeos suave */
  border: 1px solid #e8b4c0;
  transition: all .2s ease;
}

.baru-que-contiene-btn:hover {
  background: #eabac6;
  color: #6a1f3b;
  border-color: #e2aab7;
}

.fusion-body .quantity {
    border-color: white !important;
}

.baru-variations-form {
    width: 100% !important;
    margin-top: 00px !important;
}

/* Deshabilitar botones duplicados de WooCommerce en productos variables */
.baru-variations-form .quantity .minus,
.baru-variations-form .quantity .plus {
  display: none !important;
  pointer-events: none !important;
}

/*****************************************************************************/

.baru-product-content {
  height: auto;        /* antes: 250px */
  flex: 1;             /* NUEVO: ocupa el espacio restante */
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.baru-product-title {
  /* ... todo igual pero cambiar: */
  margin-bottom: 0px;  /* antes: -20px */
}

.baru-product-header {
  position: relative;
  z-index: 1;
}



