/* i8HOME-Next 默认主题样式 */
/* 移动优先，PC 端为增强 */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f6f7f9;
    color: #222;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

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

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

/* ---------- 头部 ---------- */

.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-weight: 700;
    font-size: 17px;
    color: #222;
    white-space: nowrap;
}

.nav {
    display: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav a {
    display: inline-block;
    padding: 6px 10px;
    font-size: 14px;
    color: #444;
    white-space: nowrap;
}

.nav a:hover {
    color: #0a7a35;
}

.lang-switch {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
}

.lang-switch a {
    color: #666;
}

.lang-switch a:hover {
    color: #0a7a35;
}

/* ---------- 区块通用 ---------- */

.block {
    padding: 32px 0;
}

.block h2 {
    font-size: 20px;
    margin: 0 0 16px;
}

.block-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    gap: 12px;
}

.block-head h2 {
    margin: 0;
}

.block-head .more {
    color: #0a7a35;
    font-size: 13px;
    white-space: nowrap;
}

/* ---------- Banner ---------- */

.block-banner {
    text-align: center;
    padding: 48px 0;
    background: #fff;
}

.block-banner img {
    margin: 0 auto 16px;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.block-banner h1 {
    font-size: 24px;
    margin: 0 0 10px;
    color: #111;
}

.block-banner p {
    color: #666;
    margin: 0;
    font-size: 15px;
}

/* ---------- 产品 ---------- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.product-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    background: #eee;
}

.product-card h3 {
    font-size: 14px;
    margin: 10px 0 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .desc {
    font-size: 12px;
    color: #888;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .price {
    color: #c00;
    font-weight: 700;
    font-size: 15px;
}

.product-card .price.inquire {
    color: #888;
    font-weight: 400;
    font-size: 13px;
}

/* ---------- 新闻 ---------- */

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
}

.news-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.news-list li:last-child {
    border-bottom: 0;
}

.news-list a {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}

.news-list a:hover {
    color: #0a7a35;
}

.news-list .date {
    color: #999;
    font-size: 12px;
    white-space: nowrap;
}

/* ---------- 页脚 ---------- */

.site-footer {
    background: #222;
    color: #aaa;
    padding: 28px 0;
    text-align: center;
    font-size: 13px;
    margin-top: 24px;
}

.site-footer p {
    margin: 4px 0;
}

.site-footer .muted {
    color: #777;
    font-size: 12px;
}

/* ---------- 空状态 ---------- */

.empty {
    color: #999;
    font-size: 14px;
    padding: 24px 0;
    text-align: center;
}

/* ---------- PC 端增强 ---------- */

@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }

    .header-inner {
        height: 68px;
    }

    .logo {
        font-size: 20px;
    }

    .nav {
        display: flex;
        gap: 6px;
    }

    .nav a {
        font-size: 15px;
        padding: 8px 14px;
    }

    .block {
        padding: 56px 0;
    }

    .block h2 {
        font-size: 26px;
    }

    .block-banner {
        padding: 72px 0;
    }

    .block-banner h1 {
        font-size: 36px;
    }

    .block-banner p {
        font-size: 16px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }

    .product-card {
        padding: 16px;
    }

    .product-card img {
        height: 180px;
    }

    .product-card h3 {
        font-size: 16px;
    }

    .news-list li {
        padding: 16px 20px;
    }

    .site-footer {
        padding: 36px 0;
    }
}

/* ============ 富文本内容保护 v1 ============ */
/* 防止编辑器插入的图片、视频、iframe、表格撑开页面 */

.rich-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.rich-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px 0;
    border-radius: 6px;
}

.rich-content video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px 0;
    border-radius: 6px;
    background: #000;
}

.rich-content iframe {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    margin: 12px 0;
    border: 0;
    border-radius: 6px;
    background: #000;
}

.rich-content embed,
.rich-content object {
    max-width: 100%;
    display: block;
}

.rich-content table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
    overflow-x: auto;
    display: block;
}

.rich-content table th,
.rich-content table td {
    border: 1px solid #eaeaea;
    padding: 8px 12px;
    text-align: left;
}

.rich-content table th {
    background: #fafbfc;
    font-weight: 600;
}

.rich-content pre {
    max-width: 100%;
    overflow-x: auto;
}

.rich-content blockquote {
    margin: 16px 0;
    padding: 10px 18px;
    background: #f6f7f9;
    border-left: 4px solid #0a7a35;
    color: #555;
}

.rich-content ul,
.rich-content ol {
    padding-left: 24px;
    margin: 12px 0;
}

.rich-content li {
    margin: 6px 0;
}

.rich-content h1,
.rich-content h2,
.rich-content h3,
.rich-content h4 {
    line-height: 1.4;
    color: #111;
    margin: 24px 0 12px;
}

.rich-content h1 { font-size: 24px; }
.rich-content h2 { font-size: 20px; }
.rich-content h3 { font-size: 17px; }
.rich-content h4 { font-size: 15px; }

.rich-content p {
    margin: 0 0 16px;
    line-height: 1.9;
}

.rich-content a {
    color: #0a7a35;
    text-decoration: underline;
}

.rich-content hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}