/*
Theme Name: Oriental Essence
Theme URI: https://gomalleasy.com
Author: Your Name
Author URI: https://gomalleasy.com
Description: A multi-language WooCommerce theme with Red Gold theme, supporting wishlist, compare, cart, checkout, account, and blog.
Version: 1.0.0
License: GPL v2 or later
Text Domain: oriental-essence
Domain Path: /languages
WC requires at least: 6.0
WC tested up to: 8.0
*/

/* ===== Global Reset & Variables ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, sans-serif;
}
:root {
    --china-red: #C70000;
    --china-red-dark: #A80000;
    --gold: #FFD700;
    --gray-text: #666;
    --light-bg: #f8f8f8;
    --border-color: #eee;
}
body {
    background: var(--light-bg);
    color: #333;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
}
.section {
    margin: 50px 0;
}
.section-title {
    text-align: center;
    font-size: 24px;
    color: var(--china-red);
    margin-bottom: 10px;
}
.section-desc {
    text-align: center;
    color: #777;
    margin-bottom: 30px;
    font-size: 14px;
}

/* ===== 响应式辅助类 ===== */
.desktop-only { display: block; }
.mobile-only { display: none; }
.mobile-cart-icon { display: none; }
.mobile-bottom-nav { display: none; }

/* ===== Top Bar ===== */
.topbar {
    background: #f5f5f5;
    padding: 10px 0;
    font-size: 12px;
    color: var(--gray-text);
    border-bottom: 1px solid var(--border-color);
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar-left {
    display: flex;
    gap: 20px;
    align-items: center;
}
.topbar-left select {
    border: none;
    background: transparent;
    color: var(--gray-text);
    outline: none;
}
.topbar-right {
    display: flex;
    gap: 20px;
}

/* ===== Main Header ===== */
.main-header {
    background: #fff;
    padding: 22px 0;
    border-bottom: 1px solid var(--border-color);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}
.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--china-red);
    white-space: nowrap;
}
img.custom-logo {
    max-width: 150px !important;
    max-height: 85px !important;
}
.search-form {
    flex: 1;
    max-width: 560px;
    display: flex;
}
.search-form input {
    width: 100%;
    height: 46px;
    padding: 0 15px;
    border: 1px solid var(--border-color);
    border-right: 0;
    background: #f9f9f9;
    outline: none;
    font-size: 14px;
}
.search-form button {
    width: 50px;
    height: 46px;
    background: var(--china-red);
    color: #fff;
    border: none;
    cursor: pointer;
}
.header-icons {
    display: flex;
    gap: 25px;
}
.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    gap: 4px;
    color: #222;
    cursor: pointer;
}
.icon-item i {
    font-size: 18px;
}
.icon-item:hover {
    color: var(--china-red);
}
.cart-icon {
    position: relative;
}
.cart-count {
    position: absolute;
    top: -5px;
    right: -6px;
    width: 16px;
    height: 16px;
    background: var(--china-red);
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Navigation ===== */
.main-nav {
    background: var(--china-red);
}
.nav-list {
    display: flex;
    gap: 35px;
    height: 52px;
    align-items: center;
}
.nav-list a {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}
.nav-list a:hover {
    color: var(--gold);
}

/* ===== Banner Slider (轮播) ===== */
.banner-slider {
    width: 100%;
    position: relative;
}
.banner-swiper {
    width: 100%;
    height: 550px;
}
.banner-slider,
.banner-swiper,
.swiper-wrapper,
.swiper-slide,
.banner {
    height: 550px !important;
    min-height: 550px !important;
    max-height: 550px !important;
    width: 100% !important;
}
.banner {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 10% !important;
}
.banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.05);
}
.banner-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
}
.swiper-pagination-bullet-active {
    background: var(--china-red) !important;
}
.swiper-button-prev, .swiper-button-next {
    color: var(--china-red);
    background: rgba(255,255,255,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.swiper-button-prev:after, .swiper-button-next:after {
    font-size: 18px;
}
.swiper-slide {
    width: 100% !important;
    flex-shrink: 0 !important;
}
@media (max-width: 768px) {
    .banner-slider,
    .banner-swiper,
    .swiper-wrapper,
    .swiper-slide,
    .banner {
        height: 400px !important;
        min-height: 400px !important;
        max-height: 400px !important;
    }
}

/* ===== Categories Grid ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    text-align: center;
}
.category-item {
    background: #fff;
    padding: 18px;
    border-radius: 6px;
    transition: 0.3s;
}
.category-item:hover {
    background: #fff5f5;
    transform: translateY(-3px);
}
.category-item h4 {
    font-size: 14px;
    margin-bottom: 4px;
}
.category-item p {
    font-size: 12px;
    color: #777;
}

/* ===== 首页分类网格 (woodmart-product-categories) ===== */
.woodmart-product-categories {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}
.woodmart-product-categories .category-item {
    text-align: center;
    background: #fff;
    padding: 18px;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.woodmart-product-categories .category-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}
.woodmart-product-categories .category-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 10px;
}
.woodmart-product-categories .category-item h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

/* ===== Brands Grid ===== */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}
.brand-item {
    background: #fff;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: 0.3s;
    border: 1px solid var(--border-color);
}
.brand-item:hover {
    border-color: var(--gold);
}

/* ===== 品牌列表 (brands-list) ===== */
.brands-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}
.brands-list .brand-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
    height: auto;
    min-height: 100px;
}
.brands-list .brand-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    border-color: var(--gold);
}
.brands-list .brand-item img {
    max-width: 80px;
    height: auto;
    margin-bottom: 8px;
}
.brands-list .brand-item span {
    display: block;
    font-weight: 500;
}

/* ===== Collections Grid ===== */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.collection-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
.collection-img {
    height: 220px;
    background: #f1f1f1;
}
.collection-info {
    padding: 15px;
}

/* ===== Collection Large ===== */
.collection-large {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
}
.collection-wrap {
    display: flex;
    gap: 30px;
    align-items: center;
}
.collection-left {
    flex: 2;
}
.collection-right {
    flex: 1;
}
.collection-desc {
    color: #777;
    margin: 15px 0;
    line-height: 1.6;
}

/* ===== Guide Box ===== */
.guide-box {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
}
.guide-text {
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
}
.guide-list {
    padding-left: 20px;
}
.guide-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 15px;
}
.guide-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--china-red);
}

/* ===== Articles Slider ===== */
.articles-slider {
    position: relative;
    overflow: hidden;
}
.articles-track {
    display: flex;
    gap: 25px;
    transition: 0.4s ease;
}
.article-card {
    min-width: 33.333%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
.article-img {
    height: 200px;
    background: #f1f1f1;
}
.article-info {
    padding: 20px;
}
.article-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}
.article-title {
    font-size: 16px;
    margin-bottom: 10px;
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--china-red);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}
.prev-btn { left: 15px; }
.next-btn { right: 15px; }

/* ===== 首页响应式布局 ===== */
@media (max-width: 1024px) {
    .woodmart-product-categories {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .brands-grid,
    .brands-list {
        grid-template-columns: repeat(1, 1fr) !important;
    }
    .collections-grid {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}
@media (max-width: 480px) {
    .woodmart-product-categories {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

/* ===== Footer ===== */
footer {
    background: #1a1a1a;
    color: #ccc;
    padding-top: 60px;
    margin-top: 60px;
}
.footer-top {
    padding-bottom: 40px;
    border-bottom: 1px solid #333;
}
.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.footer-col h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
}
.footer-col li {
    margin-bottom: 10px;
}
.footer-col a:hover {
    color: var(--gold);
}
.footer-logo {
    font-size: 22px;
    color: var(--gold);
    font-weight: bold;
    margin-bottom: 15px;
}
.footer-desc {
    margin-bottom: 20px;
    line-height: 1.6;
}
.footer-social {
    display: flex;
    gap: 12px;
}
.footer-social a {
    color: #fff;
    background: #292929;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer-social a:hover {
    background: var(--china-red);
    color: var(--gold);
}
.newsletter-form {
    display: flex;
    margin-top: 12px;
    flex-wrap: wrap;
    max-width: 100%;
}
.newsletter-form input {
    flex: 1;
    min-width: 0;
    padding: 10px;
    border: none;
    outline: none;
}
.newsletter-form button {
    background: var(--china-red);
    color: #fff;
    border: none;
    padding: 0 14px;
    cursor: pointer;
    flex: 0 0 auto;
    white-space: nowrap;
}
.footer-bottom {
    padding: 25px 0;
    background: #111;
}
.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.copyright { color: #777; }
.payments img { max-width: 260px; }

/* ===== Footer 响应式布局 ===== */
@media (max-width: 1024px) and (min-width: 641px) {
    .footer-columns {
        display: grid;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px 25px;
    }
    .footer-col:nth-child(1) { grid-row: 1; grid-column: 1; }
    .footer-col:nth-child(2) { grid-row: 1; grid-column: 2; }
    .footer-col:nth-child(3) { grid-row: 2; grid-column: 1; }
    .footer-col:nth-child(4) { grid-row: 2; grid-column: 2; }
}
@media (max-width: 640px) {
    .footer-columns {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
    .footer-col:nth-child(1),
    .footer-col:nth-child(2),
    .footer-col:nth-child(3),
    .footer-col:nth-child(4) {
        grid-row: auto;
        grid-column: auto;
    }
    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }
    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }
}

/* ===== 右侧购物车抽屉样式 ===== */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s ease;
}
.cart-drawer-overlay.active {
    visibility: visible;
    opacity: 1;
}
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 90%;
    height: 100%;
    background-color: #fff;
    z-index: 9999;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}
.cart-drawer.open { right: 0; }
.cart-drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-drawer-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--china-red);
}
.close-cart-drawer {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}
.close-cart-drawer:hover { color: var(--china-red); }
.cart-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.cart-drawer-loading {
    text-align: center;
    padding: 40px;
    color: #777;
}
.cart-drawer-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: #fafafa;
}
.cart-drawer-total {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: right;
}
.cart-drawer-footer .button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    margin-bottom: 10px;
    background: var(--china-red);
    color: #fff;
    border-radius: 4px;
    transition: background 0.2s;
}
.cart-drawer-footer .button:hover {
    background: var(--china-red-dark);
    color: #fff;
}
.cart-drawer-footer .view-cart-btn { background: #333; }
.cart-drawer-footer .view-cart-btn:hover { background: #555; }
/* 购物车内商品列表样式 */
.cart-drawer .cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.cart-drawer .cart-item-image {
    flex: 0 0 70px;        /* 固定宽度，不伸缩 */
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
}

.cart-drawer .cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-drawer .cart-item-details {
    flex: 1;
    min-width: 0;           /* 防止内容溢出 */
}

.cart-item-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1.4;
}

.cart-item-title a {
    color: #333;
    text-decoration: none;
}

.cart-item-title a:hover {
    color: var(--china-red);
}

.cart-item-price {
    font-size: 14px;
    color: var(--china-red);
    font-weight: 600;
    margin: 5px 0;
}

.cart-item-quantity {
    font-size: 12px;
    color: #666;
    margin: 5px 0;
}

.remove-item {
    display: inline-block;
    color: #999;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 5px;
}

.remove-item:hover {
    color: var(--china-red);
}

/* 空购物车样式 */
.empty-cart-message {
    text-align: center;
    padding: 40px 20px;
    color: #777;
}
.empty-cart-message i {
    display: block;
    margin-bottom: 20px;
    font-size: 48px;
    color: #ccc;
}
.empty-cart-message .return-to-shop {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background: var(--china-red);
    color: #fff !important;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}
.empty-cart-message .return-to-shop:hover {
    background: var(--china-red-dark);
}

/* ===== 产品详情页 ===== */
.product-main {
    display: flex;
    flex-wrap: wrap;
    margin: 40px 0 50px;
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
.product-gallery {
    flex: 0 0 50%;
    padding-right: 30px;
}
.product-summary {
    flex: 0 0 50%;
    padding-left: 10px;
}
.main-image {
    background-color: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eaeaea;
}
.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.thumbnail-row {
    display: flex;
    gap: 10px;
}
.thumbnail {
    flex: 1;
    background-color: #f5f5f5;
    border-radius: 8px;
    aspect-ratio: 1 / 1;
    border: 1px solid #eaeaea;
    cursor: pointer;
    transition: border 0.2s;
    overflow: hidden;
}
.thumbnail.active { border: 2px solid var(--china-red); }
.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.short-description {
    color: #555;
    margin-bottom: 25px;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

/* ===== 产品详情页 Add to Cart 区域（最终修正版） ===== */
/* 隐藏 Clear 链接 */
form.cart .reset_variations {
    display: none !important;
}

/* 变体表格彻底左对齐（所有屏幕尺寸） */
table.variations {
    text-align: left !important;
    width: 100% !important;
    table-layout: fixed !important;
    margin-bottom: 15px !important;
    border: none !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    float: none !important;
}
table.variations td.label {
    text-align: left !important;
    vertical-align: middle !important;
    padding-right: 10px !important;
    font-weight: 600;
    width: auto;
}
table.variations td.value {
    text-align: left !important;
}
table.variations select {
    width: 100% !important;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    text-align: left !important;
    text-align-last: left;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: block !important;
}

/* 简单产品的表单（无变体）使用 flex 布局 */
.product-summary form.cart:not(.variations_form) {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center !important;
    gap: 10px;
}

/* 变体产品的加入购物车容器强制横向 flex */
.woocommerce-variation-add-to-cart {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 10px;
}
.woocommerce-variation-add-to-cart br {
    display: none;
}
.woocommerce-variation-add-to-cart > p {
    margin: 0 !important;
    display: contents;
}

/* 数量选择器固定宽度并左对齐 */
.product-summary .quantity {
    width: 130px !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    margin-left: 0 !important;
    margin-right: auto !important;   /* 推向左端 */
    justify-content: flex-start !important;
    float: none !important;
}

/* 加入购物车按钮 */
.single_add_to_cart_button {
    float: none !important;
    display: inline-flex !important;
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 120px;
    
    background: var(--china-red) !important;
    color: white !important;
    border: none !important;
    height: 50px !important;
    border-radius: 40px !important;
    font-weight: 600;
    font-size: 16px;
    padding: 0 25px !important;
    transition: background 0.25s;
    line-height: 50px !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    margin: 0 !important;
    box-sizing: border-box;
}
.single_add_to_cart_button:hover {
    background: var(--china-red-dark) !important;
}

/* Wishlist 按钮 */
.single-product .product-summary .wd-wishlist-btn,
.single-product .woocommerce-variation-add-to-cart .wd-wishlist-btn,
.product-summary form.cart .wd-wishlist-btn {
    position: static !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px !important;
    height: 42px !important;
    border: 1px solid #ddd !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #1e1e1e !important;
    font-size: 18px !important;
    cursor: pointer !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}
.single-product .product-summary .wd-wishlist-btn:hover,
.single-product .woocommerce-variation-add-to-cart .wd-wishlist-btn:hover {
    background: #f5f5f5 !important;
}
.single-product .product-summary .wd-wishlist-btn.active i,
.single-product .woocommerce-variation-add-to-cart .wd-wishlist-btn.active i {
    color: var(--china-red) !important;
}

.product-meta {
    margin: 20px 0 25px;
    font-size: 15px;
}
.meta-item {
    display: flex;
    padding: 6px 0;
    border-bottom: 1px dashed #eaeaea;
}
.meta-label {
    width: 120px;
    font-weight: 500;
    color: #1e1e1e;
}
.meta-value { color: #555; }
.info-accordion {
    border-top: 1px solid #eaeaea;
    margin-top: 10px;
}
.info-item { border-bottom: 1px solid #eaeaea; }
.info-title {
    padding: 18px 0;
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.info-title i {
    transition: transform 0.3s;
    font-size: 16px;
}
.info-content {
    padding-bottom: 20px;
    color: #555;
    display: none;
}
.info-item.active .info-content { display: block; }
.info-item.active .info-title i { transform: rotate(180deg); }
.product-tabs { margin: 50px 0 30px; }
.tabs-header {
    display: flex;
    border-bottom: 2px solid #eaeaea;
    gap: 30px;
}
.tab-btn {
    padding: 15px 5px;
    font-weight: 600;
    font-size: 18px;
    color: #888;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: 0.2s;
}
.tab-btn.active {
    color: var(--china-red);
    border-bottom-color: var(--china-red);
}
.tab-pane {
    display: none;
    padding: 35px 0 20px;
}
.tab-pane.active { display: block; }
.details-table {
    width: 100%;
    border-collapse: collapse;
}
.details-table tr { border-bottom: 1px solid #eee; }
.details-table td { padding: 12px 5px; }
.details-table td:first-child {
    font-weight: 600;
    width: 35%;
}
.brand-section {
    margin: 50px 0;
    background: #fff;
    padding: 30px;
    border-radius: 16px;
}
.brand-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}
.brand-logo-placeholder {
    width: 80px;
    height: 80px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 28px;
    color: #333;
    background-size: cover;
    background-position: center;
}
.brand-name {
    font-size: 32px;
    font-weight: 600;
}
.brand-location { color: #777; }
.brand-desc {
    margin-bottom: 25px;
    color: #444;
}
.brand-categories {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}
.brand-cat {
    font-weight: 500;
    color: #1e1e1e;
    text-decoration: none;
    font-size: 18px;
}
.brand-cat i {
    margin-right: 8px;
    font-size: 20px;
}
.related-title {
    font-size: 28px;
    font-weight: 600;
    margin: 60px 0 25px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}
.extra-info {
    background: #fafafa;
    padding: 40px 0;
    margin-top: 60px;
    border-radius: 20px;
}
.extra-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* ===== 分类页侧边栏与产品网格 ===== */
.wd-breadcrumbs {
    padding: 20px 0 10px;
    font-size: 14px;
    color: #777;
}
.wd-breadcrumbs a {
    color: #1e1e1e;
    text-decoration: none;
}
.cat-header { margin-bottom: 30px; }
.cat-title {
    font-size: 42px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--china-red);
}
.cat-description {
    max-width: 800px;
    color: #555;
    margin-bottom: 20px;
}
.category-layout {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
}
.sidebar { flex: 0 0 280px; }
.filter-widget {
    margin-bottom: 35px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 25px;
}
.filter-widget:last-child { border-bottom: none; }
.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.filter-list { list-style: none; }
.filter-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}
.filter-list input[type="checkbox"] {
    margin-right: 10px;
    accent-color: var(--china-red);
    width: 18px;
    height: 18px;
}
.filter-list label {
    color: #444;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    width: 100%;
}
.count {
    color: #999;
    font-size: 14px;
}
.price-slider-placeholder { margin: 15px 0; }
.slider-values {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}
.filter-btn {
    background: var(--china-red);
    color: white;
    border: none;
    padding: 12px 20px;
    width: 100%;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.filter-btn:hover { background: var(--china-red-dark); }
.content-area { flex: 1; }
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}
.result-count { color: #666; }
.sorting-select {
    padding: 10px 30px 10px 20px;
    border: 1px solid #ddd;
    border-radius: 40px;
    background: white;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}
.view-toggle {
    display: flex;
    gap: 8px;
}
.view-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    cursor: pointer;
    color: #777;
}
.view-btn.active {
    background: var(--china-red);
    color: white;
    border-color: var(--china-red);
}

/* ===== 产品网格 ===== */
.products-grid {
    display: grid;
    gap: 25px;
    margin-bottom: 40px;
}
.products-grid[data-columns="1"] { grid-template-columns: repeat(1, 1fr); }
.products-grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.products-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.products-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
.products-grid[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }
.products-grid[data-columns="6"] { grid-template-columns: repeat(6, 1fr); }
.products-grid:not([data-columns]) {
    grid-template-columns: repeat(3, 1fr);
}

/* ===== 列表视图 ===== */
.products-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.products-grid.list-view .wd-product-card {
    flex-direction: row;
    align-items: flex-start;
    padding: 18px;
}
.products-grid.list-view .wd-product-image {
    flex: 0 0 240px;
    margin-right: 25px;
}
.products-grid.list-view .wd-product-info {
    flex: 1;
    padding: 0;
}
.products-grid.list-view .wd-product-actions {
    position: static;
    max-height: none;
    opacity: 1;
    padding: 0;
    margin-top: 15px;
    box-shadow: none;
    transform: none;
    background: transparent;
}
.products-grid.list-view .wd-short-description { display: block; }
.products-grid.list-view .wd-product-title { font-size: 18px !important; }
.products-grid.list-view .wd-price { font-size: 20px !important; }

/* ===== 移动端产品网格响应式 ===== */
@media (max-width: 1024px) {
    .products-grid:not(.list-view) {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .products-grid.list-view {
        display: flex;
        flex-direction: column;
    }
    .products-grid.list-view .wd-product-card {
        flex-direction: row;
    }
}
@media (max-width: 768px) {
    .products-grid.list-view .wd-product-card {
        flex-direction: column;
    }
    .products-grid.list-view .wd-product-image {
        flex: 0 0 auto;
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }
}
@media (max-width: 480px) {
    .products-grid:not(.list-view) {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}
.page-numbers {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    border: 1px solid #eaeaea;
    color: #1e1e1e;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}
.page-numbers.current,
.page-numbers:hover {
    background: var(--china-red);
    color: white;
    border-color: var(--china-red);
}
.bottom-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: #fafafa;
    padding: 45px 40px;
    border-radius: 24px;
    margin: 60px 0 40px;
}

/* ===== 分类页横幅 ===== */
.archive-banner {
    width: 100%;
    height: 440px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    margin-bottom: 30px;
    border-radius: 16px;
}
@media (max-width: 768px) {
    .archive-banner { height: 280px; border-radius: 12px; }
}
.wd-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}
.archive .wd-container,
.post-type-archive-product .wd-container,
.tax-product_cat .wd-container {
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
    display: block !important;
}

/* ===== 价格筛选小工具 ===== */
.widget_price_filter .price_slider_wrapper .ui-widget-content {
    background: #eaeaea;
    border-radius: 4px;
}
.widget_price_filter .ui-slider .ui-slider-range {
    background: var(--china-red);
}
.widget_price_filter .ui-slider .ui-slider-handle {
    background: var(--china-red);
    border: 2px solid #fff;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    top: -6px;
}
.widget_price_filter .price_slider_amount { margin-top: 20px; }
.widget_price_filter .price_slider_amount .button {
    background: var(--china-red);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: 600;
    float: right;
}
.widget_price_filter .price_label {
    color: #666;
    font-size: 14px;
    line-height: 36px;
}
.filter-list label a {
    color: #444;
    text-decoration: none;
}
.filter-list label a:hover { color: var(--china-red); }

/* ===== WoodMart 风格产品卡片 ===== */
.wd-product-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.wd-product-card:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}
.wd-product-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f5f5;
}
.wd-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--china-red);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
}
.wd-badge-hot { background: #ff5722; }
.wd-badge-new { background: #4caf50; }
.wd-badge-sale { background: var(--china-red); }
.wd-badge-discount {
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 20px;
    margin-left: 4px;
}
.wd-wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    transition: all 0.25s;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    flex-shrink: 0;           /* 防止被压缩 */
    margin-left: auto;         /* 靠右对齐（可选） */
}
.wd-wishlist-btn:hover {
    color: var(--china-red);
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    transform: scale(1.05);
}
.wd-wishlist-btn .fas { color: var(--china-red); }
.wd-product-gallery {
    width: 100%;
    height: 100%;
    position: relative;
}
.gallery-images {
    width: 100%;
    height: 100%;
    position: relative;
}
.gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s;
}
.gallery-img.active { opacity: 1; }
.gallery-prev, .gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s, background 0.2s;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.wd-product-card:hover .gallery-prev,
.wd-product-card:hover .gallery-next { opacity: 1; }
.gallery-prev:hover, .gallery-next:hover {
    background: #fff;
    color: var(--china-red);
}
.gallery-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.gallery-dots .dot {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.gallery-dots .dot.active {
    background: var(--china-red);
    transform: scale(1.2);
}
.wd-product-info {
    padding: 16px 15px;
    background: #fff;
    flex: 1 0 auto;
}
.wd-title-rating {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}
.wd-product-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    flex: 1;
    padding-right: 8px;
    color: #1e1e1e;
}
.wd-product-title a {
    color: #1e1e1e;
    text-decoration: none;
    transition: color 0.2s;
}
.wd-product-title a:hover { color: var(--china-red); }
.wd-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    white-space: nowrap;
}
.wd-rating .star-rating {
    margin: 0;
    line-height: 1;
    font-size: 13px;
}
.rating-value {
    color: #888;
    margin-left: 4px;
    font-weight: 500;
}
.wd-product-category {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    line-height: 1.4;
}
.wd-product-category a { color: inherit; }
.wd-product-category a:hover { color: var(--china-red); }
.wd-price {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--china-red) !important;
    line-height: 1.3;
}
.wd-price del {
    font-size: 14px !important;
    color: #aaa !important;
    margin-right: 6px;
    font-weight: 400;
}
.wd-price ins {
    text-decoration: none;
    background: transparent;
}
.wd-short-description {
    display: none;
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 10px;
}
/* ---------- 快速加购面板（绝对定位，不挤占布局）---------- */
.wd-product-actions {
    position: relative;
    overflow: visible;          /* 必须保持可见，保证面板能溢出 */
}
.wd-product-card:hover .wd-product-actions {
    max-height: 80px;
    opacity: 1;
    padding: 0 15px 15px 15px;
}
.actions-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}
/* Add to cart 按钮 - WoodMart 风格悬停变图标 */
.wd-add-to-cart {
    position: relative;
    flex: 1;
    padding: 11px 8px;
    background: var(--china-red);
    color: #fff !important;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background 0.25s, transform 0.15s;
    line-height: 1.2;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wd-add-to-cart .btn-text,
.wd-add-to-cart .btn-icon {
    display: block;
    transition: opacity 0.25s, transform 0.25s;
}

.wd-add-to-cart .btn-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    font-size: 16px;
    line-height: 1;
}

.wd-add-to-cart .btn-text {
    opacity: 1;
    transform: translateY(0);
}

/* 悬停效果 - 保留图标切换效果 */
.wd-add-to-cart:hover .btn-text {
    opacity: 0;
    transform: translateY(-10px);
}

.wd-add-to-cart:hover .btn-icon {
    opacity: 1;
}

.wd-add-to-cart:hover {
    background: var(--china-red-dark);
    transform: scale(1.02);
}

/* 加载中动画 */
.wd-add-to-cart.loading {
    pointer-events: none;
    opacity: 0.7;
}
.wd-add-to-cart.loading .btn-text {
    opacity: 0;
}
.wd-add-to-cart.loading .btn-icon {
    opacity: 1;
}
.wd-add-to-cart.loading .btn-icon i {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.wd-action-icons {
    display: flex;
    gap: 8px;
}
.wd-compare-btn, .wd-quickview-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
    color: #555;
    font-size: 15px;
}
.wd-compare-btn:hover, .wd-quickview-btn:hover {
    background: #e8e8e8;
    color: var(--china-red);
    transform: scale(1.05);
}

/* ===== Quick View 模态框 ===== */
.quickview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}
.quickview-modal.active { display: flex; }
.quickview-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
}
.quickview-container {
    position: relative;
    width: 95%;
    max-width: 1100px;
    max-height: 90vh;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    animation: qvFadeIn 0.3s ease;
}
@keyframes qvFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.quickview-close {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #333;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
}
.quickview-close:hover {
    background: var(--china-red);
    color: #fff;
}
.woodmart-quickview {
    display: flex;
    flex-wrap: wrap;
    max-height: 90vh;
    overflow-y: auto;
}
.quickview-gallery {
    flex: 0 0 50%;
    padding: 30px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
}
.qv-main-image {
    position: relative;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.qv-main-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}
.qv-thumbnails {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.qv-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.2s;
}
.qv-thumb.active { border-color: var(--china-red); }
.qv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.qv-view-detail {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
    margin-top: auto;
    align-self: flex-start;
    padding: 8px 0;
}
.qv-view-detail i { font-size: 12px; }
.qv-view-detail:hover { color: var(--china-red); }
.qv-prev, .qv-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 5;
    font-size: 16px;
}
.qv-prev { left: 15px; }
.qv-next { right: 15px; }
.qv-main-image:hover .qv-prev,
.qv-main-image:hover .qv-next { opacity: 1; }
.qv-prev:hover, .qv-next:hover {
    background: #fff;
    color: var(--china-red);
}
.quickview-details {
    flex: 0 0 50%;
    padding: 30px 30px 30px 10px;
}
.qv-title {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1e1e1e;
    line-height: 1.3;
}
.qv-brand {
    font-size: 15px;
    color: #666;
    margin-bottom: 12px;
}
.qv-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}
.qv-rating .star-rating { margin: 0; }
.qv-review-count {
    font-size: 13px;
    color: #888;
}
.qv-price {
    font-size: 24px;
    font-weight: 600;
    color: var(--china-red);
    margin-bottom: 20px;
}
.qv-price del {
    font-size: 18px;
    color: #aaa;
    margin-right: 8px;
    font-weight: 400;
}
.qv-price ins { text-decoration: none; }
.qv-short-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.qv-cart-form {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.qv-cart-form .quantity { width: 120px; }
.qv-cart-form .qty {
    height: 48px;
    border-radius: 40px;
    border: 1px solid #ddd;
    padding: 0 15px;
    font-size: 16px;
}
.qv-add-to-cart {
    flex: 1;
    min-width: 180px;
    height: 48px;
    background: var(--china-red);
    color: #fff;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}
.qv-add-to-cart:hover { background: var(--china-red-dark); }
.qv-meta {
    font-size: 14px;
    color: #666;
    margin-bottom: 18px;
}
.qv-meta > div { margin-bottom: 5px; }
.qv-meta span {
    font-weight: 600;
    color: #333;
    min-width: 80px;
    display: inline-block;
}
.qv-share {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #333;
}
.qv-share a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: all 0.2s;
}
.qv-share a:hover {
    background: var(--china-red);
    color: #fff;
}

/* ========== Quick View 可变产品区域 ========== */
.qv-variable-cart {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.qv-variable-cart .quantity {
    flex-shrink: 0;
}

.qv-variable-cart .quantity .qty {
    width: 60px;
    height: 38px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.qv-variable-cart .qv-add-to-cart-variable {
    flex: 1;
    height: 40px;
    line-height: 40px;
    background-color: var(--china-red);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.qv-variable-cart .qv-add-to-cart-variable:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 与简单产品按钮宽度一致 */
.quickview-details .qv-add-to-cart {
    width: 100%;
}

/* 下拉菜单美化（模拟 WoodMart 风格） */
.quickview-details .qv-attribute-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%22%23666%22%20d%3D%22M6%208L1%203h10z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

.qv-variation-row {
    margin-bottom: 12px;
}

.qv-variation-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

/* ===== 兼容旧版 product-card 样式 ===== */
.product-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}
.product-img {
    aspect-ratio: 1 / 1;
    width: 100%;
    background: #f5f5f5;
    background-size: cover;
    background-position: center;
}
.product-info {
    padding: 16px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card .product-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.4 !important;
    color: #1e1e1e;
}
.product-title a {
    color: #1e1e1e;
    text-decoration: none;
    transition: color 0.2s;
}
.product-title a:hover { color: var(--china-red); }
.product-card .product-price {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--china-red) !important;
    margin-top: 4px;
    line-height: 1.3;
}
.product-price del {
    font-size: 14px !important;
    color: #aaa !important;
    margin-right: 6px;
    font-weight: 400;
}
.product-price ins {
    text-decoration: none;
    background: transparent;
}
.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}
.rating .star-rating {
    margin: 0;
    line-height: 1;
    font-size: 13px;
}
.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--china-red);
}
.add_to_cart_button {
    display: inline-block;
    margin-top: 12px;
    padding: 11px 12px;
    background: var(--china-red);
    color: #fff !important;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background 0.25s, transform 0.15s;
    line-height: 1.2;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
}
.add_to_cart_button:hover {
    background: var(--china-red-dark);
    transform: scale(1.02);
}

/* 产品详情页标题 - 32px */
.single-product .product-title,
.product-main .product-title {
    font-size: 32px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    margin-bottom: 8px !important;
    color: #1e1e1e;
}

/* 产品详情页价格 - 28px */
.single-product .product-price,
.product-main .product-price {
    font-size: 28px !important;
    font-weight: 600 !important;
    color: var(--china-red) !important;
    margin-bottom: 20px !important;
}

/* ===== 移动端头部布局 ===== */
.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mobile-cart-icon {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 22px;
    flex-shrink: 0;
}
.mobile-cart-icon .cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: var(--china-red);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1024px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: block; }
    
    .mobile-menu-toggle { display: flex; order: 1; flex: 0 0 44px; }
    .mobile-cart-icon { display: flex; order: 3; flex: 0 0 44px; }
    
    .header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
        min-height: 50px;
    }
    
    .site-logo,
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        order: 2;
        max-width: 130px;
        text-align: center;
        white-space: nowrap;
    }
    
    .site-logo img,
    .custom-logo {
        max-width: 130px;
        height: auto;
        display: block;
    }
    
    .main-header {
        padding: 12px 0;
        position: relative;
        border-bottom: 1px solid var(--border-color);
    }
}

/* ===== 移动端抽屉菜单 ===== */
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    visibility: hidden;
    transition: visibility 0.3s;
}
.mobile-menu-drawer.active { visibility: visible; }
.mobile-menu-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s;
}
.mobile-menu-drawer.active .mobile-menu-overlay { opacity: 1; }
.mobile-menu-container {
    position: absolute;
    top: 0;
    left: -320px;
    width: 320px;
    max-width: 85%;
    height: 100%;
    background: #fff;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}
.mobile-menu-drawer.active .mobile-menu-container { left: 0; }

/* 顶部搜索和语言 */
.mobile-menu-top {
    padding: 20px 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    align-items: center;
}
.mobile-search-form {
    flex: 1;
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    overflow: hidden;
    background: #f9f9f9;
}
.mobile-search-form input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    background: transparent;
    outline: none;
    font-size: 14px;
}
.mobile-search-form button {
    width: 44px;
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
}
.mobile-language select {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    background: #fff;
    font-size: 13px;
    outline: none;
}

/* 选项卡 */
.mobile-menu-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}
.mobile-menu-tabs .tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-weight: 600;
    font-size: 14px;
    color: #888;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mobile-menu-tabs .tab-btn.active {
    color: var(--china-red);
    border-bottom-color: var(--china-red);
}

/* 内容区域 */
.mobile-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}
.mobile-menu-content .tab-pane { display: none; }
.mobile-menu-content .tab-pane.active { display: block; }
.mobile-categories-list,
.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mobile-categories-list li,
.mobile-nav-list li { margin-bottom: 2px; }
.mobile-categories-list a,
.mobile-nav-list a {
    display: block;
    padding: 14px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s;
    font-size: 15px;
}
.mobile-categories-list a:hover,
.mobile-nav-list a:hover {
    background: #f5f5f5;
    color: var(--china-red);
}

/* ===== 移动端底部导航 ===== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100%;
    max-width: 100vw;
    background: #fff;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 5px 12px;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
    box-sizing: border-box;
    overflow-x: hidden;
    transform: translateZ(0);
    will-change: transform;
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
    position: relative;
    flex: 0 1 auto;
    min-width: 60px;
    max-width: 80px;
    padding: 0 2px;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 3px;
}
.bottom-nav-item span {
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--china-red);
}
.mobile-cart-count {
    position: absolute;
    top: -2px;
    right: 5px;
    background: var(--china-red);
    color: #fff;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

@media (max-width: 1024px) {
    .mobile-bottom-nav {
        display: flex !important;
    }
    body {
        padding-bottom: 65px !important;
    }
    footer {
        margin-bottom: 0 !important;
    }
}
@media (min-width: 1025px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}
@media (max-width: 360px) {
    .bottom-nav-item {
        min-width: 50px;
        font-size: 10px;
    }
    .bottom-nav-item i {
        font-size: 18px;
    }
    .bottom-nav-item span {
        font-size: 9px;
    }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .product-main { flex-direction: column; }
    .product-gallery, .product-summary { flex: 0 0 100%; padding: 0; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .category-layout { flex-direction: column; }
}

@media (max-width: 768px) {
    .quickview-gallery,
    .quickview-details { flex: 0 0 100%; padding: 20px; }
    .quickview-details { padding-top: 0; }
    .qv-title { font-size: 22px; }
    .qv-price { font-size: 20px; }
    .main-nav,
    .category-layout .sidebar { display: none; }
}

@media (max-width: 640px) {
    .related-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .extra-grid { grid-template-columns: 1fr; }
    .cart-actions { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
    .related-grid { grid-template-columns: 1fr !important; }
}

/* ===== Compare 页面样式 ===== */
.compare-page {
    padding: 40px 0;
}

.compare-page .page-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #1e1e1e;
    text-align: center;
}

.compare-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
}

.compare-empty i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.compare-empty h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.compare-empty p {
    color: #777;
    margin-bottom: 25px;
}

.return-shop-btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--china-red);
    color: #fff !important;
    border-radius: 30px;
    font-weight: 600;
    transition: background 0.2s;
}

.return-shop-btn:hover {
    background: var(--china-red-dark);
}

.compare-table-wrapper {
    overflow-x: auto;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.remove-all-compare {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 20px;
    border-radius: 30px;
    color: #666;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.2s;
}

.remove-all-compare:hover {
    background: var(--china-red);
    color: #fff;
    border-color: var(--china-red);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.compare-table th,
.compare-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.compare-table th {
    background: #f9f9f9;
    font-weight: 600;
    position: relative;
}

.compare-table th:first-child,
.compare-table td:first-child {
    text-align: left;
    font-weight: 600;
    background: #f9f9f9;
    position: sticky;
    left: 0;
    z-index: 2;
}

.compare-table .product-col {
    min-width: 200px;
}

.remove-compare {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.remove-compare:hover {
    color: var(--china-red);
}

.compare-image img {
    max-width: 120px;
    height: auto;
    border-radius: 8px;
}

.compare-table .product-name {
    font-weight: 600;
    font-size: 16px;
}

.compare-table .product-name a {
    color: #1e1e1e;
}

.compare-table .product-name a:hover {
    color: var(--china-red);
}

.compare-table .product-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--china-red);
}

.compare-table .in-stock {
    color: #4caf50;
    font-weight: 500;
}

.compare-table .out-of-stock {
    color: #f44336;
    font-weight: 500;
}

.compare-table .add-to-cart-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--china-red);
    color: #fff !important;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.compare-table .add-to-cart-btn:hover {
    background: var(--china-red-dark);
}

/* ===== Wishlist 页面样式 ===== */
.wishlist-page {
    padding: 40px 0;
}

.wishlist-page .page-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #1e1e1e;
    text-align: center;
}

.wishlist-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
}

.wishlist-empty i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.wishlist-empty h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.wishlist-empty p {
    color: #777;
    margin-bottom: 25px;
}

.wishlist-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 5px;
}

.clear-wishlist-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 20px;
    border-radius: 30px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-wishlist-btn:hover {
    background: var(--china-red);
    color: #fff;
    border-color: var(--china-red);
}

.wishlist-count {
    color: #777;
    font-size: 14px;
}

.wishlist-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.wishlist-remove-btn:hover {
    background: var(--china-red);
    color: #fff;
}

.out-of-stock-btn {
    display: inline-block;
    padding: 11px 20px;
    background: #ccc;
    color: #666 !important;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: not-allowed;
}

/* Compare 和 Wishlist 数量徽章 */
.compare-icon-header,
.wishlist-icon-header {
    position: relative;
}

.compare-count,
.wishlist-count-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    width: 18px;
    height: 18px;
    background: var(--china-red);
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Compare 和 Wishlist 激活状态 */
.wd-wishlist-btn.active {
    color: var(--china-red);
    background: #fff;
}

.wd-wishlist-btn.active i {
    color: var(--china-red);
}

.wd-compare-btn.active {
    background: var(--china-red);
    color: #fff !important;
}

.wd-compare-btn.loading,
.wd-wishlist-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.wd-compare-btn.loading i,
.wd-wishlist-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 响应式 */
@media (max-width: 768px) {
    .compare-table th:first-child,
    .compare-table td:first-child {
        min-width: 120px;
    }
    
    .compare-image img {
        max-width: 80px;
    }
    
    .wishlist-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .wishlist-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===== 底部导航徽章定位 ===== */
.bottom-nav-item {
    position: relative;
}
.mobile-wishlist-count,
.mobile-compare-count,
.mobile-cart-count {
    position: absolute;
    top: -2px;
    right: 5px;
    background: var(--china-red);
    color: #fff;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* ===== 修正变体产品在桌面端的布局和显示异常 ===== */
@media (min-width: 1025px) {
    .product-main {
        flex-wrap: nowrap !important;
        align-items: stretch;
    }
    .product-gallery {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    .product-summary {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        overflow: hidden;
    }
    .product-summary .variations {
        width: 100% !important;
        table-layout: fixed !important;
        margin-bottom: 15px;
    }
    .product-summary .variations select {
        width: 100%;
        box-sizing: border-box;
    }
    .product-summary .single_variation_wrap {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        gap: 15px;
    }
    .product-summary .woocommerce-variation-add-to-cart {
        display: flex !important;
        flex: 1;
        align-items: center;
        gap: 15px;
    }
    .product-summary .variations_form::after {
        content: "";
        display: table;
        clear: both;
    }
}

/* 购物车编辑选项样式 */
.cart-item-edit-form {
    margin: 8px 0 12px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
}

.edit-attr-row {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-attr-row label {
    font-size: 13px;
    font-weight: 500;
    min-width: 60px;
    color: #555;
}

.edit-attr-select {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
}

.apply-variation {
    margin-top: 8px;
    background: var(--china-red);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.apply-variation:hover {
    background: var(--china-red-dark);
}

.edit-item-options {
    color: var(--china-red);
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    margin-right: 10px;
}

/* 数量修改样式 */
.cart-item-quantity-edit {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
}
.qty-change {
    background: #f0f0f0;
    border: 1px solid #ddd;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-change:hover {
    background: #e0e0e0;
}
.qty-value {
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

/* ---------- 快速加购面板（绝对定位，不挤占布局）---------- */
.wd-variations-panel {
    position: absolute;
    bottom: 100%;               /* 向上紧贴按钮容器 */
    left: 0;
    right: 0;
    z-index: 15;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.08);
    padding: 18px 15px 15px;
    display: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* 面板内部容器 */
.panel-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 变体选择行 */
.variation-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.variation-row label,
.qty-row label {
    flex-shrink: 0;
    min-width: 50px;
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.var-select {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2210%22%20height%3D%226%22%20viewBox%3D%220%200%2010%206%22%3E%3Cpath%20d%3D%22M0%200l5%206%205-6z%22%20fill%3D%22%23666%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
}

/* 数量行 */
.qty-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.qty-input {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    opacity: 0;
    height: 30px;
}

/* 已加购信息区域 */
.cart-items-info {
    padding: 5px 0;
    font-size: 13px;
}

.cart-item-detail {
    margin-bottom: 8px;
    line-height: 1.5;
}

.edit-cart-item {
    color: var(--china-red);
    text-decoration: underline;
    font-size: 12px;
    margin-left: 8px;
    cursor: pointer;
}

/* 添加成功提示 */
.added-success {
    padding: 10px;
    color: var(--china-red);
    font-weight: 600;
    text-align: center;
}

/* 加载中动画（保留 spin） */
.wd-add-to-cart.loading .btn-icon i {
    animation: spin 1s linear infinite;
}

/* ---------- 移动端优化 ---------- */
@media (max-width: 768px) {
    .wd-variations-panel {
        padding: 15px 12px;
        border-radius: 10px;
    }

    .variation-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    .variation-row label,
    .qty-row label {
        min-width: 45px;
        font-size: 12px;
    }

    .var-select {
        padding: 6px 8px;
        font-size: 12px;
    }

    .qty-input {
        width: 70px;
        padding: 6px 8px;
    }
}

/* ---------- 列表视图兼容 ---------- */
.products-grid.list-view .wd-product-card .wd-product-actions {
    position: relative;
}

.products-grid.list-view .wd-variations-panel {
    bottom: auto;
    top: 100%;
    margin-top: 10px;
}

.added-to-cart-msg {
    position: absolute;
    right: 0;
    top: -30px;
    background: #4caf50;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 99;
    animation: qvFadeIn 0.3s ease;
}

/* 强制 Our categories, Shopping by brands, Product collections 在桌面端一行显示（等宽自适应） */
@media (min-width: 1025px) {
    .woodmart-product-categories,
    .brands-list,
    .collections-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 20px;
        overflow-x: visible;
    }
    
    .woodmart-product-categories .category-item,
    .brands-list .brand-item,
    .collections-grid .collection-card {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
    }
    
    .brands-list .brand-item img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 1024px) {
    .woodmart-product-categories {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .brands-list {
        grid-template-columns: repeat(1, 1fr) !important;
    }
    .collections-grid {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

/* 移动端变体选项及数量左对齐强制修复 */
@media (max-width: 1024px) {
    table.variations {
        text-align: left !important;
        margin-left: 0 !important;
        margin-right: auto !important;
    }
    table.variations td.label,
    table.variations td.value {
        text-align: left !important;
    }
    table.variations select {
        text-align: left !important;
        text-align-last: left;
        margin-left: 0 !important;
        margin-right: 0 !important;
        display: block !important;
        width: 100% !important;
    }
    
    .product-summary .quantity {
        margin-left: 0 !important;
        margin-right: auto !important;
        justify-content: flex-start !important;
    }
}

/* 1. 修复WooCommerce商店页翻页链接的布局 */
.woocommerce nav.woocommerce-pagination ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 保持翻页项为块级元素，方便控制宽高 */
.woocommerce nav.woocommerce-pagination ul li {
    display: inline-block;
    margin: 0;
}

/* 调整翻页链接的显示样式，与您现有的 .page-numbers 风格保持一致 */
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #eaeaea;
    color: #1e1e1e;
    text-decoration: none;
    font-weight: 500;
}

/* 当前页码高亮 */
.woocommerce nav.woocommerce-pagination ul li .current {
    background: var(--china-red);
    color: white;
    border-color: var(--china-red);
}

/* 2. 修复缩略图导航按钮不显示的问题 */
.wd-product-image .gallery-prev,
.wd-product-image .gallery-next {
    opacity: 1 !important;    /* 强制显示按钮 */
}