@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');

/* --- CORRECCIÓN PARA USUARIOS NO CONECTADOS --- */
.mi-filtro-container {
    display: flex !important;
    gap: 20px;
    /* Aseguramos alineación superior en desktop */
    align-items: flex-start; 
}

.mi-filtro-sidebar {
    width: 250px !important;
    flex-shrink: 0 !important;
}

/* --- GRILLA DE PRODUCTOS Y ALINEACIÓN VERTICAL --- */
.mi-filtro-productos-grid ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    list-style: none;
    padding-left: 0;
    margin: 0;
}

/* Aplicamos flexbox al li para lograr el space-between interno */
.mi-filtro-productos-grid li.product {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 100%; 
    text-align: center;
    border: 1px solid #f6f5f6;
    border-radius: 12px;
    padding: 20px 10px;
    width: auto;
    float: none;
    margin: 0;
}

/* Contenedor de Título e Imagen */
.mi-filtro-productos-grid .woocommerce-LoopProduct-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1; /* Ocupa el espacio superior */
}

.mi-filtro-productos-grid .woocommerce-loop-product__title {
    color: #ec2f42;
    margin-bottom: 24px;
    text-align: center;
}

/* Botón Comprar siempre al fondo */
.mi-filtro-productos-grid .add_to_cart_button {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: #ffffff;
    background-color: #2b2063;
    border: none;
    border-radius: 60px;
    padding: 10px 15px;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
    align-self: center;
    margin-top: auto;
}

.mi-filtro-productos-grid .add_to_cart_button:hover {
    background-color: #4c79d4;
}

/* --- RESTO DE ESTILOS ORIGINALES --- */
.mi-filtro-container li {
    list-style: none;
}

.mi-filtro-form ul {
    padding-left: 0;
}

.mi-filtro-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: #ffffff;
    background-color: #2b2063;
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mi-filtro-btn:hover {
    background-color: #4c79d4;
}

.mi-filtro-productos-grid .fusion-price-rating,
.mi-filtro-productos-grid .woocommerce-LoopProduct-link .hover-image {
    display: none !important;
}

/* --- ACORDEÓN (Respetando tus estilos guardados) --- */
.filtro-acordeon {
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    border-radius: 6px;
    overflow: hidden;
}

.acordeon-titulo {
    background-color: #f6f5f6;
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.acordeon-titulo:hover {
    background-color: #efefef;
}

/* Estilos específicos según tus instrucciones guardadas */
.acordeon-titulo h3 {
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #333333 !important;
    text-align: left !important;
}

.acordeon-contenido {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.acordeon-contenido ul {
    margin: 0;
    padding: 15px 0;
}

.filtro-acordeon.activo .acordeon-contenido {
    max-height: 500px;
    padding: 15px;
}

/* --- RESPONSIVE (MÓVIL) --- */
@media (max-width: 768px) {
    /* Cambia la disposición a columna: Filtro arriba, productos abajo */
    .mi-filtro-container {
        flex-direction: column !important;
    }

    /* El sidebar ocupa todo el ancho y se separa un poco de los productos */
    .mi-filtro-sidebar {
        width: 100% !important;
        margin-bottom: 25px;
    }

    /* La grilla de productos pasa a 2 columnas */
    .mi-filtro-productos-grid ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    /* Ajuste opcional para que no queden pegados los productos al borde en móviles muy chicos */
    .mi-filtro-productos-grid li.product {
        padding: 15px 5px;
    }
}