/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0052cc;
    --secondary-color: #f5f6f7;
    --text-color: #333;
    --font-primary: 'Poppins', sans-serif;
    --font-display: 'Playfair Display', serif;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
}

.announcement-bar {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 10px;
}

.header-main {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Hero 区域 */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.milledcdn.com/2024-12-22/aGioUk1LBEwBHv0S/M2Jc3v1Wgluw.webp');
    background-size: cover;
    background-position: center;
    height: 600px;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* 分类区域 */
.featured-categories {
    padding: 80px 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.category-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.category-card h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: rgba(255,255,255,0.9);
    margin: 0;
    font-size: 1.5rem;
    text-align: center;
}

/* Collection Spotlight 区域样式 */
.collection-spotlight {
    padding: 80px 0;
    background: var(--secondary-color);
}

.collection-spotlight .container {
    max-width: 1000px;  /* 与 product-card 保持一致的宽度 */
    display: flex;
    align-items: center;
    gap: 40px;
    margin: 0 auto;
    padding: 0 20px;
}

.spotlight-content {
    flex: 1;
    padding-right: 20px;
}

.spotlight-content h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.spotlight-content p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.spotlight-image {
    flex: 1;
    position: relative;
}

.spotlight-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .collection-spotlight .container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 30px;
    }

    .spotlight-content {
        padding-right: 0;
    }

    .spotlight-content h2 {
        font-size: 2rem;
    }

    .spotlight-image img {
        height: 300px;
    }
}

/* Features 区域 */
.features {
    padding: 60px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.feature h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 20px;
    width: 150px;
}

.footer h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    color: #999;
}

.footer-legal {
    margin-top: 20px;
}

.footer-legal a {
    color: #999;
    text-decoration: none;
    margin: 0 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .collection-spotlight .container {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-cta {
        flex-direction: column;
    }
}

/* Trending Products 区域 */
.trending-products {
    padding: 80px 0;
    background: var(--secondary-color);
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-color);
}

.product-card {
    display: flex;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 0 auto;
    max-width: 1000px;
}

.product-image {
    flex: 1;
    position: relative;
}

.product-image a {
    display: block;
    position: relative;
    text-decoration: none;
}

.product-content a {
    text-decoration: none;
    color: var(--text-color);
}

.product-content a:hover h3 {
    color: var(--primary-color);
}

.product-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-content h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    font-family: var(--font-display);
    color: var(--text-color);
}

.product-content p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.product-buttons {
    display: flex;
    gap: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-card {
        flex-direction: column;
    }

    .product-image img {
        height: 300px;
    }

    .product-content {
        padding: 30px;
        text-align: center;
    }

    .product-buttons {
        flex-direction: column;
        gap: 10px;
    }
}

/* 按钮样式 */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0043a6;
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: #f0f5ff;
    transform: translateY(-2px);
}

/* 移动端导航 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s;
}

/* 图片加载动画 */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: block;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 15px;
    }

    /* 优化移动端触摸区域 */
    .btn-primary,
    .btn-secondary,
    .nav-menu a {
        padding: 12px 20px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 优化移动端间距 */
    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .hero {
        height: auto;
        min-height: 400px;
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    /* 优化移动端网格布局 */
    .category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* 触摸设备优化 */
@media (hover: none) {
    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.98);
    }

    .category-card:active {
        transform: scale(0.98);
    }
}

/* 性能优化 */
.product-card,
.category-card,
.feature {
    will-change: transform;
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #ffffff;
        --secondary-color: #1a1a1a;
    }
}