/* ============================================
   A4纸桂子香 - 完整现代样式表
   版本: 4.0
   设计: 清新色调 + 强视觉冲击
   ============================================ */

/* 1. 现代配色系统 */
:root {
    /* 主色调 - 清新纸品风格 */
    --color-primary: #4a6fa5;      /* 主蓝 - 如墨水般深邃 */
    --color-secondary: #ff9a76;    /* 活力橙 - 如桂花般温暖 */
    --color-accent: #6dd3ce;       /* 清新青 - 如宣纸般淡雅 */
    --color-background: #f7f9fc;   /* 背景色 - 如云纸般柔和 */
    --color-surface: #ffffff;      /* 表面色 - 纯白纸张 */
    --color-text: #2d3748;         /* 主文字 - 深灰墨色 */
    --color-text-light: #718096;   /* 次要文字 */
    --color-border: #e2e8f0;       /* 边框色 */
    
    /* 功能色 */
    --color-success: #48bb78;
    --color-warning: #ed8936;
    --color-danger: #f56565;
    --color-info: #4299e1;
    
    /* 间距系统 (基于8px网格) */
    --space-xs: 0.5rem;    /* 8px */
    --space-sm: 1rem;      /* 16px */
    --space-md: 1.5rem;    /* 24px */
    --space-lg: 2rem;      /* 32px */
    --space-xl: 3rem;      /* 48px */
    --space-xxl: 4rem;     /* 64px */
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* 阴影系统 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, var(--color-primary), #667eea);
    --gradient-accent: linear-gradient(135deg, var(--color-accent), #4fd1c5);
    --gradient-hero: linear-gradient(135deg, rgba(74, 111, 165, 0.9), rgba(109, 211, 206, 0.8));
    
    /* 动画 */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Serif SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* 3. 容器系统 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

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

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    text-align: center;
    position: relative;
    padding-bottom: var(--space-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: var(--space-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-footer {
    text-align: center;
    margin-top: var(--space-xl);
}

/* 4. 现代导航栏 */
.navbar {
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--space-sm) 0;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    gap: var(--space-md);
}

/* 品牌Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: var(--space-sm);
    transition: all var(--transition-fast);
}

.logo:hover {
    transform: translateY(-2px);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary);
    margin: 0;
    font-family: 'Ma Shan Zheng', cursive;
    letter-spacing: 1px;
}

.logo span {
    color: var(--color-secondary);
    font-weight: 700;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--color-text-light);
    font-weight: 300;
    letter-spacing: 0.5px;
    display: block;
    margin-top: 2px;
}

/* 导航链接 */
.nav-links {
    display: flex;
    gap: var(--space-xs);
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: -1;
    border-radius: var(--radius-md);
}

.nav-links a:hover {
    color: white;
    transform: translateY(-1px);
}

.nav-links a:hover::before {
    opacity: 1;
}

.nav-links a.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 111, 165, 0.2);
}

.nav-links a i {
    font-size: 1.1em;
}

/* 搜索框 */
.nav-search {
    flex: 1;
    max-width: 300px;
    min-width: 200px;
}

.nav-search form {
    display: flex;
    position: relative;
    background: var(--color-background);
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-fast);
    border: 1px solid var(--color-border);
}

.nav-search form:focus-within {
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1), var(--shadow-md);
    border-color: var(--color-primary);
}

.nav-search input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--color-text);
    outline: none;
    width: 100%;
}

.nav-search input::placeholder {
    color: var(--color-text-light);
}

.nav-search button {
    background: var(--gradient-primary);
    border: none;
    color: white;
    cursor: pointer;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
    min-width: 44px;
}

.nav-search button:hover {
    transform: scale(1.05);
}

/* 5. 英雄区 */
.hero {
    background: var(--gradient-hero), url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80') center/cover;
    padding: var(--space-xxl) var(--space-md);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: var(--space-xl);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.3), rgba(0,0,0,0.1));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--space-md);
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero .highlight {
    color: var(--color-accent);
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: var(--space-xl);
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

/* 6. 按钮系统 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    border: 2px solid transparent;
    text-align: center;
    min-height: 48px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 111, 165, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 111, 165, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: white;
    color: var(--color-primary);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px);
}

.btn-small {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.9rem;
    min-height: 36px;
}

.hero-keywords {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
    margin-top: var(--space-xl);
}

.hero-keywords span {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-fast);
}

.hero-keywords span:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* 7. 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

/* 8. 产品卡片 */
.product-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--color-border);
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-accent);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.product-info {
    padding: var(--space-lg);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.product-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
    line-height: 1.4;
}

.product-title a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

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

.product-desc {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: var(--space-md);
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: var(--space-sm);
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.product-price::before {
    content: '¥';
    font-size: 0.9em;
    opacity: 0.7;
}

.product-spec {
    font-size: 0.85rem;
    color: var(--color-text-light);
    background: var(--color-background);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

/* 9. 案例文章网格 */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.case-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.case-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.case-card:hover .case-image img {
    transform: scale(1.1);
}

.case-tag {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

.case-content {
    padding: var(--space-lg);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.case-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
    margin-bottom: var(--space-xs);
}

.case-title a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

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

.case-excerpt {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: var(--space-sm);
}

.case-meta {
    display: flex;
    justify-content: space-between;
    color: var(--color-text-light);
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
}

.case-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    margin-top: auto;
}

.case-link:hover {
    color: var(--color-secondary);
    transform: translateX(5px);
}

/* 10. 页脚 */
.footer {
    background: linear-gradient(135deg, #1a202c, #2d3748);
    color: white;
    padding: var(--space-xl) 0 0;
    margin-top: auto;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.footer-about h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    font-family: 'Ma Shan Zheng', cursive;
    color: white;
}

.footer-about span {
    color: var(--color-accent);
}

.footer-about p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.footer-about .highlight {
    color: var(--color-secondary);
    font-weight: 600;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: white;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-bottom: var(--space-sm);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent);
    transform: translateX(5px);
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-md) 0;
    margin-top: var(--space-xl);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
}

.footer-keywords {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin-top: var(--space-sm);
}

/* 11. 响应式设计 */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .nav-container {
        flex-direction: column;
        gap: var(--space-md);
        padding: 0 var(--space-sm);
    }
    
    .nav-links {
        order: 2;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--space-xs);
    }
    
    .nav-links a {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.9rem;
    }
    
    .nav-search {
        order: 1;
        width: 100%;
        max-width: 100%;
    }
    
    .hero {
        padding: var(--space-xl) var(--space-sm);
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .product-grid,
    .case-grid {
        grid-template-columns: 1fr;
        padding: 0 var(--space-sm);
    }
    
    .container {
        padding: 0 var(--space-sm);
    }
    
    .section {
        padding: var(--space-lg) 0;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo-subtitle {
        font-size: 0.7rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
}

/* 12. 辅助类 */
.highlight {
    color: var(--color-secondary);
    font-weight: 600;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

/* 13. 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.product-card {
    animation: fadeIn 0.6s ease-out;
    animation-fill-mode: both;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }

.case-card {
    animation: slideInRight 0.6s ease-out;
    animation-fill-mode: both;
}

.case-card:nth-child(1) { animation-delay: 0.1s; }
.case-card:nth-child(2) { animation-delay: 0.2s; }
.case-card:nth-child(3) { animation-delay: 0.3s; }
/* ============================================
   产品详情页专用样式
   ============================================ */

.breadcrumb {
    font-size: 0.9rem;
    color: var(--color-text-light);
    padding: var(--space-sm) 0;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
}

.breadcrumb a {
    color: var(--color-text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.breadcrumb span {
    color: var(--color-text);
    font-weight: 500;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.main-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.product-main-img {
    width: 100%;
    height: auto;
    display: block;
}

.thumbnails {
    display: flex;
    gap: var(--space-sm);
}

.thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 2px solid var(--color-border);
    transition: all var(--transition-fast);
}

.thumb.active {
    border-color: var(--color-primary);
    transform: scale(1.05);
}

.thumb:hover:not(.active) {
    border-color: var(--color-accent);
}

.product-info-detail {
    padding: var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.product-title-detail {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    color: var(--color-text-light);
}

.stars {
    color: var(--color-warning);
    font-size: 1.2rem;
}

.product-excerpt {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.price-section {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.price-main {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
}

.price-unit {
    font-size: 1.2rem;
    color: var(--color-text-light);
}

.discount-badge {
    background: var(--color-danger);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: var(--space-sm);
}

.spec-section {
    margin-bottom: var(--space-xl);
}

.spec-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm);
    background: var(--color-background);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.spec-label {
    font-weight: 500;
    color: var(--color-text);
}

.spec-value {
    color: var(--color-text-light);
    font-weight: 500;
}

.purchase-section {
    padding: var(--space-lg);
    background: var(--color-background);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-xl);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.quantity-selector label {
    font-weight: 500;
    color: var(--color-text);
}

.qty-control {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.qty-btn:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.qty-input {
    width: 60px;
    text-align: center;
    padding: var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
}

.stock-status {
    color: var(--color-success);
    font-weight: 500;
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: var(--space-md);
}

.btn-add-cart,
.btn-buy-now {
    flex: 1;
    padding: var(--space-lg);
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-add-cart {
    background: var(--gradient-primary);
    color: white;
}

.btn-buy-now {
    background: var(--gradient-accent);
    color: white;
}

.service-section {
    margin-bottom: var(--space-xl);
}

.service-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-icons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xs);
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.service-item i {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

/* 产品标签页 */
.product-tabs {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.tab-headers {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-background);
}

.tab-header {
    padding: var(--space-lg) var(--space-xl);
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-light);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}

.tab-header.active {
    color: var(--color-primary);
    background: var(--color-surface);
}

.tab-header.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.tab-content {
    padding: var(--space-xl);
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.tab-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
    margin: var(--space-lg) 0 var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--color-border);
}

.tab-content h3:first-child {
    margin-top: 0;
}

.tab-content ul {
    padding-left: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.tab-content li {
    margin-bottom: var(--space-sm);
    line-height: 1.5;
}

/* 文章详情页样式 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-header-detail h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

.article-meta-detail {
    display: flex;
    gap: var(--space-lg);
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
}

.article-meta-detail span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-meta-detail a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.article-meta-detail a:hover {
    color: var(--color-secondary);
}

.article-hero-detail {
    margin: var(--space-xl) 0;
    text-align: center;
}

.article-hero-img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-sm);
}

.article-hero-detail figcaption {
    color: var(--color-text-light);
    font-size: 0.9rem;
    font-style: italic;
    margin-top: var(--space-sm);
}

.article-content-detail {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text);
}

.article-content-detail h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: var(--space-xl) 0 var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-border);
}

.article-content-detail h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text);
    margin: var(--space-lg) 0 var(--space-md);
}

.article-content-detail p {
    margin-bottom: var(--space-lg);
}

.article-content-detail ul {
    padding-left: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.article-content-detail li {
    margin-bottom: var(--space-sm);
}

.article-content-detail blockquote {
    border-left: 4px solid var(--color-secondary);
    padding-left: var(--space-lg);
    margin: var(--space-xl) 0;
    font-style: italic;
    color: var(--color-text);
    background: var(--color-background);
    padding: var(--space-lg);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.recommend-card {
    background: var(--color-background);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all var(--transition-normal);
}

.recommend-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.recommend-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.recommend-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
}

.article-summary {
    background: linear-gradient(135deg, var(--color-background), #eef2f7);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    margin: var(--space-xl) 0;
}

.article-summary h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-summary ul {
    padding-left: var(--space-lg);
}

.article-summary li {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.article-footer-detail {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.article-tags {
    margin-bottom: var(--space-lg);
}

.article-tags strong {
    font-weight: 600;
    color: var(--color-text);
    margin-right: var(--space-sm);
}

.tag {
    display: inline-block;
    background: var(--color-background);
    color: var(--color-primary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    text-decoration: none;
    margin-right: var(--space-xs);
    margin-bottom: var(--space-xs);
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
}

.tag:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.article-share {
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.article-share strong {
    font-weight: 600;
    color: var(--color-text);
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-primary);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.share-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: scale(1.1);
}

.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.prev-article,
.next-article {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color var(--transition-fast);
}

.prev-article:hover,
.next-article:hover {
    color: var(--color-primary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .spec-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .tab-headers {
        flex-wrap: wrap;
    }
    
    .tab-header {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .article-header-detail h1 {
        font-size: 2rem;
    }
    
    .article-meta-detail {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .service-icons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-navigation {
        flex-direction: column;
        gap: var(--space-lg);
    }
}
/* ============================================
   手机端响应式优化 (针对产品详情页和文章详情页)
   ============================================ */

@media (max-width: 768px) {
    /* 产品详情页优化 */
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        padding: var(--space-sm);
    }
    
    .product-gallery {
        order: 1;
    }
    
    .product-info-detail {
        order: 2;
        padding: var(--space-md);
    }
    
    .main-image {
        max-height: 300px;
        overflow: hidden;
    }
    
    .product-main-img {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }
    
    .thumbnails {
        overflow-x: auto;
        padding-bottom: var(--space-sm);
        -webkit-overflow-scrolling: touch;
    }
    
    .thumbnails::-webkit-scrollbar {
        display: none;
    }
    
    .product-title-detail {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .price-main {
        font-size: 2rem;
    }
    
    .spec-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    .spec-item {
        padding: var(--space-sm);
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .spec-label {
        font-size: 0.9rem;
        color: var(--color-text-light);
    }
    
    .spec-value {
        font-size: 1rem;
        font-weight: 600;
    }
    
    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .qty-control {
        width: 100%;
        justify-content: center;
    }
    
    .qty-input {
        width: 80px;
        font-size: 1.1rem;
    }
    
    .qty-btn {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .btn-add-cart,
    .btn-buy-now {
        width: 100%;
        padding: var(--space-lg);
        font-size: 1.1rem;
        min-height: 56px;
    }
    
    .service-icons {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
    
    .service-item {
        padding: var(--space-sm);
    }
    
    /* 产品标签页优化 */
    .product-tabs {
        margin: var(--space-sm);
        border-radius: var(--radius-md);
    }
    
    .tab-headers {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-header {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: var(--space-md) var(--space-lg);
        font-size: 1rem;
    }
    
    .tab-content {
        padding: var(--space-lg);
    }
    
    /* 文章详情页优化 */
    .article-detail {
        padding: 0 var(--space-sm);
    }
    
    .article-header-detail h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .article-meta-detail {
        flex-direction: column;
        gap: var(--space-sm);
        font-size: 0.85rem;
    }
    
    .article-content-detail {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .article-content-detail h2 {
        font-size: 1.5rem;
        margin: var(--space-lg) 0 var(--space-md);
    }
    
    .article-content-detail h3 {
        font-size: 1.2rem;
    }
    
    .recommend-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .recommend-card {
        padding: var(--space-md);
    }
    
    .article-footer-detail {
        padding-top: var(--space-lg);
    }
    
    .article-navigation {
        flex-direction: column;
        gap: var(--space-lg);
    }
    
    .prev-article,
    .next-article {
        width: 100%;
        padding: var(--space-md);
        background: var(--color-background);
        border-radius: var(--radius-md);
        border: 1px solid var(--color-border);
    }
}

@media (max-width: 480px) {
    /* 小手机优化 */
    .product-title-detail {
        font-size: 1.6rem;
    }
    
    .price-main {
        font-size: 1.8rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
        padding: var(--space-xs) var(--space-sm);
    }
    
    .thumb {
        width: 60px;
        height: 60px;
    }
    
    .product-excerpt {
        font-size: 1rem;
    }
    
    .spec-item {
        padding: var(--space-xs) var(--space-sm);
    }
    
    .service-icons {
        grid-template-columns: 1fr;
    }
    
    /* 文章页优化 */
    .article-header-detail h1 {
        font-size: 1.6rem;
    }
    
    .article-hero-img {
        max-height: 200px;
        object-fit: cover;
    }
    
    .article-content-detail blockquote {
        padding: var(--space-md);
        font-size: 1rem;
    }
    
    .share-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    /* 通用优化 */
    .btn {
        min-height: 44px;
        font-size: 1rem;
    }
    
    .btn-small {
        min-height: 36px;
        padding: var(--space-xs) var(--space-md);
    }
    
    /* 表单元素优化 */
    input, textarea, select {
        font-size: 16px !important; /* 防止iOS自动缩放 */
    }
    
    .qty-input {
        font-size: 1.2rem;
        height: 44px;
    }
}

/* 针对iOS Safari的优化 */
@supports (-webkit-touch-callout: none) {
    .btn,
    .btn-add-cart,
    .btn-buy-now {
        cursor: pointer;
    }
    
    /* 移除iOS输入框的内阴影 */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    textarea {
        -webkit-appearance: none;
        border-radius: var(--radius-md);
    }
}

/* 防止手机端文本选中 */
@media (max-width: 768px) {
    .btn,
    .tab-header,
    .thumb {
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        -webkit-tap-highlight-color: transparent;
    }
}

/* 手机端触摸友好的优化 */
@media (max-width: 768px) {
    /* 增加触摸目标大小 */
    .nav-links a {
        min-height: 44px;
        min-width: 44px;
        padding: var(--space-sm) var(--space-md);
    }
    
    .qty-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .share-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* 防止手机端按钮点击延迟 */
    .btn,
    a,
    button {
        touch-action: manipulation;
    }
    
    /* 优化滚动性能 */
    .product-detail-grid,
    .article-detail {
        -webkit-overflow-scrolling: touch;
    }
    
    /* 防止字体大小被缩放 */
    html {
        -webkit-text-size-adjust: 100%;
    }
}

/* 平板设备的优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-detail-grid {
        gap: var(--space-lg);
    }
    
    .product-info-detail {
        padding: var(--space-md);
    }
    
    .thumb {
        width: 70px;
        height: 70px;
    }
    
    .service-icons {
        grid-template-columns: repeat(2, 1fr);
    }
}