/* ==========================================
   SWS - WOOCOMMERCE PRODUCT CARD HOVER EFFECTS
   Elementor Pro WooCommerce Products Widget
   ========================================== */

/* Image frame */
.elementor-widget-woocommerce-products
li.product .sws-product-image-frame {
    display: block;
    position: relative;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    border-radius: 8px 8px 0 0;
}

/* Primary product image */
.elementor-widget-woocommerce-products
li.product img.sws-product-main-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 1;
    transform: scale(1);
    transform-origin: center center;
    transition:
        transform 0.4s ease-in-out,
        opacity 0.3s ease-in-out;
}

/* Secondary gallery image */
.elementor-widget-woocommerce-products
li.product img.sws-product-hover-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: scale(1);
    transform-origin: center center;
    z-index: 2;
    pointer-events: none;
    transition:
        transform 0.4s ease-in-out,
        opacity 0.3s ease-in-out;
}

/* ==========================================
   IMAGE ZOOM + IMAGE SWAP
   ========================================== */

@media (hover: hover) and (pointer: fine) {

    /* Slight zoom when hovering over a product card */
    /*.elementor-widget-woocommerce-products*/
    /*li.product:hover .sws-product-image-frame img {*/
    /*    transform: scale(1.06);*/
    /*}*/

    /* Fade in the second product image */
    .elementor-widget-woocommerce-products
    li.product.sws-has-hover-image:hover
    img.sws-product-hover-image {
        opacity: 1;
    }

    /* Fade out the primary image */
    .elementor-widget-woocommerce-products
    li.product.sws-has-hover-image:hover
    img.sws-product-main-image {
        opacity: 0;
    }
}

/* ==========================================
   PRODUCT TITLE - ANIMATED UNDERLINE
   ========================================== */

/* Base title styling */
/*.elementor-widget-woocommerce-products*/
/*li.product .woocommerce-loop-product__title {*/
/*    text-decoration: none !important;*/
/*}*/
body .elementor-widget-woocommerce-products
li.product a.woocommerce-LoopProduct-link,
body .elementor-widget-woocommerce-products
li.product a.woocommerce-LoopProduct-link:hover,
body .elementor-widget-woocommerce-products
li.product a.woocommerce-LoopProduct-link:focus,
body .elementor-widget-woocommerce-products
li.product a.woocommerce-LoopProduct-link .woocommerce-loop-product__title,
body .elementor-widget-woocommerce-products
li.product:hover a.woocommerce-LoopProduct-link .woocommerce-loop-product__title {
    text-decoration: none !important;
    background-image: none !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

/* Prepare the title for underline animation */
/*.elementor-widget-woocommerce-products*/
/*li.product a.woocommerce-LoopProduct-link*/
/*.woocommerce-loop-product__title {*/
/*    text-decoration: none !important;*/
/*    text-decoration-color: transparent;*/
/*    text-decoration-thickness: 1px;*/
/*    text-underline-offset: 4px;*/
/*    background-image: linear-gradient(*/
/*        currentColor,*/
/*        currentColor*/
/*    );*/
/*    background-repeat: no-repeat;*/
/*    background-position: left bottom;*/
/*    background-size: 0% 1px;*/
/*    transition: background-size 0.35s ease-in-out;*/
/*}*/

/* Animate underline from left to right */
/*@media (hover: hover) and (pointer: fine) {*/

/*    .elementor-widget-woocommerce-products*/
/*    li.product:hover a.woocommerce-LoopProduct-link*/
/*    .woocommerce-loop-product__title {*/
/*        background-size: 100% 1px;*/
/*    }*/
/*}*/

/* ==========================================
   ACCESSIBILITY
   ========================================== */

@media (prefers-reduced-motion: reduce) {

    .elementor-widget-woocommerce-products
    li.product .sws-product-image-frame img,

    .elementor-widget-woocommerce-products
    li.product .woocommerce-loop-product__title {
        transition: none !important;
    }
}
