/*
Theme Name: My Custom WooShop
Author: 您的名字
Description: 基于现代电商需求定制的 WooCommerce 主题。
Version: 1.0.0
Text Domain: my-custom-wooshop
*/



/* 基础设置与容器 */
.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.section-padding {
    padding: 60px 0;
}
.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title h2 {
    font-size: 28px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* 全屏横幅 */
.hero-section, .promo-banner {
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 0;
    text-align: left;
}

/* 博客新闻网格 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.news-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* 底部特征栏 */
.features-bar {
    background-color: #222;
    color: #fff;
    padding: 30px 0;
}
.features-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   WooCommerce 现代商品列表网格精细化样式（精仿效果）
   ========================================================================== */

/**
 * 1. 商品网格容器配置 (重置浮动，启用现代 Grid 布局)
 */
.woocommerce ul.products[class*="columns-"] {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* 强制 PC 端 4 列布局 */
    gap: 30px 20px !important;                       /* 卡片横向 20px，纵向 30px 间距 */
    padding: 0 !important;
    margin: 0 auto !important;
    list-style: none !important;
}

/* 移动端自适应：2列或1列 */
@media (max-width: 991px) {
    .woocommerce ul.products[class*="columns-"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 480px) {
    .woocommerce ul.products[class*="columns-"] {
        grid-template-columns: 1fr !important;
    }
}

/**
 * 2. 单个商品卡片容器样式
 */
.woocommerce ul.products li.product {
    background: #ffffff !important;
    padding: 25px 20px !important;
    border: 1px solid #f0f0f0 !important; /* 极淡的边框线 */
    text-align: center !important;         /* 核心：内部所有元素全局居中 */
    position: relative !important;         /* 为左上角标签提供定位基准 */
    margin: 0 !important;                  /* 清除 WooCommerce 默认边距 */
    width: auto !important;                /* 让宽度由 Grid 容器自动控制 */
    float: none !important;                /* 清除原生浮动 */
    
    /* 弹性盒布局，确保即使标题长短不一，底部内容依然对齐 */
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    
    /* 平滑过渡动效 */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

/* 鼠标悬停动效：微上浮 5px + 柔和高阶阴影 */
.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05) !important;
    border-color: transparent !important;
}

/**
 * 3. 商品图片排版
 */
.woocommerce ul.products li.product a {
    text-decoration: none !important;
    display: block !important;
    width: 100% !important;
}

.woocommerce ul.products li.product a img {
    max-width: 100% !important;
    height: auto !important;
    max-height: 200px !important;      /* 限制图片最大高度，保持整齐 */
    object-fit: contain !important;     /* 确保自行车或手表图片完整不裁剪 */
    margin: 0 auto 15px auto !important;/* 图片居中，且下方留出 15px 间距 */
    display: block !important;
    transition: opacity 0.3s ease !important;
}

.woocommerce ul.products li.product:hover a img {
    opacity: 0.9;                      /* 悬停时图片轻微变淡提示可点击 */
}

/**
 * 4. 左上角状态标签样式 (NEW / 打折)
 */
/* 打折标签 (WooCommerce 原生) */
.woocommerce ul.products li.product .onsale {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    right: auto !important;
    background-color: #e74c3c !important; /* 图片中的红色折扣背景 */
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 4px 8px !important;
    line-height: 1 !important;
    border-radius: 2px !important;         /* 微圆角 */
    min-height: auto !important;
    min-width: auto !important;
    margin: 0 !important;
    z-index: 2;
}

/* 新品标签 (如果你在后端添加了新产品类名 .badge-new) */
.woocommerce ul.products li.product .badge-new {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    background-color: #2ecc71 !important; /* 图片中的绿色 NEW 背景 */
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    line-height: 1 !important;
    border-radius: 2px !important;
    z-index: 2;
}

/* 右上角收藏/对比图标定位调整 */
.woocommerce ul.products li.product .yith-wcwl-add-to-wishlist,
.woocommerce ul.products li.product .compare {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    margin: 0 !important;
    z-index: 2;
}

/**
 * 5. 商品标题样式 (细体、灰色、限高)
 */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px !important;
    color: #666666 !important;            /* 图片中的浅黑色/深灰色 */
    font-weight: 400 !important;           /* 采用细体，不要加粗 */
    line-height: 1.5 !important;
    margin: 0 0 10px 0 !important;
    padding: 0 10px !important;
    
    /* 强制最多显示 2 行标题，超出部分自动变省略号 (...)，确保卡片高度绝对整齐 */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    height: 38px !important;               /* 预留2行高度，防止单行标题错位 */
}

.woocommerce ul.products li.product a:hover .woocommerce-loop-product__title {
    color: #111111 !important;            /* 悬停时标题颜色加深 */
}

/**
 * 6. 星级评价样式 (居中、亮黄色)
 */
.woocommerce ul.products li.product .star-rating {
    margin: 0 auto 12px auto !important;  /* 核心：强制星级在中间 */
    font-size: 11px !important;
    float: none !important;                /* 清除 WooCommerce 默认的右浮动 */
    color: #f1c40f !important;            /* 图片中亮黄色的星星 */
}
.woocommerce ul.products li.product .star-rating::before {
    color: #e6e6e6 !important;            /* 未点亮星星的底色 */
}

/**
 * 7. 价格样式 (加粗、原价灰色划线、现价黑色或红色)
 */
.woocommerce ul.products li.product .price {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #111111 !important;            /* 默认黑色大字 */
    margin-bottom: 5px !important;
    display: block !important;
}

/* 被划线的原价 */
.woocommerce ul.products li.product .price del {
    color: #b5b5b5 !important;
    font-weight: 400 !important;
    font-size: 13px !important;
    margin-right: 8px !important;
    display: inline-block !important;
}

/* 促销新现价 */
.woocommerce ul.products li.product .price ins {
    background: transparent !important;
    color: #e74c3c !important;            /* 有折扣时，现价显示为红色 */
    text-decoration: none !important;
    display: inline-block !important;
}

/**
 * 8. 加入购物车按钮样式 (现代化扁平风格)
 */
.woocommerce ul.products li.product .button.add_to_cart_button {
    background-color: #111111 !important; /* 纯黑按钮 */
    color: #ffffff !important;
    border: none !important;
    padding: 10px 18px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important; /* 英文全大写 */
    letter-spacing: 1px !important;       /* 字间距增加 */
    border-radius: 0px !important;         /* 严格直角，符合现代主义 */
    margin-top: auto !important;          /* 顶到卡片最底部 */
    width: 100% !important;               /* 撑满卡片宽度 */
    box-sizing: border-box !important;
}

.woocommerce ul.products li.product .button.add_to_cart_button:hover {
    background-color: #e74c3c !important; /* 悬停时变成红色 */
    color: #ffffff !important;
}

/* 高级特效（可选）：在 PC 端，默认隐藏购物车按钮，鼠标悬停时从下方平滑滑出 */
@media (min-width: 992px) {
    .woocommerce ul.products li.product .button.add_to_cart_button {
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease !important;
    }
    .woocommerce ul.products li.product:hover .button.add_to_cart_button {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Header 导航栏暗黑风格排版
   ========================================================================== */

/* 1. 顶部状态栏 */
.top-bar {
    background-color: #1a1a1a;
    color: #999999;
    font-size: 11px;
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar a {
    color: #999999;
    text-decoration: none;
    transition: color 0.3s ease;
}
.top-bar a:hover {
    color: #ffffff;
}

/* 2. 主导航区基础结构 */
.main-header {
    background-color: #000000; /* 纯黑背景 */
    padding: 20px 0;
    position: relative;
    z-index: 100;
}
.main-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 3. Logo 样式 */
.site-branding .site-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 2px;
}

/* 4. 居中主菜单样式 */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}
.main-navigation ul li {
    margin: 0 5px;
}
.main-navigation ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 菜单的悬浮与“当前高亮”状态（图片中红色的 HOME） */
.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a {
    background-color: #e74c3c; /* 品牌红 */
    color: #ffffff;
}

/* 5. 右侧功能图标 (搜索、用户、购物车) */
.header-right-icons {
    display: flex;
    align-items: center;
    gap: 25px;
}
.header-right-icons .icon-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    position: relative;
    transition: color 0.3s ease;
}
.header-right-icons .icon-link:hover {
    color: #e74c3c;
}

/* 6. 购物车图标的数字角标与总价 */
.cart-contents {
    display: flex;
    align-items: center;
}
.cart-contents i {
    font-size: 18px;
}
.cart-count {
    background-color: #e74c3c; /* 红色角标 */
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%; /* 圆形 */
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -8px;
    left: 10px;
}
.cart-total {
    margin-left: 15px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

/* ==========================================================================
   Footer 底部区域排版
   ========================================================================== */

.site-footer {
    background-color: #ffffff; /* 如果需要图片中的微灰，可改为 #f8f9fa */
    color: #666666;
    margin-top: 60px;
    font-size: 13px;
    border-top: 1px solid #eeeeee;
}

/* 1. 服务保障特征栏 (深色背景) */
.footer-features {
    background-color: #222222;
    color: #ffffff;
    padding: 35px 0;
}
.features-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* 移动端自动折行 */
    gap: 20px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
}
.feature-item i {
    font-size: 32px;
    color: #e74c3c; /* 品牌红图标 */
}
.feature-item span strong {
    font-size: 13px;
    text-transform: uppercase;
    display: block;
    letter-spacing: 0.5px;
}
.feature-item span small {
    color: #aaaaaa;
    font-size: 11px;
}

/* 2. 四列导航网格区 */
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding: 60px 15px;
}
.widget-title {
    font-size: 15px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer-widget-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-widget-column ul li {
    margin-bottom: 12px;
}
.footer-widget-column a {
    color: #666666;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-widget-column a:hover {
    color: #e74c3c;
}
.social-icons a {
    display: inline-block;
    margin-right: 15px;
    font-size: 16px;
    color: #111111;
    transition: color 0.3s;
}
.social-icons a:hover {
    color: #e74c3c;
}
.contact-info li {
    display: flex;
    align-items: center;
    gap: 12px;
}
.contact-info i {
    color: #e74c3c;
    width: 14px;
    text-align: center;
}

/* 3. 版权与支付区 */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 15px;
    border-top: 1px solid #eeeeee;
}
.payment-icons i {
    font-size: 26px;
    color: #dddddd;
    margin-left: 12px;
    transition: color 0.3s;
}
.payment-icons i:hover {
    color: #666666;
}

/* 移动端自适应 */
@media (max-width: 991px) {
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .features-grid {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}


/* ==========================================================================
   修复和强制：首页热门分类 2x2 网格排版 (绝对对齐)
   ========================================================================= */

/* 1. 全局容器强制重置和应用 Grid 布局 */
.category-grid .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* 强制 PC 端严格 2 列 */
    gap: 30px 20px !important; /* 卡片横向 20px，纵向 30px 间距 */
    padding: 0 !important;
    margin: 0 auto !important;
    list-style: none !important;
    width: 100% !important; /* 占满父容器宽度 */
    clear: both !important; /* 关键：清除所有旧浮动 */
}

/* 移动端自适应：1列 */
@media (max-width: 768px) {
    .category-grid .woocommerce ul.products {
        grid-template-columns: 1fr !important;
    }
}

/* 2. 单个分类卡片强制对齐和重置 */
.category-grid .woocommerce ul.products li.product-category {
    position: relative !important;
    float: none !important; /* 清除旧浮动 */
    width: 100% !important; /* Grid 单元格宽度 */
    height: 100% !important; /* 强制卡片全高 */
    padding: 0 !important;
    margin: 0 !important; /* 清除旧边距 */
    overflow: hidden !important;
    border: none !important;
    background: #000 !important; /* 底色黑 */
}

/* 3. 分类图片强制拉伸覆盖且等高 (关键：解决错开问题) */
.category-grid .woocommerce ul.products li.product-category a {
    display: block !important;
    text-decoration: none !important;
    width: 100% !important;
    height: 100% !important;
}

.category-grid .woocommerce ul.products li.product-category a img {
    width: 100% !important;
    height: 400px !important; /* 关键：强制固定高度，确保四个方块完全一样高 (PC 端) */
    object-fit: cover !important; /* 关键：确保图片覆盖且不拉伸 */
    margin: 0 !important;
    display: block !important;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* 移动端自适应高度 */
@media (max-width: 768px) {
    .category-grid .woocommerce ul.products li.product-category a img {
        height: 300px !important; /* 手机端高度 */
    }
}

/* 4. 暗色遮罩和标题文字强制居中 */
.category-grid .woocommerce ul.products li.product-category a::before {
    content: '' !important;
    position: absolute !important;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.35) !important; /* 35%不透明度遮罩 */
    z-index: 1 !important;
    transition: background 0.4s ease !important;
}

.category-grid .woocommerce ul.products li.product-category h2 {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important; /* 绝对水平垂直居中 */
    color: #ffffff !important;
    font-size: 32px !important; /* 大标题 */
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    margin: 0 !important;
    z-index: 2 !important;
    background: transparent !important;
    width: 90% !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

/* 隐藏原生数量标签 */
.category-grid .woocommerce ul.products li.product-category .count,
.category-grid .woocommerce ul.products li.product-category h2 mark {
    display: none !important;
}

/* 5. 鼠标悬停动效 */
.category-grid .woocommerce ul.products li.product-category a:hover img {
    transform: scale(1.08) !important;
}
.category-grid .woocommerce ul.products li.product-category a:hover::before {
    background: rgba(0, 0, 0, 0.5) !important; /* 变暗 */
}


/* ==========================================================================
   全屏轮播图 (Swiper Hero) 样式
   ========================================================================== */
.hero-slider-wrap {
    width: 100%;
    position: relative;
}
.heroSwiper {
    width: 100%;
    height: 700px; /* PC端高度，可按需调整 */
}
.hero-slide {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;  /* 垂直居中 */
    position: relative;
}
/* 给轮播图加一个黑色半透明蒙版，让文字更清晰 */
.hero-slide::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
}
.hero-content {
    position: relative;
    z-index: 10;
    color: #fff;
    max-width: 600px;
}
.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.hero-content p {
    font-size: 16px;
    margin-bottom: 30px;
    letter-spacing: 1px;
}
.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid #fff;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background: #e74c3c;
    border-color: #e74c3c;
}
/* 自定义 Swiper 箭头和圆点的颜色 (配合品牌红) */
.swiper-button-next, .swiper-button-prev {
    color: #fff !important;
}
.swiper-pagination-bullet-active {
    background: #e74c3c !important;
}

@media (max-width: 768px) {
    .heroSwiper { height: 450px; }
    .hero-content h1 { font-size: 32px; }
}


/* ==========================================================================
   WooCommerce 单个商品详情页高端定制样式
   ========================================================================== */

/* 1. 面包屑与提示条美化 */
.bamboo-product-notices {
    padding-top: 30px;
    font-size: 13px;
}
.woocommerce-breadcrumb {
    color: #888888;
    margin-bottom: 15px;
}
.woocommerce-breadcrumb a {
    color: #111111;
    text-decoration: none;
}
.woocommerce-breadcrumb a:hover {
    color: #e74c3c;
}
/* 成功提示框改为扁平现代红 */
.woocommerce-message {
    border-top-color: #e74c3c !important;
    background-color: #fdfdfd !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.woocommerce-message .button {
    background-color: #111111 !important;
    color: #fff !important;
    border-radius: 0px !important;
}

/* 2. PC端左右双列并排大布局 */
@media (min-width: 992px) {
    .single-product-main-container div.product {
        display: flex !important;
        justify-content: space-between;
        gap: 60px; /* 左右两列留出 60px 的高级呼吸感间距 */
        margin-top: 20px;
    }
    /* 左侧：产品图片画廊 */
    .single-product-main-container div.product .woocommerce-product-gallery {
        width: 50% !important;
        float: none !important;
        position: sticky; /* 滚动时图片栏保持粘性，提升阅读体验 */
        top: 40px;
        height: max-content;
    }
    /* 右侧：产品购买信息购买区 */
    .single-product-main-container div.product .summary {
        width: 45% !important;
        float: none !important;
    }
}

/* 3. 右侧购买区核心元素精细排版 */
.summary .product_title {
    font-size: 32px !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px;
    color: #111111;
    margin-bottom: 15px !important;
    line-height: 1.2;
}

/* 价格大字突出 */
.summary .price {
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #e74c3c !important; /* 统一采用品牌红色 */
    margin-bottom: 25px !important;
    display: block;
}
.summary .price del {
    color: #bbbbbb !important;
    font-size: 18px;
    margin-right: 10px;
}

/* 简短描述文本 */
.summary .woocommerce-product-details__short-description {
    font-size: 14px;
    line-height: 1.8;
    color: #666666;
    margin-bottom: 30px;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 25px;
}

/* 4. 购买按钮与数量加减器美化 */
.summary form.cart {
    display: flex !important;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px !important;
}

/* 数量输入框 */
.summary .quantity input.qty {
    width: 60px !important;
    height: 48px !important;
    border: 1px solid #dddddd !important;
    border-radius: 0px !important; /* 严格直角 */
    font-weight: 600;
    text-align: center;
}

/* “加入购物车”主按钮 */
.summary .single_add_to_cart_button {
    height: 48px !important;
    background-color: #111111 !important; /* 纯黑高级底色 */
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 0px !important; /* 直角 */
    border: none !important;
    padding: 0 35px !important;
    flex-grow: 1; /* 让按钮自动撑满剩余空间 */
    transition: background-color 0.3s ease !important;
}
.summary .single_add_to_cart_button:hover {
    background-color: #e74c3c !important; /* 悬停变为品牌红 */
}

/* 5. 底部商品详情、评价切换标签页 (Tabs) */
.woocommerce-tabs {
    margin-top: 80px !important;
    border-top: 1px solid #eeeeee;
    padding-top: 40px;
}
.woocommerce-tabs ul.tabs {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    display: flex;
    justify-content: center; /* 标签栏全局居中 */
    gap: 40px;
    margin-bottom: 30px !important;
}
.woocommerce-tabs ul.tabs li {
    background: transparent !important;
    border: none !important;
    border-radius: 0px !important;
    padding: 0 0 10px 0 !important;
    margin: 0 !important;
}
.woocommerce-tabs ul.tabs li a {
    color: #999999 !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 15px;
    letter-spacing: 1px;
}
/* 当前激活的 Tab 下方加一条醒目的黑线 */
.woocommerce-tabs ul.tabs li.active {
    border-bottom: 2px solid #111111 !important;
}
.woocommerce-tabs ul.tabs li.active a {
    color: #111111 !important;
}
.woocommerce-tabs .woocommerce-Tabs-panel {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: #555555;
    font-size: 15px;
}

/* 6. 相关商品推荐区域 (Related Products) */
.related.products {
    margin-top: 80px !important;
    border-top: 1px solid #eeeeee;
    padding-top: 60px;
}
.related.products h2 {
    font-size: 24px;
    text-align: center;
    font-weight: 800;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* ==========================================================================
   消灭 WooCommerce 幽灵元素 (修复 Grid 网格错位、首个空白问题)
   ========================================================================= */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
}



/* ==========================================================================
   首页 LATEST PRODUCTS 选项卡样式与动画 (强效加强版)
   ========================================================================= */

/* 1. 选项卡按钮容器全局居中 */
.product-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

/* 2. 按钮基础样式 */
.product-tabs .tab-btn {
    background: transparent !important;
    color: #666666 !important;
    border: 1px solid #dddddd !important;
    padding: 8px 24px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    border-radius: 2px !important;
    transition: all 0.3s ease !important;
}

/* 3. 鼠标悬停与激活状态 (变成红色底) */
.product-tabs .tab-btn:hover,
.product-tabs .tab-btn.active {
    background: #e74c3c !important;
    color: #ffffff !important;
    border-color: #e74c3c !important;
}

/* 4. 强制接管该区域的 Grid 网格布局 (防止图片排版崩塌) */
.tab-content-grid ul.products,
.tab-content-grid .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* 强制 4 列 */
    gap: 30px 20px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    list-style: none !important;
    width: 100% !important;
}

/* 移动端自适应 */
@media (max-width: 991px) {
    .tab-content-grid ul.products, .tab-content-grid .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
    .tab-content-grid ul.products, .tab-content-grid .woocommerce ul.products { grid-template-columns: 1fr !important; }
}

/* 5. JS 过滤时的动画过渡类 */
.tab-content-grid ul.products li.product {
    transition: opacity 0.4s ease, transform 0.4s ease !important;
}

/* 强制隐藏不符合分类的商品 */
.tab-content-grid ul.products li.product.hide-product {
    display: none !important;
}

/* 动画：渐显进入 */
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* 强制显示动画 */
.tab-content-grid ul.products li.product.show-product {
    animation: fadeInScale 0.4s ease forwards !important;
}


/* ==========================================================================
   商品详情页：粘性悬浮购物车栏样式
   ========================================================================= */

.bamboo-sticky-cart {
    position: fixed;
    bottom: -100px; /* 默认隐藏在屏幕下方 */
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    padding: 12px 0;
    border-top: 1px solid #eeeeee;
    transition: bottom 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* 丝滑弹出动效 */
}

/* JS 触发显示时的类名 */
.bamboo-sticky-cart.show {
    bottom: 0;
}

.sticky-cart-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticky-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 缩略图 */
.sticky-product-info img {
    width: 45px !important;
    height: 45px !important;
    object-fit: cover !important;
    border-radius: 2px;
    margin: 0 !important;
}

.sticky-text {
    display: flex;
    flex-direction: column;
}

.sticky-title {
    font-size: 14px;
    font-weight: 700;
    color: #111111;
    line-height: 1.2;
    margin-bottom: 4px;
}

/* 原价变小，现价变红 */
.sticky-price .price { margin: 0 !important; font-size: 14px !important; }
.sticky-price ins { color: #e74c3c !important; text-decoration: none; font-weight: 700; }
.sticky-price del { color: #aaaaaa !important; font-size: 12px; margin-right: 5px; }

/* 右侧购买按钮 */
.sticky-cart-action .trigger-main-cart {
    background-color: #e74c3c !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 35px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    border-radius: 2px !important;
    cursor: pointer;
    transition: background-color 0.3s !important;
    margin: 0 !important;
}

.sticky-cart-action .trigger-main-cart:hover {
    background-color: #111111 !important;
}

/* 移动端自适应：精简显示 */
@media (max-width: 768px) {
    .sticky-product-info img, .sticky-title {
        display: none; /* 手机屏幕小，隐藏图片和标题，只留价格和按钮 */
    }
    .bamboo-sticky-cart { padding: 10px 0; }
    .sticky-cart-action .trigger-main-cart { padding: 12px 20px !important; }
}






/* ==========================================================================
   移动端专属：圆形悬浮菜单按钮 (Floating Action Button style)
   ========================================================================= */

/* 1. 默认设置 (PC端隐藏) */
.bamboo-floating-menu {
    display: none;
}

/* 仅在手机端 (768px以下) 显示 */
@media (max-width: 768px) {
    .bamboo-floating-menu {
        display: flex; /* 使用 flex 让图标居中 */
        justify-content: center;
        align-items: center;
        
        /* 2. 核心定位：固定在屏幕右下角 */
        position: fixed;
        bottom: 30px; /* 距离底部 30px */
        right: 25px;  /* 距离右侧 25px */
        z-index: 10000; /* 确保在最上层 */
        
        /* 3. 外观设计：圆形、品牌红、高级阴影 */
        width: 60px;
        height: 60px;
        border-radius: 50%; /* 完美圆形 */
        background-color: #e74c3c; /* 品牌红 */
        border: none;
        box-shadow: 0 5px 25px rgba(231, 76, 60, 0.4); /* 红色调柔和阴影，增加浮动感 */
        
        /* 图标样式 */
        color: #ffffff;
        font-size: 24px;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1); /* 丝滑过渡 */
    }

    /* 4. 鼠标悬停/点击时的微动效 (体验细节) */
    .bamboo-floating-menu:hover {
        transform: scale(1.1) translateY(-3px); /* 放大并微微上移 */
        box-shadow: 0 8px 30px rgba(231, 76, 60, 0.5); /* 阴影变深 */
    }
    
    .bamboo-floating-menu:active {
        transform: scale(0.95); /* 点击时微微按压 */
    }

    /* 隐藏原有的 PC 端横向菜单 (假设您的旧菜单类名叫 .desktop-menu，请根据实际情况修改) */
    .desktop-menu { display: none !important; }
}



/* ==========================================================================
   全局高级感重置 (Premium Typography & Spacing)
   ========================================================================= */

/* 1. 标题排版升级：更粗、更紧凑、更有力量 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800 !important;
    text-transform: uppercase !important;
    line-height: 1.1 !important;
    color: #111111 !important;
    letter-spacing: -0.5px !important; /* 大标题稍微收紧，更具现代感 */
}

/* 2. 移除 WooCommerce 原生丑陋边框，增加呼吸感 */
.woocommerce ul.products li.product,
.woocommerce div.product .woocommerce-tabs .panel {
    border: none !important;
    box-shadow: none !important;
    padding-bottom: 20px !important;
}

/* 3. 全局按钮高级化：直角、去浮雕、加宽 */
button, 
.button, 
.woocommerce a.button, 
.woocommerce button.button, 
.woocommerce input.button {
    border-radius: 0 !important; /* 绝对直角 */
    text-transform: uppercase !important;
    letter-spacing: 2px !important; /* 按钮文字增加呼吸感 */
    font-weight: 700 !important;
    padding: 16px 32px !important;
    border: none !important;
    transition: all 0.4s ease !important;
}

/* 4. 链接与价格的极简处理 */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price {
    color: #111111 !important;
    font-weight: 600 !important;
    font-size: 18px !important;
}

/* 5. 扩大板块间距 */
.section-padding {
    padding: 100px 0 !important;
}



/* ==========================================================================
   AJAX 实时搜索框高级样式 (加强防御版，绝对不撑开 Header)
   ========================================================================= */

/* 强制作为定位基准点，并且锁死高度 */
.bamboo-ajax-search {
    position: relative !important;
    max-width: 350px;
    margin: 0 auto;
    height: 45px !important; /* 强制锁定高度，保证 header 不会变形 */
    display: flex;
    align-items: center;
}

#bamboo-search-input {
    width: 100%;
    padding: 10px 0 10px 30px;
    border: none;
    border-bottom: 2px solid #e2e8f0;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #ffffff;
    transition: border-color 0.3s;
}

#bamboo-search-input:focus {
    outline: none;
    border-bottom: 2px solid #111111;
}

.bamboo-ajax-search .search-icon {
    position: absolute !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #94a3b8;
}

/* 核心修复：强制绝对定位悬浮，脱离文档流，永远不撑开父级 */
.search-results-dropdown {
    display: none;
    position: absolute !important;
    top: 100% !important; /* 紧贴搜索框底部 */
    left: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1) !important;
    z-index: 99999 !important; /* 强制处于全站最顶层 */
    margin-top: 5px !important;
    border-radius: 0 0 8px 8px;
    max-height: 400px !important;
    overflow-y: auto !important;
    
    /* 确保下拉框内部的内容也不会影响外部 */
    box-sizing: border-box !important;
}

/* 搜索结果项样式保持不变 */
.ajax-result-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    transition: background 0.2s;
}

.ajax-result-item:hover {
    background: #f8fafc;
}

.result-img img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.result-info h4 {
    margin: 0 0 5px 0;
    font-size: 13px;
    color: #111111;
    font-weight: 700;
    line-height: 1.2;
}

.result-info .price {
    font-size: 12px;
    color: #e74c3c;
    font-weight: 600;
}

.no-results, .loading-search {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
}


/* ==========================================================================
   BAMBOO: WOOCOMMERCE 终极去油腻美化 (Ultimate UI Reset)
   ========================================================================= */

/* --------------------------------------------------------
   1. 商品列表卡片 (Shop/Archive Grid) 极简化
-------------------------------------------------------- */
.woocommerce ul.products li.product {
    text-align: center !important; /* 居中对齐，更显高级 */
    transition: all 0.4s ease !important;
    background: transparent !important;
}

/* 图片悬浮微放大动效 */
.woocommerce ul.products li.product img {
    margin-bottom: 20px !important;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}
.woocommerce ul.products li.product:hover img {
    transform: scale(1.03) !important;
}

/* 标题去链接下划线，加粗缩小 */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #111111 !important;
    margin-bottom: 8px !important;
}

/* 价格字体调整，使用品牌红 */
.woocommerce ul.products li.product .price {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #e74c3c !important;
    margin-bottom: 20px !important;
}

/* 列表页“加入购物车”按钮高级化 (空心转实心) */
.woocommerce ul.products li.product .button {
    display: inline-block !important;
    margin-top: 10px !important;
    padding: 12px 24px !important;
    background: transparent !important;
    color: #111111 !important;
    border: 1px solid #111111 !important;
    border-radius: 0 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: all 0.3s ease !important;
}
.woocommerce ul.products li.product .button:hover {
    background: #111111 !important;
    color: #ffffff !important;
}

/* --------------------------------------------------------
   2. 全局表单与输入框极简化 (Checkout / My Account / Cart)
-------------------------------------------------------- */
.woocommerce form .form-row input.input-text, 
.woocommerce form .form-row textarea {
    padding: 15px 0 !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #d1d5db !important; /* 仅保留底边线 */
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 14px !important;
    color: #111111 !important;
    transition: border-color 0.3s ease !important;
}

.woocommerce form .form-row input.input-text:focus, 
.woocommerce form .form-row textarea:focus {
    outline: none !important;
    border-bottom: 1px solid #111111 !important; /* 聚焦时变黑 */
}

.woocommerce form .form-row label {
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: #64748b !important;
}

/* --------------------------------------------------------
   3. 系统通知框 (Notices/Errors/Messages) 现代化
-------------------------------------------------------- */
/* 去除原生丑陋的五颜六色大色块和图标 */
.woocommerce-message, 
.woocommerce-error, 
.woocommerce-info {
    background: #ffffff !important;
    border: none !important;
    border-left: 4px solid #111111 !important; /* 极简左侧边条 */
    border-radius: 0 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
    color: #111111 !important;
    font-weight: 600 !important;
    padding: 20px 30px !important;
}
.woocommerce-error {
    border-left-color: #e74c3c !important; /* 错误提示用红线 */
}
.woocommerce-message {
    border-left-color: #10b981 !important; /* 成功提示用绿线 */
}
.woocommerce-message::before, 
.woocommerce-error::before, 
.woocommerce-info::before {
    display: none !important; /* 隐藏老旧的系统图标 */
}

/* 通知框里的按钮 */
.woocommerce-message .button, 
.woocommerce-error .button, 
.woocommerce-info .button {
    background: transparent !important;
    color: #111111 !important;
    border: 1px solid #111111 !important;
    border-radius: 0 !important;
    padding: 8px 16px !important;
}
.woocommerce-message .button:hover {
    background: #111111 !important;
    color: #ffffff !important;
}