/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: #fff;
    border-bottom: 2px solid #eee;
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.logo a {
    text-decoration: none;
    color: #2c3e50;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #3498db;
}

/* 底部样式 */
footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
}

/* 首页横幅 */
.hero {
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: #fff;
    text-align: center;
    padding: 80px 0;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero .slogan {
    font-size: 20px;
    opacity: 0.9;
}

.btn-primary {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 40px;
    background: #fff;
    color: #3498db;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: transform 0.3s;
}

.btn-primary:hover {
    transform: scale(1.05);
}

/* 特色模块 */
.features {
    padding: 40px 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 40px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.feature-item h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: box-shadow 0.3s;
}

.product-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.product-card img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.product-card h3 {
    margin: 15px 0 10px;
    font-size: 18px;
}

.product-card .price {
    color: #e74c3c;
    font-size: 20px;
    font-weight: bold;
}

.no-image {
    height: 200px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    border-radius: 4px;
}

.btn-detail {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.btn-back {
    display: inline-block;
    margin-top: 20px;
    padding: 8px 25px;
    background: #95a5a6;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

/* 产品详情页 */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

.product-detail .product-image img {
    width: 100%;
    border-radius: 8px;
}

.product-detail .price {
    font-size: 28px;
    color: #e74c3c;
    font-weight: bold;
}

/* 新闻列表 */
.news-item {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item h2 {
    margin-bottom: 8px;
}

.news-item h2 a {
    color: #2c3e50;
    text-decoration: none;
}

.news-item h2 a:hover {
    color: #3498db;
}

.news-meta {
    color: #888;
    font-size: 14px;
    margin-bottom: 10px;
}

.news-content {
    font-size: 16px;
    line-height: 1.8;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    header .container {
        flex-direction: column;
        gap: 10px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}

/* ============================================
   页面切换入场动画
   ============================================ */

/* 页面主体内容初始状态（隐藏 + 位移） */
.page-content {
    opacity: 0;
    transform: translateY(60px);  /* 增大位移距离，从 30px → 60px */
    transition: opacity 1.2s cubic-bezier(0.23, 1, 0.32, 1),  /* 持续时间 0.8s → 1.2s */
                transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

/* 页面加载完成后，显示内容 */
.page-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 针对不同页面，可以添加延迟（让标题先出现，内容稍后） */
.page-content .delay-1 { transition-delay: 0.1s; }
.page-content .delay-2 { transition-delay: 0.25s; }
.page-content .delay-3 { transition-delay: 0.4s; }
.page-content .delay-4 { transition-delay: 0.55s; }
