/*
Theme Name: best456
Theme URI: https://example.com/best456-theme
Author: Your Name
Author URI: https://example.com/
Description: 一个为 best456 网站定制的现代、兼容 WooCommerce 的主题框架。
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: best456
Tags: custom-background, post-thumbnails, title-tag, woocommerce, block-styles, editor-style

This theme, like WordPress, is licensed under the GPL.
*/

/* * 您的主要 CSS 样式写在这里。
 * functions.php 中的代码会自动加载这个文件。
 */

/* 示例：全局内容宽度 */
body .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}


/* ========================================
页脚样式 (Footer Styles)
========================================
*/
.site-footer {
    background-color: #5a5a5a; /* 统一的背景色 */
    font-size: 14px;
}

.footer-widgets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-widget {
    flex: 1;
    min-width: 220px; /* 确保在小屏幕上不会过度压缩 */
}

.footer-widget .widget-title {
    font-size: 18px;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 20px;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    margin-bottom: 12px;
}

.footer-widget ul li a {
    color: #f0f0f0;
    text-decoration: none;
}

.footer-widget ul li a:hover {
    text-decoration: underline;
}

.footer-widget p {
    color: #f0f0f0;
    margin-top: 0;
    margin-bottom: 15px;
}

/* 订阅表单 */
.footer-subscribe-form {
    display: flex;
    background-color: #fff;
    border: 1px solid #ccc;
    max-width: 350px;
}

.footer-subscribe-form input[type="email"] {
    flex: 1;
    border: none;
    padding: 10px;
    font-size: 14px;
    min-width: 100px;
    background: transparent;
}

.footer-subscribe-form button[type="submit"] {
    background-color: #d90429; /* 红色按钮 */
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
}

.footer-account-links {
    margin-top: 20px;
}
.footer-account-links p {
    margin-bottom: 5px;
}
.footer-account-links a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}
.footer-account-links a:hover {
    text-decoration: underline;
}

/* 底部栏 */
.footer-bottom-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-copyright {
    font-size: 13px;
    color: #cccccc;
}

.footer-copyright a {
    color: #ffffff;
    text-decoration: none;
}
.footer-copyright a:hover {
    text-decoration: underline;
}

.footer-payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.footer-payment-icons img {
    height: 30px;
    width: auto;
    background-color: white; /* 模拟白色背景 */
    border-radius: 4px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .footer-widgets-grid {
        flex-direction: column; /* 在小屏幕上垂直堆叠 */
    }
    
    .footer-bottom-flex {
        flex-direction: column; /* 底部栏也垂直堆叠 */
        text-align: center;
    }

    .footer-payment-icons {
        justify-content: center;
    }
    h3.truncate{
        white-space: normal !important;
        font-size: 13px !important;
    }
    h1.product_title{
        font-size: 21px;
        font-weight: bold;
    }
    #reviews #comments{
        padding-left:15px;
    }
    #closeSearchButton{
        top: 4rem !important;
    }
    #post-7 h1.entry-title{
        font-size: 36px;
        text-align: center;
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
    #post-2003 h1.entry-title{
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
    .pc-product-mtop{
        margin-top: 0rem !important;
    }
    
}
#searchInput{
    padding: 8px !important;
}
#searchBar{
    padding-top: 20px !important;
}
#post-7 h1.entry-title{
    font-size: 36px;
    text-align: center;
    padding-top: 50px;
    padding-bottom: 50px;
}
#post-7 .wc-block-cart__submit-button{
    background: #4a4a4a;
    border-radius: 6px;
    color: #FFF;
}
#post-2003 h1.entry-title{
    font-size: 36px;
    text-align: center;
    padding-top: 50px;
    padding-bottom: 50px;
}

/* 隐藏默认 select */
.cfvsw-hidden-select {
    display: none !important;
}

/* 每个 variation 属性占完整一行 */
table.variations tr {
    display: block;
    margin-bottom: 20px;
}

/* 属性名称单独显示一行 */
table.variations th.label {
    display: block;
    margin-bottom: 8px;
    text-align: left;
}

table.variations th.label label {
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

/* 右侧 value 区域占满整行 */
table.variations td.value {
    display: block;
}

/* Swatches 外层容器 */
.cfvsw-swatches-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;  /* swatch 之间的间距 */
}

/* 每个选项的样式 */
.cfvsw-swatches-option {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    line-height: 1;
}

/* hover 效果 */
.cfvsw-swatches-option:hover {
    border-color: #ff4d4f;
    color: #ff4d4f;
}

/* 选中状态（插件会加上 .cfvsw-selected） */
.cfvsw-swatches-option.cfvsw-selected {
    background: #ff4d4f;
    color: #fff;
    border-color: #ff4d4f;
}

/* swatch 文本 */
.cfvsw-swatch-inner {
    white-space: nowrap;
}

/* 清除按钮隐藏（你不需要它） */
.reset_variations {
    display: none !important;
}

#tab-title-additional_information {
    display: none;
}
/* ========== 1. 基础布局：让 related products 变成网格 ========== */

/* 外层容器 */
.related.products {
    margin-top: 40px;
}

/* 标题 */
.related.products > h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #111827;
}

/* ul.products 网格布局 */
.related.products ul.products {
    list-style: none;
    margin: 0;
    padding: 0;
    
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));  /* 手机：2 列 */
    gap: 16px;
}

/* 桌面端：4 列 */
@media (min-width: 768px) {
    .related.products ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }
    #page .entry-content{
        max-width: none !important;
    }
    h3.truncate{
        white-space: normal !important;
        font-size: 13px !important;
    }
    h1.product_title{
        font-size: 21px;
        font-weight: bold;
    }
    .pdleft0{
        padding-left: 0 !important;
    }
    .pcpadding{
        padding: 0.55rem !important;
    }
    .pcmargin10{
        margin-top:10px !important;
    }
    .pc-product-mtop{
        margin-top: 1rem !important;
    }
}
#alg_currency_selector{
    position: fixed;
    bottom: 0vh;
    display: flex;
}
/* 去掉 WooCommerce 内联 width / float 影响 */
.related.products ul.products li.product {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
}

/* ========== 2. 单个产品卡片样式 ========== */

.related.products ul.products li.product {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* 产品链接块 */
.related.products ul.products li.product a.woocommerce-LoopProduct-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* 产品图片 */
.related.products ul.products li.product img {
    width: 100%;
    height: auto;
    display: block;
}

/* 产品标题 */
.related.products ul.products li.product h2.woocommerce-loop-product__title {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin: 10px 12px 4px;
    line-height: 1.4;
}

/* 价格 */
.related.products ul.products li.product .price {
    display: block;
    margin: 0 12px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #dc2626;
}

.related.products ul.products li.product .price del {
    color: #9ca3af;
    margin-right: 6px;
    font-weight: 400;
    font-size: 12px;
}

.related.products ul.products li.product .price ins {
    text-decoration: none;
}

/* Sale 标 */
.related.products ul.products li.product .onsale {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 999px;
    z-index: 2;
}

/* ========== 3. Add to cart 按钮 ========== */

.related.products ul.products li.product a.button {
    display: none;
    margin: 0 12px 12px;
    padding: 8px 0;
    text-align: center;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.1s ease;
}

.related.products ul.products li.product a.button:hover {
    background: #ef4444;
    transform: translateY(-1px);
}

/* 手机端稍微减小间距 */
@media (max-width: 480px) {
    .related.products ul.products li.product h2.woocommerce-loop-product__title {
        font-size: 13px;
        margin: 8px 10px 4px;
    }
    
    .related.products ul.products li.product .price {
        margin: 0 10px 10px;
    }
    
    .related.products ul.products li.product a.button {
        margin: 0 10px 10px;
    }
}
/* 整个 Reviews 面板外观 */
.woocommerce-Tabs-panel--reviews {
    background: #f9fafb;
    padding: 24px 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-top: 24px;
}

/* 内部容器宽度居中一点，看起来不那么宽 */
.woocommerce-Reviews {
    max-width: 720px;
    margin: 0 auto;
}

/* 标题：Reviews */
.woocommerce-Reviews-title,
#reply-title.comment-reply-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

/* “There are no reviews yet.” 提示 */
.woocommerce-noreviews {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}
/* 星星容器 */
.comment-form-rating p.stars {
    margin: 4px 0 0;
}

/* 一行横向排列 */
.comment-form-rating p.stars span {
    display: inline-flex;
    gap: 4px;
}

/* 每个星星按钮基础外观 */
.comment-form-rating p.stars a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    cursor: pointer;
    text-indent: -9999px; /* 隐藏“1 of 5 stars”文字 */
    overflow: hidden;
}

/* 用伪元素绘制 ★ */
.comment-form-rating p.stars a::before {
    content: "★";
    text-indent: 0;
    color: #d1d5db;
    font-size: 16px;
}

/* hover 高亮当前星 */
.comment-form-rating p.stars a:hover::before {
    color: #f59e0b;
}

/* 已选中的星（Woo 会给 active / selected 类） */
.comment-form-rating p.stars a.active::before,
.comment-form-rating p.stars.selected a::before {
    color: #f59e0b;
}

/* 鼠标悬停时边框也高亮 */
.comment-form-rating p.stars a:hover {
    border-color: #f59e0b;
}

/* 隐藏下拉 rating（已经有星星了） */
#commentform select#rating {
    display: none !important;
}
@media (max-width: 480px) {
    .woocommerce-Tabs-panel--reviews {
        padding: 18px 14px;
    }
    #respond.comment-respond {
        padding: 16px 14px;
    }
}
.comment-form-comment #comment{
    width: 100%;
}
.product_meta .posted_in{
    display: none !important;
}
/* 评论提交按钮美化 */
#commentform .form-submit input#submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 26px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px;

    color: #ffffff;
    background: linear-gradient(90deg, #111827, #1f2937);

    border: none;
    cursor: pointer;
    transition: 
        background 0.25s ease,
        transform 0.15s ease,
        box-shadow 0.25s ease;
}

/* hover 效果：变红、轻微抬起、阴影 */
#commentform .form-submit input#submit:hover {
    background: linear-gradient(90deg, #dc2626, #ef4444);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.25);
}

/* 点击效果：按下去一点 */
#commentform .form-submit input#submit:active {
    transform: translateY(0);
    box-shadow: none;
}

/* 禁用状态（如果 Woo 启动验证） */
#commentform .form-submit input#submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* 单个产品页 related products 区域隐藏“加入购物车”按钮 */
.single-product .related ul.products li.product .button,
.single-product .related ul.products li.product .add_to_cart_button {
    display: none !important;
}
/*联系我们 输入框显示border*/
.srfm-block-single input,.srfm-block-single textarea{
    border :1px solid #CCC !important
}

