.wp-block-woocommerce-product-template {
    grid-gap: 30px 13px;

    .wc-block-components-product-image,
    .wp-block-woocommerce-product-price,
    .wp-block-button.wc-block-components-product-button {
        margin: 0;
    }

    .wc-block-components-product-image__inner-container {
        padding: 0;
    }

    /* Wishlist Button: Positioned at Top Right */
    .wc-block-components-product-image button.yith-wcwl-add-to-wishlist-button.yith-wcwl-add-to-wishlist-button--icon-button {
        position: absolute;
        top: -28px;
        right: 0;
        z-index: 10;
        width: fit-content;
        margin: 0;
        background: transparent;
        border: none;
        margin-left: auto;
        padding: 0;

        .yith-wcwl-add-to-wishlist-button-icon {
            width: 17px;
            height: 17px;
            transition: transform 0.2s;

            &:hover {
            transform: scale(1.1);
            }
        }
    }

     /* Category: Truncated to 1 line */
    .taxonomy-product_cat {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }

     /* Product Image Container */
    .wc-block-components-product-image {
        margin-top: 10px;

        img {
            aspect-ratio: 1 / 1;
        }
    }

    /* Product Title: Truncated to 2 lines */
    .wp-block-post-title {
        margin: 10px 0;
        color: var(--wp--preset--color--contrast);
        font-size: 15px;
        font-weight: 500;
        line-height: 24px;
        text-align: left;
        text-decoration: none;
        text-underline-offset: 4px;
    }

    .wp-block-post-title,
    .wp-block-post-title a {
        display: -webkit-box;
        overflow: hidden;
        min-height: 48px;
        text-overflow: ellipsis;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

     /* Price Section Styling */
    .wp-block-woocommerce-product-price .wc-block-components-product-price {
        font-size: 17px;
        font-weight: 700;
        line-height: 28px;
    }

    /* Add to Cart Button */
    .wp-block-button.wc-block-components-product-button {
        .wp-block-button__link {
            width: 100%;
        }
    }

    .added_to_cart {
        margin-top: 0;
    }

    /* The li element */
    .wc-block-product {
        position: relative;

        > .wp-block-group {
            padding: 20px;
            background: var(--white, #FFF);
            border: 1px solid var(--wp--preset--color--white);
            border-radius: 8px;
        }

        &:hover {
            > .wp-block-group {
                border: 1px solid var(--Border, #EAEAEA);
                box-shadow: 0 6px 15px 0 rgba(64, 79, 104, 0.05);
                border-bottom-left-radius: 0;
                border-bottom-right-radius: 0;
                border-bottom: 0;
                z-index: 999;
            }

            .wp-block-post-title,
            .wp-block-post-title a {
                color: var(--wp--preset--color--info);
                text-decoration: underline;
            }
        }
    }

    .wc-block-product > .wp-block-group > .wp-block-group:last-child {
        margin-top: 0;
        opacity: 0;
        position: absolute;
        transition: all .1s ease-in-out;
        left: -1px;
        right: -1px;
        padding: 0 20px 20px 20px;
        background: var(--white, #FFF);
        border-color: transparent;
    }

    .wc-block-product:hover > .wp-block-group > .wp-block-group:last-child {
        margin-top: 20px;
        opacity: 1;
        display: grid;
        border: 1px solid var(--Border, #EAEAEA);
        box-shadow: 0 6px 15px 0 rgba(64, 79, 104, 0.05);
        border-radius: 8px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-top: 0;
    }
}
