/*
Theme Name:   xstore-child
Theme URI:    https://xstore.8theme.com
Description:  XStore is a multi-purpose theme that offers the ultimate WordPress and WooCommerce synergy, providing a comprehensive, all-in-one solution.
Author:       8theme
Author URI:   https://www.8theme.com
Template:     xstore
Version:      1.0
Text Domain:  xstore-child
Tags: e-commerce, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, custom-logo, featured-images, full-width-template, threaded-comments, accessibility-ready, rtl-language-support, footer-widgets, sticky-post, theme-options, translation-ready, ecommerce, woocommerce, shop, elementor, business, corporate, blog, news, light, dark
*/
/* ============================================
   FIX: Immagini prodotto con aspect ratio diverso
   Applicato SOLO alla pagina Shop (archivio prodotti)
   Aggiunto: 2024-12-10
   ============================================ */

/* Pagina Shop - Archivio prodotti */
.post-type-archive-product .product-image-wrapper img.attachment-woocommerce_thumbnail,
.woocommerce-shop .product-image-wrapper img.attachment-woocommerce_thumbnail {
    object-fit: contain !important;
    object-position: center center;
    background-color: #fff; /* sfondo bianco per immagini con ratio diverso */
}

/* Mantiene l'altezza fissa del contenitore per uniformità griglia */
.post-type-archive-product .product-image-wrapper,
.woocommerce-shop .product-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 296px; /* altezza standard thumbnail WooCommerce (247*6/5) */
}

/* Pagine categoria prodotti */
.tax-product_cat .product-image-wrapper img.attachment-woocommerce_thumbnail {
    object-fit: contain !important;
    object-position: center center;
    background-color: #fff;
}

.tax-product_cat .product-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 296px;
}

/* FIX 2025-12-10: Update selectors for image aspect ratio */
.product-content-image img,
.product-content-image picture img,
.image-swap img,
.woocommerce-loop-product__link img {
    object-fit: contain !important;
    height: auto !important;
    width: 100% !important;
    max-height: 296px;
}

.product-content-image,
.image-swap {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
}
