/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Han Sans CN', 'Noto Sans SC', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #199003;
}

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

/* 头部导航 */
.header {
    background-color: #fff;
    border-bottom: 2px solid #199003;
    padding: 20px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav a {
    font-size: 20px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 4px;
}

.nav a.active,
.nav a:hover {
    background-color: #025E21;
    color: #fff;
}

/* 主内容区 */
.main-content {
    padding: 40px 0;
    min-height: 60vh;
}

/* 首页关于我们和最新动态 */
.intro-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.about-block,
.news-block {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
}

.block-title {
    font-size: 24px;
    color: #199003;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #199003;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 首页关于我们和最新动态标题 - 黑色 */
.intro-section .block-title,
.news-section .block-title {
    font-size: 18px !important;
    color: #000 !important;
    border-bottom: none !important;
    margin-top: 2px !important;
}

.intro-section .block-title a,
.news-section .block-title a {
    font-weight: normal !important;
    color: #000 !important;
}

.intro-section .block-title a:hover,
.news-section .block-title a:hover {
    color: #199003 !important;
}

.block-title .more {
    font-size: 14px;
    color: #A6A6A6;
}

.block-title .more:hover {
    color: #199003;
}

.about-content {
    color: #666;
    line-height: 1.8;
}

.news-list {
    list-style: none;
}

.news-list li {
    padding: 12px 0;
    border-bottom: 1px dashed #ddd;
}

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

.news-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-list .news-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-list .news-date {
    color: #A6A6A6;
    font-size: 14px;
    margin-left: 20px;
}

/* 产品展示 */
.products-section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 28px;
    color: #199003;
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 3px solid #199003;
}

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

.product-item {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f5f5f5;
}

.product-name {
    padding: 15px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
}

/* 产品分类 */
.category-nav {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-nav a {
    padding: 10px 25px;
    background-color: #f0f0f0;
    border-radius: 25px;
    font-size: 16px;
}

.category-nav a.active,
.category-nav a:hover {
    background-color: #199003;
    color: #fff;
}

/* 新闻列表 */
.news-items {
    list-style: none;
}

.news-items li {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.news-items .news-item-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.news-items .news-item-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.news-items .news-item-meta {
    display: flex;
    justify-content: space-between;
    color: #A6A6A6;
    font-size: 14px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pagination a:hover,
.pagination .active {
    background-color: #199003;
    color: #fff;
    border-color: #199003;
}

/* 详情页 */
.detail-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.detail-title {
    font-size: 28px;
    color: #199003;
    margin-bottom: 20px;
}

.detail-meta {
    color: #A6A6A6;
    font-size: 14px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.detail-body {
    line-height: 2;
    color: #555;
}

.detail-body img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

/* 上下篇导航 */
.post-nav {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    margin: 30px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.post-nav a {
    color: #666;
}

.post-nav a:hover {
    color: #199003;
}

.post-nav .prev {
    text-align: left;
}

.post-nav .next {
    text-align: right;
}

/* 页脚 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-links a {
    color: #fff;
    font-size: 16px;
}

.footer-links a:hover {
    color: #199003;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #555;
}

.copyright {
    color: #A6A6A6;
    font-size: 14px;
}

.footer-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-right a {
    color: #A6A6A6;
    font-size: 14px;
}

.footer-right a:hover {
    color: #199003;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .intro-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .category-nav {
        justify-content: center;
    }
}

/* 后台管理样式 */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background-color: #199003;
    color: #fff;
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav {
    display: flex;
    gap: 20px;
}

.admin-nav a {
    color: #fff;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.admin-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.admin-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.btn {
    padding: 10px 20px;
    background-color: #199003;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background-color: #025E21;
    color: #fff;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #199003;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tr:hover {
    background-color: #f8f9fa;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 页面标题统一样式 */
.page-title {
    color: #000;
    font-size: 24px;
    text-align: center;
    margin: 30px 0;
    font-weight: bold;
}