/* ===== 重置与基础 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== 页头 ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 40px; width: auto; }
.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #1a56db;
    white-space: nowrap;
}
.main-nav { display: flex; align-items: center; }
.nav-list { display: flex; gap: 8px; }
.nav-list a {
    display: block;
    padding: 8px 16px;
    font-size: 16px;
    color: #555;
    border-radius: 6px;
    transition: all 0.2s;
}
.nav-list a:hover, .nav-list a.active {
    color: #1a56db;
    background: #eff6ff;
}
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: #333;
    transition: 0.3s;
}

/* ===== 页面横幅 ===== */
.page-banner {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    padding: 60px 0;
    text-align: center;
}
.page-banner h1 {
    font-size: 36px;
    color: #1e293b;
    margin-bottom: 10px;
}
.page-banner p {
    font-size: 16px;
    color: #64748b;
}

/* ===== 首页轮播 ===== */
.hero-slider {
    position: relative;
    overflow: hidden;
    background: #eef2ff;
}
.slide {
    display: none;
    min-height: 480px;
    align-items: center;
    padding: 60px 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}
.slide.active { display: flex; }
.slide-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.55);
    z-index: 1;
}
.slide > .container { position: relative; z-index: 2; }
.slide-content { max-width: 560px; }
.slide-content h2 {
    font-size: 48px;
    color: #1a56db;
    margin-bottom: 16px;
    font-weight: 800;
}
.slide-content p {
    font-size: 20px;
    color: #475569;
    margin-bottom: 30px;
}
.slide-buttons { display: flex; gap: 16px; }

/* 轮播图文字对齐：左侧/右侧放在三分之一处，居中 */
.slide-align-left .slide-content { margin-right: auto; margin-left: 0; }
.slide-align-right .slide-content { margin-left: auto; margin-right: 0; }
.slide-align-center .slide-content { margin: 0 auto; text-align: center; }
.slide-align-center .slide-buttons { justify-content: center; }
@media (min-width: 993px) {
    .slide-align-left .container { padding-left: 8.33%; }
    .slide-align-right .container { padding-right: 8.33%; }
}
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.btn-primary { background: #1a56db; color: #fff; }
.btn-primary:hover { background: #1e40af; }
.btn-outline { background: transparent; color: #1a56db; border: 2px solid #1a56db; }
.btn-outline:hover { background: #1a56db; color: #fff; }
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1a56db;
    color: #fff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
}
.slider-prev { left: 20px; }
.slider-next { right: 20px; }
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.slider-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}
.slider-dots span.active { background: #1a56db; }

/* ===== 通用区块 ===== */
.section { padding: 60px 0; }
.section-white { background: #fff; }
.section-gray { background: #f5f7fa; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 {
    font-size: 30px;
    color: #1e293b;
    margin-bottom: 10px;
}
.section-header p { color: #64748b; font-size: 16px; }

/* ===== 优势卡片 ===== */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.advantage-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s;
}
.advantage-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: #1a56db;
}
.advantage-card h3 {
    color: #1a56db;
    font-size: 18px;
    margin-bottom: 12px;
}
.advantage-card p { color: #64748b; font-size: 14px; }

/* ===== 产品展示 ===== */
.product-category-block { margin-bottom: 50px; }
.category-title {
    font-size: 24px;
    color: #1a56db;
    padding-left: 12px;
    border-left: 4px solid #1a56db;
    margin-bottom: 24px;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.product-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #f1f5f9;
}
.product-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-card-body h3 {
    font-size: 18px;
    color: #1e293b;
    margin-bottom: 10px;
}
.product-card-body p {
    color: #64748b;
    font-size: 14px;
    flex: 1;
}
.product-more { text-align: center; margin-top: 30px; }

/* ===== 产品列表页 ===== */
.product-list-section { padding: 40px 0 60px; }
.product-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ===== 产品详情页 ===== */
.product-detail { padding: 40px 0 60px; }
.product-detail-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
}
.product-detail-img img {
    width: 100%;
    border-radius: 8px;
    background: #f1f5f9;
}
.product-detail-info h1 {
    font-size: 28px;
    color: #1e293b;
    margin-bottom: 16px;
}
.product-detail-meta {
    color: #64748b;
    margin-bottom: 20px;
    font-size: 14px;
}
.product-detail-desc {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 24px;
}
.product-detail-content {
    margin-top: 30px;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    line-height: 1.8;
    color: #475569;
}
.product-detail-content img { max-width: 100%; border-radius: 8px; margin: 16px 0; }

/* ===== 案例 ===== */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.case-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}
.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.case-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f1f5f9;
}
.case-card-body { padding: 20px; }
.case-card-body h3 {
    font-size: 18px;
    color: #1e293b;
    margin-bottom: 10px;
}
.case-card-body p {
    color: #64748b;
    font-size: 14px;
}

/* ===== 案例详情 ===== */
.case-detail { padding: 40px 0 60px; }
.case-detail-wrap {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
}
.case-detail h1 {
    font-size: 28px;
    color: #1e293b;
    margin-bottom: 16px;
}
.case-detail-meta {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}
.case-detail-img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 24px;
    background: #f1f5f9;
}
.case-detail-content {
    line-height: 1.8;
    color: #475569;
}
.case-detail-content img { max-width: 100%; border-radius: 8px; margin: 16px 0; }

/* ===== 新闻 ===== */
.news-list { display: flex; flex-direction: column; gap: 20px; }
.news-item {
    display: flex;
    gap: 24px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}
.news-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.news-item-img {
    width: 240px;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #f1f5f9;
}
.news-item-body { flex: 1; display: flex; flex-direction: column; }
.news-item-body h3 {
    font-size: 20px;
    color: #1e293b;
    margin-bottom: 10px;
}
.news-item-tag {
    display: inline-block;
    padding: 2px 10px;
    background: #eff6ff;
    color: #1a56db;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 10px;
    align-self: flex-start;
}
.news-item-body p {
    color: #64748b;
    font-size: 14px;
    flex: 1;
}
.news-item-date { color: #94a3b8; font-size: 13px; margin-top: 10px; }

/* ===== 新闻详情 ===== */
.news-detail { padding: 40px 0 60px; }
.news-detail-wrap {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
}
.news-detail h1 {
    font-size: 28px;
    color: #1e293b;
    margin-bottom: 16px;
}
.news-detail-meta {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}
.news-detail-content {
    line-height: 1.8;
    color: #475569;
}
.news-detail-content img { max-width: 100%; border-radius: 8px; margin: 16px 0; }

/* ===== 关于我们 ===== */
.about-section { padding: 40px 0; }
.about-block {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
}
.about-block h2 {
    font-size: 26px;
    color: #1e293b;
    text-align: center;
    margin-bottom: 24px;
}
.about-block p {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 16px;
}
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 30px;
}
.about-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
}
.about-card h3 {
    color: #1a56db;
    font-size: 18px;
    margin-bottom: 12px;
}
.about-card p { color: #64748b; font-size: 14px; margin: 0; }

/* ===== 分页 ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}
.pagination a {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #475569;
    background: #fff;
    transition: all 0.2s;
}
.pagination a:hover, .pagination a.active {
    background: #1a56db;
    color: #fff;
    border-color: #1a56db;
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

/* ===== 页脚 ===== */
.site-footer {
    background: #1e293b;
    color: #cbd5e1;
    padding-top: 50px;
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}
.footer-col h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
}
.footer-col p, .footer-col li {
    font-size: 14px;
    line-height: 1.8;
    color: #94a3b8;
}
.footer-col a:hover { color: #fff; }
.qrcode-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
}
.qrcode-placeholder {
    width: 120px;
    height: 120px;
    border: 1px dashed #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 14px;
    border-radius: 4px;
}
.footer-bottom {
    border-top: 1px solid #334155;
    padding: 20px 0;
    text-align: center;
}
.footer-bottom p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
}
.footer-bottom a:hover { color: #fff; }

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1a56db;
    color: #fff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: none;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(26,86,219,0.4);
}
.back-to-top.show { display: block; }

/* ===== 后台样式 ===== */
.admin-body { background: #f1f5f9; }
.admin-header {
    background: #1e293b;
    color: #fff;
    padding: 16px 0;
}
.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-header h1 { font-size: 20px; }
.admin-header a { color: #cbd5e1; margin-left: 20px; }
.admin-header a:hover { color: #fff; }
.admin-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}
.admin-sidebar {
    width: 220px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    padding: 20px 0;
}
.admin-sidebar a {
    display: block;
    padding: 12px 24px;
    color: #475569;
    border-left: 3px solid transparent;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
    background: #eff6ff;
    color: #1a56db;
    border-left-color: #1a56db;
}
.admin-content {
    flex: 1;
    padding: 30px;
}
.admin-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}
.admin-card h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #1e293b;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th, .admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}
.admin-table th { background: #f8fafc; font-weight: 600; color: #475569; }
.admin-table img { width: 60px; height: 40px; object-fit: cover; border-radius: 4px; }
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #1a56db;
    box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.btn-sm { padding: 6px 14px; font-size: 14px; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; }
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    width: 360px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.login-box h2 { text-align: center; margin-bottom: 30px; color: #1e293b; }

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .advantages-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid, .product-list-grid, .cases-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .product-detail-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-list {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 10px 20px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        gap: 0;
    }
    .nav-list.open { display: flex; }
    .nav-list a { padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
    .slide { min-height: 360px; padding: 40px 0; }
    .slide-content h2 { font-size: 32px; }
    .slide-content p { font-size: 16px; }
    .page-banner { padding: 40px 0; }
    .page-banner h1 { font-size: 28px; }
    .section { padding: 40px 0; }
    .section-header h2 { font-size: 24px; }
    .advantages-grid { grid-template-columns: 1fr; }
    .products-grid, .product-list-grid, .cases-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .news-item { flex-direction: column; }
    .news-item-img { width: 100%; height: 200px; }
    .footer-inner { grid-template-columns: 1fr; gap: 30px; }
    .about-block, .news-detail-wrap, .case-detail-wrap, .product-detail-wrap { padding: 20px; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; display: flex; flex-wrap: wrap; padding: 10px; }
    .admin-sidebar a { padding: 8px 16px; border-left: none; border-bottom: 2px solid transparent; }
    .admin-sidebar a.active { border-left: none; border-bottom-color: #1a56db; }
    .slider-nav { width: 36px; height: 36px; font-size: 16px; }
}

@media (max-width: 480px) {
    .logo-text { font-size: 16px; }
    .logo-img { height: 32px; }
    .slide-content h2 { font-size: 26px; }
    .slide-buttons { flex-direction: column; }
    .btn { width: 100%; text-align: center; }
}
