/* ========================================
   菜七生鲜 - 全局样式
   ======================================== */

/* CSS 变量 */
:root {
    --primary-green: #1B5E20;
    --primary-light: #2E7D32;
    --accent-orange: #F57C00;
    --accent-light: #FF9800;
    --text-dark: #212121;
    --text-medium: #616161;
    --text-light: #9E9E9E;
    --bg-white: #FFFFFF;
    --bg-light: #F1F8E9;
    --bg-cream: #FAFAFA;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.16);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 重置与基础 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 通用区块 */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header.light {
    color: var(--bg-white);
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--bg-light);
    color: var(--primary-green);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.section-header.light .section-tag {
    background: rgba(255,255,255,0.15);
    color: var(--bg-white);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.section-header.light .section-title {
    color: var(--bg-white);
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--accent-orange);
    color: var(--bg-white);
    box-shadow: 0 4px 16px rgba(245,124,0,0.35);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245,124,0,0.45);
}

/* ========================================
   导航栏
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 12px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bg-white);
    transition: var(--transition);
}

.navbar.scrolled .logo {
    color: var(--primary-green);
}

.logo-icon {
    font-size: 1.75rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    position: relative;
    padding: 4px 0;
}

.navbar.scrolled .nav-link {
    color: var(--text-dark);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-orange);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-orange);
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
    color: var(--accent-orange);
}

/* 移动端菜单按钮 */
.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    color: var(--bg-white);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.lang-switch:hover {
    background: rgba(255,255,255,0.25);
}

.lang-icon {
    width: 14px;
    height: 14px;
    transition: var(--transition);
}

.lang-switch.active .lang-icon {
    transform: rotate(180deg);
}

.navbar.scrolled .lang-switch {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--bg-white);
    transition: var(--transition);
    border-radius: 2px;
}

.navbar.scrolled .nav-toggle span {
    background: var(--text-dark);
}

/* ========================================
   首屏 Hero
   ======================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(27,94,32,0.88) 0%, rgba(46,125,50,0.82) 50%, rgba(76,175,80,0.75) 100%);
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--bg-white);
    max-width: 800px;
    padding: 0 24px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: 4px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 16px;
    opacity: 0.95;
    letter-spacing: 8px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    white-space: nowrap;
}

.hero-desc {
    font-size: 1.125rem;
    opacity: 0.85;
    margin-bottom: 40px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-content .btn {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* 滚动提示 */
.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.hero-scroll span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 12px;
    position: relative;
}

.hero-scroll span::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
    animation: scrollDown 1.5s infinite;
}

/* 维吾尔语版首屏底部版权 */
.hero-footer {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    z-index: 2;
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.8125rem;
    line-height: 1.8;
}

.hero-footer .icp {
    margin-top: 4px;
}

.hero-footer .icp a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
}

.hero-footer .icp a:hover {
    color: rgba(255,255,255,0.8);
}

/* ========================================
   产品中心
   ======================================== */
.products {
    background: var(--bg-cream);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--bg-light);
}

.product-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: inline-block;
    transition: var(--transition);
}

.product-card:hover .product-icon {
    transform: scale(1.1);
}

.product-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.product-card p {
    font-size: 0.9375rem;
    color: var(--text-medium);
    line-height: 1.7;
}

/* ========================================
   核心优势
   ======================================== */
.features {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-light) 100%);
    position: relative;
    overflow: hidden;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
    z-index: 1;
}

.feature-item {
    text-align: center;
    color: var(--bg-white);
    padding: 20px;
}

.feature-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--bg-white);
}

.feature-item:hover .feature-icon {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

.feature-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-item p {
    font-size: 0.9375rem;
    opacity: 0.85;
    line-height: 1.7;
}

.zh-only.hidden {
    display: none !important;
}

.ug-only {
    display: none;
}

.ug-only.visible {
    display: block;
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: var(--text-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bg-white);
    margin-bottom: 16px;
}

.footer-brand p {
    line-height: 1.8;
    font-size: 0.9375rem;
}

.footer-contact h4 {
    color: var(--bg-white);
    font-size: 1.125rem;
    margin-bottom: 20px;
}

.footer-contact p {
    line-height: 2;
    font-size: 0.9375rem;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
}

.footer-bottom .icp {
    margin-top: 8px;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.4);
}

.footer-bottom .icp a {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
}

.footer-bottom .icp a:hover {
    color: rgba(255,255,255,0.7);
}



/* ========================================
   动画
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollDown {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(12px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 1.125rem;
        letter-spacing: 4px;
        white-space: normal;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .lang-switch {
        padding: 5px 10px;
        font-size: 0.8125rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
    }

    .nav-menu.active {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        justify-content: center;
        gap: 24px;
        box-shadow: var(--shadow-lg);
        transition: right 0.3s ease;
    }

    .nav-link {
        color: var(--text-dark) !important;
        font-size: 1.125rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-brand .footer-logo {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.9375rem;
        letter-spacing: 1px;
    }

    .btn {
        padding: 12px 28px;
        font-size: 0.9375rem;
    }

    .product-card {
        padding: 30px 20px;
    }
}
