/* 产品列表布局修复 - 强制3列显示 */

/* 产品列表容器 */
.wp-product_list_content .product_list > ul,
.wp-product_list_content .tb_product_list > ul {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 20px !important;
}

/* 产品列表项 - 3列布局 */
.wp-product_list_content .product_list > ul > li,
.wp-product_list_content .tb_product_list > ul > li {
    width: calc(33.333% - 14px) !important;
    float: none !important;
    margin-right: 0 !important;
    margin-bottom: 20px !important;
    box-sizing: border-box !important;
}

/* 清除每行第4个元素的右边距（如果有的话） */
.wp-product_list_content .product_list > ul > li:nth-child(3n),
.wp-product_list_content .tb_product_list > ul > li:nth-child(3n) {
    margin-right: 0 !important;
}

/* 响应式：移动端改为1列 */
@media (max-width: 768px) {
    .wp-product_list_content .product_list > ul > li,
    .wp-product_list_content .tb_product_list > ul > li {
        width: 100% !important;
    }
}

/* 响应式：平板改为2列 */
@media (min-width: 769px) and (max-width: 1024px) {
    .wp-product_list_content .product_list > ul > li,
    .wp-product_list_content .tb_product_list > ul > li {
        width: calc(50% - 10px) !important;
    }
    
    .wp-product_list_content .product_list > ul > li:nth-child(3n),
    .wp-product_list_content .tb_product_list > ul > li:nth-child(3n) {
        margin-right: 20px !important;
    }
    
    .wp-product_list_content .product_list > ul > li:nth-child(2n),
    .wp-product_list_content .tb_product_list > ul > li:nth-child(2n) {
        margin-right: 0 !important;
    }
}
