/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-biz
Version: 2.0.0
Text Domain: hello-biz-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */

/* Estilo para el widget de categorías de productos */
.woocommerce.widget_product_categories {
    border-radius: 8px; /* Bordes redondeados estilo YouTube */
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Sombra suave */
    max-width: 300px; /* Ancho máximo para un diseño compacto */
    margin: 0 auto; /* Centrado */
    font-family: 'Roboto', Arial, sans-serif; /* Tipografía moderna como YouTube */
}

/* Título del widget */
.woocommerce.widget_product_categories h5 {
    color: var(--e-global-color-accent, #ed1d26); /* Color de acento o rojo por defecto */
    font-size: 1.25rem; /* Tamaño de fuente */
    font-weight: 700;
    margin: 0 0 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #333333; /* Línea gris oscura debajo del título */
    padding-bottom: 10px;
}

/* Lista de categorías */
.woocommerce.widget_product_categories ul.product-categories {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Elementos de la lista */
.woocommerce.widget_product_categories ul.product-categories li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 8px;
    background-color: #cecece; /* Fondo gris oscuro */
    border-radius: 6px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Efecto hover */
.woocommerce.widget_product_categories ul.product-categories li:hover {
    background-color: #ed1d26; /* Fondo rojo al pasar el ratón */
    transform: translateX(5px); /* Desplazamiento suave */
}

/* Enlaces de las categorías */
.woocommerce.widget_product_categories ul.product-categories li a {
    color: #000000; /* Texto blanco */
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.woocommerce.widget_product_categories ul.product-categories li a:hover {
    color: #ffffff; /* Mantiene el blanco en hover para contraste */
}

/* Contador de productos */
.woocommerce.widget_product_categories ul.product-categories li .count {
    color: #000000; /* Gris claro */
    font-size: 0.9rem;
    font-weight: 400;
    background-color: #ffffff; /* Fondo negro para el contador */
    padding: 2px 8px;
    border-radius: 12px;
    line-height: 1.5;
}

/* Efecto hover en el contador */
.woocommerce.widget_product_categories ul.product-categories li:hover .count {
    color: #ffffff; /* Blanco en hover para contraste */
    background-color: #333333; /* Gris oscuro en hover */
}

/* Responsividad para pantallas pequeñas */
@media (max-width: 768px) {
    .woocommerce.widget_product_categories {
        max-width: 100%;
        padding: 15px;
    }

    .woocommerce.widget_product_categories ul.product-categories li {
        padding: 10px 12px;
        margin-bottom: 6px;
    }

    .woocommerce.widget_product_categories h5 {
        font-size: 1.1rem;
    }

    .woocommerce.widget_product_categories ul.product-categories li a {
        font-size: 0.95rem;
    }

    .woocommerce.widget_product_categories ul.product-categories li .count {
        font-size: 0.85rem;
    }
}

/* Asegurar que no haya conflictos con otros estilos */
.woocommerce.widget_product_categories ul.product-categories li a:focus,
.woocommerce.widget_product_categories ul.product-categories li a:active {
    outline: none;
    box-shadow: none;
}
















/* GRID PRINCIPAL - 3 columnas Elementor */
.woocommerce.columns-3 > ul.products.elementor-grid.columns-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas iguales */
    gap: 24px; /* espacio entre tarjetas */
    align-items: stretch; /* estira todas las celdas */
}

/* Cada producto ocupa su celda */
.woocommerce.columns-3 > ul.products.elementor-grid.columns-3 > li.product.type-product {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* La tarjeta ocupa todo el alto disponible */
.woocommerce.columns-3 > ul.products.elementor-grid.columns-3 > li.product.type-product > .custom-product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* empuja el botón al fondo */
    height: 100%;
}

/* === CARD PRINCIPAL === */
.woocommerce .products.elementor-grid li.product .custom-product-card {
    background-color: #F4F3F4;
    border: 1px solid #DDDDDD;
    border-radius: 12px;
    padding: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.3s ease;
    height: 100%;
}

.woocommerce .products.elementor-grid li.product .custom-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* === IMAGEN === */
.woocommerce .products.elementor-grid li.product .custom-product-card .product-image {
    overflow: hidden;
    margin-bottom: 8px;
    width: 100%;
}

.woocommerce .products.elementor-grid li.product .custom-product-card .product-image img {
    width: 100%;
    border-radius: 0;
    transition: transform 1s ease;
}

.woocommerce .products.elementor-grid li.product .custom-product-card .product-image img:hover,
.woocommerce .products.elementor-grid li.product .custom-product-card .product-image img:focus {
    transform: scale(1.1);
}

/* === META (categoría, título, precio) === */
.woocommerce .products.elementor-grid li.product .custom-product-card .product-meta {
    border: 1px solid #DDDDDD;
    border-radius: 12px;
    padding: 8px;
    width: 100%;
    text-align: center;
    background-color: #fff;
}

/* Categoría */
.woocommerce .products.elementor-grid li.product .custom-product-card .product-category {
    font-family: "Signika", sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    color: #444444;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: block;
}

/* Título */
.woocommerce .products.elementor-grid li.product .custom-product-card .product-title {
    font-family: "Signika", sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.3em;
    margin: 0;
    color: #000;
}
.woocommerce .products.elementor-grid li.product .custom-product-card .product-title a {
    text-decoration: none;
    color: inherit;
}

/* Precio */
.woocommerce .products.elementor-grid li.product .custom-product-card .product-price {
    font-family: "Signika", sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3em;
    color: #ed1d26;
    margin-top: 6px;
    display: block;
}

/* === BOTÓN === */
.woocommerce .products.elementor-grid li.product .custom-product-card .product-actions {
    margin-top: auto;
    padding-top: 8px;
}

.woocommerce .products.elementor-grid li.product .custom-product-card .product-actions .button.product_type_simple.add_to_cart_button.ajax_add_to_cart {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 18px;
    font-family: "Signika", sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    background-color: #ed1d26;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.15s ease;
    text-decoration: none;
}

.woocommerce .products.elementor-grid li.product .custom-product-card .product-actions .button.product_type_simple.add_to_cart_button.ajax_add_to_cart:hover {
    background-color: #000;
    color: #fff !important;
    transform: translateY(-1px);
}
/* Cada li como contenedor flex vertical */
.woocommerce ul.products.elementor-grid li.product {
    display: flex;
    flex-direction: column;
}

/* Card ocupa todo el alto */
.woocommerce ul.products.elementor-grid li.product .custom-product-card {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Meta se estira igual en todas */
.woocommerce ul.products.elementor-grid li.product .custom-product-card .product-meta {
    flex: 1; /* ocupa todo el espacio disponible */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* título y precio arriba */
}




