/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/
/* 子主题 style.css - 使用更具体的选择器 */
/* 网格背景样式 */

/* ===== YKMotos country/currency selector styles live in my_functions/ykmotos-country-currency-selector.php ===== */

/* ===== 产品列表（网格+列表模式）：强制1:1正方形，contain居中 ===== */
.wd-products .wd-loop-prod-thumb,
.wd-products .wd-product-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}
.wd-products .wd-loop-prod-thumb .wd-product-img-link,
.wd-products .wd-product-thumb .wd-product-img-link {
    display: block;
    width: 100%;
    height: 100%;
}
.wd-products .wd-loop-prod-thumb .wd-product-img-link img,
.wd-products .wd-product-thumb .wd-product-img-link img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background-color: white; /* 背景色，可调整 浅灰#f5f5f5 */
    display: block;
}
/* ======================================================================*/
/* ======================================================================*/
/* Single product page - quantity + buttons in one full row */
.single-product .summary-inner form.cart {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
}

/* Quantity keeps normal small width */
.single-product .summary-inner form.cart .quantity {
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
}

/* Add to Cart and Buy Now share the remaining space */
.single-product .summary-inner form.cart .single_add_to_cart_button,
.single-product .summary-inner form.cart .wd-buy-now-btn {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    white-space: nowrap !important;
}