/* =====================================================
   全局变量与重置
   ===================================================== */
:root {
    --color-primary: #000000;
    --color-secondary: #1d1d1f;
    --color-accent: #0071e3;
    --color-text: #1d1d1f;
    --color-text-secondary: #6e6e73;
    --color-background: #ffffff;
    --color-surface: #f5f5f7;
    --color-border: #d2d2d7;
    --color-hover: #f5f5f7;

    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    --spacing-2xl: 80px;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    overscroll-behavior: none;
    overflow-x: hidden;
}

/* =====================================================
   Banner Section - Hero
   ===================================================== */
.banner {
    position: relative;
    height: 85vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: white;
    margin-top: 0;
}

.banner-title {
    position: relative;
    z-index: 2;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    letter-spacing: -0.02em;
    margin-bottom: var(--spacing-lg);
    padding: 0 var(--spacing-md);
    max-width: 1200px;
    animation: fadeInUp 0.8s ease-out;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.banner-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1; /* 移除虚化，显示原图 */
    filter: none; /* 移除模糊效果 */
}

.explore-btn {
    position: relative;
    z-index: 2;
    display: inline-block;
    padding: 16px 48px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-primary);
    background: #ffffff;
    border-radius: 980px;
    text-decoration: none;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.explore-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* =====================================================
   Products Section - 使用灰色背景，修复横向布局
   ===================================================== */
.products-section {
    padding: var(--spacing-2xl) 0; /* 修改：左右padding改为0，使内容横向铺满 */
    background: var(--color-surface); /* 灰色背景 */
    width: 100%; /* 确保宽度100% */
}

.products-section .container {
    max-width: 1400px; /* 添加容器限制最大宽度 */
    margin: 0 auto;
    padding: 0 var(--spacing-md); /* 在容器内部添加padding */
}

.cuisine-ops {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    padding: 6px;
    background: var(--color-surface);
    border-radius: 980px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.cuisine-link {
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: transparent; /* 透明背景 */
    border-radius: 980px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: 1px solid transparent;
}

.cuisine-link[is-active="true"] {
    color: var(--color-text);
    background: rgba(0, 0, 0, 0.1); /* 浅灰色激活状态 */
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: var(--shadow-sm);
}

.cuisine-link:hover {
    color: var(--color-text);
    background: rgba(0, 0, 0, 0.05);
}

.products-container {
    margin-top: var(--spacing-xl);
}

/* =====================================================
   Products Grid - 只保留网格布局样式
   ===================================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.no-product {
    text-align: center;
    padding: var(--spacing-2xl);
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    grid-column: 1 / -1;
}

.loading-state {
    text-align: center;
    padding: var(--spacing-2xl);
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    grid-column: 1 / -1;
}

/* =====================================================
   Pagination
   ===================================================== */
.products-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xl);
}

.products-pagination a,
.products-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    font-size: 0.938rem;
    font-weight: 500;
    color: var(--color-text);
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.products-pagination a:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.products-pagination .current {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

/* =====================================================
   About Us Section - 使用灰色背景
   ===================================================== */
.about-us {
    background: var(--color-surface);
    padding: var(--spacing-2xl) var(--spacing-md);
}

.course-from {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.course-from-content {
    padding: var(--spacing-lg);
}

.course-from-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.course-from-desc {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.course-from-img {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.course-from-img img {
    width: 100%;
    height: auto;
    display: block;
}

/* =====================================================
   Real-time Stats - 使用灰色背景
   ===================================================== */
.real-time-stats {
    background: var(--color-surface);
    padding: var(--spacing-2xl) var(--spacing-md);
    color: var(--color-text);
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
}

.stats-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    letter-spacing: -0.02em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.stat-item {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all var(--transition-normal);
}

.stat-item:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-label {
    font-size: 0.938rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1;
}

/* =====================================================
   Ingredient Helper - 使用灰色背景
   ===================================================== */
.ingredient-helper {
    padding: var(--spacing-2xl) var(--spacing-md);
    background: var(--color-surface);
}

.ingredient-helper .container {
    max-width: 1200px;
    margin: 0 auto;
}

.helper-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    margin-top: var(--spacing-xl);
}

.helper-text {
    padding: var(--spacing-lg);
}

.function-intro h3 {
    font-size: 2rem; /* 从 1.75rem 增大到 2rem */
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--spacing-md);
}

.function-intro p {
    font-size: 1.25rem; /* 从 1.125rem 增大到 1.25rem */
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
}

.start-using-btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--color-primary);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.start-using-btn:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.helper-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.helper-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* =====================================================
   Animations
   ===================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动动画效果 */
.animated {
    animation: fadeInUp 0.8s ease-out;
}

/* =====================================================
   Responsive Design
   ===================================================== */
@media (max-width: 1024px) {
    .course-from,
    .helper-content {
        grid-template-columns: 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }

    .contact-left,
    .contact-right {
        align-items: center;
    }

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

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: var(--spacing-md);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .plans-wrapper {
        grid-template-columns: 1fr;
    }

    .cuisine-ops {
        width: 100%;
    }

    .contact-title {
        font-size: 2rem;
    }

    .contact-subtitle {
        font-size: 1rem;
    }

    .social-links {
        gap: var(--spacing-sm);
    }

    .social-icon {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .banner {
        height: 70vh;
        min-height: 500px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}