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

/* CSS Corrections */
/* Product page image: always square */
.single-product .woocommerce-product-gallery__image a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 30px;
    background: #fff;
    overflow: hidden;
}

/* Keep product image proportional inside the square */
.single-product .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Archive / Product grid cards: fixed square image area */
.wd-products .wd-product .wd-product-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
    padding: 24px;
}

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

.wd-products .wd-product .wd-product-img-link img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}


/* Product category carousel/grid: fixed image area */
.wd-cats .category-grid-item .wd-cat-thumb {
    width: 100%;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Category image link fills the fixed area */
.wd-cats .category-grid-item .wd-cat-image {
    width: 100%;
    height: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Keep category images proportional */
.wd-cats .category-grid-item .wd-cat-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    object-position: center;
}