/* Contenedor Principal */
.nova-widget-container {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #333;
    padding: 15px;
    background: #fff;
}

.nova-widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #222;
}

.nova-filter-group {
    margin-bottom: 25px;
}

/* --- 1. PRICE SLIDER STYLES (DORADO) --- */
.nova-filter-group.price-slider-group {
    padding-top: 40px !important;
    padding-bottom: 15px !important;
    margin-bottom: 25px !important;
    position: relative;
}

/* La barra principal del slider */
.nova-price-slider.ui-slider {
    height: 6px !important;
    background: #e0e0e0 !important;
    border: none !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    position: relative !important; /* Asegurar que no esté colapsado */
}

/* El rango relleno */
.nova-price-slider .ui-slider-range {
    background: #c69b5e !important;
    border-radius: 3px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Los manejadores (círculos) */
.nova-price-slider .ui-slider-handle {
    width: 20px !important;
    height: 20px !important;
    background: #fff !important;
    border: 3px solid #c69b5e !important;
    border-radius: 50% !important;
    top: -7px !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
    touch-action: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Etiquetas flotantes */
.price-label-container {
    position: relative;
    height: 0;
}

.price-tag {
    position: absolute;
    top: -35px;
    background: #c69b5e;
    color: #fff;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 3px;
    transform: translateX(-50%);
    white-space: nowrap;
}

.price-tag::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    margin-left: -4px;
    border-width: 4px 4px 0;
    border-style: solid;
    border-color: #c69b5e transparent transparent;
}

.price-range-text {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: #999;
    font-size: 12px;
}


/* --- 2. CHECKBOX STYLES --- */
.nova-checkbox {
    display: block;
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 15px;
    user-select: none;
    color: #666;
}
.nova-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
}
.nova-checkbox:hover input~.checkmark {
    background-color: #f5f5f5;
}
.nova-checkbox input:checked~.checkmark {
    background-color: #c69b5e;
    border-color: #c69b5e;
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.nova-checkbox input:checked~.checkmark:after {
    display: block;
}
.nova-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}


/* --- 3. AJAX SEARCH STYLES --- */
.nova-search-wrapper {
    position: relative;
}

/* CAMBIO: id a class */
.nova-ajax-search {
    width: 100%;
    padding: 10px 35px 10px 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 14px;
    background: #fdfdfd;
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

/* CAMBIO: id a class */
.nova-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #eee;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    max-height: 300px;
    overflow-y: auto;
}
.nova-search-results ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.nova-search-results li a {
    display: flex;
    align-items: center;
    padding: 10px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}
.nova-search-results li a:hover {
    background: #f9f9f9;
}
.nova-search-results img {
    margin-right: 10px;
    border-radius: 3px;
}
.nova-search-results .no-results,
.nova-search-results .loading {
    padding: 10px;
    color: #999;
    font-size: 13px;
    text-align: center;
}


/* --- 4. CATEGORY SELECT2 OVERRIDES --- */
.select2-container--default .select2-selection--single {
    border: 1px solid #eee !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    border-radius: 4px !important;
    background: #fdfdfd !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #777 !important;
    line-height: 38px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
    color: #777 !important;
}
.category-group h4, .brand-group h4 {
    font-size: 16px;
    color: #999;
    font-weight: normal;
    margin-bottom: 10px;
}
/* Dropdown abierto */
.select2-dropdown {
    background: #ffffff !important;
    border: 1px solid #e1e1e1 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    z-index: 10000; /* z-index alto por defecto */
}
/* Opción Hover */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #c69b5e !important;
    color: #fff !important;
}
/* Opción Seleccionada */
.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #f5f5f5 !important;
    color: #333 !important;
}


/* --- 5. BOTONES Y PAGINACIÓN --- */
.nova-filter-actions {
    margin-top: 20px;
}
.nova-btn-apply {
    display: none; /* Oculto, usamos filtro automático */
}
.nova-btn-reset {
    display: block;
    width: 100%;
    background: #222;
    color: #fff !important;
    padding: 12px 0;
    text-align: center;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}
.nova-btn-reset:hover {
    background: #444;
}
.nova-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.nova-pagination .page-number {
    padding: 8px 14px;
    background: #f7f7f7;
    cursor: pointer;
    border: 1px solid #eee;
    color: #666;
    transition: all 0.3s ease;
    font-size: 14px;
}
.nova-pagination .page-number:hover {
    background: #eee;
}
.nova-pagination .page-number.current {
    background: #c69b5e;
    color: #fff;
    border-color: #c69b5e;
    font-weight: 600;
}
/* Ocultar paginación nativa */
.mkdf-pl-main-holder+.mkdf-pagination,
nav.woocommerce-pagination {
    display: none !important;
}


/* --- 6. INDICADOR DE CARGA --- */
.nova-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
    transition: opacity 0.3s ease;
}
.nova-loading-message {
    background: #c69b5e;
    color: #fff;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}
.nova-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.mkdf-pl-main-holder {
    position: relative;
    min-height: 200px;
}


/* --- 7. Z-INDEX Y CORRECCIONES STICKY --- */
.elementor-widget-sidebar.elementor-widget-sticky--active {
    z-index: 100 !important;
}


/* --- 8. CORRECCIONES PÁGINA DE PRODUCTO --- */
body.single-product .woocommerce div.product form.cart,
body.single-product .woocommerce div.product div.cart {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    margin-bottom: 30px !important;
    flex-wrap: wrap !important;
}
body.single-product .mkdf-quantity-buttons.quantity {
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid #e1e1e1 !important;
    border-radius: 4px !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 46px !important;
    background-color: #fff !important;
    overflow: hidden !important;
    width: auto !important;
    position: static !important;
}
body.single-product .mkdf-quantity-buttons .mkdf-quantity-minus,
body.single-product .mkdf-quantity-buttons .mkdf-quantity-plus {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 100% !important;
    min-height: 46px !important;
    cursor: pointer !important;
    border: none !important;
    background-color: #f9f9f9 !important;
    color: #666 !important;
    font-size: 18px !important;
    line-height: 1 !important;
    margin: 0 !important;
}
body.single-product .mkdf-quantity-buttons .mkdf-quantity-minus {
    order: 1 !important;
    border-right: 1px solid #eee !important;
}
body.single-product .mkdf-quantity-buttons .mkdf-quantity-input {
    order: 2 !important;
}
body.single-product .mkdf-quantity-buttons .mkdf-quantity-plus {
    order: 3 !important;
    border-left: 1px solid #eee !important;
}
body.single-product .mkdf-quantity-buttons .mkdf-quantity-input.qty {
    position: static !important;
    width: 50px !important;
    height: 46px !important;
    min-height: 46px !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    font-weight: bold !important;
    font-size: 16px !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
body.single-product .single_add_to_cart_button.button {
    height: 46px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* --- 9. CORRECCIÓN HOVER TABS --- */
html body.woocommerce.sptpro-smart-tabs div.product .woocommerce-tabs ul.tabs.wc-tabs li a:hover,
html body.woocommerce.sptpro-smart-tabs div.product .woocommerce-tabs ul.tabs.wc-tabs li.active a,
html body.woocommerce.sptpro-smart-tabs .woocommerce-tabs ul.tabs.wc-tabs li:not(.active) a:hover {
    color: #333333 !important;
    opacity: 1 !important;
}
:root html body.woocommerce.sptpro-smart-tabs div.product .woocommerce-tabs ul.tabs.wc-tabs li a:hover {
    color: #333333 !important;
}

input#woocommerce-product-search-field-0, span#select2-product_cat-container {
    border-top: 1px solid #e1909000 !important;
    border-bottom: 1px solid #e1ca9000 !important;
    border-left: 1px solid #e1ca9000 !important;
}

/* --- 10. CORRECCIÓN SLIDER EN MÓVIL --- */
@media (max-width: 767px) {
    /* La barra principal del slider */
    .nova-price-slider.ui-slider {
        display: block !important;
        visibility: visible !important;
        height: 6px !important; 
        background: #e0e0e0 !important;
        opacity: 1 !important;
        position: relative !important;
    }
    /* La barra de rango */
    .nova-price-slider .ui-slider-range {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    /* Los manejadores */
    .nova-price-slider .ui-slider-handle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        touch-action: none !important;
    }
}