:root {
    --green-900: #0d3d24;
    --green-800: #145c35;
    --green-700: #1a7a45;
    --green-600: #228b52;
    --green-500: #2ea86a;
    --green-100: #e8f5ec;
    --gold-500: #c9a227;
    --gold-400: #e0b84a;
    --text: #1a2e22;
    --text-muted: #5c6f64;
    --border: #dce8df;
    --bg: #f4f8f5;
    --white: #ffffff;
    --shadow: 0 8px 30px rgba(13, 61, 36, 0.08);
    --shadow-lg: 0 20px 50px rgba(13, 61, 36, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --header-h: 72px;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 顶部导航 ========== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-h);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}

.site-header.scrolled {
    box-shadow: var(--shadow);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--green-700), var(--green-500));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--green-900);
    letter-spacing: 0.5px;
}

.logo-text small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a {
    padding: 8px 16px;
    font-size: 15px;
    color: var(--text);
    border-radius: 8px;
    transition: all 0.2s;
}

.main-nav a:hover {
    color: var(--green-700);
    background: var(--green-100);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-phone {
    font-size: 14px;
    color: var(--text-muted);
    display: none;
}

.header-phone strong {
    display: block;
    color: var(--green-800);
    font-size: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--green-700), var(--green-600));
    color: #fff;
    box-shadow: 0 4px 14px rgba(34, 139, 82, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(34, 139, 82, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--green-700);
    border: 1.5px solid var(--green-600);
}

.btn-outline:hover {
    background: var(--green-100);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--green-100);
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--green-800);
    border-radius: 2px;
    transition: 0.3s;
}

/* ========== 轮播图（固定区域：有图只显示图，无图才显示文字） ========== */
.page-main {
    padding-top: var(--header-h);
    overflow-x: hidden;
}

.hero-carousel {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    left: 50%;
    margin-left: -50vw;
    aspect-ratio: 21 / 9;
    height: auto;
    max-height: 480px;
    min-height: 200px;
    overflow: hidden;
    background: #0f4a2e;
    touch-action: pan-y;
}

.carousel-track {
    display: flex;
    height: 100%;
    min-height: 100%;
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

/* 主图模式：仅图片，铺满轮播区域不留边 */
.carousel-slide.slide-image {
    background: #0f4a2e;
}

.slide-picture {
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
    padding: 0;
    margin: 0;
    line-height: 0;
}

.slide-img-link {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
}

.slide-image .slide-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
}

/* 纯文字模式：无图时显示文案 */
.carousel-slide.slide-text {
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(13, 61, 36, 0.9) 0%,
        rgba(13, 61, 36, 0.55) 50%,
        rgba(13, 61, 36, 0.2) 100%
    );
}

.slide-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 36px;
    color: #fff;
    box-sizing: border-box;
    overflow: hidden;
    max-height: 100%;
}

.slide-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    font-size: 13px;
    margin-bottom: 16px;
    backdrop-filter: blur(4px);
}

.slide-text .slide-content h2 {
    font-size: clamp(18px, 3vw, 36px);
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.slide-text .slide-content p {
    font-size: clamp(12px, 1.6vw, 16px);
    opacity: 0.95;
    max-width: 100%;
    margin-bottom: 12px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.slide-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.slide-actions .btn {
    padding: clamp(10px, 2vw, 12px) clamp(18px, 4vw, 28px);
    font-size: clamp(13px, 2vw, 15px);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    color: #fff;
    box-shadow: 0 4px 16px rgba(201, 162, 39, 0.4);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.22);
}

@media (min-width: 769px) {
    .hero-carousel {
        aspect-ratio: 21 / 9;
        max-height: 520px;
        min-height: 320px;
    }
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s;
}

.carousel-dots button.active {
    width: 28px;
    border-radius: 5px;
    background: #fff;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

/* 轮播背景图（CSS 渐变模拟农业场景） */
.slide-1 .slide-bg { background: linear-gradient(135deg, #1a5c38 0%, #2d8a52 40%, #6ba83e 100%); }
.slide-2 .slide-bg { background: linear-gradient(135deg, #0f4a2e 0%, #3a7d4a 50%, #8fbc5a 100%); }
.slide-3 .slide-bg { background: linear-gradient(135deg, #164a30 0%, #2a6b45 60%, #4a9e6b 100%); }

/* ========== 功能模块 ========== */
.section {
    padding: 56px 0;
}

.section-head {
    text-align: center;
    margin-bottom: 36px;
}

.section-head h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--green-900);
    margin-bottom: 8px;
}

.section-head p {
    font-size: 15px;
    color: var(--text-muted);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--green-500);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.feature-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.fi-tools { background: #e8f4fc; }
.fi-seed { background: #edf7e8; }
.fi-fert { background: #fef6e8; }
.fi-pest { background: #fce8ec; }
.fi-disease { background: #e8f0fc; }
.fi-machine { background: #f0e8fc; }
.fi-labor { background: #fce8f4; }
.fi-trust { background: #e8fcf4; }

/* ========== 商品/服务卡片 ========== */
.product-grid,
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.item-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.item-thumb {
    height: 160px;
    background: linear-gradient(145deg, var(--green-100), #d4ead9);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.item-thumb .thumb-label {
    font-size: 48px;
    opacity: 0.35;
}

.item-thumb .type-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--green-800);
}

.item-body {
    padding: 18px;
}

.item-body h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
    min-height: 38px;
}

.item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price {
    font-size: 20px;
    font-weight: 700;
    color: #e53935;
}

.price small {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
}

.price-range {
    font-size: 14px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.empty-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    color: var(--text-muted);
}

/* ========== 优势条 ========== */
.trust-bar {
    background: var(--white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 28px 0;
}

.trust-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.trust-item strong {
    display: block;
    font-size: 22px;
    color: var(--green-700);
    margin-bottom: 4px;
}

.trust-item span {
    font-size: 13px;
    color: var(--text-muted);
}

/* ========== 页脚 ========== */
.site-footer {
    background: var(--green-900);
    color: rgba(255, 255, 255, 0.85);
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-brand {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.footer-col h4 {
    font-size: 14px;
    color: #fff;
    margin-bottom: 14px;
}

.footer-col a,
.footer-col p {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.footer-col a:hover {
    color: var(--gold-400);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* ========== 响应式 ========== */
@media (min-width: 992px) {
    .header-phone { display: block; }
}

@media (max-width: 991px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid,
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .slide-content {
        padding: 28px 32px 52px;
    }
}

@media (max-width: 768px) {
    :root { --header-h: 64px; }

    .menu-toggle { display: flex; }

    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .main-nav a {
        width: 100%;
        padding: 12px 16px;
    }

    .header-actions .btn-outline { display: none; }

    .hero-carousel {
        aspect-ratio: 16 / 9;
        max-height: 240px;
        min-height: 180px;
    }

    .slide-text .slide-content {
        padding: 14px 16px 32px;
    }

    .slide-text .slide-content h2 {
        font-size: 17px;
    }

    .slide-text .slide-content p {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .slide-tag {
        font-size: 11px;
        padding: 3px 8px;
        margin-bottom: 6px;
    }

    .slide-actions .btn {
        padding: 7px 12px;
        font-size: 12px;
    }

    .carousel-arrow { display: none; }

    .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .feature-card { padding: 18px 12px; }
    .product-grid,
    .service-grid { grid-template-columns: 1fr; }
    .trust-list { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
    .section { padding: 40px 0; }
}

@media (max-width: 480px) {
    .hero-carousel {
        aspect-ratio: 16 / 9;
        max-height: 200px;
        min-height: 160px;
    }
}
