/* ===== 鑫威顺门户网站样式 ===== */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    color: #1e293b;
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: #1a56db; text-decoration: none; }
a:hover { color: #1e40af; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 24px; border-radius: 6px; font-size: .95rem; font-weight: 500;
    cursor: pointer; border: none; transition: all .2s; text-decoration: none;
}
.btn-primary { background: #1a56db; color: #fff; }
.btn-primary:hover { background: #1e40af; color: #fff; }
.btn-outline { background: transparent; color: #1a56db; border: 1.5px solid #1a56db; }
.btn-outline:hover { background: #1a56db; color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-sm { padding: 4px 12px; font-size: .82rem; border-radius: 4px; border: 1px solid #e2e8f0; background: #fff; color: #475569; text-decoration: none; cursor: pointer; }
.btn-sm:hover { border-color: #1a56db; color: #1a56db; }
.btn-danger { color: #dc2626; border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; border-color: #dc2626; }

/* === Top Bar === */
.top-bar {
    background: #0f172a; color: #94a3b8; font-size: .82rem; padding: 6px 0;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar a { color: #94a3b8; }
.top-bar a:hover { color: #fff; }

/* === Header === */
.site-header { background: #fff; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-text h1 { font-size: 1.2rem; font-weight: 700; color: #0f172a; line-height: 1.2; }
.logo-sub { font-size: .75rem; color: #64748b; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav a {
    display: block; padding: 8px 16px; border-radius: 6px; font-size: .92rem;
    color: #475569; transition: all .15s; white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { color: #1a56db; background: #eff6ff; }

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown {
    position: absolute; top: 100%; left: 0; min-width: 200px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,.08);
    padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: all .2s; z-index: 200;
}
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: 8px 16px; border-radius: 0 !important; font-size: .88rem !important; }

/* Mobile toggle */
.mobile-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 4px; }
.mobile-toggle span { display: block; width: 22px; height: 2px; background: #475569; border-radius: 2px; }

/* === Hero === */
.hero {
    position: relative; background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1a56db 100%);
    color: #fff; padding: 100px 0 80px; overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; opacity: .08;
    background: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,.1) 2px, rgba(255,255,255,.1) 4px);
}
.hero-content { position: relative; max-width: 680px; }
.hero-content h2 { font-size: 2.8rem; font-weight: 800; line-height: 1.2; margin-bottom: 8px; }
.hero-sub { font-size: 1.1rem; color: #93c5fd; margin-bottom: 12px; }
.hero-desc { font-size: 1.05rem; color: #cbd5e1; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta .btn-outline { color: #fff; border-color: rgba(255,255,255,.4); }
.hero-cta .btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }

/* === Sections === */
.section { padding: 80px 0; }
.section.bg-light { background: #f8fafc; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h3 { font-size: 1.8rem; font-weight: 700; color: #0f172a; }
.section-en { font-size: .88rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 2px; margin-top: 4px; }
.section-line { width: 48px; height: 3px; background: #1a56db; margin: 16px auto 0; border-radius: 3px; }
.section-more { text-align: center; margin-top: 40px; }

/* === Intro section === */
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.intro-text { font-size: .95rem; color: #475569; line-height: 1.85; }
.intro-highlights { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.highlight-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 24px; text-align: center; transition: all .2s;
}
.highlight-card:hover { border-color: #1a56db; box-shadow: 0 4px 16px rgba(26,86,219,.08); }
.highlight-icon { margin-bottom: 12px; }
.highlight-card h4 { font-size: .95rem; font-weight: 600; color: #0f172a; margin-bottom: 4px; }
.highlight-card p { font-size: .82rem; color: #64748b; }

/* === Product Grid === */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.product-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    overflow: hidden; transition: all .25s; display: flex; flex-direction: column;
}
.product-card:hover { border-color: #1a56db; box-shadow: 0 8px 30px rgba(26,86,219,.1); transform: translateY(-2px); color: inherit; }
.product-img {
    position: relative; height: 220px; background: #f1f5f9;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: #f1f5f9; }
.product-img-placeholder.large { height: 360px; max-width: 500px; }
.product-tag {
    position: absolute; top: 12px; left: 12px;
    background: #1a56db; color: #fff; font-size: .72rem; padding: 4px 10px; border-radius: 4px;
}
.product-info { padding: 16px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.product-model { font-size: .78rem; color: #1a56db; font-weight: 600; margin-bottom: 4px; }
.product-info h4 { font-size: 1rem; font-weight: 600; color: #0f172a; line-height: 1.4; }
.product-name-en { font-size: .78rem; color: #94a3b8; margin-top: 4px; }

/* === Category tabs === */
.category-tabs {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px;
    justify-content: center;
}
.cat-tab {
    padding: 8px 20px; border-radius: 20px; font-size: .88rem;
    border: 1px solid #e2e8f0; color: #475569; transition: all .15s;
}
.cat-tab:hover, .cat-tab.active { background: #1a56db; color: #fff; border-color: #1a56db; }
.category-header { text-align: center; margin-bottom: 32px; }
.category-header h3 { font-size: 1.4rem; font-weight: 600; }
.category-header p { color: #94a3b8; font-size: .88rem; margin-top: 4px; }

/* === News === */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.news-card {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden;
    transition: all .2s; display: flex; flex-direction: column;
}
.news-card:hover { border-color: #1a56db; box-shadow: 0 4px 20px rgba(26,86,219,.08); color: inherit; }
.news-img { height: 200px; overflow: hidden; background: #f1f5f9; }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-info { padding: 20px; flex: 1; }
.news-date { font-size: .78rem; color: #94a3b8; margin-bottom: 8px; display: block; }
.news-info h4 { font-size: 1rem; font-weight: 600; color: #0f172a; margin-bottom: 8px; line-height: 1.5; }
.news-info p { font-size: .85rem; color: #64748b; line-height: 1.6; }

/* === CTA === */
.cta-section {
    background: linear-gradient(135deg, #1a56db, #1e40af); color: #fff; text-align: center; padding: 72px 0;
}
.cta-section h3 { font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.cta-section p { font-size: 1rem; color: #bfdbfe; margin-bottom: 28px; }

/* === Page Banner === */
.page-banner {
    background: linear-gradient(135deg, #0f172a, #1e3a5f); color: #fff; padding: 48px 0; text-align: center;
}
.page-banner h2 { font-size: 1.8rem; font-weight: 700; }
.page-banner p { color: #93c5fd; font-size: .95rem; margin-top: 6px; }
.page-banner-sm { padding: 20px 0; }
.breadcrumb { font-size: .85rem; color: #94a3b8; }
.breadcrumb a { color: #93c5fd; }
.breadcrumb span { color: #fff; }

/* === Pagination === */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 48px; }
.page-btn {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    border-radius: 6px; border: 1px solid #e2e8f0; font-size: .88rem; color: #475569;
    transition: all .15s; text-decoration: none;
}
.page-btn:hover, .page-btn.active { background: #1a56db; color: #fff; border-color: #1a56db; }

/* === Product Detail === */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-detail-img { border-radius: 10px; overflow: hidden; background: #f1f5f9; }
.product-detail-img img { width: 100%; }
.product-detail-model { display: inline-block; background: #eff6ff; color: #1a56db; font-size: .85rem; padding: 4px 14px; border-radius: 4px; font-weight: 600; margin-bottom: 12px; }
.product-detail-info h2 { font-size: 1.8rem; font-weight: 700; color: #0f172a; margin-bottom: 4px; }
.product-detail-name-en { font-size: .92rem; color: #94a3b8; margin-bottom: 8px; }
.product-detail-cat { font-size: .85rem; color: #64748b; display: block; margin-bottom: 16px; }
.product-detail-desc { margin-bottom: 24px; }
.product-detail-section { margin-top: 48px; }
.product-detail-section h3 { font-size: 1.3rem; font-weight: 700; color: #0f172a; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #1a56db; display: inline-block; }

/* === Specs Table === */
.specs-table-wrapper { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 8px; }
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; font-size: .92rem; }
.specs-table td:first-child { font-weight: 600; color: #475569; width: 30%; background: #f8fafc; }

/* === Prose === */
.prose { font-size: .95rem; color: #475569; line-height: 1.85; }
.prose p + p { margin-top: 12px; }

/* === About === */
.about-content { max-width: 860px; margin: 0 auto; }
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.value-card { text-align: center; padding: 32px 20px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; transition: all .2s; }
.value-card:hover { border-color: #1a56db; box-shadow: 0 4px 20px rgba(26,86,219,.08); }
.value-num { font-size: 2.4rem; font-weight: 800; color: #e2e8f0; margin-bottom: 8px; }
.value-card h4 { font-size: 1.1rem; font-weight: 600; color: #0f172a; margin-bottom: 4px; }
.value-card p { font-size: .85rem; color: #64748b; }

/* === Contact === */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info-col h3, .contact-form-col h3 { font-size: 1.3rem; font-weight: 700; color: #0f172a; margin-bottom: 24px; }
.contact-info-list { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-item strong { display: block; font-size: .9rem; color: #0f172a; margin-bottom: 2px; }
.contact-item div { font-size: .9rem; color: #64748b; line-height: 1.5; }

/* === Forms === */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .88rem; font-weight: 500; color: #475569; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    padding: 10px 14px; border: 1.5px solid #e2e8f0; border-radius: 8px;
    font-size: .92rem; font-family: inherit; transition: border-color .2s;
    background: #fff; color: #1e293b;
}
.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,.1);
}
.form-group input[type="file"] { font-size: .88rem; }
.form-group select { cursor: pointer; }
.alert { padding: 12px 16px; border-radius: 8px; font-size: .9rem; margin-bottom: 16px; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* === News Detail === */
.news-detail { max-width: 800px; margin: 0 auto; }
.news-detail-header { margin-bottom: 24px; }
.news-detail-header h2 { font-size: 1.8rem; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.news-detail-header time { font-size: .85rem; color: #94a3b8; }
.news-detail-img { margin-bottom: 32px; border-radius: 10px; overflow: hidden; }
.news-detail-content { margin-bottom: 32px; }
.news-detail-back { text-align: center; margin-top: 48px; }

/* === Footer === */
.site-footer {
    background: #0f172a; color: #94a3b8; padding: 56px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 40px; }
.footer-col h3 { color: #fff; font-size: 1.1rem; margin-bottom: 12px; font-weight: 600; }
.footer-col h4 { color: #e2e8f0; font-size: .95rem; margin-bottom: 16px; font-weight: 600; }
.footer-col p { font-size: .85rem; line-height: 1.7; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #94a3b8; font-size: .85rem; }
.footer-col ul li a:hover { color: #fff; }
.contact-info li { font-size: .85rem; line-height: 1.7; }
.footer-bottom { border-top: 1px solid #1e293b; padding: 20px 0; text-align: center; font-size: .82rem; }
.footer-bottom p { margin: 0; }

/* === Empty state === */
.empty-state { text-align: center; padding: 60px 20px; color: #94a3b8; font-size: 1rem; }

/* ===================== ADMIN ===================== */

/* Admin Login */
.admin-login-body { background: #f1f5f9; display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.admin-login { width: 100%; max-width: 400px; padding: 20px; }
.admin-login-card { background: #fff; border-radius: 12px; padding: 36px; box-shadow: 0 4px 24px rgba(0,0,0,.06); }
.admin-login-logo { text-align: center; margin-bottom: 28px; }
.admin-login-logo h2 { font-size: 1.3rem; margin-top: 12px; color: #0f172a; }
.admin-login form { display: flex; flex-direction: column; gap: 16px; }

/* Admin Layout */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px; background: #0f172a; color: #94a3b8;
    display: flex; flex-direction: column; flex-shrink: 0; padding: 20px 0;
}
.admin-brand { padding: 0 16px 20px; border-bottom: 1px solid #1e293b; margin-bottom: 12px; }
.admin-brand a { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-size: .95rem; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; flex: 1; }
.admin-nav-item {
    display: block; padding: 10px 12px; border-radius: 6px;
    font-size: .88rem; color: #94a3b8; transition: all .12s;
}
.admin-nav-item:hover, .admin-nav-item.active { background: #1e293b; color: #fff; }
.admin-nav hr { border: none; border-top: 1px solid #1e293b; margin: 8px 0; }
.badge { background: #dc2626; color: #fff; font-size: .7rem; padding: 1px 6px; border-radius: 10px; margin-left: 4px; }

/* Admin Main */
.admin-main { flex: 1; background: #f1f5f9; min-width: 0; }
.admin-header {
    background: #fff; padding: 16px 24px; border-bottom: 1px solid #e2e8f0;
    display: flex; justify-content: space-between; align-items: center;
}
.admin-header h2 { font-size: 1.2rem; font-weight: 600; color: #0f172a; }
.admin-content { padding: 24px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card {
    background: #fff; border-radius: 10px; padding: 20px;
    border: 1px solid #e2e8f0; display: flex; align-items: center; gap: 16px;
}
.stat-icon { width: 52px; height: 52px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-num { display: block; font-size: 1.8rem; font-weight: 700; color: #0f172a; line-height: 1; }
.stat-label { font-size: .82rem; color: #64748b; }

/* Admin Panel */
.admin-panel {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 24px; margin-bottom: 24px;
}
.admin-panel h3 { font-size: 1.05rem; font-weight: 600; color: #0f172a; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f1f5f9; }
.admin-panel h4 { font-size: .95rem; font-weight: 600; color: #475569; margin: 20px 0 12px; }
.admin-panel form { display: flex; flex-direction: column; gap: 16px; }
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Admin Table */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th {
    text-align: left; padding: 12px; background: #f8fafc; color: #64748b;
    font-weight: 600; border-bottom: 2px solid #e2e8f0; white-space: nowrap;
}
.admin-table td { padding: 12px; border-bottom: 1px solid #f1f5f9; color: #475569; }
.admin-table tr:hover td { background: #f8fafc; }
.admin-table tr.unread td { background: #eff6ff; font-weight: 500; }

/* === Responsive === */
@media (max-width: 900px) {
    .intro-grid, .product-detail, .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .values-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .main-nav { display: none; }
    .mobile-toggle { display: flex; }
    .main-nav.open { display: block; position: absolute; top: 68px; left: 0; right: 0; background: #fff; border-bottom: 2px solid #e2e8f0; padding: 16px; box-shadow: 0 10px 25px rgba(0,0,0,.1); }
    .main-nav.open ul { flex-direction: column; gap: 4px; }
    .main-nav.open .dropdown { position: static; box-shadow: none; border: none; opacity: 1; visibility: visible; transform: none; padding-left: 16px; }
    .hero-content h2 { font-size: 2rem; }
    .news-grid { grid-template-columns: 1fr; }
    .admin-sidebar { width: 60px; }
    .admin-sidebar .admin-brand span, .admin-nav-item { font-size: 0; padding: 12px; text-align: center; }
    .admin-nav-item .badge { margin: 0; }
}

@media (max-width: 600px) {
    .hero { padding: 60px 0 50px; }
    .hero-content h2 { font-size: 1.6rem; }
    .section { padding: 50px 0; }
    .product-grid { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .values-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .category-tabs { overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; padding-bottom: 8px; }
    .admin-sidebar { display: none; }
    .breadcrumb { font-size: .78rem; }
}
