/* 
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-elementor
Version: 2.0.0
Text Domain: hello-elementor-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 */

/* En el carrusel de Elementor, ocultar SOLO el primer <a> de los productos simples */
.elementor-widget-loop-carousel 
  .e-loop-item.product-type-simple 
  > a.elementor-element[data-element_type="container"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.product-remove {
    width: 22px !important;
}

.woocommerce-column--shipping-address .woocommerce-column__title {
    margin-top: 24px;
}

#wc_checkout_add_ons .optional {
    display: none;
}

/* --- Contenedor del bloque de filtros --- */
/* --- Contenedor del bloque de filtros --- */
.mdm-filters {
    background: #eeeae5;
    border-radius: 8px;
}

/* --- Nombre del filtro --- */
.mdm-filter__label {
    font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 14px;
    line-height: 1.25;
    margin-bottom: 25px;
    color: #050708;
}

.mdm-filter__options-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.mdm-filter__options--list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    grid-column: 1 / 4;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 24px;
    row-gap: 12px;
}

/* Tablet — 2 columnas */
@media (max-width: 1024px) {
    .mdm-filter__options-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .mdm-filter__options--list {
        grid-column: 1 / 4;
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Móvil — 1 columna */
@media (max-width: 767px) {
    .mdm-filter__options-grid {
        grid-template-columns: 1fr;
    }

    .mdm-filter__options--list {
        grid-column: 1 / 2;
        grid-template-columns: 1fr;
    }
}

.mdm-filter__options--list li {
    margin: 0;
}

/* Mantiene el estilo de cada fila (checkbox + texto) */
.mdm-check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    accent-color: #050708;
}

.mdm-check__text {
    font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
    line-height: 1.25;
    color: #050708;
    text-transform: lowercase;
}

.mdm-check__text::first-letter {
    text-transform: uppercase;
}

/* --- Botonera --- */
.mdm-filters__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 40px;
}

/* Filtros de ropa: 3 columnas */
.mdm-filters--ropa .mdm-filters__row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
}

/* En móvil, una columna */
@media (max-width: 768px) {
    .mdm-filters--ropa .mdm-filters__row {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Layout general del filtro de ropa */
.mdm-filters--ropa .mdm-filters__grid {
    display: flex;
    gap: 80px;
    /* separa las 3 columnas */
}

.mdm-filters--ropa .mdm-filter {
    flex: 1;
}

/* Título de cada columna */
.mdm-filter__label {
    font-family: Montserrat, sans-serif;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 12px;
}

/* Lista de composiciones / prendas (texto con viñetas) */
.mdm-filter__list {
    list-style: none;
    padding-left: 20px;
    margin: 0;
    display: grid;
    gap: 12px;
    padding: 0;
}

.mdm-filter__list li {
    margin: 0;
}

/* Colores: cuadritos */
.mdm-filter__colors {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mdm-filter__colors li {
    margin: 0;
}

.mdm-color-check {
    display: inline-flex;
    cursor: pointer;
}

/* Checkbox oculto, usamos el cuadrado como "check" */
.mdm-color-check input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Cuadrado de color */
.mdm-color-swatch {
    width: 18px;
    height: 18px;
    border-radius: 2px;
}

/* Estado seleccionado: borde más grueso */
.mdm-color-check input[type="checkbox"]:checked+.mdm-color-swatch {
    box-shadow: 0 0 0 2px #050708;
}

.mdm-color-check .mdm-check__text {
    margin-left: 8px;
}

/* --- Botones FILTRAR y BORRAR FILTRO --- */
button.mdm-btn,
a.mdm-btn {
    padding: 15px 30px;
    border: 1px solid #050708;
    background: transparent;
    color: #050708;
    text-transform: uppercase;
    text-align: center;
    font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: none;
}

@media (max-width: 767px) {

    button.mdm-btn,
    a.mdm-btn {
        padding: 14px 30px;
        width: 100%;
    }
}

/* sin cambios visuales en hover/focus/active */
button.mdm-btn:hover,
button.mdm-btn:focus,
button.mdm-btn:active,
a.mdm-btn:hover,
a.mdm-btn:focus,
a.mdm-btn:active {
    background-color: #050708;
    color: #FFF;
}

/* --- Estado de carga del grid (spinner ya implementado) --- */
#products-grid {
    position: relative;
}

#products-grid .mdm-loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: flex-start;
    justify-content: center;
    backdrop-filter: blur(2px);
    background: rgba(255, 255, 255, 0.6);
    z-index: 5;
}

#products-grid.is-loading .mdm-loading {
    display: flex;
}

.mdm-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(5, 7, 8, 0.15);
    border-top-color: #050708;
    border-radius: 50%;
    animation: mdm-spin .8s linear infinite;
    margin-top: 80px;
}

@keyframes mdm-spin {
    to {
        transform: rotate(360deg);
    }
}

#products-grid.is-loading .products,
#products-grid.is-loading .elementor-loop-container {
    opacity: .35;
    transition: opacity .2s ease;
}

/* Responsive */
@media (max-width:768px) {
    .mdm-filters__actions {
        justify-content: flex-start;
    }
}

/* Ocultar mensajes Woocommerce */
.woocommerce-notices-wrapper,
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    display: none !important;
}

/* Header sticky */
.elementor-sticky--effects {
    background-color: #FFF !important;
}

/* Menu mobile */
@media (max-width: 767px) {

    body {
        position: relative;
    }

    header.elementor-location-header {
        position: relative;
        z-index: 20;
    }

    body:has(nav.elementor-nav-menu--dropdown.elementor-nav-menu__container[aria-hidden="false"])::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 5;
        pointer-events: none;
    }
}

/* Ocultar flechas por defecto */
.elementor-loop-container .elementor-swiper-button {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Mostrar flechas al hacer hover sobre la card del producto (solo desktop) */
.elementor-loop-container .e-loop-item:hover .elementor-swiper-button {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (max-width: 1024px) {
    .elementor-loop-container .elementor-swiper-button {
        display: none !important;
    }
}