/*  productos bien
Theme Name: Hello Elementor Child
Template: hello-elementor
*/

/* ================================
   FUENTE GLOBAL
================================ */
body, h1, h2, h3, h4, h5, h6, p, a, span, li {
  font-family: 'Roboto', sans-serif ;
  
}


/* ================================
   HEADER DE CATEGORA
================================ */
.category-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 40px;
  margin: 50px auto;
  max-width: 1200px;
}
.category-header .category-image img {
  max-width: 280px;
  height: auto;
  border-radius: 6px;
}
.category-header .category-description {
  flex: 1;
}
.category-header .category-description h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: #000;
}
.category-header .category-description p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
  margin: 0;
}

/* ================================
   GRID PRODUCTOS Y CATEGORÍAS
================================ */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); /* responsive */
  gap: 30px;
 
}
/* ================================
   ITEMS (Productos y Categorías)
================================ */
.woocommerce ul.products li.product,
.woocommerce ul.products li.product-category {
  width: 100% ;
 max-width: 300px !important;
}


/* CAMBIOS!!!!  */


/* Eliminar pseudo-elementos de WooCommerce que rompen el grid */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
  content: none !important;
  display: none !important;
}

/* ================================
   TÍTULOS DE PRODUCTOS (mostrar completos)
================================ */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 1rem;
  font-weight: 600;
  color: #000;
  line-height: 1.4;
  white-space: normal;       /* permite varias lneas */
  overflow: visible;         /* no oculta texto */
  text-overflow: unset;      /* no pone "..." */
  -webkit-line-clamp: unset; /* elimina el lmite */
  max-height: none;          /* sin límite de altura */
  min-height: auto;
  margin-bottom: 10px;
}

/* ================================
   PRECIO MS GRANDE Y DESTACADO
================================ */
.woocommerce ul.products li.product .price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #971600;
  margin-bottom: 15px;
  display: block;
}

/* ================================
   SUBCATEGORÍAS Y PRODUCTOS
================================ */

ul.products li.product-category img {
  border-radius: 6px;
  max-width: 100%;
  height: auto;
}
ul.products li.product-category h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 10px;
  color: #000;
}

ul.products li.product,
ul.products li.product-category {
  text-align: center;
}


/* ================================
   BOTONES ADD TO CART
================================ */
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product .product_type_variable,
.woocommerce ul.products li.product .product_type_grouped,
.woocommerce ul.products li.product .product_type_external {
  background-color: black !important;
  color: #fff !important;
  font-weight: 400;
  border: none;
  border-radius: 6px;
  padding: 12px 15px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  text-transform: uppercase;
  font-family: 'Roboto', sans-serif;
  display: block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  min-height: 45px;
  margin-top: auto;
}
.woocommerce ul.products li.product a.button:hover,
.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .add_to_cart_button:hover,
.woocommerce ul.products li.product .product_type_variable:hover,
.woocommerce ul.products li.product .product_type_grouped:hover,
.woocommerce ul.products li.product .product_type_external:hover {
  background-color: #7a1200 !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  transform: translateY(-2px);
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
  .category-header {
    flex-direction: column;
    text-align: center;
  }
  .category-header .category-image img {
    max-width: 200px;
  }
  ul.products {
    gap: 20px;
  }
  ul.products li.product,
  ul.products li.product-category {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

.category-header .category-description p{
    font-size: 1rem;
}

/* Espacio entre menú y migas de pan */
.woocommerce-breadcrumb {
  padding-top: 40px !important; /* ajusta el valor según necesites */
  
}


/* ================================
   SEARCH TEMPLATE
   Estilos exclusivos para resultados de búsqueda
================================ */

.search-template {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.search-template .search-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 40px;
}

/* Grid de productos */
.search-template ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.search-template ul.products li.product {
  text-align: center;
  background: #fff;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  padding: 10px;
  box-sizing: border-box;
}

/* Imágenes uniformes */
.search-template ul.products li.product img {
  width: 100%;
  height: 220px;         /* alto fijo */
  object-fit: contain;   /* mantiene proporción */
  border-radius: 6px;
  margin-bottom: 10px;
}

/* Título */
.search-template ul.products li.product .product-title {
  font-size: 1rem;
  font-weight: 600;
  color: #000;
  line-height: 1.4;
  margin: 10px 0;
  min-height: 40px;
}

/* Precio */
.search-template ul.products li.product .price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #971600;
  margin: 10px 0;
}

/* Botón */
.search-template ul.products li.product a.button {
  background: black !important;
  color: #fff !important;
  border-radius: 6px;
  padding: 10px 12px;
  font-weight: 500;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transition: all 0.3s ease;
  margin-top: auto;
}

.search-template ul.products li.product a.button:hover {
  background: #7a1200 !important;
  transform: translateY(-2px);
}
