/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* (Panos Nieris - Origilab) Make product thumbnails contain and center the image */
.products.wd-products .wd-product .wd-loop-prod-thumb {
    width: 100%;
    height: 250px;
    overflow: hidden;
    box-sizing: border-box;
    background: #fff;
}

/* Main image link */
.products.wd-products .wd-product .wd-product-img-link {
    width: 100%;
    height: 100%;
    display: flex !important;
    justify-content: center;
    align-items: center;
}

/* Main product image */
.products.wd-products .wd-product .wd-product-img-link img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
    margin: auto;
}

/* Hover image container */
.products.wd-products .wd-product .wd-product-img-hover {
    width: 100%;
    height: 100%;
    display: flex !important;
    justify-content: center;
    align-items: center;
}

/* Hover image */
.products.wd-products .wd-product .wd-product-img-hover img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
    margin: auto;
}

/* Mobile */
@media (max-width: 767px) {
    .products.wd-products .wd-product .wd-loop-prod-thumb {
        height: 180px;
    }
}


/* (Panos Nieris - Origilab) Product page gallery - contain and center image */
.single-product .wd-single-gallery .wd-gallery-images {
    width: 100%;
}

.single-product .wd-single-gallery .wd-gallery-images .woocommerce-product-gallery__wrapper,
.single-product .wd-single-gallery .wd-gallery-images .wd-carousel-wrap,
.single-product .wd-single-gallery .wd-gallery-images .wd-carousel-item {
    height: 420px !important;
}

.single-product .wd-single-gallery .wd-gallery-images .woocommerce-product-gallery__image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid lightgray;
    border-radius: 15px !important;
    box-sizing: border-box;
    background: #fff;
}

.single-product .wd-single-gallery .wd-gallery-images .woocommerce-product-gallery__image a {
    width: 100%;
    height: 100%;
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.single-product .wd-single-gallery .wd-gallery-images .woocommerce-product-gallery__image img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
    margin: auto;
}

@media (max-width: 1024px) {
    .single-product .wd-single-gallery .wd-gallery-images .woocommerce-product-gallery__wrapper,
    .single-product .wd-single-gallery .wd-gallery-images .wd-carousel-wrap,
    .single-product .wd-single-gallery .wd-gallery-images .wd-carousel-item {
        height: 340px !important;
    }
}

@media (max-width: 767px) {
    .single-product .wd-single-gallery .wd-gallery-images .woocommerce-product-gallery__wrapper,
    .single-product .wd-single-gallery .wd-gallery-images .wd-carousel-wrap,
    .single-product .wd-single-gallery .wd-gallery-images .wd-carousel-item {
        height: 260px !important;
    }
}

/* (Panos) Product page gallery thumbnails - equal height */
.single-product .wd-single-gallery .wd-gallery-thumb .wd-carousel-wrap {
    height: 100px !important;
}

.single-product .wd-single-gallery .wd-gallery-thumb .wd-carousel-item {
    height: 100px !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
    background: #fff;
}

.single-product .wd-single-gallery .wd-gallery-thumb .wd-carousel-item img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
    margin: auto;
}