/* WPCode 71017 — CT Green Product Image Background (for white designs) */
/*
 * CLASSIC TRANSFERS
 * Green product image background
 *
 * Products tagged: image-bg-green
 * Background: #017a50
 */

/* PRODUCT CATEGORY / ARCHIVE CARDS */
.woocommerce.archive li.product_tag-image-bg-green .wc-block-components-product-image,
.woocommerce.archive li.product_tag-image-bg-green .wc-block-grid__product-image,
.woocommerce.archive li.product_tag-image-bg-green .wp-block-woocommerce-product-image,

.woocommerce.archive .product_tag-image-bg-green .wc-block-components-product-image,
.woocommerce.archive .product_tag-image-bg-green .wc-block-grid__product-image,
.woocommerce.archive .product_tag-image-bg-green .wp-block-woocommerce-product-image {
    background-color: #017a50 !important;
}


/* Make the link inside the image area transparent
   so the green parent background shows through */
.woocommerce.archive .product_tag-image-bg-green .wc-block-components-product-image > a,
.woocommerce.archive .product_tag-image-bg-green .wc-block-grid__product-image > a,
.woocommerce.archive .product_tag-image-bg-green .wp-block-woocommerce-product-image > a {
    background: transparent !important;
}


/* Keep the image itself transparent */
.woocommerce.archive .product_tag-image-bg-green img {
    background: transparent !important;
}
/* =========================================================
 * CART - GREEN PRODUCT IMAGES
 * Products tagged: image-bg-green
 * ========================================================= */

body.woocommerce-cart
tr.product_tag-image-bg-green
td.product-thumbnail a {
    display: inline-block !important;
    background: #017a50 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    line-height: 0 !important;
}

body.woocommerce-cart
tr.product_tag-image-bg-green
td.product-thumbnail img {
    background: transparent !important;
    display: block !important;
}
/* =========================================================
 * SINGLE PRODUCT PAGE
 * Green background for products tagged: image-bg-green
 * ========================================================= */

body.single-product.product_tag-image-bg-green
.woocommerce-product-gallery,

body.single-product.product_tag-image-bg-green
.woocommerce-product-gallery__wrapper,

body.single-product.product_tag-image-bg-green
.woocommerce-product-gallery__image,

body.single-product.product_tag-image-bg-green
.woocommerce-product-gallery__image > a {
    background-color: #017a50 !important;
}


/* Protected WebP itself stays transparent */
body.single-product.product_tag-image-bg-green
.woocommerce-product-gallery img {
    background: transparent !important;
}


/* =========================================================
 * GREEN CARD FINISHING
 * ========================================================= */

/* Match the rounded top corners of the normal product cards */
.woocommerce.archive .product_tag-image-bg-green
.wp-block-woocommerce-product-image {
    border-radius: 10px 10px 0 0 !important;
    overflow: hidden !important;
}


/* Remove the white strip between green image and product details */
.woocommerce.archive .product_tag-image-bg-green
.wp-block-woocommerce-product-image + .wp-block-group {
    margin-top: 0 !important;
}


/* Make sure no block gap is being inserted between
   the image and details inside the product card */
.woocommerce.archive .product_tag-image-bg-green {
    row-gap: 0 !important;
    gap: 0 !important;
}


/* =========================================================
 * SINGLE PRODUCT GALLERY
 * Keep hover zoom, remove click/lightbox
 * ========================================================= */

/* Hide magnifying-glass/lightbox button */
body.single-product .woocommerce-product-gallery__trigger {
    display: none !important;
}


/* Keep the gallery window clipped */
body.single-product .woocommerce-product-gallery__image {
    overflow: hidden !important;
}


/* Green products:
   give WooCommerce's hover-zoom image the SAME green background */
body.single-product.product_tag-image-bg-green
.woocommerce-product-gallery__image .zoomImg {
    background-color: #017a50 !important;
}


/* Prevent the normal image itself introducing a white background */
body.single-product.product_tag-image-bg-green
.woocommerce-product-gallery__image img {
    background-color: transparent !important;
}
body.single-product.product_tag-image-bg-green
.woocommerce-product-gallery__image {
    background: #017a50 !important;
}

body.single-product.product_tag-image-bg-green
.woocommerce-product-gallery__image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #017a50;
    z-index: 0;
}

body.single-product.product_tag-image-bg-green
.woocommerce-product-gallery__image > a {
    position: relative;
    z-index: 1;
}
/* =========================================================
 * GREEN SINGLE PRODUCT - OUTER FRAME
 * ========================================================= */

body.single-product.product_tag-image-bg-green
.woocommerce-product-gallery {
    border: none !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    box-shadow: 0 0 0 1px #c7c7c7 !important;
}
