/*
Theme Name: Lyncast Projector Theme
Theme URI: https://lyncastusa.com
Author: Lyncast USA
Description: 专为投影仪品牌电商设计的现代化主题,类似lyncast.cn风格,浅色系清爽设计,完全兼容WooCommerce
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lyncast-theme
Tags: e-commerce, woocommerce, projector, brand-website, light-theme, custom-menu, featured-images
*/

/* ========================================
   1. 基础样式重置
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 覆盖 WordPress 预设系统字体变量，使 h1–h6 等引用该变量的元素统一使用 Inter */
:root {
    --wp--preset--font-family--system: 'Inter', Arial, sans-serif;
}

/* 高特异性兜底：确保 h1–h6 标题使用 Inter（覆盖 WP 内联的 var(--wp--preset--font-family--system) 系统字体栈，
   特异性 body+h1..h6 (0,1,6) > WP 内联 h1..h6 (0,0,6)，不受加载顺序影响） */
body h1, body h2, body h3, body h4, body h5, body h6 {
    font-family: 'Inter', Arial, sans-serif;
}

/* 按钮与表单控件：覆盖浏览器 UA 默认字体（button/input/select/textarea 默认用 system-ui，不继承 body），
   统一为 Inter。gallery-arrow 为图标字符按钮（❮❯），保持原字体不变。 */
button:not(.gallery-arrow), input, select, textarea {
    font-family: 'Inter', Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* ========================================
   2. 配色方案 (品牌官网风格 - 浅色系)
   ======================================== */
:root {
    /* 主色调 - 科技蓝 */
    --primary-color: #0066cc;
    --primary-hover: #0052a3;

    /* 次要色 - 橙色强调 */
    --accent-color: #ff6b35;
    --accent-hover: #e55a2b;

    /* 背景色 */
    --bg-light: #ffffff;
    --bg-gray: #f8f9fa;
    --bg-dark: #f5f7f9;

    /* 文字颜色 */
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;

    /* 边框 */
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;

    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* 间距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* ========================================
   3. 容器与布局
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section {
    padding: var(--spacing-xl) 0;
}

.section-gray {
    background-color: var(--bg-gray);
}

.section-dark {
    background-color: var(--bg-dark);
}

/* ========================================
   4. 顶部导航栏
   ======================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #E5E7EB;
    box-shadow: var(--shadow-sm);
}

.header-top {
    background: var(--primary-color);
    color: #fff;
    padding: 8px 0;
    font-size: 14px;
}

.header-top a {
    color: #fff;
    text-decoration: none;
}

.header-main {
    display: contents;
}

/* 桌面端：Logo + 导航 + 图标 单行排列（container 为 flex 容器）
   Header 容器单独加宽到 1320px，保证完整导航 + 功能图标在宽屏放下 */
.site-header .container {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    max-width: 1320px;
    position: relative;          /* 作为搜索框绝对定位浮层的参照容器 */
}

.site-header .container .site-branding {
    order: 1;
    flex-shrink: 0;
    margin-right: 18px;
}

.site-header .container .main-navigation {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
}

.site-header .container .header-actions {
    order: 3;
    flex-shrink: 0;
}

.site-branding {
    flex-shrink: 0;
}

/* 宽屏桌面端(≥1440px): 增加 Logo 与第一个导航项的间距 */
@media (min-width: 1440px) {
    .site-header .container .site-branding {
        margin-right: 24px;
    }
}

/* Header 图片 Logo（透明背景，宽度固定、高度自适应，不变形） */
.site-logo-link {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
}

.site-logo {
    display: block;
    width: 175px;
    height: auto;
    max-height: 56px;
    object-fit: contain;
}

.site-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-decoration: none;
}

.site-title a {
    text-decoration: none;
    color: inherit;
}

/* 主导航 */
.main-navigation {
    flex-grow: 1;
    display: flex;
    justify-content: flex-start;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: var(--spacing-lg);
    margin: 0;
    padding: 0;
}

/* 移动端专属 My Account 菜单：桌面端隐藏（仅移动端汉堡菜单内显示） */
.mobile-account-menu {
    display: none;
}

.nav-menu li a {
    color: #1F2937;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item a {
    color: #0066CC;
    background-color: rgba(0, 102, 204, 0.10);
}

/* 头部右侧 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

/* 桌面端(≥1280px)：拉开导航与右侧功能图标的间距（平板/手机端不加，避免横向溢出） */
@media (min-width: 1280px) {
    .header-actions {
        margin-left: 16px;
    }
}

/* 头部右侧图标（搜索/账户/购物车）——白色 Header 上深灰 */
.lyncast-search-toggle,
.header-account,
.header-cart {
    color: #1F2937;
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.lyncast-search-toggle:hover,
.header-account:hover,
.header-cart:hover {
    background: rgba(0, 102, 204, 0.10);
    color: #0066CC;
}

/* 购物车数量徽标 */
.header-cart {
    position: relative;
}

.header-cart .cart-count {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--accent-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    padding: 0 4px;
}

.search-form {
    position: relative;
}

.search-form input[type="search"] {
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    width: 200px;
    transition: all 0.3s ease;
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--primary-color);
    width: 250px;
}

.search-form button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

/* 购物车图标 */
.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px;
    color: var(--text-primary);
    text-decoration: none;
}

.cart-link:hover {
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-color);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ========================================
   5. 英雄区域轮播 (Hero Carousel)
   ======================================== */
.hero-carousel {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1920 / 500;
    overflow: hidden;
    color: #fff;
    background: #222;
}

.carousel-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out;
    z-index: 0;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hero-carousel .container {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.hero-content {
    max-width: 560px;
    padding: 30px 40px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 12px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hero-title {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.25;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-description {
    font-size: 17px;
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 4;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator.active,
.indicator:hover {
    background: #fff;
    transform: scale(1.2);
}

/* 轮播箭头 */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 4;
    border-radius: 4px;
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.6);
}

.carousel-arrow-prev {
    left: 20px;
}

.carousel-arrow-next {
    right: 20px;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-outline:hover {
    background: #fff;
    color: var(--primary-color);
}

.hero-image {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    max-width: 600px;
    opacity: 0.9;
}

.hero-image img {
    width: 100%;
    height: auto;
}

/* ========================================
   6. 产品分类区域
   ======================================== */
.product-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.category-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-light);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.category-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.category-content {
    padding: var(--spacing-md);
}

.category-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.category-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.category-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.category-link:hover {
    text-decoration: underline;
}

/* ========================================
   7. 产品展示
   ======================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.product-card {
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-gray);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.product-info {
    padding: var(--spacing-md);
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.product-title a {
    text-decoration: none;
    color: inherit;
}

.product-title a:hover {
    color: var(--primary-color);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: var(--spacing-xs);
}

.star {
    color: #ffc107;
}

.rating-count {
    font-size: 14px;
    color: var(--text-muted);
}

.product-price {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.price-current {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
}

.price-original {
    font-size: 16px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: var(--spacing-sm);
}

.product-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.btn-add-to-cart {
    flex: 1;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-add-to-cart:hover {
    background: var(--primary-hover);
}

.btn-wishlist {
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* ========================================
   8. 特色区域
   ======================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    display: block;
    text-decoration: none;
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--bg-light);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
    transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease;
    height: 100%;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--border-light);
}

.feature-card:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.feature-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
}

/* ========================================
   9. 客户评价
   ======================================== */
.testimonials-slider {
    display: flex;
    align-items: stretch;
    gap: var(--spacing-lg);
    overflow-x: auto;
    padding: var(--spacing-sm) 0;
    scroll-snap-type: x mandatory;
}

.testimonial-card {
    min-width: 350px;
    flex: 1 0 350px;
    display: flex;
    flex-direction: column;
    background: var(--bg-light);
    border-radius: 12px;
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    scroll-snap-align: start;
}

.testimonial-rating {
    color: #ffc107;
    margin-bottom: var(--spacing-md);
}

.testimonial-text {
    color: var(--text-secondary);
    font-style: italic;
    margin: 0 0 var(--spacing-lg);
    flex: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: auto;
}

.author-info h4 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.author-info p {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin: 0;
    color: var(--text-primary);
}

.author-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* ========================================
   10. 底部区域
   ======================================== */
.site-footer {
    background: #1a1a1a;
    color: #fff;
    padding: var(--spacing-xl) 0 var(--spacing-sm);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.footer-widget h3 {
    font-size: 18px;
    margin-bottom: var(--spacing-md);
    color: #fff;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-widget ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-widget ul li a:hover {
    color: var(--primary-color);
}

.footer-widget p {
    color: #ccc;
    line-height: 1.8;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: var(--spacing-md);
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ========================================
   Footer 底部导航增强（四栏布局）
   ======================================== */

/* Brand 栏较宽，其余自适应 */
.footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.footer-brand {
    padding-right: 20px;
}

.footer-brand .footer-logo {
    margin-bottom: 16px;
}

.footer-brand .footer-logo img {
    max-height: 40px;
    width: auto;
}

.footer-brand p {
    font-size: 14px;
    color: #ccc;
    line-height: 1.8;
}

.footer-brand .footer-amazon-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-brand .footer-amazon-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* 空栏目（无菜单项时）自动隐藏，grid 重新分配 */
.footer-widget:empty,
.footer-widget:has(.footer-menu:empty) {
    display: none;
}

/* Footer 菜单链接样式 */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu li a:hover {
    color: #fff;
}

/* 底部法律政策链接 */
.footer-bottom-links {
    margin-bottom: 8px;
}

.footer-bottom-links a {
    color: #ccc;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: #fff;
}

.footer-bottom-links .sep {
    color: #555;
    margin: 0 4px;
}

/* ========================================
   Footer 四栏固定布局 + 静态文字项
   ======================================== */

/* 四栏固定，Brand 加宽 */
.footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 32px;
    align-items: start;
}

/* 未发布项目（普通文字，非链接）样式 */
.footer-static li span {
    color: #ccc;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    line-height: 1.6;
}

/* 底部法律政策链接（未发布时以文字显示） */
.footer-bottom-links span:not(.sep) {
    color: #ccc;
    font-size: 14px;
    margin: 0 10px;
    display: inline-block;
}

/* 移动端响应式 */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-brand {
        padding-right: 0;
    }

    .footer-bottom-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .footer-bottom-links .sep {
        display: none;
    }
}

/* ========================================
   11. WooCommerce 样式覆盖
   ======================================== */
.woocommerce-page .site-main {
    padding: var(--spacing-lg) 0;
}

.woocommerce-products-header {
    margin-bottom: var(--spacing-lg);
}

.woocommerce-result-count {
    color: var(--text-secondary);
}

.woocommerce-ordering select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

/* 单品页 */
.woocommerce div.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

/* 产品详情页左侧 Gallery：外层容器 sticky（主图+箭头+缩略图作为整体固定）
   align-self:start 让 Grid 子项不 stretch、sticky 正常生效；
   min-width:0 允许 grid 子项收缩（防缩略图内容撑破容器，移动端尤为关键）；
   受 .single-product-wrapper 主体容器约束，到达底部自动停止 */
.product-gallery {
    position: sticky;
    top: 100px;
    align-self: start;
    min-width: 0;
}

.woocommerce-product-details {
    padding-left: var(--spacing-lg);
}

.product_title {
    font-size: 36px;
    margin-bottom: var(--spacing-sm);
}

.woocommerce-product-price {
    font-size: 28px;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.woocommerce-product-description {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

/* 购物车页 */
.woocommerce-cart-form {
    width: 100%;
}

.woocommerce-cart-form table {
    border-collapse: collapse;
    width: 100%;
}

.woocommerce-cart-form td,
.woocommerce-cart-form th {
    padding: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.cart-collaterals {
    margin-top: var(--spacing-lg);
}

.cart_totals {
    background: var(--bg-gray);
    padding: var(--spacing-md);
    border-radius: 12px;
}

/* 结账页 */
.woocommerce-checkout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.woocommerce-checkout-review-order {
    background: var(--bg-gray);
    padding: var(--spacing-md);
    border-radius: 12px;
}

/* ========================================
   12. 响应式设计
   ======================================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 36px;
    }

    .woocommerce div.product {
        grid-template-columns: 1fr;
    }

    .woocommerce-product-details {
        padding-left: 0;
    }
}

/* ===== Hero Banner 响应式高度 ===== */
@media (max-width: 1024px) {
    .hero-carousel {
        height: 360px;
        aspect-ratio: auto;
    }
}
@media (max-width: 767px) {
    .hero-carousel {
        height: 330px;
        aspect-ratio: auto;
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding: 20px 25px;
        max-width: 90%;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-description {
        font-size: 15px;
    }

    .carousel-arrow {
        font-size: 18px;
        padding: 10px 15px;
    }

    .carousel-arrow-prev {
        left: 10px;
    }

    .carousel-arrow-next {
        right: 10px;
    }

    .hero-title {
        font-size: 32px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .woocommerce-checkout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .product-actions {
        flex-direction: column;
    }
}

/* ========================================
   About Page
   ======================================== */
.about-page {
    max-width: 800px;
    margin: 0 auto;
}

.about-page .about-intro {
    font-size: 18px;
    line-height: 1.9;
    color: #444;
    margin-bottom: 35px;
}

.about-page h2 {
    font-size: 26px;
    margin: 35px 0 14px;
    color: #1a1a1a;
}

.about-page p {
    font-size: 16px;
    line-height: 1.85;
    color: #555;
    margin-bottom: 14px;
}

.about-page .about-values {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.about-page .about-values li {
    background: #f8f9fa;
    margin-bottom: 12px;
    padding: 14px 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-size: 16px;
    line-height: 1.7;
    color: #444;
}

/* ========================================
   Contact Us Page
   ======================================== */
.contact-page {
    max-width: 860px;
    margin: 0 auto;
}

.contact-page .contact-intro {
    font-size: 18px;
    line-height: 1.9;
    color: #444;
    margin-bottom: 35px;
}

.contact-page h2 {
    font-size: 26px;
    margin: 35px 0 14px;
    color: #1a1a1a;
}

.contact-page p {
    font-size: 16px;
    line-height: 1.85;
    color: #555;
    margin-bottom: 14px;
}

.contact-page .contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 25px 0 10px;
}

.contact-page .contact-card {
    background: #f8f9fa;
    padding: 22px 24px;
    border-radius: 10px;
    border-left: 4px solid #0066cc;
}

.contact-page .contact-card h3 {
    font-size: 18px;
    margin: 0 0 10px;
    color: #1a1a1a;
}

.contact-page .contact-card p {
    margin: 0;
    color: #555;
    font-size: 15px;
    line-height: 1.7;
}

.contact-page .contact-card a {
    color: #0066cc;
    text-decoration: none;
}

.contact-page .contact-card a:hover {
    text-decoration: underline;
}

.contact-page .contact-note {
    margin-top: 30px;
    padding: 18px 22px;
    background: rgba(0, 102, 204, 0.06);
    border-radius: 10px;
    border: 1px solid rgba(0, 102, 204, 0.15);
    font-size: 15px;
    color: #444;
}

@media (max-width: 600px) {
    .contact-page .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Header 顶部导航改造（Lyncast 单行导航）
   ======================================== */

/* 单行导航布局 */
.header-main {
    flex-wrap: nowrap;
}

/* 主导航 - 单行不换行 */
.main-navigation .nav-menu {
    flex-wrap: nowrap;
    gap: 4px;
}

.main-navigation .nav-menu > li > a {
    color: #1F2937;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 9px;
    border-radius: 4px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.main-navigation .nav-menu > li > a:hover {
    color: #0066CC;
    background-color: rgba(0, 102, 204, 0.10);
}

/* 下拉父菜单（Support）样式 */
.main-navigation .nav-menu > li {
    position: relative;
}

/* 父菜单项：链接 + 独立箭头按钮 水平排列 */
.main-navigation .nav-menu .menu-item-has-children {
    display: flex;
    align-items: center;
}

/* 独立下拉箭头按钮（桌面+移动端通用，负责展开/收起二级菜单） */
.main-navigation .nav-menu .menu-item-has-children > .submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #1F2937;
    border-radius: 4px;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

.main-navigation .nav-menu .menu-item-has-children > .submenu-toggle:hover {
    background-color: rgba(0, 102, 204, 0.10);
}

/* 箭头图标（FontAwesome chevron-down，清晰单个箭头） */
.main-navigation .nav-menu .menu-item-has-children > .submenu-toggle .submenu-toggle-icon {
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    transition: transform 0.3s ease;
}

/* 展开时箭头旋转 */
.main-navigation .nav-menu .menu-item-has-children.open > .submenu-toggle .submenu-toggle-icon {
    transform: rotate(180deg);
}

/* 下拉子菜单：默认隐藏，hover 或 .open 时显示 */
.main-navigation .nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 2000;
    padding: 6px 0;
    white-space: nowrap;
    list-style: none;  /* 移除下拉菜单 li 的项目符号 */
}

.main-navigation .nav-menu .sub-menu li a {
    display: block;
    padding: 10px 16px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.main-navigation .nav-menu .sub-menu li a:hover {
    background: rgba(0, 102, 204, 0.08);
    color: #0066cc;
}

/* 下拉显示：hover 展开 或 .open 类（点击/键盘） */
.main-navigation .nav-menu .menu-item-has-children:hover > .sub-menu,
.main-navigation .nav-menu li.open > .sub-menu {
    display: block;
}

/* 搜索框：绝对定位浮层，贴近搜索图标展开，不占文档流、不挤压导航/图标 */
.lyncast-search-box {
    position: absolute;
    top: 100%;
    right: 136px;               /* 桌面端：浮层右缘对齐搜索图标右缘 */
    display: none;
    z-index: 2000;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
    padding: 8px;
    white-space: nowrap;
}

.lyncast-search-box.open {
    display: block;
}

.lyncast-search-box form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.lyncast-search-box input[type="search"] {
    width: 200px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    color: #1a1a1a;
    background: #fff;
}

.lyncast-search-box button {
    padding: 8px 14px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lyncast-search-box button:hover {
    background: #0052a3;
}

/* 移动端汉堡按钮：浅灰底 + 深色边框 + 深色三条横线，44px 点击区 */
.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    position: relative;
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.mobile-menu-toggle .hamburger,
.mobile-menu-toggle .hamburger::before,
.mobile-menu-toggle .hamburger::after {
    display: block;
    width: 22px;
    height: 2px;
    background: #1F2937;
    position: absolute;
    left: 50%;
    margin-left: -11px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle .hamburger {
    top: 50%;
    margin-top: -1px;
}

.mobile-menu-toggle .hamburger::before {
    content: '';
    top: -8px;
}

.mobile-menu-toggle .hamburger::after {
    content: '';
    top: 8px;
}

.mobile-menu-toggle.active {
    background: #E5E7EB;
}

.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* 移动端响应式 */
@media (max-width: 1024px) {
    .main-navigation .nav-menu > li > a {
        padding: 8px 8px;
        font-size: 13px;
    }
}

/* 响应式：宽度不足 1280px 时提前切换为紧凑汉堡菜单布局
   （完整导航 + 功能图标最小需约 1220px 容器宽度） */
@media (max-width: 1279px) {
    /* 移动端/窄屏：container 恢复块级，顶部栏与导航面板两个独立结构 */
    .site-header .container {
        display: block;
    }

    /* 顶部栏单行：Logo 左、功能图标右，固定高度约 64px */
    .header-main {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 10px 0;
    }

    .site-branding {
        flex: 1 1 auto;
        min-width: 0;
        margin-right: 0;
    }

    /* 移动端 Logo 缩小，保持与搜索/购物车/汉堡同排不重叠 */
    .site-logo {
        width: 140px;
    }

    .site-title {
        font-size: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 汉堡按钮：移动端显示（白色横线在基础样式已定义） */
    .mobile-menu-toggle {
        display: inline-flex;
    }

    /* 顶部账户图标移动端隐藏（入口在汉堡菜单内） */
    .header-account {
        display: none;
    }

    /* 主导航：独立全宽面板，隐藏不占位；点击汉堡展开 */
    .main-navigation {
        display: none;
        width: 100%;
        background: #fff;
        border-top: 1px solid #e0e0e0;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-navigation.active {
        display: block;
    }

    /* 移动端导航纵向排列 */
    .main-navigation .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 4px 0;
    }

    .main-navigation .nav-menu > li {
        width: 100%;
        position: static;
    }

    .main-navigation .nav-menu > li > a {
        display: block;
        padding: 13px 16px;
        font-size: 15px;
        line-height: 1.4;
        color: #1a1a1a;
        width: 100%;
        white-space: normal;
        border-bottom: 1px solid #f0f0f0;
    }

    .main-navigation .nav-menu > li > a:hover {
        color: #0066cc;
        background-color: rgba(0, 102, 204, 0.08);
    }

    /* 移动端：父菜单项块级布局，箭头按钮绝对定位右侧（≥44×44 点击区） */
    .main-navigation .nav-menu > li.menu-item-has-children {
        position: relative;
        display: block;
    }

    .main-navigation .nav-menu .menu-item-has-children > .submenu-toggle {
        position: absolute;
        top: 0;
        right: 0;
        width: 48px;
        height: 48px;
        color: #666;
        border-left: 1px solid #f0f0f0;
        border-radius: 0;
        align-items: center;
        justify-content: center;
        z-index: 1;
    }

    .main-navigation .nav-menu .menu-item-has-children > .submenu-toggle:hover {
        background: rgba(0, 102, 204, 0.08);
    }

    .main-navigation .nav-menu .menu-item-has-children > .submenu-toggle .submenu-toggle-icon {
        color: #666;
    }

    /* 移动端父菜单链接右侧留出箭头按钮空间 */
    .main-navigation .nav-menu .menu-item-has-children > a {
        padding-right: 56px;
    }

    /* 下拉子菜单移动端：占满宽度、在父项正下方、脱离 flex 定位 */
    .main-navigation .nav-menu .sub-menu {
        position: static;
        display: none;
        top: auto;
        left: auto;
        min-width: 0;
        width: 100%;
        white-space: normal;
        box-shadow: none;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        padding: 0;
        margin: 0;
        background: #f8f9fa;
        z-index: auto;
    }

    /* 移动端禁用 hover 展开；.open（点击箭头）展开。
       两条规则同优先级(.menu-item-has-children:hover / .open)，后者声明在后胜出，
       保证触屏 :hover 激活时 .open 仍能显示子菜单。 */
    .main-navigation .nav-menu .menu-item-has-children:hover > .sub-menu {
        display: none;
    }

    .main-navigation .nav-menu .menu-item-has-children.open > .sub-menu {
        display: block;
    }

    .main-navigation .nav-menu .sub-menu li {
        width: 100%;
    }

    .main-navigation .nav-menu .sub-menu li a {
        color: #333;
        padding: 12px 16px 12px 32px;
        width: 100%;
        white-space: normal;
    }

    .main-navigation .nav-menu .sub-menu li a:hover {
        background: rgba(0, 102, 204, 0.08);
        color: #0066cc;
    }

    /* 移动端专属 My Account 菜单项（桌面隐藏） */
    .mobile-account-menu {
        display: none;
    }

    .main-navigation.active .mobile-account-menu {
        display: block;
    }

    .main-navigation.active .mobile-account-item a {
        display: block;
        padding: 13px 16px;
        font-size: 15px;
        color: #1a1a1a;
        border-bottom: 1px solid #f0f0f0;
    }

    /* 搜索图标移动端显示，搜索框点击展开 */
    .lyncast-search-toggle {
        display: inline-flex;
    }

    .lyncast-search-box {
        display: none;
        right: 144px;            /* 平板/窄屏：浮层右缘对齐搜索图标右缘（768px 实测） */
    }

    .lyncast-search-box.open {
        display: block;
    }

    /* 手机端（≤480px）：搜索框全宽自适应，input flex 撑满，防横向溢出 */
    @media (max-width: 480px) {
        .lyncast-search-box {
            right: 0;            /* 贴 container 右缘全宽展开 */
            left: 0;
            white-space: normal;
        }
        .lyncast-search-box form {
            flex-wrap: nowrap;
        }
        .lyncast-search-box input[type="search"] {
            width: auto;
            flex: 1;
            min-width: 0;
        }
        .lyncast-search-box button {
            flex-shrink: 0;
        }
    }

    /* 移动端展开菜单时锁定纵向滚动，防横向溢出 */
    body.menu-open {
        overflow-x: hidden;
    }
}

/* ========================================
   Support Center 页面专属样式（限定 .support-page 作用域）
   ======================================== */
.support-page { max-width: 1100px; margin: 0 auto; padding: 20px; }
.support-hero { text-align: center; padding: 40px 0 30px; }
.support-hero h1 { font-size: 36px; color: #1a1a1a; margin-bottom: 20px; }
.support-hero p { font-size: 16px; color: #555; max-width: 800px; margin: 0 auto 12px; line-height: 1.8; }
.support-help h2 { text-align: center; font-size: 28px; color: #1a1a1a; margin: 40px 0 30px; }
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.support-card { background: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 10px; padding: 28px 24px; text-align: center; transition: box-shadow 0.3s ease; }
.support-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.support-icon { font-size: 36px; color: #0066cc; margin-bottom: 16px; }
.support-card h3 { font-size: 18px; color: #1a1a1a; margin-bottom: 12px; }
.support-card p { font-size: 14px; color: #666; line-height: 1.7; }
.support-contact { text-align: center; padding: 40px 0; }
.support-contact h2 { font-size: 28px; color: #1a1a1a; margin-bottom: 16px; }
.support-contact p { font-size: 16px; color: #555; max-width: 700px; margin: 0 auto 12px; line-height: 1.8; }
.support-btn { display: inline-block; background: #0066cc; color: #fff; padding: 12px 32px; border-radius: 25px; text-decoration: none; font-weight: 600; margin-top: 10px; transition: background 0.3s ease; }
.support-btn:hover { background: #0052a3; }
@media (max-width: 900px) { .support-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .support-grid { grid-template-columns: 1fr; } .support-hero h1 { font-size: 28px; } }

/* ========================================
   FAQs 页面专属样式（作用域 .faqs-page，不影响 Support Center）
   ======================================== */
.faqs-page { max-width: 1100px; margin: 0; padding: 0; margin-top: -28px; }
.faqs-intro { margin-bottom: 40px; }
.faqs-intro p { font-size: 16px; color: #333; line-height: 1.8; margin: 0 0 12px; text-align: left; }
.faqs-section { margin-bottom: 32px; }
.faqs-section h2 { font-size: 24px; color: #1a1a1a; margin: 0; padding-bottom: 10px; border-bottom: 2px solid #e5e7eb; text-align: left; }

/* FAQ 问答项（details/summary 折叠展开，作用域 .faqs-page 内 .faq-item） */
.faqs-section .faq-item {
    margin: 16px 0 0;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 16px;
}
.faqs-section .faq-item summary {
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.6;
    padding: 6px 0;
    text-align: left;
    list-style: none;
    outline: none;
}
.faqs-section .faq-item summary::-webkit-details-marker {
    display: none;
}
.faqs-section .faq-item summary::before {
    content: "+";
    display: inline-block;
    width: 20px;
    margin-right: 10px;
    font-weight: 700;
    color: #0066cc;
    transition: transform 0.2s ease;
}
.faqs-section .faq-item[open] summary::before {
    content: "\2212";
}
.faqs-section .faq-item p {
    font-size: 16px;
    color: #333;
    line-height: 1.8;
    margin: 10px 0 0;
    padding-left: 30px;
    text-align: left;
}

/* 移动端 FAQ 页正文左右留白 16px（仅 FAQ 页，桌面端不变） */
@media (max-width: 600px) {
    body.page-id-52 article#post-52 {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ================================================
   LYNCAST 产品分类页 (taxonomy-product_cat.php)
   ================================================ */

.lyncast-cat-archive {
    padding: 30px 0 60px;
}

/* 面包屑 */
.lyncast-cat-archive .woocommerce-breadcrumb {
    margin: 0 0 16px;
    font-size: 14px;
    color: #666;
}

/* 产品详情页面包屑：与产品主体 .container 同宽（1200px）居中，
   左右 padding 用 var(--spacing-md) 与容器一致，使文字左对齐容器内容边缘 */
.single-product .woocommerce-breadcrumb {
    max-width: 1200px;
    margin: 0 auto 14px;
    padding: 0 var(--spacing-md);
    font-size: 14px;
    color: #666;
}

/* 产品 short_description 排版层次（全站统一，适用于现有及未来产品）：
   - 总结段与卖点列表之间留 22px 间距（需求 20–24px）
   - 卖点列表 UL 缩进 40px（参考 Hotack 产品页浏览器默认缩进）
   - 列表项之间 8px 间距（需求 6–8px）
   - 保持容器字体/字号/颜色/行高（16px/#666/1.8），不加背景或卡片 */
.product-short-description p + ul {
    margin-top: 22px;
}
.product-short-description ul {
    padding-left: 40px;
    margin: 0;
    list-style: disc;
}
.product-short-description li {
    margin-bottom: 8px;
    line-height: 1.8;
}
.product-short-description li:last-child {
    margin-bottom: 0;
}

/* 产品详情页购买区域（全站统一，适用于现有及未来产品）：
   - Quantity 输入框宽约 85px，与 Add to Cart 按钮同行紧凑排列
   - 按钮宽 180px、高 46px（内联已设），不拉伸占满 */
.product-summary .quantity input.qty {
    width: 85px;
    height: 44px;
    padding: 0 10px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.product-summary .quantity-wrapper .btn {
    white-space: nowrap;
}

/* 产品详情页右侧信息排版紧凑化（全站统一）：
   - 顶部评分与价格：评价-价格间距 12px，价格-描述间距 16px（内联 margin-bottom 20px 覆盖）
   - 保持价格字号/颜色/字重不变 */
.product-summary .product-rating {
    margin-bottom: 12px !important;
}
.product-summary .product-price {
    margin-bottom: 16px !important;
}

/* Categories / Tags 左边缘对齐（全站统一）：
   - 左侧标签固定宽度 72px，两行右侧内容从同一位置开始
   - 右侧内容 flex:1 占满剩余宽度，超出自动换行且换行对齐起始位置 */
.product-meta .product-meta-row .meta-label {
    width: 72px !important;
    flex-shrink: 0;
}
.product-meta .product-meta-row .posted_in,
.product-meta .product-meta-row .tagged_as {
    flex: 1;
    min-width: 0;
}

/* H1 */
.lyncast-cat-title {
    font-size: 32px;
    line-height: 1.2;
    margin: 0 0 16px;
    color: #1a1a1a;
}

/* 分类描述（顶部 1–3 段） */
.lyncast-cat-archive .term-description {
    margin: 0 0 28px;
    color: #444;
    line-height: 1.7;
}
.lyncast-cat-archive .term-description p {
    margin: 0 0 12px;
}

/* ===== 布局：左栏 + 右产品 ===== */
.lyncast-cat-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* 左侧分类导航（约 200px） */
.lyncast-cat-sidebar {
    flex: 0 0 200px;
    max-width: 200px;
    position: sticky;
    top: 20px;
}
.lyncast-cat-sidebar-inner {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
}
.lyncast-cat-sidebar-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.lyncast-cat-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}
.lyncast-cat-nav li {
    margin: 0 0 4px;
}
.lyncast-cat-nav li a {
    display: block;
    padding: 9px 12px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.lyncast-cat-nav li a:hover {
    background: #f4f7fb;
    color: #0052a3;
}
.lyncast-cat-nav li.current-cat a {
    background: #0052a3;
    color: #fff;
    font-weight: 600;
}

/* 右侧产品区 */
.lyncast-cat-products {
    flex: 1 1 auto;
    min-width: 0;
}

/* 右侧标题 + 排序头 */
.lyncast-cat-products-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.lyncast-cat-products-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

/* 结果计数 */
.lyncast-cat-products .woocommerce-result-count {
    margin: 0 0 14px;
    font-size: 14px;
    color: #666;
}

/* ===== 产品网格：桌面端 3 列等宽 =====
   分类页 ul.products 带 columns-4 类，会触发 functions.php 内联的
   .products.columns-4{repeat(4,1fr)!important}，导致卡片被压到约200px。
   这里用更高特异性 + !important 覆盖，强制分类页 3 列。 */
.lyncast-cat-products ul.products,
.lyncast-cat-products ul.products.columns-4 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    margin: 0 0 24px !important;
    padding: 0 !important;
    list-style: none !important;
    width: 100% !important;
}
.lyncast-cat-products ul.products::before,
.lyncast-cat-products ul.products::after,
.lyncast-cat-products ul.products.columns-4::before,
.lyncast-cat-products ul.products.columns-4::after {
    display: none !important;
    content: none !important;
}
/* 卡片：等高 flex 列，随网格正常扩展（不再被限约200px） */
.lyncast-cat-products ul.products li.product,
.lyncast-cat-products ul.products.columns-4 li.product {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: none !important;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
    transition: all 0.3s ease;
}
.lyncast-cat-products ul.products li.product:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}
/* ===== 商品卡片内部规范化（基于 content-product.php 内联结构） ===== */

/* 图片区：4:3 比例与 object-fit:contain 由 content-product.php 内联控制（仅分类页），此处不重复覆盖 */

/* Sale 标签：改为图片左上角小红色标签（覆盖 WooCommerce 全局 .onsale 的 width 拉伸） */
.lyncast-cat-products ul.products li.product .onsale {
    position: absolute;
    top: 10px;
    left: 10px;
    width: fit-content !important;        /* 关键：收缩到文字宽度，取消横幅 */
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 4px 10px;
    font-size: 12px;
    line-height: 1.4;
    z-index: 10;
}

/* 商品内容区：flex 列，撑满卡片，按钮贴底 */
.lyncast-cat-products ul.products li.product .product-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    box-sizing: border-box;
}

/* 标题区：正常换行，预留一致高度（min-height 内联已 50px，确保两卡一致） */
.lyncast-cat-products ul.products li.product .product-content h2,
.lyncast-cat-products ul.products li.product .product-content h3 {
    text-align: left;
    padding-left: 0;
    padding-right: 0;
    word-break: break-word;
}

/* 价格区：预留原价+促销价空间 */
.lyncast-cat-products ul.products li.product .price-wrapper {
    text-align: left;
}
.lyncast-cat-products ul.products li.product .price-wrapper .price {
    display: inline-block;
}

/* 商品 meta（SKU / 库存）：固定顺序，正常显示 */
.lyncast-cat-products ul.products li.product .product-meta {
    text-align: left;
}

/* Add to Cart：底部对齐（同一行所有按钮顶部与底部对齐） */
.lyncast-cat-products ul.products li.product .product-content .button,
.lyncast-cat-products ul.products li.product .product-content a.button {
    margin-top: auto !important;          /* 贴到卡片底部 */
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
    text-align: center;
}

/* 分页 */
.lyncast-cat-products nav.woocommerce-pagination {
    margin-top: 20px;
}

/* 空分类提示 */
.lyncast-cat-products .woocommerce-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    color: #666;
}

/* ===== Explore More Projectors（相关分类导航模块） ===== */
.lyncast-cat-more {
    margin-top: 40px;
    padding-top: 36px;
    border-top: 1px solid #e8e8e8;
    width: 100%;
}
.lyncast-cat-more-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px;
}
.lyncast-cat-more-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.lyncast-cat-more-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.lyncast-cat-more-card:hover {
    background: #f4f7fb;
    border-color: #0052a3;
    color: #0052a3;
}
.lyncast-cat-more-card-label {
    line-height: 1.4;
}

/* ===== 全宽底部 SEO 内容 ===== */
.lyncast-cat-bottom-content {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #e8e8e8;
    width: 100%;
}
.lyncast-cat-bottom-content h2 {
    font-size: 24px;
    color: #1a1a1a;
    margin: 32px 0 14px;
}
.lyncast-cat-bottom-content h3 {
    font-size: 19px;
    color: #1a1a1a;
    margin: 24px 0 12px;
}
.lyncast-cat-bottom-content p {
    color: #444;
    line-height: 1.7;
    margin: 0 0 14px;
}
.lyncast-cat-bottom-content ul,
.lyncast-cat-bottom-content ol {
    margin: 0 0 14px 22px;
    color: #444;
    line-height: 1.7;
}
.lyncast-cat-bottom-content a {
    color: #0052a3;
}

/* 移动端横向导航：默认隐藏（桌面端用左侧栏） */
.lyncast-cat-mobile-nav {
    display: none;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .lyncast-cat-sidebar {
        flex-basis: 180px;
        max-width: 180px;
    }
}

@media (max-width: 900px) {
    /* 手机端：产品网格 2 列；Explore More 分类卡 2 列换行 */
    .lyncast-cat-products ul.products,
    .lyncast-cat-products ul.products.columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
    .lyncast-cat-more-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    /* 手机端：产品网格单列，无横向溢出；Explore More 分类卡单列 */
    .lyncast-cat-products ul.products,
    .lyncast-cat-products ul.products.columns-4 {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .lyncast-cat-more-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Shop 总页专属布局（仅 /shop/，不影响分类页/详情页/首页） ===== */
.shop-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* 左侧栏 */
.shop-sidebar {
    width: 220px;
    flex-shrink: 0;
}
.shop-sidebar-toggle {
    display: none; /* 桌面端隐藏折叠按钮，内容常显 */
}
.shop-sidebar-details {
    /* details 元素，桌面默认 open（由模板 PHP 控制） */
}
.shop-sidebar-inner {
    display: block;
}

/* 侧栏小部件通用 */
.shop-sidebar .shop-widget {
    margin-bottom: 28px;
}
.shop-sidebar .widget-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Projector Categories 列表 */
.shop-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.shop-cat-list li {
    margin-bottom: 4px;
}
.shop-cat-list a {
    display: block;
    padding: 9px 12px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}
.shop-cat-list a:hover {
    background: #f4f7fb;
    color: #0052a3;
}
.shop-cat-list li.current a {
    background: #0066cc;
    color: #fff;
    font-weight: 600;
}

/* 右侧商品区 */
.shop-main {
    flex: 1;
    min-width: 0;
}
.shop-main .products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important; /* 覆盖 functions.php 内联 4 列强制规则（仅 Shop 页） */
    gap: 24px !important;
    margin-bottom: 40px;
}

/* 原生价格筛选小部件样式 */
.shop-sidebar .price_slider_wrapper {
    font-size: 14px;
    color: #333;
}
.shop-sidebar .price_slider_amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.shop-sidebar .price_slider_amount input {
    width: 72px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}
.shop-sidebar .price_slider_amount .button {
    background: #0066cc;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
}
.shop-sidebar .price_slider_amount .button:hover {
    background: #0052a3;
}
.shop-sidebar .price_label {
    font-size: 13px;
    color: #666;
}

/* On Sale 模块（动态促销商品列表） */
.shop-sidebar .widget_lyncast_on_sale {
    margin-top: 28px;
}
.lyncast-on-sale-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.lyncast-on-sale-list > li {
    margin-bottom: 14px;
}
.lyncast-on-sale-list > li:last-child {
    margin-bottom: 0;
}
.lyncast-on-sale-list > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}
.lyncast-on-sale-list img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 6px;
    background: #f5f5f5;
    flex-shrink: 0;
}
.lyncast-on-sale-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    margin-bottom: 3px;
    /* 两行截断 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lyncast-on-sale-price {
    display: block;
    font-size: 13px;
}
.lyncast-on-sale-price del {
    color: #999;
    margin-right: 6px;
}
.lyncast-on-sale-price ins {
    text-decoration: none;
    font-weight: 700;
    color: #0066cc;
}

/* Shop with Confidence（简洁图标 + 文字链接） */
.shop-sidebar .widget_lyncast_trust {
    margin-top: 28px;
}
.lyncast-trust-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.lyncast-trust-list > li {
    margin-bottom: 12px;
}
.lyncast-trust-list > li:last-child {
    margin-bottom: 0;
}
.lyncast-trust-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    line-height: 1.3;
    transition: color 0.2s;
}
.lyncast-trust-list a:hover {
    color: #0066cc;
}
.lyncast-trust-list a:hover .lyncast-trust-icon {
    color: #0066cc;
}
.lyncast-trust-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #7b5bd6; /* 品牌紫色系，简洁线条图标 */
    transition: color 0.2s;
}

/* Need Help Choosing?（普通文字链接） */
.shop-sidebar .widget_lyncast_help {
    margin-top: 28px;
}
.lyncast-help-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 10px 0;
}
.lyncast-help-link {
    font-size: 14px;
    font-weight: 600;
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}
.lyncast-help-link:hover {
    color: #0052a3;
    text-decoration: underline;
}

/* 中等屏幕：商品 2 列，避免卡片过窄 */
@media (max-width: 1023px) and (min-width: 768px) {
    .shop-sidebar {
        width: 200px;
    }
    .shop-main .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 移动端：筛选折叠到商品上方，商品单列，无横向滚动 */
@media (max-width: 767px) {
    .shop-layout {
        display: block;
    }
    .shop-sidebar {
        width: 100%;
        margin-bottom: 24px;
    }
    .shop-sidebar-toggle {
        display: block;
        cursor: pointer;
        padding: 14px 16px;
        background: #f4f7fb;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        font-size: 15px;
        font-weight: 600;
        color: #333;
        list-style: none;
    }
    .shop-sidebar-toggle::-webkit-details-marker {
        display: none;
    }
    .shop-sidebar-toggle::after {
        content: '▾';
        float: right;
    }
    .shop-sidebar-details[open] .shop-sidebar-toggle::after {
        content: '▴';
    }
    .shop-sidebar-inner {
        padding-top: 14px;
    }
    .shop-main .products-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===== 手机端隐藏返回顶部悬浮按钮(≤767px) ===== */
@media (max-width: 767px) {
    .back-to-top {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

/* ===== LYNCAST About Us page (page-id-50) custom styles ===== */

.page-id-50 .lyncast-about{max-width:1200px;margin:0 auto;padding:0 15px;font-family:'Inter',Arial,sans-serif;color:#1a1a1a}
.page-id-50 .lyncast-about h1,.page-id-50 .lyncast-about h2{color:#1a1a1a}
.page-id-50 .lyncast-about a{text-decoration:none}
.page-id-50 .lyncast-about .la-hero{background:linear-gradient(135deg,#2b1f4a 0%,#4a2a6a 100%);color:#fff;border-radius:12px;overflow:hidden;margin:24px 0}
.page-id-50 .lyncast-about .la-hero .la-container{max-width:1200px;margin:0 auto;padding:60px 40px;display:flex;align-items:center;gap:48px}
.page-id-50 .lyncast-about .la-hero-left{flex:1.2}
.page-id-50 .lyncast-about .la-hero-right{flex:1}
.page-id-50 .lyncast-about .la-hero h2{color:#fff;font-size:42px;line-height:1.2;margin:0 0 20px}
.page-id-50 .lyncast-about .la-hero p{color:#eaeaea;font-size:17px;line-height:1.7;margin:0 0 28px}
.page-id-50 .lyncast-about .la-hero-img{width:100%;height:320px;object-fit:cover;border-radius:10px;display:block}
.page-id-50 .lyncast-about .la-btn{display:inline-block;padding:13px 26px;border-radius:6px;font-weight:600;font-size:16px;margin-right:12px}
.page-id-50 .lyncast-about .la-btn-primary{background:#ff6b35;color:#fff}
.page-id-50 .lyncast-about .la-btn-primary:hover{background:#e55a2b}
.page-id-50 .lyncast-about .la-btn-secondary{background:transparent;color:#fff;border:1px solid #ffffff88}
.page-id-50 .lyncast-about .la-btn-secondary:hover{border-color:#fff;background:#ffffff22}
.page-id-50 .lyncast-about .la-who{padding:70px 20px;display:flex;align-items:center;gap:48px}
.page-id-50 .lyncast-about .la-who-img{width:50%;height:340px;object-fit:cover;border-radius:10px}
.page-id-50 .lyncast-about .la-who-text{flex:1}
.page-id-50 .lyncast-about .la-who h2{font-size:34px;margin:0 0 20px}
.page-id-50 .lyncast-about .la-who p{font-size:16px;line-height:1.7;margin:0}
.page-id-50 .lyncast-about .la-collections{padding:20px 0 60px;text-align:center}
.page-id-50 .lyncast-about .la-collections h2{font-size:34px;margin:0 0 12px}
.page-id-50 .lyncast-about .la-collections .la-collect-intro{font-size:16px;line-height:1.7;color:#444;max-width:700px;margin:0 auto 36px}
.page-id-50 .lyncast-about .la-grid{display:flex;flex-wrap:nowrap;gap:24px;justify-content:flex-start;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;padding-bottom:8px}
.page-id-50 .lyncast-about .la-card{background:#fff;border:1px solid #e8e8e8;border-radius:12px;box-shadow:0 2px 10px rgba(0,0,0,0.06);overflow:hidden;flex:0 0 calc(33.333% - 16px);scroll-snap-align:start;transition:transform .2s,box-shadow .2s}
.page-id-50 .lyncast-about .la-card:hover{transform:translateY(-4px);box-shadow:0 6px 20px rgba(0,0,0,0.12)}
.page-id-50 .lyncast-about .la-card img{width:100%;height:200px;object-fit:cover;display:block}
.page-id-50 .lyncast-about .la-card-body{padding:18px 20px 22px;text-align:left}
.page-id-50 .lyncast-about .la-card h3{font-size:20px;margin:0 0 10px;color:#1a1a1a}
.page-id-50 .lyncast-about .la-card p{font-size:14px;line-height:1.6;color:#555;margin:0 0 14px}
.page-id-50 .lyncast-about .la-card .la-shopnow{color:#764ba2;font-weight:600;font-size:14px}
.page-id-50 .lyncast-about .la-card .la-shopnow:hover{color:#ff6b35}
.page-id-50 .lyncast-about .la-amazon{background:#764ba2;color:#fff;border-radius:12px;margin:40px 0;padding:60px 40px;text-align:center}
.page-id-50 .lyncast-about .la-amazon h2{color:#fff;font-size:32px;margin:0 0 18px}
.page-id-50 .lyncast-about .la-amazon p{color:#f3eefb;font-size:16px;line-height:1.7;max-width:760px;margin:0 auto 30px}
.page-id-50 .lyncast-about .la-support{padding:30px 0 70px;text-align:center}
.page-id-50 .lyncast-about .la-support h2{font-size:32px;margin:0 0 14px}
.page-id-50 .lyncast-about .la-support>p{font-size:16px;line-height:1.7;color:#444;max-width:720px;margin:0 auto 36px}
.page-id-50 .lyncast-about .la-support-grid{display:flex;flex-wrap:wrap;gap:20px;justify-content:center}
.page-id-50 .lyncast-about .la-support-card{background:#f8f9fa;border:1px solid #e8e8e8;border-radius:10px;padding:26px 30px;width:calc(33.333% - 20px);max-width:340px}
.page-id-50 .lyncast-about .la-support-card a{color:#764ba2;font-weight:600;font-size:17px}
.page-id-50 .lyncast-about .la-support-card a:hover{color:#ff6b35}
@media (max-width:900px){
.page-id-50 .lyncast-about .la-hero .la-container{flex-direction:column;padding:40px 24px;gap:30px}
.page-id-50 .lyncast-about .la-hero-right{width:100%}
.page-id-50 .lyncast-about .la-hero h2{font-size:32px}
.page-id-50 .lyncast-about .la-who{flex-direction:column;padding:50px 20px}
.page-id-50 .lyncast-about .la-who-img{width:100%;height:260px}
.page-id-50 .lyncast-about .la-card{flex:0 0 calc(50% - 12px)}
.page-id-50 .lyncast-about .la-support-card{width:calc(50% - 20px)}
}
@media (max-width:768px){
.page-id-50 .lyncast-about .la-card{flex:0 0 260px}
.page-id-50 .lyncast-about .la-support-card{width:100%}
.page-id-50 .lyncast-about .la-btn{display:block;margin:0 0 12px;text-align:center}
.page-id-50 .lyncast-about .la-hero p{font-size:15px}
}
/* Hero 按钮横向并排：隐藏 hero-left 内 wpautop 生成的 <br> 换行 */
.page-id-50 .lyncast-about .la-hero-left br{display:none}
.page-id-50 .lyncast-about .la-hero-left .la-btn{display:inline-block;margin-bottom:0}

/* ========================================
   12. 产品页标题独立行 + 移动端单栏（2026-11-05）
   ======================================== */
/* 产品标题独立行：左对齐，横跨整个产品区域 */
.single-product-heading {
    margin-bottom: 40px;
}
.single-product-heading .product_title {
    font-size: 36px;
    margin: 0;
}

/* 移动端：单栏 + 标题优先（模板内联 grid 需 !important 覆盖） */
@media (max-width: 768px) {
    .single-product-wrapper {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    .single-product-heading .product_title {
        font-size: 26px;
    }
    .single-product-heading {
        margin-bottom: 25px;
    }
    /* 移动端 Gallery 解除 sticky（回归文档流，随页面滚动） */
    .product-gallery {
        position: static !important;
        align-self: auto !important;
    }
}

/* ========================================
   13. 产品页 Gallery（2026-11-05 方案 B）
   缩略图 active 高亮；主图箭头内联样式已够，仅补 active 视觉
   ======================================== */
/* 缩略图单行排列：覆盖模板内联 flex-wrap:wrap（6张 5上1下 → 全部同一行）
   nowrap 强制单行；超宽时容器内部横向滚动（不撑宽页面）；移动端可手指横滑 */
.product-thumbnails {
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
    max-width: 100%;
}
/* 缩略图统一 64px 正方形（覆盖模板内联 80px），flex 固定 0 0 64px 防挤压变形 */
.product-thumbnails .thumbnail {
    width: 64px !important;
    height: 64px !important;
    flex: 0 0 64px !important;
    scroll-snap-align: start;
}
.product-thumbnails .thumbnail.active {
    border-color: #ff6b35 !important;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.25);
}
.product-thumbnails .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-arrow:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #ff6b35 !important;
}

/* ========================================
   14. 产品页 Tabs 移动端横向溢出修复（2026-11-05）
   390px 下三标签缩小 padding 完整一行；320px 窄屏 Tabs 内部滚动防页面溢出
   仅对 ≤768px 生效，桌面端布局不变
   ======================================== */
@media (max-width: 768px) {
    .product-tabs .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .product-tabs .tabs::-webkit-scrollbar {
        display: none;
    }
    .product-tabs .tabs li {
        padding: 15px 12px !important;
        font-size: 14px !important;
        white-space: nowrap;
        flex-shrink: 0;
    }
}
@media (max-width: 320px) {
    .product-tabs .tabs li {
        padding: 15px 10px !important;
        font-size: 13px !important;
    }
}

/* ===== You May Also Like (相关产品) 布局专属规则 =====
   仅作用于单产品详情页底部的 .related-products 模块，用高特异性 .related-products 前缀限定，
   不影响首页 Featured / Shop 共用的 .products-grid，不影响产品详情主体/Gallery/购买区/Description。 */
.related-products .products-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* 桌面 4 列（!important 覆盖 functions.php 内联 .products-grid 的 3 列） */
    gap: var(--spacing-lg);
}

.related-products .product-card {
    display: flex;
    flex-direction: column;
    height: 100%;                          /* 整卡等高 */
    background: var(--bg-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.related-products .product-image-wrapper {
    aspect-ratio: 1;                       /* 图片区域统一正方形 */
    width: 100%;
    background: var(--bg-gray);
    overflow: hidden;
}

.related-products .product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;                   /* 完整展示产品，不裁切不变形 */
    padding: 20px;
    display: block;
}

.related-products .product-info {
    display: flex;
    flex-direction: column;
    flex: 1;                               /* 撑满卡片剩余高度，配合整卡等高 */
    padding: var(--spacing-md);
}

.related-products .product-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    min-height: 2.8em;                     /* 固定两行标题高度 (1.4 × 2) */
    display: -webkit-box;
    -webkit-line-clamp: 2;                 /* 产品名称最多显示 2 行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.related-products .product-price {
    margin-top: auto;                      /* 价格统一贴底对齐 */
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* 平板 2 列 */
@media (max-width: 1024px) {
    .related-products .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 手机 1 列（≤767px；768px iPad Mini 归平板 2 列） */
@media (max-width: 767px) {
    .related-products .products-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===== 产品详情页 Tabs 激活状态同步（2026-11-06） =====
   激活样式从模板内联移到此，由 .active class 驱动，三标签正确切换。
   仅作用于 .product-tabs .tabs，不影响其他模块。视觉复现原内联值。 */
.product-tabs .tabs li {
    color: #666;
}
.product-tabs .tabs li.active {
    color: #0066cc;
    border-bottom: 2px solid #0066cc;
    font-weight: 600;
}

/* ===== 产品页 Add to Cart 按钮配色加深（2026-11-12） =====
   覆盖 WooCommerce .button.alt 默认背景 #7F54B3，改为品牌深紫 #534AB7。
   高优先级规则，仅作用于产品页加购按钮，不影响其他按钮/Amazon按钮(#ff9900不变)。 */
.single_add_to_cart_button {
    background: #534AB7 !important;
    color: #fff !important;
    border: 1px solid #534AB7 !important;
}
.single_add_to_cart_button:hover {
    background: #3C3489 !important;
    border-color: #3C3489 !important;
}
