/* =======================================================
   ACODESIGN PRO: ESTILOS GLOBALES (VISTA RÁPIDA Y SINGLE)
   Aplica a todos los estilos de loop de la tienda
======================================================= */

#yith-quick-view-modal div.quantity,
#yith-quick-view-modal div.quantity input.qty {
    background-color: #f2f2f2 !important;
    border: 0px !important;
    padding: 2px 0px;
    margin-right: 10px;
}

#yith-quick-view-modal table.variations,
#yith-quick-view-modal table.variations tr,
#yith-quick-view-modal table.variations th.label,
#yith-quick-view-modal table.variations td.value {
    background-color: transparent !important;
    border: none !important;
}

.summary.entry-summary table.variations,
.summary.entry-summary table.variations tr,
.summary.entry-summary table.variations th.label,
.summary.entry-summary table.variations td.value {
    background-color: transparent !important;
    border: none !important;
}

.woocommerce .yith-quick-view .yith-quick-view-content.woocommerce div.summary .single_add_to_cart_button {
    padding: 12px 40px;
    border-radius: 0px;
    font-size: 1rem;
    line-height: 1;
    text-transform: unset;
    min-width: 60%;
}

#yith-quick-view-modal.open .yith-wcqv-main {
    border-radius: 0px;
}

div#yith-quick-view-content div[id^="product"] {
    padding: 0px;
}

#yith-quick-view-content div.images img {
    margin: 0px;
    padding: 0px !important;
}

.yith-quick-view-content.woocommerce div.product div.images {
    padding-bottom: 0em;
}

/* =======================================================
   ACODESIGN PRO: ETIQUETA DE OFERTA EN VISTA RÁPIDA (MULTI-THEME)
======================================================= */
#yith-quick-view-modal .yith-wcqv-main span.onsale,
#yith-quick-view-modal .yith-wcqv-main div.onsale,
#yith-quick-view-modal .yith-wcqv-main .ast-onsale-card,
#yith-quick-view-modal .yith-wcqv-main .kadence-sale-badge,
#yith-quick-view-modal .yith-wcqv-main .nv-onsale,
#yith-quick-view-modal .yith-wcqv-main .product-ribbon,
#yith-quick-view-modal .yith-wcqv-main .acodesign-custom-badge {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 5px 10px !important;
    line-height: 1.2 !important;
    min-height: auto !important; 
    min-width: auto !important;
    display: inline-block !important;
    box-sizing: border-box !important;
    border: none !important;
    background-color: var(--acd-sale-bg, #131728) !important;
    color: var(--acd-sale-text, #ffffff) !important;
    z-index: 99 !important;
    width: auto !important;
    height: auto !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transform: none !important;
}

#yith-quick-view-modal .yith-wcqv-main div.product {
    position: relative !important;
}

/* =======================================================
   ACODESIGN PRO: SISTEMA DUAL (QUICK ADD vs QUICK VIEW)
======================================================= */
.acd-btn-loading {
    position: relative !important;
    color: transparent !important;
    pointer-events: none !important;
}
.acd-btn-loading::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important; left: 50% !important;
    width: 16px !important; height: 16px !important;
    margin: -8px 0 0 -8px !important;
    border: 2px solid rgba(0,0,0,0.2) !important;
    border-top-color: #333 !important;
    border-radius: 50% !important;
    animation: acd-spin 1s linear infinite !important;
    display: block !important;
}
@keyframes acd-spin { 100% { transform: rotate(360deg); } }

#acd-quick-add-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 999999; display: none; 
}
.acd-modal-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); cursor: pointer;
}
.acd-modal-wrapper {
    position: relative; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; box-sizing: border-box; pointer-events: none;
}
.acd-modal-box {
    pointer-events: auto;
    background: #fff; 
    border-radius: 4px !important;
    width: 100%; 
    position: relative; padding: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    box-sizing: border-box; max-height: 90vh; overflow-y: auto; cursor: default;
}

.acd-modal-box.acd-qa-box { max-width: 420px !important; padding: 25px; } 
.acd-modal-box.acd-qv-box { max-width: 900px !important; padding: 30px; } 

.acd-modal-close {
    position: absolute; top: 10px; right: 10px; 
    background: transparent !important; 
    border: none !important;
    font-size: 24px; line-height: 1; cursor: pointer; 
    color: #333 !important;
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    padding: 0; z-index: 10;
    box-shadow: none !important; outline: none !important;
}
.acd-modal-close:hover, .acd-modal-close:focus { 
    color: #d63638 !important; 
    background-color: transparent !important; 
    box-shadow: none !important; border: none !important; outline: none !important;
}

/* =======================================================
   DISEÑO 1: COMPRA RÁPIDA (Modal Pequeño)
======================================================= */
.acd-qa-header { display: flex; gap: 15px; margin-bottom: 20px; align-items: flex-start; }
.acd-qa-image { width: 80px; flex-shrink: 0; }
.acd-qa-image img { width: 100%; height: auto; border-radius: 6px; display: block; margin: 0; }

.acd-qa-info { flex-grow: 1; }
.acd-qa-title { font-size: 18px; font-weight: 600; margin: 0 0 5px; line-height: 1.2; color: var(--acd-title-color, #131728); }

.acd-qa-price { font-size: 18px; font-weight: 600; color: var(--acd-title-color, #131728); }
.acd-qa-price del { opacity: 0.6; margin-right: 5px; }

.acd-qa-form { margin-bottom: 20px; }
.acd-qa-form .variations { width: 100%; margin-bottom: 15px; border: none; }
.acd-qa-form .variations td, .acd-qa-form .variations th { display: block; padding: 0; text-align: left; background: transparent; border: none; }
.acd-qa-form .variations th { padding-bottom: 5px; font-weight: 600; font-size: 13px; color: #333; }
.acd-qa-form .variations td { padding-bottom: 15px; }
.acd-qa-form .variations select { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; }
.acd-qa-form .single_variation_wrap { margin-top: 15px; }

.acd-qa-form .woocommerce-variation-price { margin-bottom: 15px; font-weight: 600; font-size: 18px; color: var(--acd-title-color, #131728); }

.acd-qa-form form.cart:not(.variations_form),
.acd-qa-form .woocommerce-variation-add-to-cart { 
    display: flex !important; 
    flex-wrap: nowrap !important; 
    gap: 10px !important; 
    align-items: stretch !important; 
}

.acd-qa-form .quantity { flex-shrink: 0 !important; display: flex !important; align-items: center !important; margin: 0 !important; }
.acd-qa-form .quantity input.qty { width: 60px !important; height: 42px !important; padding: 0 10px !important; border: 1px solid #ddd !important; border-radius: 4px !important; text-align: center !important; background: #f2f2f2 !important; margin:0 !important; box-sizing: border-box !important;}

.acd-qa-form .single_add_to_cart_button { 
    flex-grow: 1 !important; width: auto !important; padding: 0 20px !important; height: 42px !important; line-height: 42px !important; border-radius: 4px !important; 
    background-color: var(--acd-modal-btn-bg, #131728) !important; 
    color: var(--acd-modal-btn-text, #ffffff) !important; 
    border: none !important; font-weight: 600 !important; text-transform: uppercase !important; cursor: pointer !important; transition: all 0.3s !important; margin:0 !important; box-sizing: border-box !important;
}
.acd-qa-form .single_add_to_cart_button:hover { 
    background-color: var(--acd-modal-btn-hover-bg, #131728) !important; 
    color: var(--acd-modal-btn-hover-text, #ffffff) !important; 
}

.acd-qa-form .cfvsw-swatches-container { justify-content: flex-start !important; margin-left: 0 !important; }

/* =======================================================
   DISEÑO 2: VISTA RÁPIDA (Modal Grande con Galería)
======================================================= */
.acd-qv-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.acd-qv-gallery {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.acd-qv-swiper {
    width: 100%;
    border-radius: 8px;
}
.acd-qv-swiper img.acd-qv-main-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.swiper-button-next, .swiper-button-prev {
    color: #131728 !important;
    background: rgba(255,255,255,0.8);
    width: 35px !important;
    height: 35px !important;
    border-radius: 50%;
}
.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 14px !important;
    font-weight: bold;
}
.swiper-pagination-bullet-active {
    background: #131728 !important;
}

.acd-qv-info { 
    display: flex; 
    flex-direction: column; 
}
.acd-qv-title { 
    font-size: 24px; 
    font-weight: 600; 
    margin: 0 0 10px; 
    line-height: 1.2; 
    color: var(--acd-title-color, #131728); 
}

.acd-qv-price { 
    font-size: 22px; 
    font-weight: 600; 
    color: var(--acd-title-color, #131728); 
    margin-bottom: 20px; 
}
.acd-qv-price del { opacity: 0.6; margin-right: 5px; }

.acd-qv-meta {
    font-size: 13px;
    color: #777;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.acd-qv-meta span {
    display: block;
    margin-bottom: 5px;
}
.acd-qv-meta span.sku_wrapper { color: #555; }
.acd-qv-meta span.posted_in a { color: var(--acd-btn-bg, #131728); text-decoration: none; }

.acd-qv-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .acd-qv-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .acd-modal-box.acd-qv-box { padding: 20px; }
    .acd-qv-title { font-size: 20px; }
    .acd-qv-price { font-size: 18px; }
}

/* =======================================================
   ESTILOS COMPARTIDOS DEL MODAL
======================================================= */
#acd-quick-add-modal .acodesign-badges-wrapper {
    position: absolute !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    top: 15px !important;
    left: 15px !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 15 !important;
    pointer-events: none !important;
}

.acd-qa-box .acodesign-badges-wrapper {
    position: relative !important;
    top: auto !important; left: auto !important;
    margin: 2px 0 10px 0 !important;
}

#acd-quick-add-modal .acodesign-badges-wrapper span.onsale,
#acd-quick-add-modal .acodesign-badges-wrapper .acodesign-out-of-stock,
#acd-quick-add-modal .acodesign-badges-wrapper .acodesign-custom-badge {
    position: relative !important;
    margin: 0 !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 5px 10px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    border: none !important;
    min-height: 0 !important; 
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    letter-spacing: 0.5px !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

#acd-quick-add-modal .acodesign-badges-wrapper span.onsale {
    background-color: var(--acd-sale-bg, #131728) !important;
    color: var(--acd-sale-text, #ffffff) !important;
}
#acd-quick-add-modal .acodesign-badges-wrapper .acodesign-out-of-stock {
    background-color: var(--acd-oos-bg, #131728) !important;
    color: var(--acd-oos-text, #ffffff) !important;
}
#acd-quick-add-modal .acodesign-badges-wrapper .acodesign-custom-badge {
    background-color: var(--acd-custom-bg, #e63946) !important;
    color: var(--acd-custom-text, #ffffff) !important;
}

#acd-quick-add-modal span.price {
    color: var(--acd-title-color, #131728) !important;
}
#acd-quick-add-modal .woocommerce div.product span.price ins,
#acd-quick-add-modal span.price ins {
    text-decoration: none !important;
}

.acd-qa-view-details {
    text-align: center !important;
    margin-top: 15px !important;
    width: 100% !important;
    clear: both !important;
}

.acd-qa-view-details a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: var(--acd-title-color, #131728) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.acd-qa-view-details a:hover {
    opacity: 0.7 !important;
}

.acd-qa-view-details a svg {
    transition: transform 0.3s ease !important;
}

.acd-qa-view-details a:hover svg {
    transform: translateX(4px) !important;
}

/* =======================================================
   ACODESIGN PRO: ALINEACIÓN PERFECTA ICONOS FLOTANTES
======================================================= */
html body ul.products li.product .acodesign-floating-icons-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important; 
    align-items: center !important;
}

/* FIX: PERMITIR TODOS LOS BOTONES */
html body ul.products li.product .acodesign-floating-icons-wrapper > a:not(.yith-wcqv-button):not(.compare):not(.acodesign-native-wishlist-btn):not(.acodesign-native-compare-btn) {
    display: contents !important;
}

html body ul.products li.product .acodesign-floating-icons-wrapper > *,
html body ul.products li.product .acodesign-floating-icons-wrapper .yith-wcqv-button,
html body ul.products li.product .acodesign-floating-icons-wrapper .compare,
html body ul.products li.product .acodesign-floating-icons-wrapper .acodesign-native-wishlist-btn,
html body ul.products li.product .acodesign-floating-icons-wrapper .acodesign-native-compare-btn,
html body ul.products li.product .acodesign-floating-icons-wrapper .yith-add-to-wishlist-button-block,
html body ul.products li.product .acodesign-floating-icons-wrapper .yith-add-to-wishlist-button-block--single {
    margin: 0 !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

/* =======================================================
   ACODESIGN PRO: ESTILOS ICONOS FLOTANTES (WISHLIST + COMPARE NATIVOS)
======================================================= */
html body ul.products li.product .acodesign-floating-icons-wrapper .yith-add-to-wishlist-button-block,
html body ul.products li.product .acodesign-floating-icons-wrapper .yith-add-to-wishlist-button-block--single,
html body ul.products li.product .acodesign-floating-icons-wrapper .acodesign-native-wishlist-btn,
html body ul.products li.product .acodesign-floating-icons-wrapper .acodesign-native-compare-btn {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    display: block !important;
    position: relative !important;
    clear: none !important;
}

html body ul.products li.product .acodesign-floating-icons-wrapper .yith-wcwl-add-to-wishlist-button__label,
html body ul.products li.product .acodesign-floating-icons-wrapper .yith-wcwl-icon,
html body ul.products li.product .acodesign-floating-icons-wrapper .yith-wcwl-add-to-wishlist-button i {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* WISHLIST NATIVO Y YITH */
html body ul.products li.product .acodesign-floating-icons-wrapper a.yith-wcwl-add-to-wishlist-button,
html body ul.products li.product .acodesign-floating-icons-wrapper a.yith-wcwl-add-to-wishlist-button--single,
html body ul.products li.product .acodesign-floating-icons-wrapper a.acodesign-native-wishlist-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 100% !important;
    background-color: var(--acd-icon-bg) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'%3E%3C/path%3E%3C/svg%3E") !important;
    background-size: 18px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0 !important; 
    color: transparent !important;
    line-height: 0 !important;
    position: relative !important; 
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
}

html body ul.products li.product .acodesign-floating-icons-wrapper a.yith-wcwl-add-to-wishlist-button:hover,
html body ul.products li.product .acodesign-floating-icons-wrapper a.yith-wcwl-add-to-wishlist-button--single:hover,
html body ul.products li.product .acodesign-floating-icons-wrapper a.acodesign-native-wishlist-btn:hover {
    background-color: var(--acd-icon-hover-bg) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'%3E%3C/path%3E%3C/svg%3E") !important;
}

html body ul.products li.product .acodesign-floating-icons-wrapper a.acodesign-native-wishlist-btn.acd-wishlist-added {
    background-color: #f5f5f5 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%23131728' stroke='%23131728' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'%3E%3C/path%3E%3C/svg%3E") !important;
}

html body ul.products li.product .acodesign-floating-icons-wrapper .yith-add-to-wishlist-button-block {
    display: none !important;
}

html body ul.products li.product .acodesign-floating-icons-wrapper a.acodesign-native-compare-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    border-radius: 50% !important;
    background-color: var(--acd-icon-bg, #ffffff) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 3 21 3 21 8'%3E%3C/polyline%3E%3Cline x1='4' y1='20' x2='21' y2='3'%3E%3C/line%3E%3Cpolyline points='21 16 21 21 16 21'%3E%3C/polyline%3E%3Cline x1='15' y1='15' x2='21' y2='21'%3E%3C/line%3E%3C/svg%3E") !important;
    background-size: 18px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0 !important; 
    color: transparent !important;
    line-height: 0 !important;
    position: relative !important;
    clear: none !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    text-indent: -9999px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    cursor: pointer !important;
    z-index: 50 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

html body ul.products li.product .acodesign-floating-icons-wrapper a.acodesign-native-compare-btn:hover {
    background-color: var(--acd-icon-hover-bg, #131728) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 3 21 3 21 8'%3E%3C/polyline%3E%3Cline x1='4' y1='20' x2='21' y2='3'%3E%3C/line%3E%3Cpolyline points='21 16 21 21 16 21'%3E%3C/polyline%3E%3Cline x1='15' y1='15' x2='21' y2='21'%3E%3C/line%3E%3C/svg%3E") !important;
}

html body ul.products li.product .acodesign-floating-icons-wrapper a.acodesign-native-compare-btn.acd-compare-added {
    background-color: #f5f5f5 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23131728' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 3 21 3 21 8'%3E%3C/polyline%3E%3Cline x1='4' y1='20' x2='21' y2='3'%3E%3C/line%3E%3Cpolyline points='21 16 21 21 16 21'%3E%3C/polyline%3E%3Cline x1='15' y1='15' x2='21' y2='21'%3E%3C/line%3E%3C/svg%3E") !important;
}

html body ul.products li.product .acodesign-floating-icons-wrapper a.compare:not(.acodesign-native-compare-btn) {
    display: none !important;
}

/* =======================================================
   REPARACIÓN AGRESIVA PARA MÓVILES (Fuerza la visualización)
======================================================= */
@media (max-width: 768px) {
    html body ul.products li.product .acodesign-floating-icons-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        overflow: visible !important;
        z-index: 99 !important;
    }
    
    html body ul.products li.product .acodesign-floating-icons-wrapper a.acodesign-native-compare-btn,
    html body ul.products li.product .acodesign-floating-icons-wrapper a.acodesign-native-wishlist-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        max-width: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        background-size: 16px !important;
        position: relative !important; 
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        margin: 0 !important;
        transform: none !important;
    }
}

/* =======================================================
   FIX EXTREMO: SISTEMA DE VIDEO (AUTOPLAY VS HOVER)
======================================================= */
ul.products li.product .acodesign-hover-video {
    position: absolute !important;
    top: 0 !important; 
    left: 0 !important;
    width: 100% !important; 
    height: 100% !important;
    object-fit: cover !important;
    background-color: #f7f7f7 !important; 
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease !important;
    z-index: 2 !important;
    pointer-events: none !important; 
}

ul.products li.product:hover .acodesign-hover-video {
    transform: scale(1.08) !important;
}

/* --- MODO: AUTOPLAY CONTINUO --- */
body.aco-video-mode-autoplay li.aco-has-video .acodesign-image-wrapper img.attachment-woocommerce_thumbnail,
body.aco-video-mode-autoplay li.aco-has-video .acodesign-image-wrapper img.acodesign-hover-img {
    opacity: 0 !important;
    visibility: hidden !important;
    z-index: 1 !important;
}
body.aco-video-mode-autoplay ul.products li.product .acodesign-hover-video {
    opacity: 1 !important; 
}

/* --- MODO: HOVER (ESTILO TIKTOK/REELS) --- */
body.aco-video-mode-hover ul.products li.aco-has-video .acodesign-image-wrapper img.attachment-woocommerce_thumbnail {
    transition: opacity 0.3s ease !important;
}

body.aco-video-mode-hover ul.products li.aco-has-video:hover .acodesign-image-wrapper img.attachment-woocommerce_thumbnail,
body.aco-video-mode-hover ul.products li.aco-has-video.aco-video-playing .acodesign-image-wrapper img.attachment-woocommerce_thumbnail {
    opacity: 0 !important;
}

body.aco-video-mode-hover ul.products li.aco-has-video:hover .acodesign-hover-video,
body.aco-video-mode-hover ul.products li.aco-has-video.aco-video-playing .acodesign-hover-video {
    opacity: 1 !important;
    visibility: visible !important;
}

/* =======================================================
   ACODESIGN PRO: INDICADOR DE VIDEO (ESTILO REELS)
======================================================= */
.acodesign-video-indicator {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    width: 28px !important;
    height: 28px !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    backdrop-filter: blur(2px) !important;
}

.acodesign-video-indicator svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
}

/* Se oculta solo cuando el video está verdaderamente reproduciéndose */
body.aco-video-mode-hover ul.products li.aco-has-video.aco-video-playing .acodesign-video-indicator {
    opacity: 0 !important;
    visibility: hidden !important;
}

@media (max-width: 768px) {
    .acodesign-video-indicator {
        right: auto !important;
        left: 10px !important;
        top: auto !important;
        bottom: 10px !important;
    }
}

/* =======================================================
   ACODESIGN PRO: SELECTOR DE COLUMNAS GRID GLOBAL (PUNTOS)
======================================================= */
.acodesign-grid-selector {
    display: inline-flex;
    align-items: center;
    gap: 12px; 
    margin: 8px 0 20px 15px; 
    vertical-align: middle;
    float: right; 
}

.acodesign-grid-selector .acd-grid-btn {
    background: transparent;
    border: none; 
    border-radius: 0; 
    width: auto;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0; 
    color: #b0b0b0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: none; 
    outline: none;
}

.acodesign-grid-selector .acd-grid-btn svg {
    height: 100%;
    width: auto;
    transition: transform 0.3s ease;
}

.acodesign-grid-selector .acd-grid-btn:hover {
    color: #131728;
}

.acodesign-grid-selector .acd-grid-btn:hover svg {
    transform: scale(1.08); 
}

.acodesign-grid-selector .acd-grid-btn.active {
    color: #131728;
}

.acodesign-grid-selector .acd-grid-btn.active svg {
    transform: scale(1);
}

.woocommerce::after, .woocommerce-page::after {
    content: "";
    display: table;
    clear: both;
}

/* =======================================================
   4. GRID Y COLUMNAS (ESTRUCTURA CORE)
======================================================= */
.woocommerce ul.products::before, .woocommerce ul.products::after, .woocommerce-page ul.products::before, .woocommerce-page ul.products::after { display: none !important; content: none !important; }

/* FIX: Excluir .swiper-wrapper (nuestro plugin) y .splide__list (Kadence) para no romper los carruseles */
.woocommerce ul.products:not(.swiper-wrapper):not(.splide__list), .woocommerce-page ul.products:not(.swiper-wrapper):not(.splide__list), html body .elementor-widget-wc-archive-products ul.products:not(.swiper-wrapper):not(.splide__list) { display: grid !important; gap: 10px !important; margin-right: 0 !important; margin-left: 0 !important; float: none !important; width: 100% !important; }

.woocommerce ul.products.columns-3, .woocommerce-page ul.products.columns-3 { grid-template-columns: repeat(3, 1fr) !important; }
.woocommerce ul.products.columns-4, .woocommerce-page ul.products.columns-4 { grid-template-columns: repeat(4, 1fr) !important; }
.woocommerce ul.products.columns-5, .woocommerce-page ul.products.columns-5 { grid-template-columns: repeat(5, 1fr) !important; }
.woocommerce ul.products.columns-6, .woocommerce-page ul.products.columns-6 { grid-template-columns: repeat(6, 1fr) !important; }

/* FIX: Excluir .swiper-slide (nuestro plugin) y .splide__slide (Kadence) para no forzar width: 100% en las tarjetas */
.woocommerce ul.products li.product:not(.swiper-slide):not(.splide__slide), .woocommerce-page ul.products li.product:not(.swiper-slide):not(.splide__slide) { width: 100% !important; margin: 0 !important; float: none !important; padding: 0 !important; background: transparent !important; }

/* 🚨 FIX: Aplicamos las columnas seleccionadas SÓLO en Escritorio (PC) 🚨 */
@media (min-width: 1025px) {
    .woocommerce ul.products.columns-2 { grid-template-columns: repeat(2, 1fr) !important; }
    .woocommerce ul.products.columns-3 { grid-template-columns: repeat(3, 1fr) !important; }
    .woocommerce ul.products.columns-4 { grid-template-columns: repeat(4, 1fr) !important; }
    .woocommerce ul.products.columns-5 { grid-template-columns: repeat(5, 1fr) !important; }
    .woocommerce ul.products.columns-6 { grid-template-columns: repeat(6, 1fr) !important; }

    html[data-acd-columns="2"] body.woocommerce ul.products, html[data-acd-columns="2"] body.woocommerce-page ul.products { grid-template-columns: repeat(2, 1fr) !important; }
    html[data-acd-columns="3"] body.woocommerce ul.products, html[data-acd-columns="3"] body.woocommerce-page ul.products { grid-template-columns: repeat(3, 1fr) !important; }
    html[data-acd-columns="4"] body.woocommerce ul.products, html[data-acd-columns="4"] body.woocommerce-page ul.products { grid-template-columns: repeat(4, 1fr) !important; }
    html[data-acd-columns="5"] body.woocommerce ul.products, html[data-acd-columns="5"] body.woocommerce-page ul.products { grid-template-columns: repeat(5, 1fr) !important; }
    html[data-acd-columns="6"] body.woocommerce ul.products, html[data-acd-columns="6"] body.woocommerce-page ul.products { grid-template-columns: repeat(6, 1fr) !important; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .woocommerce ul.products, .woocommerce-page ul.products, .woocommerce ul.products[class*="columns-"], .woocommerce-page ul.products[class*="columns-"] { grid-template-columns: repeat(3, 1fr) !important; }
    .acodesign-grid-selector { display: none !important; }
}

@media (max-width: 768px) {
    /* FIX Móvil: Excluir también ambas clases para aislar los carruseles en dispositivos móviles */
    .woocommerce ul.products:not(.swiper-wrapper):not(.splide__list), .woocommerce-page ul.products:not(.swiper-wrapper):not(.splide__list), .woocommerce ul.products.columns-3:not(.swiper-wrapper):not(.splide__list), .woocommerce ul.products.columns-4:not(.swiper-wrapper):not(.splide__list), .woocommerce-page ul.products.columns-3:not(.swiper-wrapper):not(.splide__list), .woocommerce-page ul.products.columns-4:not(.swiper-wrapper):not(.splide__list) { grid-template-columns: repeat(var(--acd-mobile-columns, 2), 1fr) !important; gap: 8px !important; }
    .acodesign-grid-selector { display: none !important; }
}

/* =======================================================
   ACODESIGN PRO: EFECTO ZOOM GLOBAL EN IMÁGENES (HOVER)
======================================================= */
html body ul.products li.product .acodesign-image-wrapper {
    overflow: hidden !important; 
}

html body ul.products li.product .acodesign-image-wrapper img {
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease-in-out !important;
    will-change: transform, opacity;
}

html body ul.products li.product:hover .acodesign-image-wrapper img {
    transform: scale(1.08) !important;
}

/* =======================================================
   ACODESIGN PRO: CINTILLO MARQUEE (SCROLLING BANNER)
======================================================= */
.acodesign-marquee-wrapper {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background-color: var(--acd-marquee-bg, #000000) !important;
    color: var(--acd-marquee-color, #ffffff) !important;
    overflow: hidden !important;
    z-index: 15 !important;
    display: flex !important;
    align-items: center !important;
    padding: 6px 0 !important;
    pointer-events: none !important; 
}

.acodesign-marquee-content {
    display: flex !important;
    width: max-content !important;
    animation: acd-marquee-scroll var(--acd-marquee-speed, 60s) linear infinite !important;
    will-change: transform;
}

.acd-marquee-track {
    display: flex !important;
    white-space: nowrap !important;
    align-items: center !important;
}

.acd-marquee-text {
    padding-right: 20px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    line-height: 1 !important;
}

@keyframes acd-marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .acodesign-marquee-wrapper {
        bottom: 42px !important;
    }
}

/* =======================================================
   ACODESIGN PRO: CONTADOR DE OFERTAS (COUNTDOWN)
======================================================= */
.acodesign-countdown-wrapper {
    position: absolute !important;
    bottom: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    gap: 4px !important;
    z-index: 16 !important;
    pointer-events: none !important;
    transition: all 0.3s ease-in-out !important;
}

.acd-cd-item {
    background-color: var(--acd-cd-bg, #131728) !important;
    color: var(--acd-cd-color, #ffffff) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 6px !important;
    border-radius: 4px !important;
    min-width: 40px !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
}

.acd-cd-num {
    font-size: 14px !important;
    font-weight: 700 !important;
    margin-bottom: 2px !important;
}

.acd-cd-label {
    font-size: 9px !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    opacity: 0.9 !important;
}

@media (min-width: 769px) {
    html body ul.products li.product:hover .acodesign-countdown-wrapper {
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translate(-50%, 10px) !important;
    }
}

@media (max-width: 768px) {
    .acodesign-countdown-wrapper {
        bottom: 50px !important; 
    }
    html body ul.products li.product .acodesign-image-wrapper:has(.acodesign-marquee-wrapper) .acodesign-countdown-wrapper {
        bottom: 78px !important; 
    }
}

/* =======================================================
   REGLAS PARA EL CONTADOR EN PÁGINA SINGLE Y SHORTCODE
======================================================= */
html body .acodesign-countdown-wrapper.acd-single-countdown {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    justify-content: flex-start !important; 
    margin: 15px 0 25px 0 !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    width: 100% !important;
    clear: both !important;
    flex-wrap: wrap !important;
}

html body .product:hover .acodesign-countdown-wrapper.acd-single-countdown,
html body ul.products li.product:hover .acodesign-countdown-wrapper.acd-single-countdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

html body .acodesign-countdown-wrapper.acd-single-countdown .acd-cd-item {
    min-width: 55px !important;
    padding: 8px 10px !important;
}

html body .acodesign-countdown-wrapper.acd-single-countdown .acd-cd-num {
    font-size: 18px !important;
}

html body .acodesign-countdown-wrapper.acd-single-countdown .acd-cd-label {
    font-size: 11px !important;
}

html body .acd-single-countdown-header {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    color: var(--acd-title-color, #131728) !important;
    margin-bottom: 5px !important;
}

html body .acd-single-countdown-header svg {
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
}

/* =======================================================
   FIX NATIVO: RECUPERAR "ABRIR EN NUEVA PESTAÑA" (CAPA LINK)
======================================================= */
ul.products li.product .acodesign-image-wrapper .acodesign-overlay-link {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10 !important; 
    display: block !important;
    background: transparent !important;
    pointer-events: auto !important;
    border: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    margin: 0 !important;
    padding: 0 !important;
    outline: none !important;
}

/* =======================================================
   FASE 3: ESTILOS DE COMPARADOR NATIVO (TABLA Y BARRA)
======================================================= */
#acd-compare-floating-bar {
    position: fixed !important;
    bottom: -100px !important; 
    right: 20px !important;
    z-index: 999999 !important;
    transition: bottom 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

#acd-compare-floating-bar.visible {
    bottom: 20px !important;
}

#acd-compare-floating-bar button {
    background-color: #131728 !important;
    color: #ffffff !important;
    border-radius: 50px !important;
    padding: 12px 25px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    line-height: 1 !important;
    transition: transform 0.2s ease, background-color 0.2s ease !important;
}

#acd-compare-floating-bar button:hover {
    background-color: #1a2035 !important;
    transform: translateY(-3px) !important;
}

.acd-modal-box.acd-compare-box {
    max-width: 1100px !important; 
    padding: 40px 20px 20px !important;
}

.acd-compare-table-wrapper {
    width: 100% !important;
    overflow-x: auto !important; 
    -webkit-overflow-scrolling: touch !important;
}

.acd-compare-table {
    width: 100% !important;
    min-width: 700px !important; 
    border-collapse: collapse !important;
    background: #fff !important;
}

.acd-compare-table th {
    width: 150px !important;
    min-width: 150px !important;
    text-align: left !important;
    padding: 15px !important;
    background-color: #f9f9f9 !important;
    border-bottom: 1px solid #eeeeee !important;
    font-weight: 700 !important;
    color: #333333 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    border-right: 1px solid #eeeeee !important;
}

.acd-compare-table td {
    padding: 20px 15px !important;
    text-align: center !important;
    border-bottom: 1px solid #eeeeee !important;
    border-right: 1px solid #eeeeee !important;
    vertical-align: top !important;
    width: 25% !important;
}

.acd-compare-table .acd-tr-image td {
    position: relative !important;
}

.acd-compare-table .acd-tr-image img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 6px !important;
    display: block !important;
    margin: 0 auto 15px auto !important;
}

.acd-compare-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
}
.acd-compare-title a {
    color: #131728 !important;
    text-decoration: none !important;
}

.acd-comp-price {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #131728 !important;
}
.acd-comp-price del {
    opacity: 0.5 !important;
    margin-right: 5px !important;
    font-weight: 400 !important;
}

.acd-comp-desc {
    font-size: 13px !important;
    color: #666 !important;
    text-align: left !important;
    line-height: 1.6 !important;
}

.acd-compare-table .add_to_cart_button,
.acd-compare-table .button {
    background-color: #131728 !important;
    color: #ffffff !important;
    border-radius: 4px !important;
    padding: 10px 15px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    display: inline-block !important;
    text-decoration: none !important;
}
.acd-compare-table .add_to_cart_button:hover,
.acd-compare-table .button:hover {
    opacity: 0.8 !important;
}

.acd-compare-remove-btn {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    background-color: #e63946 !important;
    color: #ffffff !important;
    width: 24px !important;
    height: 24px !important;
    line-height: 22px !important;
    text-align: center !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-weight: bold !important;
    font-size: 16px !important;
    z-index: 10 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    transition: transform 0.2s ease !important;
}

.acd-compare-remove-btn:hover {
    transform: scale(1.1) !important;
}

@media (max-width: 768px) {
    #acd-compare-floating-bar {
        right: 50% !important;
        transform: translateX(50%) !important;
        bottom: -100px !important;
    }
    #acd-compare-floating-bar.visible {
        bottom: 10px !important;
    }
    .acd-modal-box.acd-compare-box {
        padding: 30px 10px 10px !important;
    }
}

/* =======================================================
   ACODESIGN PRO: SHORTCODE CONTADOR WISHLIST EN HEADER
======================================================= */
.aco-wishlist-counter-link {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--acd-wl-counter-icon, #131728) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    padding: 5px !important;
}
.aco-wishlist-counter-link:hover {
    color: var(--acd-wl-counter-icon-hover, #e63946) !important;
    opacity: 1 !important;
}
.aco-wishlist-counter-link svg {
    width: var(--acd-wl-counter-size, 24px) !important;
    height: var(--acd-wl-counter-size, 24px) !important;
    stroke: currentColor !important;
    transition: stroke 0.3s ease !important;
}
.aco-wishlist-counter-link .aco-wishlist-count {
    position: absolute !important;
    top: -2px !important;
    right: -5px !important;
    background-color: var(--acd-wl-counter-bg, #e63946) !important;
    color: var(--acd-wl-counter-text, #ffffff) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    height: 18px !important;
    min-width: 18px !important;
    line-height: 18px !important;
    border-radius: 50px !important;
    text-align: center !important;
    padding: 0 4px !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
}
.aco-wishlist-counter-link:hover .aco-wishlist-count {
    background-color: var(--acd-wl-counter-bg-hover, #131728) !important;
    color: var(--acd-wl-counter-text-hover, #ffffff) !important;
}
.aco-wishlist-counter-link.acd-pop {
    transform: scale(1.15) !important;
}

/* =======================================================
   ACODESIGN PRO: LOAD MORE AJAX BUTTON
======================================================= */
.aco-load-more-btn {
    background-color: var(--acd-modal-btn-bg, #131728) !important;
    color: var(--acd-modal-btn-text, #ffffff) !important;
    border: none !important;
    padding: 14px 35px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 180px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    line-height: 1 !important;
}

.aco-load-more-btn:hover {
    background-color: var(--acd-modal-btn-hover-bg, #1a2035) !important;
    color: var(--acd-modal-btn-hover-text, #ffffff) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
}

.aco-load-more-btn.loading {
    pointer-events: none !important;
    opacity: 0.8 !important;
}

.acd-spinner-svg {
    animation: acd-btn-spin 1s linear infinite !important;
    margin-right: 8px !important;
    vertical-align: middle !important;
}

@keyframes acd-btn-spin {
    100% { transform: rotate(360deg); }
}

/* =======================================================
   ACODESIGN CAROUSEL: SWIPER STYLES OVERRIDE
======================================================= */
.aco-carousel-wrapper {
    position: relative;
    width: 100%;
}

/* Evitar que las tarjetas se estiren raras en el carrusel */
.aco-carousel-wrapper .swiper-slide {
    height: auto !important; 
}

/* Flechas elegantes */
.aco-carousel-wrapper .swiper-button-next,
.aco-carousel-wrapper .swiper-button-prev {
    color: var(--acd-modal-btn-bg, #131728) !important;
    background: #ffffff;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.aco-carousel-wrapper .swiper-button-next:after,
.aco-carousel-wrapper .swiper-button-prev:after {
    font-size: 16px !important;
    font-weight: bold;
}

.aco-carousel-wrapper .swiper-button-next:hover,
.aco-carousel-wrapper .swiper-button-prev:hover {
    background: var(--acd-modal-btn-bg, #131728);
    color: #ffffff !important;
    transform: scale(1.1);
}

/* Paginación (Puntitos) */
.aco-carousel-wrapper .swiper-pagination-bullet-active {
    background: var(--acd-modal-btn-bg, #131728) !important;
}