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

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    color: #333;
    line-height: 1.7;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

.container { width: 92%; max-width: 1180px; margin: 0 auto; }

/* ========== 顶部导航 ========== */
.header {
    background: #fff;
    box-shadow: 0 2px 12px rgba(76, 175, 80, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}
.logo {
    font-size: 24px;
    font-weight: bold;
    color: #2e7d32;
    letter-spacing: 2px;
}
.logo span { color: #81c784; }
.nav nav a {
    color: #333;
    text-decoration: none;
    margin-left: 32px;
    font-size: 15px;
    transition: 0.3s;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}
.nav nav a:hover { color: #2e7d32; }
.nav nav a.active {
    color: #2e7d32;
    font-weight: bold;
    border-bottom-color: #66bb6a;
}

/* ========== 分页控制 ========== */
.page { display: none; }
.page.active { display: block; }

#home.active {
    min-height: calc(100vh - 72px);
    display: flex;
    flex-direction: column;
}
#home .features { flex: 1; }

/* ========== 首屏 Banner ========== */
.banner {
    position: relative;
    height: 380px;
    background: url("images/banner.jpg") center/cover no-repeat, #43a047;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}
.banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(56, 142, 60, 0.55);
}
.banner-content { position: relative; z-index: 2; padding: 0 16px; }
.banner h1 { font-size: 38px; margin-bottom: 14px; letter-spacing: 2px; }
.banner p { font-size: 17px; margin-bottom: 26px; opacity: 0.95; }

.btn-primary {
    display: inline-block;
    background: #81c784;
    color: #fff;
    padding: 12px 34px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}
.btn-primary:hover { background: #66bb6a; transform: translateY(-2px); }

/* ========== 核心优势 ========== */
.features {
    padding: 40px 0;
    background: #f6fbf6;
}
.features .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    text-align: center;
    width: 92%;
    max-width: 1180px;
    margin: 0 auto;
}

.feature-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #66bb6a, #a5d6a7);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(102, 187, 106, 0.3);
    transition: 0.3s;
    color: #fff;
}

.feature-icon svg {
    width: 36px;
    height: 36px;
    stroke: #fff;
}

.feature-item:hover .feature-icon {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 24px rgba(102, 187, 106, 0.45);
}

.feature-item h3 {
    color: #2e7d32;
    font-size: 17px;
    margin-bottom: 6px;
}
.feature-item p {
    color: #666;
    font-size: 13px;
}

/* ========== 关于我们 ========== */
.about-section { padding: 50px 0; }
.about-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.about-img img { width: 100%; border-radius: 12px; box-shadow: 0 10px 30px rgba(102, 187, 106, 0.15); }
.about-text h2 { font-size: 28px; color: #2e7d32; margin-bottom: 20px; }
.about-text p { color: #555; margin-bottom: 16px; }

/* ========== 通用标题 ========== */
.section-title {
    text-align: center;
    font-size: 32px;
    color: #2e7d32;
    margin-bottom: 12px;
    padding-top: 70px;
}
.section-sub {
    text-align: center;
    color: #888;
    margin-bottom: 48px;
    font-size: 15px;
}

/* ========== 在线留言 ========== */
.contact-section {
    padding: 30px 0 60px;
    background: #f6fbf6;
}
.contact-section .section-title {
    padding-top: 0;
    margin-bottom: 12px;
}

/* ========== 产品中心 ========== */
.products { padding-bottom: 80px; }
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(102, 187, 106, 0.1);
    transition: 0.3s;
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 10px 30px rgba(102, 187, 106, 0.2); }
.product-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.product-info { padding: 18px; }
.product-info h3 { color: #2e7d32; font-size: 17px; margin-bottom: 8px; }
.product-info p { color: #666; font-size: 13px; }

/* ========== 产品筛选 ========== */
.product-filter {
    margin-bottom: 30px;
    text-align: center;
}
.product-filter input {
    width: 320px;
    max-width: 100%;
    padding: 12px 18px;
    border: 1px solid #c8e6c9;
    border-radius: 30px;
    font-size: 14px;
    margin-bottom: 18px;
    box-sizing: border-box;
}
.product-filter input:focus {
    border-color: #66bb6a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102,187,106,0.15);
}
.category-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}
.category-btn {
    padding: 8px 22px;
    background: #fff;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
}
.category-btn:hover {
    background: #e8f5e9;
}
.category-btn.active {
    background: #66bb6a;
    color: #fff;
    border-color: #66bb6a;
}

/* ========== 合作品牌墙 ========== */
.brand-section {
    padding: 50px 0;
    background: #f6fbf6;
}
.brand-section .section-title {
    padding-top: 0;
}
.brand-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}
.brand-item {
    background: #fff;
    border: 1px solid #e8f5e9;
    border-radius: 10px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 110px;
    overflow: hidden;
    transition: 0.3s;
}
.brand-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(102,187,106,0.15);
}
.brand-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 12px;
    box-sizing: border-box;
}
/* ========== 配送流程 ========== */
.flow-section {
    padding: 50px 0;
}
.flow-section .section-title {
    padding-top: 0;
}
.flow-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}
.flow-item {
    text-align: center;
}
.flow-num {
    width: 50px;
    height: 50px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #66bb6a, #a5d6a7);
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    line-height: 50px;
    box-shadow: 0 6px 16px rgba(102,187,106,0.3);
}
.flow-item h4 {
    color: #2e7d32;
    font-size: 16px;
    margin-bottom: 8px;
}
.flow-item p {
    color: #666;
    font-size: 13px;
}

/* ========== 页脚（只在首页） ========== */
.footer {
    background: #388e3c;
    color: #c8e6c9;
    text-align: center;
    padding: 10px 0;
    font-size: 12px;
    flex-shrink: 0;
}
.footer a {
    color: inherit;
    text-decoration: none;
    transition: 0.3s;
}
.footer a:hover {
    color: inherit;
    text-decoration: underline;
}

/* ========== 在线留言弹窗 ========== */
.modal-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-mask.active { display: flex; }
.modal-box {
    width: 480px;
    max-width: 92%;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}
.modal-box h3 {
    color: #2e7d32;
    text-align: center;
    margin-bottom: 24px;
    font-size: 20px;
}
.modal-row {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}
.modal-row label {
    width: 60px;
    text-align: right;
    color: #2e7d32;
    font-size: 14px;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}
.modal-row input,
.modal-row textarea {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}
.modal-row textarea { resize: vertical; min-height: 70px; }
.modal-row input:focus,
.modal-row textarea:focus {
    border-color: #66bb6a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102,187,106,0.15);
}
.modal-btns {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}
.btn-cancel {
    padding: 10px 28px;
    background: #eee;
    color: #666;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}
.btn-cancel:hover { background: #ddd; }
.btn-submit {
    padding: 10px 28px;
    background: #66bb6a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}
.btn-submit:hover { background: #4caf50; }
.modal-msg {
    text-align: center;
    margin-top: 14px;
    font-size: 14px;
    min-height: 20px;
}
.modal-msg.error { color: #e53935; }
.modal-msg.success { color: #2e7d32; }

/* ========== 手机端底部导航 ========== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e8f5e9;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
    z-index: 200;
}
.mobile-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    color: #666;
    text-decoration: none;
    font-size: 11px;
    gap: 2px;
}
.mobile-nav a svg {
    width: 22px;
    height: 22px;
    stroke: #2e7d32;
}
.mobile-nav a:hover {
    color: #2e7d32;
}

/* ==================================================
   平板 / 手机端适配
   ================================================== */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {

    body { padding-bottom: 60px; }

    .mobile-nav { display: flex; }

    .nav { height: 60px; }
    .logo { font-size: 20px; letter-spacing: 1px; }
    .nav nav a { margin-left: 20px; font-size: 14px; }

    #home.active { min-height: calc(100vh - 60px); }

    .banner { height: 240px; }
    .banner h1 { font-size: 22px; letter-spacing: 1px; margin-bottom: 8px; }
    .banner p { font-size: 13px; margin-bottom: 16px; }
    .btn-primary { padding: 9px 22px; font-size: 13px; }

    .features { padding: 28px 0; }
    .features .container {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    .feature-icon { width: 54px; height: 54px; margin-bottom: 10px; }
    .feature-icon svg { width: 26px; height: 26px; }
    .feature-item h3 { font-size: 14px; margin-bottom: 4px; }
    .feature-item p { font-size: 12px; }

    .about-section { padding: 30px 0; }
    .about-wrap { grid-template-columns: 1fr; gap: 24px; }
    .about-text h2 { font-size: 22px; margin-bottom: 14px; }
    .about-text p { font-size: 14px; }

    .section-title { font-size: 24px; padding-top: 40px; }
    .section-sub { font-size: 13px; margin-bottom: 32px; }

    .contact-section { padding: 20px 0 40px; }

    .products { padding-bottom: 50px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .product-card img { height: 130px; }
    .product-info { padding: 14px; }
    .product-info h3 { font-size: 15px; }
    .product-info p { font-size: 12px; }

    .product-filter input { width: 100%; }
    .category-btn { padding: 6px 16px; font-size: 13px; }

    /* 品牌墙 */
    .brand-section { padding: 30px 0; }
    .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .brand-item { height: 80px; }
    .brand-item img { padding: 8px; }

    /* 配送流程 */
    .flow-section { padding: 30px 0; }
    .flow-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .flow-num { width: 42px; height: 42px; font-size: 18px; line-height: 42px; }
    .flow-item h4 { font-size: 14px; }
    .flow-item p { font-size: 12px; }

    .footer { font-size: 11px; padding: 8px 0; }

    .modal-box { padding: 24px 20px; }
    .modal-row { flex-direction: column; align-items: flex-start; }
    .modal-row label { width: auto; text-align: left; margin-bottom: 6px; }
    .modal-row input, .modal-row textarea { width: 100%; }
}

@media (max-width: 400px) {
    .nav nav a { margin-left: 14px; font-size: 13px; }
    .banner h1 { font-size: 20px; }
    .product-grid { grid-template-columns: 1fr; }
    .features .container { grid-template-columns: 1fr; }
}