/*
Theme Name: Twenty Twenty-Five Child
Theme URI: 
Author: the balebo team
Author URI: http://balebo.com/
Description: 这是2025父主题的子主题
Version: 1.0.0
License: GNU General Public License v2 or later
Template:twentytwentyfive
Text Domain: twentytwentyfive
*/

/* 引入父主题的样式（必需） */
@import url("../twentytwentyfive/style.css");

/* ================= WooCommerce 产品样式自定义 ================= */

/* 产品主图加圆角和边框 */
.wc-block-components-product-image img{
	border-radius: 10px;
    border-bottom: 1px solid #e0e0e0;
}

/* 加入购物车按钮 */
.wc-block-components-product-button__button{
	border-radius: 30px;
	background-color: #14ac70;
	color:#ffffff;
}

/* 瀑布流布局 css*/
/* 桌面端三列 */
ul.products,
.wc-block-product-template {
    position: relative;
	margin: 0 auto;           /* 居中容器 */	
}

ul.products li.product,
.wc-block-product-template .wc-block-product {
    width: calc(33.333% - 11px);   /* 三列，减去间距 */
    margin-bottom: 16px;
    float: none;                    /* 取消浮动，由 Masonry 接管 */
}

/* 产品li */
li.wc-block-product {
	background-color:#ffffff;
	border-radius: 10px;
}

/* 瀑布流布局 css*/
/* 平板端两列 */
@media (max-width: 768px) {
    ul.products li.product,
    .wc-block-product-template .wc-block-product {
        width: calc(50% - 8px);
    }
}

/* 瀑布流布局 css*/
/* 手机端两列 */
@media (max-width: 600px) {
    ul.products li.product,
    .wc-block-product-template .wc-block-product {
        width: calc(50% - 8px) !important;
    }
}

/* 通用兜底：隐藏所有可能的销售（促销、优惠）标签 */
.onsale,
.wc-block-product-badge,
.wc-block-grid__product-onsale,
[class*="product-badge"],
[class*="sale-badge"],
span:has(+ .price del) {
    display: none !important;
}

/* 经典产品循环中的价格 */
.woocommerce ul.products li.product .price {
    //color: #000000 !important;
}

/* WooCommerce 块中的价格 */
.wc-block-product .wc-block-product__price,
.wc-block-product-price {
    //color: #e60000 !important;
}

/* 价格里的具体金额 */
.woocommerce-Price-amount,
.wc-block-product-price .wc-block-product-price__value {
    //color: #e60000 ;
}

/* 产品详情页的价格 */
.single-product .summary .price {
    //color: #e60000 !important;
}

/* 优惠价（如果有） */
.price ins .woocommerce-Price-amount,
.price del .woocommerce-Price-amount {
    //color: #e60000 !important;
}

/* 标题内的链接也需要同样处理 */
.wc-block-product-template .wc-block-product .wp-block-post-title a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* 隐藏所有可能的分页组件 */
.woocommerce-pagination,
.wc-block-pagination,
.wp-block-query-pagination,
nav.woocommerce-pagination,
.wc-block-product-template + nav,
.wp-block-query nav {
    display: none !important;
}


/* ========== 产品图片按原比例显示 ========== */
/* 覆盖 img 内联的 object-fit:cover */
.wc-block-components-product-image img,
.wc-block-grid__product-image img,
.wp-block-woocommerce-product-image img {
    object-fit: contain !important;
    width: 100% !important;
    height: auto !important;
}

/* 移除外层容器的限制 */
.wc-block-components-product-image,
.wc-block-grid__product-image {
    aspect-ratio: unset !important;
    height: auto !important;
    overflow: visible !important;
}

/* 让整个价格容器左对齐，并确保内部元素横向排列 */
.price {
    //display: flex;
    //align-items: baseline;
    //justify-content: flex-start; /* 左对齐 */
    //gap: 0.5em; /* 两个价格之间的间距，可自行调整 */
    //flex-wrap: wrap;
	//margin-left:6px;
}


/* 促销价样式（<ins> 内） */
.price ins {
	color:#c00;
    text-decoration: none;  /* 移除默认下划线 */
    font-size: 1.2em;       /* 促销价稍大，可改成 1.3em 等 */
    font-weight: bold;      /* 可选：加粗 */
    order: 0;               /* 保证在前 */
}

/* 原价划线样式（<del> 内） */
.price del {
    color: #000;            /* 黑色，也可用 #333 等 */
    font-size: 0.6em;       /* 比促销价小 */
    text-decoration: line-through;
    opacity: 1;             /* 防止主题降低不透明度 */
    order: 1;
}




