/* =========================================
   河南爱力生生物科技有限公司 - 样式表
   固定宽度 1200px，深绿色系传统企业风格
   ========================================= */

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

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f5f5f5;
    line-height: 1.6;
}

a { text-decoration: none; color: #1a6b3c; }
a:hover { color: #0d4d28; }
img { max-width: 100%; vertical-align: middle; }
ul { list-style: none; }

.container {
    width: 1200px;
    margin: 0 auto;
}

/* ---- 头部 ---- */
.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header .container { display: flex; align-items: center; height: 80px; }
.header .logo { font-size: 22px; font-weight: bold; color: #1a6b3c; white-space: nowrap; }
.header .logo span { display: block; font-size: 12px; color: #888; font-weight: normal; margin-top: 2px; }

.nav { display: flex; margin-left: 50px; }
.nav a {
    display: block; padding: 28px 22px; color: #444;
    font-size: 15px; font-weight: 500; transition: all 0.2s;
    border-bottom: 3px solid transparent;
}
.nav a:hover, .nav a.active { color: #1a6b3c; border-bottom-color: #1a6b3c; }

.header-right { margin-left: auto; color: #999; font-size: 13px; }

/* ---- 面包屑 ---- */
.breadcrumb {
    background: #fff; border-bottom: 1px solid #e8e8e8; padding: 12px 0;
}
.breadcrumb span { color: #999; }
.breadcrumb a { color: #666; }
.breadcrumb .sep { margin: 0 8px; color: #ccc; }

/* ---- Banner ---- */
.banner { background: #e8f5e9; border-bottom: 3px solid #1a6b3c; }
.banner .container { height: 400px; overflow: hidden; }
.banner-inner {
    width: 1200px; height: 400px; background: linear-gradient(135deg, #1a6b3c 0%, #2d8a54 100%);
    display: flex; align-items: center; justify-content: center; color: #fff;
}
.banner-inner h1 { font-size: 36px; margin-bottom: 15px; }
.banner-inner p { font-size: 16px; opacity: 0.9; }

/* ---- 轮播通用 ---- */
.carousel { position: relative; width: 100%; height: 100%; overflow: hidden; }
.carousel-track { display: flex; transition: transform 0.6s ease-in-out; height: 100%; }
.carousel-slide { min-width: 100%; height: 100%; }
.carousel-slide a { display: block; width: 100%; height: 100%; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 6px; border: 1px solid rgba(0,0,0,0.08); }
.carousel-btn { display: none; }
.carousel-btn:hover { display: none; }
.carousel-prev { display: none; }
.carousel-next { display: none; }
.carousel-dots {
    position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 2;
}
.dot {
    width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5);
    cursor: pointer; transition: background 0.3s;
}
.dot.active, .dot:hover { background: #fff; }

/* 通用板块 */
.section { padding: 50px 0; }
.section-title {
    text-align: center; margin-bottom: 40px;
}
.section-title h2 { font-size: 28px; color: #1a6b3c; margin-bottom: 10px; }
.section-title p { color: #999; font-size: 15px; }
.section-title .line {
    width: 60px; height: 3px; background: #1a6b3c; margin: 12px auto 0;
}

/* 公司简介 */
.about-intro { background: #fff; }
.about-intro .content { display: flex; gap: 40px; }
.about-intro .text { flex: 1; }
.about-intro .text p { margin-bottom: 16px; text-indent: 2em; color: #555; line-height: 1.8; }
.about-intro .image-box {
    width: 400px; height: 280px; background: #e8f5e9; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; color: #1a6b3c; font-size: 18px;
}
.about-more { display: inline-block; margin-top: 10px; padding: 8px 24px; background: #1a6b3c; color: #fff; border-radius: 4px; }
.about-more:hover { background: #0d4d28; color: #fff; }

/* 产品分类 */
.product-cats { background: #f9f9f9; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cat-card {
    background: #fff; border-radius: 8px; padding: 35px 30px; text-align: center;
    transition: all 0.3s; border: 1px solid #eee;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.cat-card .icon { width: 70px; height: 70px; background: #e8f5e9; border-radius: 50%; margin: 0 auto 20px; line-height: 70px; font-size: 30px; }
.cat-card h3 { font-size: 18px; color: #1a6b3c; margin-bottom: 10px; }
.cat-card p { color: #777; font-size: 13px; }

/* 新闻块 */
.news-section { background: #fff; }
.news-grid { display: grid; grid-template-columns: 1fr 360px; gap: 40px; }
.news-main .news-item {
    display: flex; padding: 18px 0; border-bottom: 1px dashed #eee;
}
.news-item .date {
    width: 70px; height: 70px; background: #1a6b3c; color: #fff; text-align: center;
    border-radius: 4px; flex-shrink: 0; margin-right: 18px;
    display: flex; flex-direction: column; justify-content: center; padding: 4px 8px;
}
.news-item .date .day { font-size: 24px; font-weight: bold; display: block; line-height: 1.2; }
.news-item .date .mon { font-size: 12px; display: block; line-height: 1.3; }
.news-item .info { flex: 1; }
.news-item .info h4 { font-size: 16px; margin-bottom: 6px; }
.news-item .info h4 a { color: #333; }
.news-item .info h4 a:hover { color: #1a6b3c; }
.news-item .info p { color: #999; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-sidebar {
    background: #f9f9f9; border-radius: 8px; padding: 30px;
}
.contact-sidebar h3 { font-size: 20px; color: #1a6b3c; margin-bottom: 20px; border-bottom: 2px solid #1a6b3c; padding-bottom: 10px; }
.contact-sidebar .info-item { margin-bottom: 15px; color: #555; }

/* 底部 */
.footer {
    background: #1a1a1a; color: #bbb; text-align: center; font-size: 13px;
}
.footer .container { padding: 0; }
.footer .links { padding: 25px 0 20px; }
.footer .links a { color: #bbb; margin: 0 10px; }
.footer .links a:hover { color: #fff; }

/* 底部信息栏 */
.footer-info {
    background: #1a1a1a; color: #999; padding: 20px 0; text-align: center; font-size: 13px;
}
.footer-info .footer-company { font-size: 15px; color: #e0e0e0; font-weight: 500; margin-bottom: 10px; }
.footer-info .footer-copyright { margin-top: 10px; color: #888; }
.footer-info .footer-icp { color: #777; font-size: 12px; }

/* ---- 内页通用 ---- */
.page-header {
    background: #1a6b3c; color: #fff; padding: 40px 0; text-align: center;
}
.page-header h1 { font-size: 30px; margin-bottom: 8px; }
.page-header p { opacity: 0.8; font-size: 15px; }
.page-body { background: #fff; padding: 50px 0; min-height: 400px; }

/* 关于页 */
.about-content .row { display: flex; gap: 40px; margin-bottom: 40px; }
.about-content .row .col { flex: 1; }
.about-content h3 { font-size: 20px; color: #1a6b3c; margin-bottom: 16px; padding-left: 12px; border-left: 3px solid #1a6b3c; }
.about-content p { color: #555; line-height: 1.8; margin-bottom: 12px; text-indent: 2em; }
.about-content .timeline { position: relative; padding-left: 30px; }
.about-content .timeline::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0;
    width: 2px; background: #1a6b3c;
}
.timeline-item { position: relative; margin-bottom: 25px; padding-left: 20px; }
.timeline-item::before {
    content: ""; position: absolute; left: -5px; top: 5px;
    width: 12px; height: 12px; background: #1a6b3c; border-radius: 50%;
}
.timeline-item .year { font-weight: bold; color: #1a6b3c; margin-bottom: 4px; }
.timeline-item .desc { color: #555; }
.culture-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.culture-item { background: #f9f9f9; padding: 20px; border-radius: 6px; }
.culture-item strong { color: #1a6b3c; display: block; margin-bottom: 6px; }

/* 产品页 */
.product-filter { margin-bottom: 30px; text-align: center; }
.product-filter a {
    display: inline-block; padding: 8px 24px; margin: 0 6px; border: 1px solid #ddd;
    color: #666; border-radius: 4px; transition: all 0.2s;
}
.product-filter a:hover, .product-filter a.active { background: #1a6b3c; color: #fff; border-color: #1a6b3c; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
    background: #fff; border: 1px solid #eee; border-radius: 8px; overflow: hidden;
    transition: all 0.3s; text-align: center;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.product-card .img {
    height: 200px; background: #e8f5e9; display: flex; align-items: center;
    justify-content: center; color: #1a6b3c; font-size: 14px;
}
.product-card .info { padding: 18px; }
.product-card .info h4 { font-size: 16px; margin-bottom: 8px; color: #333; }
.product-card .info .cat { font-size: 12px; color: #1a6b3c; background: #e8f5e9; display: inline-block; padding: 2px 10px; border-radius: 3px; margin-bottom: 8px; }
.product-card .info p { font-size: 13px; color: #999; }

/* 新闻列表 */
.news-list .item { padding: 20px 0; border-bottom: 1px dashed #eee; display: flex; gap: 20px; }
.news-list .item .img-box {
    width: 200px; height: 140px; background: #e8f5e9; flex-shrink: 0; border-radius: 4px;
    display: flex; align-items: center; justify-content: center; color: #1a6b3c; font-size: 13px;
}
.news-list .item .info { flex: 1; }
.news-list .item .info h3 { font-size: 18px; margin-bottom: 10px; }
.news-list .item .info h3 a { color: #333; }
.news-list .item .info h3 a:hover { color: #1a6b3c; }
.news-list .item .info .meta { font-size: 12px; color: #999; margin-bottom: 8px; }
.news-list .item .info .meta .cat-tag { background: #1a6b3c; color: #fff; padding: 1px 8px; border-radius: 2px; margin-right: 10px; font-size: 11px; }
.news-list .item .info .summary { color: #666; font-size: 14px; line-height: 1.6; }

/* 新闻详情 */
.article-detail h1 { font-size: 26px; color: #1a6b3c; margin-bottom: 12px; }
.article-detail .meta { color: #999; font-size: 13px; margin-bottom: 30px; padding-bottom: 15px; border-bottom: 1px solid #eee; }
.article-detail .content { font-size: 15px; line-height: 1.9; color: #444; }
.article-detail .content p { margin-bottom: 16px; text-indent: 2em; }
.article-nav { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; }
.article-nav a { color: #1a6b3c; }

/* 联系页 */
.contact-page { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info h3 { font-size: 20px; color: #1a6b3c; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #1a6b3c; }
.contact-info .info-row { display: flex; margin-bottom: 16px; }
.contact-info .info-row .label { width: 70px; color: #666; flex-shrink: 0; }
.contact-info .info-row .val { color: #333; }

/* 地图区块 */
.map-block { margin-top: 30px; }
.map-title {
    font-size: 20px; color: #1a6b3c; margin-bottom: 16px;
    padding-bottom: 10px; border-bottom: 2px solid #1a6b3c;
}
.map-container {
    display: flex; height: 400px; border-radius: 8px; overflow: hidden;
    border: 1px solid #e0e0e0;
}
.map-left {
    width: 30%; background: #f9f9f9; padding: 30px 24px;
    display: flex; flex-direction: column; justify-content: center;
}
.map-address {
    font-size: 15px; color: #333; line-height: 1.8; font-weight: 500;
}
.map-right { width: 70%; }
.map-right iframe { display: block; }

/* 留言表单 */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; color: #555; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 4px;
    font-size: 14px; font-family: inherit; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: #1a6b3c; }
.form-group textarea { resize: vertical; min-height: 120px; }
.btn-submit {
    padding: 12px 40px; background: #1a6b3c; color: #fff; border: none;
    border-radius: 4px; font-size: 15px; cursor: pointer; transition: background 0.2s;
}
.btn-submit:hover { background: #0d4d28; }
.success-msg { background: #e8f5e9; color: #1a6b3c; padding: 15px; border-radius: 4px; margin-bottom: 20px; }

/* 分页 */
.pagination { text-align: center; margin-top: 30px; }
.pagination a, .pagination span {
    display: inline-block; padding: 8px 14px; margin: 0 3px; border: 1px solid #ddd;
    color: #666; border-radius: 4px; font-size: 14px;
}
.pagination a:hover { background: #1a6b3c; color: #fff; border-color: #1a6b3c; }
.pagination .current { background: #1a6b3c; color: #fff; border-color: #1a6b3c; }

/* ---- 后台样式 ---- */
.admin-wrap { min-height: 100vh; background: #f0f2f5; }
.admin-header { background: #001529; color: #fff; padding: 0 30px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.admin-header .brand { font-size: 18px; font-weight: bold; }
.admin-header .user a { color: #bbb; margin-left: 20px; font-size: 13px; }
.admin-container { display: flex; min-height: calc(100vh - 56px); }
.admin-sidebar { width: 220px; background: #fff; box-shadow: 2px 0 8px rgba(0,0,0,0.06); padding: 20px 0; }
.admin-sidebar a { display: block; padding: 12px 30px; color: #555; font-size: 14px; }
.admin-sidebar a:hover, .admin-sidebar a.active { color: #1a6b3c; background: #e8f5e9; }
.admin-main { flex: 1; padding: 30px; }
.admin-main h2 { font-size: 22px; color: #333; margin-bottom: 24px; }

/* 仪表盘 */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card {
    background: #fff; border-radius: 8px; padding: 25px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.stat-card .num { font-size: 36px; font-weight: bold; color: #1a6b3c; }
.stat-card .label { font-size: 14px; color: #999; margin-top: 6px; }

/* 后台表格 */
.admin-table { width: 100%; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-collapse: collapse; }
.admin-table th { background: #fafafa; padding: 14px 16px; text-align: left; font-weight: 500; color: #555; font-size: 14px; border-bottom: 1px solid #eee; }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid #f5f5f5; color: #666; font-size: 14px; }
.admin-table tr:hover td { background: #f9f9f9; }
.admin-table .actions a, .admin-table .actions button {
    display: inline-block; padding: 4px 12px; margin-right: 6px; border-radius: 3px;
    font-size: 13px; border: none; cursor: pointer; color: #fff;
}
.btn-edit { background: #1890ff; }
.btn-delete { background: #ff4d4f; }
.btn-success { background: #1a6b3c; }
.btn-publish { background: #fa8c16; }
.btn-add {
    display: inline-block; padding: 10px 24px; background: #1a6b3c; color: #fff;
    border-radius: 4px; margin-bottom: 16px; font-size: 14px;
}
.btn-add:hover { background: #0d4d28; color: #fff; }

/* 后台表单 */
.admin-form { background: #fff; border-radius: 8px; padding: 30px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); max-width: 800px; }
.admin-form .form-group { margin-bottom: 20px; }
.admin-form .form-group label { display: block; margin-bottom: 8px; color: #333; font-weight: 500; }
.admin-form .form-group input[type="text"],
.admin-form .form-group input[type="number"],
.admin-form .form-group select,
.admin-form .form-group textarea {
    width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px;
}
.admin-form .form-group textarea { min-height: 300px; font-family: inherit; }
.admin-form .form-group input:focus,
.admin-form .form-group textarea:focus,
.admin-form .form-group select:focus { outline: none; border-color: #1a6b3c; }
.admin-form .btn-row { margin-top: 20px; }
.admin-form .btn-row .btn-submit { margin-right: 10px; }
.btn-cancel { padding: 12px 24px; border: 1px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer; font-size: 15px; }

/* 登录 */
.login-page { min-height: 100vh; background: linear-gradient(135deg, #1a6b3c 0%, #2d8a54 100%); display: flex; align-items: center; justify-content: center; }
.login-box { width: 400px; background: #fff; border-radius: 8px; padding: 40px; box-shadow: 0 15px 40px rgba(0,0,0,0.2); }
.login-box h2 { text-align: center; color: #1a6b3c; margin-bottom: 30px; font-size: 24px; }
.login-box .error { background: #fff2f0; color: #ff4d4f; padding: 10px; border-radius: 4px; margin-bottom: 20px; text-align: center; font-size: 14px; }

/* 后台分页 */
.admin-pagination { text-align: center; margin-top: 20px; }
.admin-pagination a, .admin-pagination span {
    display: inline-block; padding: 6px 12px; margin: 0 2px; border: 1px solid #ddd; color: #666; border-radius: 3px; font-size: 13px;
}
.admin-pagination a:hover { background: #1a6b3c; color: #fff; border-color: #1a6b3c; }
.admin-pagination .current { background: #1a6b3c; color: #fff; border-color: #1a6b3c; }

/* 响应式 */
@media (max-width: 1240px) {
    .container { width: 96%; }
    .banner-inner { width: 100%; }
}
