/* =======================================================
   PILAR 3: RESET UNIVERSAL DE TARJETA (Aislamiento de Tema)
======================================================= */
/* Remove strict body.woocommerce dependency to allow shortcodes to work anywhere */
html body ul.products li.product,
html body .aco-products-wrapper ul.products li.product,
html body .elementor-widget-wc-archive-products ul.products li.product {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    list-style: none !important;
    transition: none !important;
    overflow: visible !important;
    position: relative !important; 
    z-index: 1 !important;         
    /* ESTRUCTURA FLEXBOX (Forza el orden visual de los elementos) */
    display: flex !important;
    flex-direction: column !important;
}

/* FIX: Aislar el margin: 0 solo para elementos que no son del carrusel (Reemplazado Splide por Swiper para proteger el layout) */
html body ul.products li.product:not(.swiper-slide),
html body .aco-products-wrapper ul.products li.product:not(.swiper-slide),
html body .elementor-widget-wc-archive-products ul.products li.product:not(.swiper-slide) {
    margin: 0 !important;
}

html body ul.products li.product:hover,
html body .aco-products-wrapper ul.products li.product:hover,
html body .elementor-widget-wc-archive-products ul.products li.product:hover {
    box-shadow: none !important;
    transform: none !important;
    background-color: transparent !important;
    border: none !important;
    z-index: 2 !important; 
}

/* Enviamos cualquier elemento basura del tema al final de la tarjeta */
html body ul.products li.product > * {
    order: 10 !important; 
}

/* EXTRAE ENLACES DEL TEMA DEL FLUJO FLEXBOX PARA QUE NO ROMPAN ETIQUETAS */
html body ul.products li.product > a.woocommerce-LoopProduct-link {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    order: 0 !important;
    z-index: 10 !important;
    pointer-events: none !important;
}

/* ORDEN ESTRICTO: De arriba hacia abajo (Imagen -> Categoría -> Titulo -> Precio -> Valoración -> Variaciones) */
html body ul.products li.product > .acodesign-image-wrapper { order: 1 !important; width: 100% !important; }
html body ul.products li.product > .acodesign-product-category { order: 2 !important; }
html body ul.products li.product > .acodesign-title-link { order: 3 !important; }
html body ul.products li.product > .price { order: 4 !important; }
html body ul.products li.product > .star-rating { order: 5 !important; }
html body ul.products li.product > .cfvsw_variations_form,
html body ul.products li.product > table.cfvsw-shop-variations { order: 6 !important; }

/* FIX ASTRA & NEVE: Aseguramos que sus contenedores sigan la estructura Flexbox y encerramos el zoom */
html body ul.products li.product > .astra-shop-thumbnail-wrap,
html body ul.products li.product > .nv-card-content-wrapper > .sp-product-image,
html body ul.products li.product > .nv-card-content-wrapper > .sp-product-image > .img-wrap { 
    order: 1 !important; width: 100% !important; margin: 0 !important; padding: 0 !important; border: none !important; 
    overflow: hidden !important; /* Previene desbordamiento del zoom en Neve/Astra */
    position: relative !important;
}

html body ul.products li.product > .astra-shop-summary-wrap,
html body ul.products li.product > .nv-card-content-wrapper { 
    order: 2 !important; 
    display: flex !important; 
    flex-direction: column !important; 
    width: 100% !important; 
    background: transparent !important;
    margin: 0 !important; padding: 0 !important; border: none !important; 
}

html body ul.products li.product .astra-shop-summary-wrap > .acodesign-product-category,
html body ul.products li.product .nv-card-content-wrapper > .acodesign-product-category { order: 1 !important; }
html body ul.products li.product .astra-shop-summary-wrap > .acodesign-title-link,
html body ul.products li.product .nv-card-content-wrapper > .acodesign-title-link { order: 2 !important; }
html body ul.products li.product .astra-shop-summary-wrap > .price,
html body ul.products li.product .nv-card-content-wrapper > .price { order: 3 !important; }
html body ul.products li.product .astra-shop-summary-wrap > .star-rating,
html body ul.products li.product .nv-card-content-wrapper > .star-rating { order: 4 !important; }
html body ul.products li.product .astra-shop-summary-wrap > .cfvsw_variations_form,
html body ul.products li.product .nv-card-content-wrapper > .cfvsw_variations_form { order: 5 !important; }

/* =======================================================
   COMPATIBILIDAD KADENCE: CAROUSEL & ARCHIVE
   ======================================================= */
/* 1. Asignar el comportamiento flexbox al wrapper de Kadence para que el orden interno funcione */
html body ul.products li.product > .product-details.entry-content-wrap { 
    order: 2 !important; 
    display: flex !important; 
    flex-direction: column !important; 
    width: 100% !important; 
    background: transparent !important;
    margin: 0 !important; 
    padding: 0 !important; 
    border: none !important; 
}

/* 2. Forzar el orden del título y precio DENTRO del wrapper de Kadence */
html body ul.products li.product .product-details > .acodesign-product-category { order: 1 !important; }
html body ul.products li.product .product-details > .acodesign-title-link { order: 2 !important; }
html body ul.products li.product .product-details > .price { order: 3 !important; }
html body ul.products li.product .product-details > .star-rating { order: 4 !important; }
html body ul.products li.product .product-details > .cfvsw_variations_form { order: 5 !important; }


/* =======================================================
   ESTILOS IMAGEN HOVER (ACO DESIGN PRO)
======================================================= */
html body ul.products li.product .acodesign-image-wrapper img,
html body ul.products li.product .acodesign-image-wrapper img {
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    /* 🚨 FIX: Hace la imagen "invisible" al clic derecho para obligar al navegador a usar el enlace 🚨 */
    pointer-events: none !important;
    -webkit-user-drag: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}

ul.products li.product .acodesign-image-wrapper a.woocommerce-LoopProduct-link {
    position: relative !important;
    overflow: hidden !important;
    display: block;
    pointer-events: auto !important;
}

/* 🚨 FIX: Si el tema fuerza position absolute en la imagen, evitamos que pise el padding-bottom de 42px */
@media (max-width: 768px) {
    html body ul.products li.product .acodesign-image-wrapper a.woocommerce-LoopProduct-link,
    html body ul.products li.product .acodesign-hover-img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 42px !important;
        height: auto !important; /* Se calcula por estiramiento de top a bottom */
    }
}

ul.products li.product .acodesign-hover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 1;
    object-fit: cover;
}

ul.products li.product .acodesign-image-wrapper:hover .acodesign-hover-img,
ul.products li.product:hover .acodesign-hover-img {
    opacity: 1;
}

/* =======================================================
   ESTILOS LOOP ACO DESIGN - FINAL (PC + MÓVIL)
======================================================= */
ul.products li.product .acodesign-image-wrapper {
    position: relative !important;
    overflow: hidden !important;
    margin-bottom: 0px !important;
}

/* --- A. ICONOS FLOTANTES (FLEXBOX WRAPPER) --- */
ul.products li.product .acodesign-floating-icons-wrapper {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 25 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 36px !important;
    gap: 8px !important;
    opacity: 0;
    transform: translateX(15px);
    transition: all 0.3s ease !important;
    pointer-events: none !important;
    overflow: visible !important;
}

ul.products li.product:hover .acodesign-floating-icons-wrapper {
    opacity: 1 !important;
    transform: translateX(0) !important;
    pointer-events: auto !important;
}

ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] {
    position: relative !important;
    width: 36px !important; height: 36px !important;
    min-height: 36px !important; max-height: 36px !important;
    margin: 0 !important; padding: 0 !important;
    opacity: 1 !important; transform: none !important;
    display: block !important;
    flex-shrink: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] > div {
    display: none !important;
}

html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] a,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] button,
html body ul.products li.product .acodesign-floating-icons-wrapper .yith-wcqv-button,
html body ul.products li.product .acodesign-floating-icons-wrapper .compare {
    position: relative !important;
    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;
    box-shadow: none !important; 
    font-size: 0 !important; line-height: 0 !important; color: transparent !important;
    border: none !important; margin: 0 !important; padding: 0 !important;
    transition: background-color 0.3s ease !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 18px !important;
    top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
    opacity: 1 !important; transform: 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;
}

html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] a,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] button {
    position: absolute !important;
    top: 0 !important; left: 0 !important; right: auto !important; bottom: auto !important;
}

html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"]:hover a,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"]:hover button,
html body ul.products li.product .acodesign-floating-icons-wrapper .yith-wcqv-button:hover,
html body ul.products li.product .acodesign-floating-icons-wrapper .compare:hover {
    background-color: var(--acd-icon-hover-bg, #131728) !important;
}

html body ul.products li.product .acodesign-floating-icons-wrapper .yith-wcqv-button { 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='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3C/svg%3E") !important; }
html body ul.products li.product .acodesign-floating-icons-wrapper .compare { 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; }
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] a,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] button { 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; }

html body ul.products li.product .acodesign-floating-icons-wrapper .yith-wcqv-button:hover { 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='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3C/svg%3E") !important; }
html body ul.products li.product .acodesign-floating-icons-wrapper .compare:hover { 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 [class*="yith-add-to-wishlist-button-block"]:hover a,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"]:hover button { 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 [class*="yith-add-to-wishlist-button-block"].exists a,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"].exists button,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] .yith-wcwl-wishlistaddedbrowse a,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] .yith-wcwl-wishlistaddedbrowse button,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] .yith-wcwl-wishlistexistsbrowse a,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] .yith-wcwl-wishlistexistsbrowse button,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"][data-attributes*='"exists":true'] a,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"][data-attributes*='"exists":true'] button,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] a.yith-wcwl-add-to-wishlist-button--added,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] button.yith-wcwl-add-to-wishlist-button--added,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"].added a,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"].added button,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] a.added,
html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] button.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;
}

/* Eliminada regla que ocultaba ::before y ::after para permitir los tooltips */

ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] a span,
ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] button span,
ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] a i,
ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] button i,
ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] a svg,
ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] button svg,
ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] img,
ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] .feedback {
    display: none !important; opacity: 0 !important; visibility: hidden !important;
}

/* --- B. BOTÓN PRINCIPAL (ESCRITORIO) --- */
ul.products li.product .acodesign-image-wrapper .button,
ul.products li.product .acodesign-image-wrapper .add_to_cart_button {
    position: absolute !important;
    bottom: 30px !important;
    left: 50% !important;
    transform: translate(-50%, 40px);
    width: 85% !important;
    z-index: 20 !important;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-color: var(--acd-btn-bg, #ffffff) !important;
    color: var(--acd-btn-text, #131728) !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    text-transform: uppercase;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(19, 23, 40, 0.1);
    border: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

ul.products li.product:hover .acodesign-image-wrapper .button,
ul.products li.product:hover .acodesign-image-wrapper .add_to_cart_button {
    opacity: 1 !important; transform: translate(-50%, 0) !important;
}
ul.products li.product .acodesign-image-wrapper .button:hover { 
    background-color: var(--acd-btn-hover-bg, #131728) !important; color: var(--acd-btn-hover-text, #ffffff) !important; 
}

/* Estado "Añadido" - Icono + Texto (ESCRITORIO) */
ul.products li.product .acodesign-image-wrapper .button.added,
ul.products li.product .acodesign-image-wrapper .add_to_cart_button.added {
    background-color: var(--acd-btn-hover-bg, #131728) !important;
    color: var(--acd-btn-hover-text, #ffffff) !important;
    background-image: none !important;
    font-size: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    /* Mantener dimensiones exactas del estado normal/hover */
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    width: 85% !important;
    transform: translate(-50%, 0) !important;
    opacity: 1 !important;
}

/* Icono check vía pseudo-elemento */
ul.products li.product .acodesign-image-wrapper .button.added::before,
ul.products li.product .acodesign-image-wrapper .add_to_cart_button.added::before {
    content: "✔";
    font-size: 16px;
    line-height: 1;
    font-weight: normal;
    color: inherit;
}

ul.products li.product.outofstock .acodesign-image-wrapper .button,
ul.products li.product.outofstock .acodesign-image-wrapper .add_to_cart_button {
    background-color: #f0f0f0 !important; 
    color: #999999 !important; 
    pointer-events: none !important; 
    cursor: default !important; 
    bottom: 10px !important;
    font-size: 11px !important; 
    font-weight: 700 !important;
}

ul.products li.product .acodesign-image-wrapper .button::before, 
ul.products li.product .acodesign-image-wrapper .button i { display: none !important; }

ul.products li.product.outofstock .acodesign-image-wrapper .button::after,
ul.products li.product.outofstock .acodesign-image-wrapper .add_to_cart_button::after {
    content: none !important;
    display: none !important;
}

@media (min-width: 769px) {
    ul.products li.product .acodesign-image-wrapper .acodesign-internal-qv { display: none !important; }
}

/* =======================================================
   3. ETIQUETAS Y BADGES
======================================================= */
html body ul.products li.product .acodesign-badges-wrapper {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    z-index: 10 !important; 
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 5px !important;
    pointer-events: none !important;
}

html body ul.products li.product .acodesign-badges-wrapper span.onsale, 
html body ul.products li.product .acodesign-badges-wrapper span.onsale,
html body ul.products li.product .acodesign-badges-wrapper .acodesign-out-of-stock,
html body ul.products li.product .acodesign-badges-wrapper .acodesign-out-of-stock,
html body ul.products li.product .acodesign-badges-wrapper .acodesign-custom-badge,
html body ul.products li.product .acodesign-badges-wrapper .acodesign-custom-badge {
    position: relative !important;
    top: auto !important; left: auto !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: 0 !important; min-width: 0 !important;
    display: inline-block !important;
    box-sizing: border-box !important;
    border: none !important;
    white-space: nowrap !important; /* FIJA EL TEXTO EN UNA SOLA LÍNEA */
}

html body ul.products li.product .acodesign-badges-wrapper span.onsale, 
html body ul.products li.product .acodesign-badges-wrapper span.onsale {
    background-color: var(--acd-sale-bg, #131728) !important; 
    color: var(--acd-sale-text, #ffffff) !important;
}

html body ul.products li.product .acodesign-badges-wrapper .acodesign-out-of-stock,
html body ul.products li.product .acodesign-badges-wrapper .acodesign-out-of-stock {
    background-color: var(--acd-oos-bg, #131728) !important; 
    color: var(--acd-oos-text, #ffffff) !important;
}

html body ul.products li.product .acodesign-badges-wrapper .acodesign-custom-badge,
html body ul.products li.product .acodesign-badges-wrapper .acodesign-custom-badge {
    background-color: var(--acd-custom-bg, #e63946) !important; 
    color: var(--acd-custom-text, #ffffff) !important;
}

/* =======================================================
   VERSIÓN MÓVIL FINAL (ESTABILIDAD TOTAL)
======================================================= */
@media (max-width: 768px) {
    
    /* 🚨 FIX: Mueve los botones debajo de la imagen sin taparla (anula aspect-ratio del tema y plugin en móvil) */
    html body ul.products li.product .acodesign-image-wrapper.acodesign-image-wrapper,
    html body ul.products li.product div.acodesign-image-wrapper.acodesign-image-wrapper,
    html body ul.products li.product .ct-image-container,
    html body ul.products li.product figure {
        position: relative !important; /* Forza al contenedor a ser el punto de referencia para sus hijos absolutos */
        aspect-ratio: auto !important; /* Por defecto desactivado en móvil, PHP inyectará el aspect-ratio dinámico de WooCommerce */
        height: auto !important;
        overflow: hidden !important; /* Encierra el zoom de forma segura */
        margin-bottom: 0 !important;
        padding-bottom: 42px !important; /* Espacio físico vacío al fondo para los botones */
        box-sizing: content-box !important; /* Aplica la proporción de aspecto pura a la imagen */
    }
    
    /* Imagen principal: se mantiene en flujo normal y adopta el alto del contenedor (menos los 42px de padding en border-box) */
    html body ul.products li.product .acodesign-image-wrapper img:not(.acodesign-hover-img),
    html body ul.products li.product .ct-image-container img,
    html body ul.products li.product figure img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Elementos absolutos (imagen hover, video hover, overlay link): se estiran de top: 0 a bottom: 42px */
    html body ul.products li.product .acodesign-image-wrapper .acodesign-hover-img,
    html body ul.products li.product .acodesign-image-wrapper .acodesign-hover-video,
    html body ul.products li.product .acodesign-image-wrapper .acodesign-overlay-link,
    html body ul.products li.product .acodesign-image-wrapper a.acodesign-overlay-link,
    html body ul.products li.product .ct-image-container .acodesign-hover-img,
    html body ul.products li.product .ct-image-container .acodesign-hover-video,
    html body ul.products li.product .ct-image-container .acodesign-overlay-link,
    html body ul.products li.product figure .acodesign-hover-img,
    html body ul.products li.product figure .acodesign-hover-video,
    html body ul.products li.product figure .acodesign-overlay-link {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        bottom: 42px !important; /* Finalizan exactamente al inicio de los botones */
        height: auto !important;
        object-fit: cover !important;
    }

    /* Apagamos el zoom en móvil para evitar comportamientos extraños al tocar la pantalla */
    html body ul.products li.product:hover .acodesign-image-wrapper img,
    html body ul.products li.product:hover .acodesign-hover-video {
        transform: none !important;
    }

    html body ul.products li.product .acodesign-floating-icons-wrapper {
        width: 32px !important;
        opacity: 1 !important; transform: none !important;
        pointer-events: auto !important; gap: 6px !important;
        overflow: visible !important;
    }

    html body ul.products li.product .acodesign-floating-icons-wrapper .yith-wcqv-button {
        display: none !important;
    }

    html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] a,
    html body ul.products li.product .acodesign-floating-icons-wrapper [class*="yith-add-to-wishlist-button-block"] button {
        position: absolute !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 30px !important;
        height: 30px !important;
        min-width: 32px !important;
        max-width: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        border-radius: 50% !important;
        background-color: var(--acd-icon-bg, #ffffff) !important;
        box-shadow: none !important;
        font-size: 0 !important;
        line-height: 0 !important;
        color: transparent !important;
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
        transition: background-color 0.3s ease !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: 18px !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        opacity: 1 !important;
        transform: 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;
    }

    html body ul.products li.product .acodesign-floating-icons-wrapper .compare {
        width: 30px !important; height: 30px !important;
        min-width: 32px !important; max-width: 32px !important;
        min-height: 32px !important; max-height: 32px !important;
        background-size: 16px !important;
        box-shadow: none !important;
    }

    ul.products li.product .acodesign-image-wrapper .button ,
    ul.products li.product .acodesign-image-wrapper .add_to_cart_button,
    ul.products li.product .acodesign-image-wrapper .product_type_simple,
    ul.products li.product .acodesign-image-wrapper .product_type_variable,
    ul.products li.product .acodesign-image-wrapper .acodesign-internal-qv {
        position: absolute !important;
        bottom: 0 !important; top: auto !important; /* <--- Se anclan milimétricamente al fondo del padding */
        height: 42px !important; line-height: 42px !important;
        padding: 0 !important;  margin: 0 !important;
        border-radius: 0 !important;
        border-top: 1px solid #eeeeee !important;
        opacity: 1 !important;
        transform: none !important;
        display: flex !important; align-items: center !important; justify-content: center !important;
        box-sizing: border-box !important;
        box-shadow: none !important;
        border: none !important;
        border-top: 1px solid #eeeeee !important;
        z-index: 20 !important; /* Nivel 20: Barra de carrito móvil sobre todo */
        font-size: 0 !important; color: transparent !important;
        transition: background-color 0.1s ease !important;
    }

    ul.products li.product:not(.swiper-slide) .acodesign-image-wrapper .button, 
    ul.products li.product:not(.swiper-slide) .acodesign-image-wrapper .add_to_cart_button,
    ul.products li.product:not(.swiper-slide) .acodesign-image-wrapper .product_type_simple,
    ul.products li.product:not(.swiper-slide) .acodesign-image-wrapper .product_type_variable {
        width: 100% !important;
        left: 0 !important; right: auto !important;
        border-right: none !important;
        background-color: var(--acd-btn-bg, #ffffff) !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23131728' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V9a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v12a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1z'/%3E%3Cpath d='M10 7V5a2 2 0 0 1 4 0v2'/%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important; background-position: center !important; background-size: 18px !important;
    }

    ul.products li.product .acodesign-image-wrapper.has-qv .button, 
    ul.products li.product .acodesign-image-wrapper.has-qv .add_to_cart_button,
    ul.products li.product .acodesign-image-wrapper.has-qv .product_type_simple,
    ul.products li.product .acodesign-image-wrapper.has-qv .product_type_variable {
        width: 50% !important;
        border-right: 1px solid #eeeeee !important;
    }

    /* MÓVIL: Estado "Añadido" - Versión ultra-robusta sin depender de add_to_cart_button */
    html body ul.products li.product .acodesign-image-wrapper .added,
    html body ul.products li.product .acodesign-image-wrapper a.added,
    html body ul.products li.product .acodesign-image-wrapper .added:hover,
    html body ul.products li.product .acodesign-image-wrapper a.added:hover,
    html body ul.products li.product .acodesign-image-wrapper .added:focus,
    html body ul.products li.product .acodesign-image-wrapper a.added:focus,
    html body ul.products li.product .acodesign-image-wrapper .added:active,
    html body ul.products li.product .acodesign-image-wrapper a.added:active {
        background-color: #ffffff !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23131728' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") !important;
        background-size: 18px !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        color: transparent !important;
        font-size: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* MÓVIL: Anchos y posiciones dinámicas para neutralizar escritorio */
    html body ul.products li.product .acodesign-image-wrapper .added,
    html body ul.products li.product .acodesign-image-wrapper a.added {
        width: 100% !important;
        transform: none !important;
        left: 0 !important;
        right: auto !important;
    }
    html body ul.products li.product .acodesign-image-wrapper.has-qv .added,
    html body ul.products li.product .acodesign-image-wrapper.has-qv a.added {
        width: 50% !important;
        transform: none !important;
        left: 0 !important;
        right: auto !important;
    }

    /* MÓVIL: Estado de Carga (Loading) blindado */
    html body ul.products li.product .acodesign-image-wrapper a.add_to_cart_button.loading {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* MÓVIL: Evitar deformación por pseudo-elementos nativos */
    html body ul.products li.product .acodesign-image-wrapper a.add_to_cart_button.loading::after,
    html body ul.products li.product .acodesign-image-wrapper a.add_to_cart_button.added::after,
    html body ul.products li.product .acodesign-image-wrapper a.add_to_cart_button.loading::before,
    html body ul.products li.product .acodesign-image-wrapper a.add_to_cart_button.added::before {
        display: none !important;
        content: none !important;
    }

    ul.products li.product .acodesign-image-wrapper .acodesign-internal-qv {
        width: 50% !important;
        right: 0 !important; left: auto !important;
        background-color: #ffffff !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23131728' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important; background-position: center !important; background-size: 20px !important;
    }

    ul.products li.product .acodesign-image-wrapper .add_to_cart_button:active, 
    ul.products li.product .acodesign-image-wrapper .add_to_cart_button:focus,
    ul.products li.product .acodesign-image-wrapper .product_type_simple:active, 
    ul.products li.product .acodesign-image-wrapper .product_type_simple:focus,
    ul.products li.product .acodesign-image-wrapper .product_type_variable:active, 
    ul.products li.product .acodesign-image-wrapper .product_type_variable:focus {
        background-color: var(--acd-btn-hover-bg, #131728) !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V9a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v12a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1z'/%3E%3Cpath d='M10 7V5a2 2 0 0 1 4 0v2'/%3E%3C/svg%3E") !important;
    }

    ul.products li.product .acodesign-image-wrapper .acodesign-internal-qv:active,
    ul.products li.product .acodesign-image-wrapper .acodesign-internal-qv:focus,
    ul.products li.product .acodesign-image-wrapper .acodesign-internal-qv:hover {
        background-color: var(--acd-icon-hover-bg) !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3C/svg%3E") !important;
    }

    ul.products li.product:hover .acodesign-image-wrapper .button,
    ul.products li.product:hover .acodesign-image-wrapper .add_to_cart_button {
        background-color: #ffffff !important;
        color: transparent !important; 
        transform: none !important;
        width: 100% !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23131728' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V9a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v12a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1z'/%3E%3Cpath d='M10 7V5a2 2 0 0 1 4 0v2'/%3E%3C/svg%3E") !important;
    }

    ul.products li.product:hover .acodesign-image-wrapper.has-qv .button,
    ul.products li.product:hover .acodesign-image-wrapper.has-qv .add_to_cart_button,
    ul.products li.product:hover .acodesign-image-wrapper .acodesign-internal-qv {
        width: 50% !important;
    }

    ul.products li.product:hover .acodesign-image-wrapper .acodesign-internal-qv {
        background-color: #ffffff !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23131728' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3C/svg%3E") !important;
        transform: none !important;
    }

    ul.products li.product .acodesign-image-wrapper .add_to_cart_button:hover,
    ul.products li.product .acodesign-image-wrapper .product_type_simple:hover,
    ul.products li.product .acodesign-image-wrapper .product_type_variable:hover {
        background-color: var(--acd-btn-hover-bg, #131728) !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V9a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v12a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1z'/%3E%3Cpath d='M10 7V5a2 2 0 0 1 4 0v2'/%3E%3C/svg%3E") !important;
    }

    ul.products li.product.outofstock .acodesign-image-wrapper .button,
    ul.products li.product.outofstock .acodesign-image-wrapper .add_to_cart_button,
    ul.products li.product.outofstock .acodesign-image-wrapper .product_type_simple,
    ul.products li.product.outofstock:hover .acodesign-image-wrapper .button,
    ul.products li.product.outofstock:hover .acodesign-image-wrapper .add_to_cart_button,
    ul.products li.product.outofstock:hover .acodesign-image-wrapper .product_type_simple {
        background-color: #f9f9f9 !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E") !important;
        background-size: 16px !important;
        pointer-events: none !important;
        bottom: 0 !important;
        color: transparent !important; 
        font-size: 0 !important;
    }

    /* =======================================================
       FEEDBACK VISUAL AL AÑADIR AL CARRITO EN MÓVIL
    ======================================================= */
    /* Forzamos que en estado de carga o añadido pierda el hover negro que se queda pegado en móviles */
    /* MÓVIL: Estado de carga (loading) - Mantiene dimensiones y muestra spinner */
    ul.products li.product .acodesign-image-wrapper .add_to_cart_button.loading,
    ul.products li.product .acodesign-image-wrapper .add_to_cart_button.loading:hover,
    ul.products li.product .acodesign-image-wrapper .add_to_cart_button.loading:focus,
    ul.products li.product .acodesign-image-wrapper .add_to_cart_button.loading:active {
        background-color: var(--acd-btn-bg, #ffffff) !important;
        background-image: none !important;
        color: transparent !important;
        font-size: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 42px !important;
        line-height: 42px !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        position: absolute !important; /* Mantenemos absoluto en móvil para evitar saltos de flujo */
        bottom: 0 !important;
        pointer-events: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    /* MÓVIL: Anchos dinámicos para el estado de carga (loading) para evitar saltos */
    ul.products li.product .acodesign-image-wrapper .add_to_cart_button.loading {
        width: 100% !important;
        left: 0 !important;
        right: auto !important;
    }
    ul.products li.product .acodesign-image-wrapper.has-qv .add_to_cart_button.loading {
        width: 50% !important;
        left: 0 !important;
        right: auto !important;
    }

    /* Spinner personalizado (pseudo-elemento) */
    ul.products li.product .acodesign-image-wrapper .add_to_cart_button.loading::after {
        content: "" !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        width: 18px !important;
        height: 18px !important;
        margin: -9px 0 0 -9px !important;
        border: 2px solid rgba(19, 23, 40, 0.15) !important;
        border-top-color: #131728 !important;
        border-radius: 50% !important;
        animation: acd-spin 1s linear infinite !important;
        display: block !important;
    }


}

ul.products li.product { position: relative !important; }

/* =======================================================
   TIPOGRAFÍA / TITULOS Y PRECIOS (ALINEACIÓN DINÁMICA)
======================================================= */

/* Categoría opcional (shortcodes) */
html body ul.products li.product .acodesign-product-category {
    display: block !important;
    text-align: var(--acd-text-align, left) !important;
    margin: 12px 10px -5px 10px !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
}

html body ul.products li.product .acodesign-product-category a {
    color: var(--acd-cat-color, #a5a5a5) !important;
    font-size: var(--acd-cat-font-size, 15px) !important;
    font-weight: var(--acd-cat-font-weight, 400) !important;
    text-decoration: none !important;
    text-transform: none !important;
}
html body ul.products li.product .acodesign-product-category a:hover {
    opacity: 0.8 !important;
}

/* Salvar nuestro propio título y aplicar alineación */
html body ul.products li.product .acodesign-title-link .woocommerce-loop-product__title {
    display: block !important;
    text-align: var(--acd-text-align, left) !important;
    margin: 12px 10px 0 10px !important;
    padding: 0 !important;
    font-weight: var(--acd-title-font-weight, 600) !important; 
    font-size: var(--acd-title-font-size, 16px) !important;
    color: var(--acd-title-color, #131728) !important;
    transition: color 0.3s ease !important; /* Transición suave en hover */
}

/* Efecto hover usando la variable personalizable desde el panel */
html body ul.products li.product a.acodesign-title-link:hover .woocommerce-loop-product__title {
    color: var(--acd-title-hover-color, #a5a5a5) !important;
}

html body ul.products li.product .price,
html body ul.products li.product .price {
    text-align: var(--acd-text-align, left) !important;
    display: block !important;
    width: auto !important;
    margin: 3px 10px 5px 10px !important;
    color: var(--acd-price-color, #A5A5A5) !important; 
    font-size: var(--acd-price-font-size, 15px) !important; 
    font-weight: var(--acd-price-font-weight, 600) !important;
    background: transparent !important;
}

html body ul.products li.product .price .amount,
html body ul.products li.product .price del,
html body ul.products li.product .price ins {
    display: inline-block !important; 
    margin: 0 4px 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
}

html body ul.products li.product .price del {
    opacity: 0.6 !important;
    display: inline-block !important;
}

html body ul.products li.product .price ins { 
    text-decoration: none !important; 
    display: inline-block !important;
}

ul.products li.product a.acodesign-title-link { text-decoration: none !important; color: inherit !important; display: block; }
ul.products li.product a.acodesign-title-link:hover { color: inherit !important; text-decoration: none !important; }

/* =======================================================
   ALINEACIÓN DINÁMICA DE SWATCHES (CARTFLOWS)
======================================================= */

html body ul.products li.product .cfvsw_variations_form,
html body ul.products li.product table.cfvsw-shop-variations {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
}

html body ul.products li.product table.cfvsw-shop-variations tbody,
html body ul.products li.product table.cfvsw-shop-variations tr,
html body ul.products li.product table.cfvsw-shop-variations td.value {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
}

html body ul.products li.product table.cfvsw-shop-variations td.value .cfvsw-hidden-select {
    display: none !important;
}

html body ul.products li.product .cfvsw_variations_form .cfvsw-swatches-container.cfvsw-shop-container,
html body ul.products li.product .cfvsw_variations_form .cfvsw-swatches-container.cfvsw-shop-container {
    justify-content: var(--acd-flex-align, flex-start) !important;
    margin: 3px 10px 10px 10px !important; 
    display: flex !important; 
    grid-gap: 5px; 
    min-height: 26px !important;
    flex-wrap: wrap !important;
    width: auto !important;
    float: none !important;
}

ul.products li.product .cfvsw-swatches-option { margin: 0px !important; display: inline-block; }
ul.products li.product .cfvsw-swatch-inner { border: none !important; }





ul.products li.product .acodesign-more-count { 
    display: inline-flex !important; align-items: center; justify-content: center; 
    width: 24px !important; height: 24px !important; border-radius: 50%; 
    background-color: #f1f1f1; color: #333; font-size: 11px; font-weight: 600; 
    margin-left: 5px; cursor: help; border: 1px solid #e1e1e1; line-height: 1; 
}

html body ul.products li.product table.variations tbody tr:hover > td,
html body ul.products li.product table.variations tbody tr:hover > th {
    background-color: transparent !important;
}

/* =======================================================
   FIX DE NAVEGACIÓN Y PROTECCIÓN DE CLICS (PROXY CLICK)
======================================================= */
ul.products li.product .acodesign-image-wrapper { cursor: pointer !important; }

ul.products li.product .acodesign-image-wrapper .button,
ul.products li.product .acodesign-image-wrapper .add_to_cart_button,
ul.products li.product .acodesign-floating-icons-wrapper,
ul.products li.product .acodesign-image-wrapper .acodesign-internal-qv {
    z-index: 25 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

#yith-quick-view-modal,
.yith-quick-view-overlay,
.yith-wcqv-main {
    z-index: 999999 !important;
}

/* =======================================================
   RESET DE SEGURIDAD ABSOLUTO (SINGLE PRODUCT PAGE)
======================================================= */
.summary.entry-summary [class*="yith-add-to-wishlist-button-block"] {
    position: relative !important;
    opacity: 1 !important;
    transform: none !important;
    display: block !important;
    margin-bottom: 15px !important;
}
.summary.entry-summary [class*="yith-add-to-wishlist-button-block"] a {
    background-image: none !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: inherit !important;
    font-size: inherit !important;
}
.summary.entry-summary [class*="yith-add-to-wishlist-button-block"] a span,
.summary.entry-summary [class*="yith-add-to-wishlist-button-block"] a svg {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: auto !important;
    height: auto !important;
}

/* =======================================================
   ESCUDO ANTI-CLON V6 (LÁSER DESTRUCTOR TOTAL MULTI-THEME)
   Garantiza que la basura de los temas se pulverice.
======================================================= */

/* Ocultar etiquetas duplicadas y basura general de los temas */
html body ul.products li.product .woocommerce-loop-product__title:not(.acodesign-title-link .woocommerce-loop-product__title),
html body ul.products li.product .woocommerce-loop-category__title {
    display: none !important;
}

/* Ocultar basura específica inyectada por Astra, Neve, Kadence */
html body ul.products li.product .ast-shop-category,
html body ul.products li.product .ast-woo-product-category,
html body ul.products li.product .kadence-loop-product-category,
html body ul.products li.product .ast-shop-product-out-of-stock,
html body ul.products li.product .kadence-out-of-stock-badge,
html body ul.products li.product .out-of-stock-label,
html body ul.products li.product .ast-on-card-button,
html body ul.products li.product .ast-quick-view-button,
html body ul.products li.product .ast-quick-view-text,
html body ul.products li.product .nv-quick-view {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    z-index: -999 !important;
}

/* Ocultar MEGA-BOTONES AZULES (botones crudos que quedan sueltos debajo del producto) */
html body ul.products li.product > a.button:not(.acodesign-image-wrapper *):not(.acodesign-floating-icons-wrapper *),
html body ul.products li.product > a.add_to_cart_button:not(.acodesign-image-wrapper *):not(.acodesign-floating-icons-wrapper *),
html body ul.products li.product .astra-shop-summary-wrap > a.button,
html body ul.products li.product .nv-card-content-wrapper > a.button,
html body ul.products li.product a.added_to_cart,
html body ul.products li.product a.ast-loop-product__link,
html body ul.products li.product .product-action-wrap,
html body ul.products li.product a.woocommerce-LoopProduct-link-title {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    z-index: -9999 !important;
}

/* Ocultar etiquetas de oferta duplicadas y botones extra incrustados por la fuerza de YITH */
html body ul.products li.product > span.onsale,
html body ul.products li.product > mark.onsale,
html body ul.products li.product .onsale:not(.acodesign-badges-wrapper .onsale),
html body ul.products li.product mark.onsale:not(.acodesign-badges-wrapper mark.onsale),
html body ul.products li.product span.onsale:not(.acodesign-badges-wrapper span.onsale),
html body ul.products li.product .yith-wcqv-button:not(.acodesign-floating-icons-wrapper *),
html body ul.products li.product .compare:not(.acodesign-floating-icons-wrapper *):not(.acodesign-image-wrapper *),
html body ul.products li.product [class*="yith-add-to-wishlist-button-block"]:not(.acodesign-floating-icons-wrapper *),
html body ul.products li.product .yith-wcwl-add-to-wishlist-button:not(.acodesign-floating-icons-wrapper *),
html body ul.products li.product .yith-wcwl-add-to-wishlist-button-over-image {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    z-index: -9999 !important;
}

/* DESTRUIR WRAPPERS QUE NO SE PUEDEN ALINEAR Y SOMBRAS DE KADENCE */
/* NOTA: .product-details.entry-content-wrap (Kadence) está EXCLUIDO porque necesita display:flex (ver sección Kadence) */
html body ul.products li.product .product-inner,
html body ul.products li.product .ast-woocommerce-container,
html body ul.products li.product .woo-loop-product__style-1,
html body ul.products li.product.content-bg,
html body ul.products li.product .content-bg,
html body ul.products li.product .entry-content-wrap:not(.product-details),
html body ul.products li.product .product-details:not(.entry-content-wrap) {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    transform: none !important;       
    transition: none !important;      
    display: block !important;        
    position: static !important;      
    min-height: auto !important;      
    width: auto !important;           
    overflow: visible !important;     
    clip-path: none !important;       
    z-index: auto !important;
}

/* Destruir la imagen de hover nativa inyectada por Kadence */
html body ul.products li.product img.secondary-product-image,
html body ul.products li.product img.wp-post-image--secondary {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    z-index: -9999 !important;
}

/* =======================================================
   FIX KADENCE: PRODUCTOS RELACIONADOS (SINGLE PRODUCT)
======================================================= */

/* Asegurar que el grid de related products use nuestro sistema de columnas */
.woocommerce .related.products ul.products,
.woocommerce .up-sells.products ul.products,
.woocommerce .cross-sells ul.products {
    display: grid !important;
    gap: 10px !important;
}

/* Resetear las clases de columna de Kadence para que no interfieran */
.woocommerce .related.products ul.products[class*="grid-cols"],
.woocommerce .up-sells.products ul.products[class*="grid-cols"] {
    grid-template-columns: repeat(4, 1fr) !important; /* Valor por defecto, se ajustará con el selector de columnas si está activo */
}

@media (max-width: 1024px) {
    .woocommerce .related.products ul.products,
    .woocommerce .up-sells.products ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .woocommerce .related.products ul.products,
    .woocommerce .up-sells.products ul.products {
        grid-template-columns: repeat(var(--acd-mobile-columns, 2), 1fr) !important;
    }
}

/* Restaurado: Mostrar icono de Kadence solo cuando el producto ha sido añadido */
.woocommerce ul.products li.product .button .kadence-svg-iconset,
.woocommerce ul.products li.product .add_to_cart_button .kadence-svg-iconset {
    display: none !important;
}

.woocommerce ul.products li.product .button.added .kadence-svg-iconset,
.woocommerce ul.products li.product .add_to_cart_button.added .kadence-svg-iconset {
    display: inline-flex !important;
}

/* Eliminar cualquier texto adicional de Kadence en los botones (si se cuela) */
.woocommerce ul.products li.product .button .kadence-spinner-svg,
.woocommerce ul.products li.product .button .kadence-check-svg {
    display: none !important;
}

/* Asegurar que las tarjetas de related products respeten el mismo ancho y margen que en la tienda */
.woocommerce .related.products ul.products li.product:not(.swiper-slide),
.woocommerce .up-sells.products ul.products li.product:not(.swiper-slide),
.woocommerce .cross-sells ul.products li.product:not(.swiper-slide) {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
}

/* Forzar la estructura flexbox en related products (igual que en el loop principal) */
.woocommerce .related.products ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
}

/* Ocultar el título duplicado de Kadence (si existe) */
.woocommerce .related.products ul.products li.product .product-details .woocommerce-loop-product__title {
    display: none !important;
}

/* Corregir el espaciado del título y precio en related products */
.woocommerce .related.products ul.products li.product .acodesign-title-link .woocommerce-loop-product__title {
    margin: 12px 10px 0 10px !important;
}

.woocommerce .related.products ul.products li.product .price {
    margin: 3px 10px 5px 10px !important;
}

/* Star Rating Alignment & Spacing */
html body ul.products li.product .star-rating {
    margin-top: 0px !important;
    margin-bottom: 10px !important;
    margin-left: var(--acd-star-margin-left, 10px) !important;
    margin-right: var(--acd-star-margin-right, auto) !important;
    font-size: 13px !important;
    display: inline-block !important;
    float: none !important;
}

@media (min-width: 992px) {
    /* Contenedor relativo para posicionamiento absoluto */
    html body ul.products li.product.aco-style-2 {
        position: relative !important;
    }
    html body ul.products li.product.aco-style-2 .astra-shop-summary-wrap,
    html body ul.products li.product.aco-style-2 .nv-card-content-wrapper,
    html body ul.products li.product.aco-style-2 .product-details,
    html body ul.products li.product.aco-style-2 .product-info-wrap {
        position: relative !important;
        z-index: 20 !important;
    }

    /* Ubicar el formulario de variaciones sobre la imagen */
    html body ul.products li.product.aco-style-2 .cfvsw_variations_form {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: translateY(8px) !important;
        width: 100% !important;
        max-width: 100% !important;
        background: #ffffff !important;
        border-radius: 0 !important;
        padding: 6px 10px !important;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05) !important;
        z-index: 99999 !important;
        display: flex !important;
        justify-content: flex-start !important;
        align-items: center !important;
        pointer-events: auto !important;
        box-sizing: border-box !important;
        
        /* Animación suave de aparición y traslación */
        opacity: 0 !important;
        visibility: hidden !important;
        transition: opacity 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    visibility 0.25s !important;
    }

    /* Contenedor interno de swatches */
    html body ul.products li.product.aco-style-2 .cfvsw_variations_form .cfvsw-swatches-container.cfvsw-shop-container {
        margin: 0 !important;
        padding: 0 !important;
        justify-content: flex-start !important;
        min-height: auto !important;
        flex-wrap: nowrap !important;
        display: flex !important;
        grid-gap: 6px !important;
    }

    /* Ajuste de las opciones/botones individuales de swatch dentro de la imagen */
    html body ul.products li.product.aco-style-2 .cfvsw_variations_form .cfvsw-swatches-option {
        width: 18px !important;
        height: 18px !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        transition: border-color 0.2s ease, transform 0.2s ease !important;
        pointer-events: auto !important;
    }
    
    html body ul.products li.product.aco-style-2 .cfvsw_variations_form .cfvsw-swatches-option:hover,
    html body ul.products li.product.aco-style-2 .cfvsw_variations_form .cfvsw-swatches-option.cfvsw-selected-swatch {
        transform: scale(1.1) !important;
        border-color: #131728 !important;
    }

    /* Burbuja de "+X" en Estilo 2 */
    html body ul.products li.product.aco-style-2 .cfvsw_variations_form .acodesign-more-count {
        width: 20px !important;
        height: 20px !important;
        font-size: 10px !important;
        margin-left: 2px !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        background-color: rgba(240, 240, 240, 0.9) !important;
    }

    /* Mostrar al hacer hover */
    html body ul.products li.product.aco-style-2:hover .cfvsw_variations_form {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }

    /* Ocultar el botón grande de añadir al carrito que se monta sobre las variaciones */
    html body ul.products li.product.aco-style-2 .acodesign-image-wrapper > a.button {
        display: none !important;
    }

    /* Estilar el botón flotante del carrito en el Estilo 2 */
    html body ul.products li.product.aco-style-2 .acodesign-floating-icons-wrapper .acodesign-floating-cart-wrapper {
        display: block !important;
    }
    
    html body ul.products li.product.aco-style-2 .acodesign-floating-icons-wrapper .acodesign-floating-cart-wrapper a.button {
        position: relative !important;
        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;
        box-shadow: none !important; 
        font-size: 0 !important; line-height: 0 !important; color: transparent !important;
        border: none !important; margin: 0 !important; padding: 0 !important;
        transition: background-color 0.3s ease !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: 18px !important;
        top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
        opacity: 1 !important; transform: none !important;
        box-sizing: border-box !important;
        text-indent: -9999px !important; 
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        cursor: pointer !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='M5 21V9a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v12a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1z'/%3E%3Cpath d='M10 7V5a2 2 0 0 1 4 0v2'/%3E%3C/svg%3E") !important;
    }
    
    html body ul.products li.product.aco-style-2 .acodesign-floating-icons-wrapper .acodesign-floating-cart-wrapper a.button: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%3Cpath d='M5 21V9a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v12a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1z'/%3E%3Cpath d='M10 7V5a2 2 0 0 1 4 0v2'/%3E%3C/svg%3E") !important;
    }

    /* Opcion 3 UX: Botón desactivado por defecto en productos variables Estilo 2 */
    html body ul.products li.product.aco-style-2.product-type-variable .acodesign-floating-icons-wrapper .acodesign-floating-cart-wrapper a.button:not(.cfvsw_variation_found) {
        opacity: 0.5 !important;
        cursor: not-allowed !important;
    }
    html body ul.products li.product.aco-style-2.product-type-variable .acodesign-floating-icons-wrapper .acodesign-floating-cart-wrapper a.button:not(.cfvsw_variation_found):hover {
        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%3Cpath d='M5 21V9a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v12a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1z'/%3E%3Cpath d='M10 7V5a2 2 0 0 1 4 0v2'/%3E%3C/svg%3E") !important;
    }

    html body ul.products li.product.aco-style-2 .acodesign-floating-icons-wrapper .acodesign-floating-cart-wrapper a.button.loading {
        opacity: 0.6 !important;
    }
}

/* Ocultar el botón flotante del carrito en pantallas móviles/tablets */
@media (max-width: 991px) {
    html body ul.products li.product .acodesign-floating-icons-wrapper .acodesign-floating-cart-wrapper {
        display: none !important;
    }
}

