/*
Theme Name: Hello Elementor Child
Template: hello-elementor
Version: 1.0
Description: Tema hijo de Hello Elementor.
Author: Tu nombre
Text Domain: hello-elementor-child
*/

/* 📌 AJUSTES GENERALES */

.ver-modelos-btn a.button {
    background-color: #15B5E7;
    color: #ffffff !important;
    padding: 8px 16px;
    display: inline-block;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    margin-top:10px;
}

.ver-modelos-btn a.button:hover {
    background-color: #2A6DA5;
}

ul.marcas-filtradas {
    padding-inline-start: 5px;
}

img.attribute-icon {
    width: 30px;
}

.woocommerce-breadcrumb {
    padding: 20px 0px 10px 30px !important;
}

/* 📌 GRILLA DE AUTOS (FORMATO TARJETAS) */
.auto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin: 40px 0;
    width: 100%;
}

.auto-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
    width: 100%;
}

.auto-item:hover {
    transform: scale(1.03);
}

.auto-item img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.auto-item h3 {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* 📱 RESPONSIVE GRILLA DE AUTOS */
@media screen and (max-width: 1024px) {
    .auto-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media screen and (max-width: 768px) {
    .auto-grid {
        grid-template-columns: 1fr;
    }
}

/* 📌 ESTILO DE LOGOS */
.marca-logo img,
.brand-logo img {
    max-height: 60px;
    width: auto;
    display: inline-block;
}

/* 📌 LAYOUT GENERAL */
.layout-container {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 30px;
    width: 100%;
    padding: 0px 30px;
}

.sidebar-marcas {
    width: 25%;
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #1da1f2;
    color: #1da1f2;
}

.content-area {
    width: 100%;
    padding: 10px;
    background: #fff;
}

.custom-title {
    font-size: 41px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 22px;
    text-align: left;
    background-color: #1da1f2;
    padding: 10px 10px 10px 26px;
    margin-top: 0px;
}

h2.custom-subtitle {
    text-align: center;
    color: #33373d;
    font-size: 40px;
}

/* 📌 LISTAS FILTRADAS */
.sidebar-marcas h3 {
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 10px;
}

.categorias-estaticas,
.categorias-filtradas,
.marcas-filtradas {
    list-style: none;
    padding-left: 0;
}

.categorias-estaticas li a,
.categorias-filtradas li a {
    text-decoration: none;
    color: #0073aa;
}

.categorias-estaticas li a:hover,
.categorias-filtradas li a:hover {
    text-decoration: underline;
}

/* 📌 WOOCOMMERCE - PRODUCTOS */
.woocommerce-content {
    width: 100%;
}

.woocommerce ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    padding: 20px 0 !important;
    gap: 20px;
}

.woocommerce ul.products li.product {
    width: calc(33.333% - 20px) !important;
    max-width: 300px !important;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background: #fff;
    transition: transform 0.2s ease-in-out;
}

.woocommerce ul.products li.product:hover {
    transform: scale(1.05);
}

/* 📱 RESPONSIVE PARA PRODUCTOS */
@media screen and (max-width: 1024px) {
    .woocommerce ul.products li.product {
        width: calc(50% - 20px) !important;
    }
}
@media screen and (max-width: 768px) {
    .woocommerce ul.products li.product {
        width: 100% !important;
    }
}

/* 📌 BOTONES DE PRODUCTO */
.woocommerce ul.products li.product .button {
    background-color: #2a6da5 !important;
    color: #ffffff !important;
    border: none;
    transition: background-color 0.3s ease-in-out;
}

.woocommerce ul.products li.product .button:hover {
    background-color: #1f5784 !important;
    color: #ffffff !important;
}

/* 📌 SELECTORES DE FILTRO */
.woocommerce-ordering {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0 11px 1em;
}

.woocommerce-ordering select,
#marca_filter {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    appearance: none;
}

/* 📱 MENU DESPLEGABLE EN MÓVIL */
.menu-toggle-btn {
    display: none;
    background: #0071a1;
    color: white;
    border: none;
    padding: 10px;
    width: 100%;
    text-align: center;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 15px;
}

.menu-mobile {
    display: none;
    width: 100%;
    background: #f8f8f8;
    padding: 20px;
    border: 1px solid #1da1f2;
    border-radius: 8px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .layout-container {
        flex-direction: column;
        padding: 0 15px;
    }

    .sidebar-marcas {
        display: none; /* Ocultamos el sidebar en móvil */
    }

    .menu-toggle-btn {
        display: block;
    }

    .menu-mobile.abierto {
        display: block;
    }
}

/* --- CONFIGURACIÓN DE 4 COLUMNAS Y LIMPIEZA --- */

.woocommerce ul.products {
    display: grid !important;
    /* Máximo 4 columnas */
    grid-template-columns: repeat(4, 1fr) !important; 
    gap: 20px !important;
    padding: 20px 0 !important;
    list-style: none !important;
}

/* 1. Eliminar cualquier elemento vacío al inicio (como el de ordenación o mensajes) */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
    content: none !important;
}

/* 2. Si hay un li oculto que causa el hueco, lo forzamos a desaparecer */
.woocommerce ul.products li.product:empty {
    display: none !important;
}

/* 3. Estilo de la Tarjeta */
.woocommerce ul.products li.product {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* 4. Alineación de contenido interno */
.woocommerce ul.products li.product .woocommerce-LoopProduct-link {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.05rem !important;
    min-height: 3em; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* 5. Botón al fondo */
.woocommerce ul.products li.product .button {
    margin-top: auto !important;
    width: 100% !important;
}

/* --- AJUSTES RESPONSIVE --- */
@media screen and (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 columnas en tablet */
    }
}

@media screen and (max-width: 600px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr !important; /* 1 columna en móvil */
    }
}

