/* ============================================
   郑州鑫聚康电子科技有限公司 - 官网样式
   ============================================ */

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; color: #333; line-height: 1.6; background: #fff; }
a { text-decoration: none; color: inherit; transition: color 0.3s; }
ul, ol { list-style: none; }
img { max-width: 100%; vertical-align: middle; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ==================== Header ==================== */
.header { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 1000; }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.logo { font-size: 24px; font-weight: 700; color: #1a5ca1; display: flex; align-items: center; }
.logo span { color: #e63946; }
.logo-img { max-height: 50px; width: auto; vertical-align: middle; }
.nav { display: flex; gap: 8px; }
.nav a { padding: 8px 20px; border-radius: 4px; font-size: 15px; color: #555; transition: all 0.3s; }
.nav a:hover, .nav a.active { color: #1a5ca1; background: #f0f6ff; }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: #333; }

/* ==================== Banner ==================== */
.banner { position: relative; height: 500px; overflow: hidden; background: #1a5ca1; }
.banner-slides { position: relative; height: 100%; }
.banner-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; opacity: 0; transition: opacity 1s ease; }
.banner-slide.active { opacity: 1; }
.banner-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.banner-default-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #1a5ca1 0%, #0d3264 100%); z-index: 0; }
.banner-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(26,92,161,0.7) 0%, rgba(13,50,100,0.6) 100%); z-index: 1; }
.banner-content { position: relative; z-index: 2; }
.banner-content h2 { font-size: 48px; font-weight: 700; margin-bottom: 16px; letter-spacing: 2px; }
.banner-content p { font-size: 20px; opacity: 0.9; margin-bottom: 30px; }
.banner-dots { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.banner-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s; }
.banner-dot.active { background: #fff; transform: scale(1.2); }
.btn-primary { display: inline-block; padding: 12px 36px; background: #e63946; color: #fff; border-radius: 4px; font-size: 16px; transition: all 0.3s; border: none; cursor: pointer; }
.btn-primary:hover { background: #c62828; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(230,57,70,0.4); }
.btn-outline { display: inline-block; padding: 12px 36px; border: 2px solid #fff; color: #fff; border-radius: 4px; font-size: 16px; transition: all 0.3s; background: transparent; cursor: pointer; }
.btn-outline:hover { background: #fff; color: #1a5ca1; }

/* ==================== Section ==================== */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 32px; color: #1a5ca1; margin-bottom: 12px; position: relative; display: inline-block; }
.section-header h2::after { content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); width: 60px; height: 3px; background: #e63946; border-radius: 2px; }
.section-header p { color: #888; font-size: 16px; margin-top: 20px; }

/* ==================== Product Grid ==================== */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: all 0.3s; border: 1px solid #f0f0f0; }
.product-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(0,0,0,0.12); }
.product-card .img-box { height: 200px; background: #f5f8fc; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-card .img-box img { width: 100%; height: 100%; object-fit: cover; }
.product-card .img-box .no-img { color: #bbb; font-size: 14px; }
.product-card .info { padding: 20px; }
.product-card .info h3 { font-size: 16px; margin-bottom: 8px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card .info p { font-size: 13px; color: #999; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .info .tag { display: inline-block; padding: 2px 8px; background: #f0f6ff; color: #1a5ca1; border-radius: 3px; font-size: 12px; margin-top: 10px; }

/* ==================== News List ==================== */
.news-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.news-card { display: flex; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: all 0.3s; border: 1px solid #f0f0f0; }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.news-card .img-box { width: 200px; min-height: 140px; background: #f5f8fc; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.news-card .img-box img { width: 100%; height: 100%; object-fit: cover; }
.news-card .img-box .no-img { color: #bbb; font-size: 12px; }
.news-card .info { padding: 20px; flex: 1; }
.news-card .info .date { font-size: 13px; color: #bbb; margin-bottom: 8px; }
.news-card .info h3 { font-size: 16px; margin-bottom: 8px; color: #333; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.news-card .info p { font-size: 14px; color: #888; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ==================== About ==================== */
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text h3 { font-size: 24px; color: #1a5ca1; margin-bottom: 20px; }
.about-text p { font-size: 15px; color: #666; line-height: 1.8; margin-bottom: 16px; }
.about-image { border-radius: 8px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,0.1); background: #f5f8fc; height: 350px; display: flex; align-items: center; justify-content: center; }
.about-image .no-img { color: #bbb; font-size: 16px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-top: 50px; }
.stat-item { text-align: center; padding: 30px 20px; background: #f8fbff; border-radius: 8px; }
.stat-item .num { font-size: 36px; font-weight: 700; color: #1a5ca1; }
.stat-item .label { font-size: 14px; color: #888; margin-top: 8px; }
.stat-img-box { display: flex; align-items: center; justify-content: center; }
.stat-img-box img { max-height: 60px; width: auto; }

/* ==================== Contact ==================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.contact-info h3 { font-size: 22px; color: #1a5ca1; margin-bottom: 24px; }
.contact-item { display: flex; align-items: flex-start; margin-bottom: 20px; }
.contact-item .icon { width: 48px; height: 48px; background: #f0f6ff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-right: 16px; flex-shrink: 0; }
.contact-item .text h4 { font-size: 15px; color: #333; margin-bottom: 4px; }
.contact-item .text p { font-size: 14px; color: #888; }
.contact-form { background: #f8fbff; padding: 40px; border-radius: 8px; }
.contact-form h3 { font-size: 22px; color: #1a5ca1; margin-bottom: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: #555; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; transition: border-color 0.3s; outline: none; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: #1a5ca1; }
.form-group textarea { height: 120px; resize: vertical; }

/* 联系我们 - 双分部布局 */
.contact-branches { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 50px; }
.contact-branch-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.branch-header { background: linear-gradient(135deg, #1a5ca1, #0d3264); color: #fff; padding: 30px; text-align: center; }
.branch-header.south { background: linear-gradient(135deg, #e63946, #b82d39); }
.branch-header .branch-icon { font-size: 40px; margin-bottom: 10px; }
.branch-header h3 { font-size: 22px; margin-bottom: 6px; }
.branch-header .branch-company { font-size: 14px; opacity: 0.9; }
.branch-body { padding: 30px; }
.branch-row { display: flex; padding: 12px 0; border-bottom: 1px solid #f0f0f0; align-items: flex-start; }
.branch-row:last-child { border-bottom: none; }
.branch-label { width: 70px; flex-shrink: 0; font-size: 14px; color: #999; }
.branch-value { font-size: 14px; color: #333; flex: 1; word-break: break-all; }
.branch-value a { color: #1a5ca1; }
.contact-form-wrapper { background: #fff; border-radius: 12px; padding: 40px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); max-width: 700px; margin: 0 auto; }
.contact-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }

/* ==================== Footer ==================== */
.footer { background: #1a2744; color: #ccc; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 20px; }
.footer p { font-size: 14px; line-height: 1.8; color: #99a8b8; }
.footer ul li { margin-bottom: 10px; }
.footer ul li a { color: #99a8b8; font-size: 14px; transition: color 0.3s; }
.footer ul li a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 40px; padding: 20px 0; text-align: center; font-size: 13px; color: #667; }

/* ==================== Pagination ==================== */
.pagination { display: flex; justify-content: center; margin-top: 40px; gap: 8px; }
.pagination a, .pagination span { display: inline-block; padding: 8px 14px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; color: #555; transition: all 0.3s; }
.pagination a:hover, .pagination span.current { background: #1a5ca1; color: #fff; border-color: #1a5ca1; }

/* ==================== Breadcrumb ==================== */
.breadcrumb { background: #f5f8fc; padding: 16px 0; }
.breadcrumb .container { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #888; }
.breadcrumb a { color: #1a5ca1; }
.breadcrumb span { color: #999; }

/* ==================== Detail Page ==================== */
.detail-content { display: grid; grid-template-columns: 1fr 300px; gap: 40px; }
.detail-main { background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.detail-main h1 { font-size: 24px; color: #333; margin-bottom: 20px; }
.detail-main .meta { font-size: 14px; color: #999; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; }
.detail-main .body { font-size: 15px; line-height: 1.8; color: #555; }
.detail-main .body p { margin-bottom: 16px; }
.detail-main .body img { max-width: 100%; border-radius: 4px; }
.detail-sidebar { }
.sidebar-box { background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); padding: 24px; margin-bottom: 24px; }
.sidebar-box h3 { font-size: 16px; color: #1a5ca1; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid #f0f6ff; }
.sidebar-box ul li { margin-bottom: 10px; }
.sidebar-box ul li a { font-size: 14px; color: #555; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-box ul li a:hover { color: #1a5ca1; }

/* Page nav */
.page-nav { display: flex; justify-content: space-between; margin-top: 30px; padding-top: 20px; border-top: 1px solid #f0f0f0; }
.page-nav a { font-size: 14px; color: #1a5ca1; }

/* ==================== Category Tabs ==================== */
.category-tabs { display: flex; gap: 12px; margin-bottom: 30px; flex-wrap: wrap; }
.category-tabs a { padding: 8px 20px; border-radius: 20px; border: 1px solid #ddd; font-size: 14px; color: #666; transition: all 0.3s; }
.category-tabs a:hover, .category-tabs a.active { background: #1a5ca1; color: #fff; border-color: #1a5ca1; }

/* ==================== Factory Page ==================== */
.factory-category-block { margin-bottom: 50px; }
.factory-category-title { font-size: 20px; color: #1a5ca1; margin-bottom: 24px; padding-left: 14px; border-left: 4px solid #1a5ca1; }
.factory-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.factory-gallery-item { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: all 0.3s; border: 1px solid #f0f0f0; }
.factory-gallery-item:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.factory-img-box { height: 240px; background: #f5f8fc; overflow: hidden; }
.factory-img-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.factory-gallery-item:hover .factory-img-box img { transform: scale(1.05); }
.factory-img-title { padding: 14px 16px; font-size: 14px; color: #555; text-align: center; }
.factory-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.factory-feature-item { text-align: center; padding: 40px 20px; background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.factory-feature-item .feature-icon { font-size: 48px; margin-bottom: 16px; }
.factory-feature-item h4 { font-size: 18px; color: #333; margin-bottom: 10px; }
.factory-feature-item p { font-size: 14px; color: #888; line-height: 1.6; }

/* ==================== Product Page Layout ==================== */
.product-page-layout { display: grid; grid-template-columns: 240px 1fr; gap: 30px; align-items: start; }
.product-sidebar { position: sticky; top: 90px; }
.sidebar-category { background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); overflow: hidden; }
.sidebar-category h3 { background: #1a5ca1; color: #fff; padding: 16px 20px; font-size: 16px; }
.category-tree { padding: 8px 0; }
.category-tree > li { border-bottom: 1px solid #f5f5f5; }
.category-tree > li:last-child { border-bottom: none; }
.category-tree > li > a, .category-tree > li:first-child > a { display: block; padding: 12px 20px; font-size: 15px; color: #333; transition: all 0.3s; font-weight: 500; }
.category-tree > li > a:hover, .category-tree > li.active > a { color: #1a5ca1; background: #f0f6ff; }
.category-tree > li.active > a { border-left: 3px solid #1a5ca1; }
.cat-parent-item { position: relative; }
.cat-toggle { position: absolute; right: 16px; top: 12px; font-size: 12px; color: #999; cursor: pointer; transition: transform 0.3s, color 0.3s; padding: 2px 6px; border-radius: 3px; }
.cat-toggle:hover { color: #1a5ca1; background: #f0f6ff; }
.cat-parent-item:not(.collapsed) .cat-toggle { transform: rotate(90deg); }
.cat-children { background: #fafbfc; overflow: hidden; transition: max-height 0.3s ease; max-height: 500px; }
.cat-parent-item.collapsed .cat-children { max-height: 0; }
.cat-children li a { display: block; padding: 10px 20px 10px 40px; font-size: 14px; color: #666; transition: all 0.3s; position: relative; }
.cat-children li a::before { content: '└'; position: absolute; left: 24px; color: #ccc; }
.cat-children li a:hover, .category-tree .cat-children li.active a { color: #1a5ca1; background: #f0f6ff; }
.category-tree .cat-children li.active a { color: #1a5ca1; font-weight: 500; }
.product-main { min-width: 0; }
.product-main-header { margin-bottom: 24px; }
.product-main-header h2 { font-size: 24px; color: #1a5ca1; }
/* 详情页侧边栏分类树 */
.category-tree-sm > li { margin-bottom: 8px; }
.category-tree-sm > li > a { font-size: 14px; color: #333; }
.category-tree-sm > li > a:hover { color: #1a5ca1; }
.category-tree-sm > li > ul { padding-left: 16px; margin-top: 4px; }
.category-tree-sm > li > ul li { margin-bottom: 4px; }
.category-tree-sm > li > ul li a { font-size: 13px; color: #888; }
.category-tree-sm > li > ul li a:hover { color: #1a5ca1; }

/* ==================== Product Gallery ==================== */
.product-gallery { margin-bottom: 30px; }
.gallery-main { width: 100%; height: 450px; background: #f5f8fc; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; border: 1px solid #eee; }
.gallery-main img { max-width: 100%; max-height: 100%; object-fit: contain; transition: opacity 0.2s; }
.gallery-thumbs { display: flex; gap: 10px; }
.gallery-thumb { width: 80px; height: 80px; border-radius: 6px; overflow: hidden; cursor: pointer; border: 2px solid #eee; transition: border-color 0.3s; flex-shrink: 0; background: #f5f8fc; display: flex; align-items: center; justify-content: center; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { border-color: #1a5ca1; }
.gallery-thumb.active { border-color: #1a5ca1; box-shadow: 0 0 0 2px rgba(26,92,161,0.2); }

/* 产品描述区域 */
.product-desc { margin-bottom: 30px; padding: 24px; background: #f8fbff; border-radius: 8px; }
.product-desc h3 { font-size: 18px; color: #1a5ca1; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid #e8f0fe; }
.product-desc p { font-size: 15px; color: #555; line-height: 1.8; }

/* 产品详情内容 */
.product-detail-body { font-size: 15px; line-height: 1.8; color: #555; }
.product-detail-body p { margin-bottom: 16px; }
.product-detail-body img { max-width: 100%; border-radius: 4px; }

/* ==================== WeChat Popup ==================== */
.wx-popup { position: fixed; bottom: 30px; right: 30px; z-index: 9999; opacity: 0; visibility: hidden; transform: translateY(20px) scale(0.95); transition: all 0.4s ease; }
.wx-popup.show { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.wx-popup-card { position: relative; width: 220px; background: #fff; border-radius: 12px; box-shadow: 0 8px 40px rgba(0,0,0,0.15); overflow: hidden; }
.wx-popup-close { position: absolute; top: 8px; right: 10px; width: 24px; height: 24px; line-height: 22px; text-align: center; font-size: 18px; color: #999; cursor: pointer; border-radius: 50%; background: rgba(255,255,255,0.9); z-index: 2; transition: all 0.2s; }
.wx-popup-close:hover { color: #fff; background: #e63946; }
.wx-popup-header { background: linear-gradient(135deg, #1a5ca1, #0d3264); color: #fff; padding: 14px 16px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.wx-popup-icon { font-size: 18px; }
.wx-popup-body { padding: 16px; text-align: center; }
.wx-popup-qr { width: 160px; height: 160px; margin: 0 auto 10px; border-radius: 8px; overflow: hidden; border: 1px solid #eee; }
.wx-popup-qr img { width: 100%; height: 100%; object-fit: cover; }
.wx-popup-tip { font-size: 13px; color: #888; margin-bottom: 8px; }
.wx-popup-id { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; background: #f0f6ff; border-radius: 20px; }
.wx-popup-label { font-size: 13px; color: #888; }
.wx-popup-num { font-size: 14px; color: #1a5ca1; font-weight: 600; }

/* 联系我悬浮按钮 */
.wx-float-btn { position: fixed; bottom: 30px; right: 30px; z-index: 9998; display: flex; align-items: center; gap: 6px; padding: 12px 20px; background: linear-gradient(135deg, #1a5ca1, #0d3264); color: #fff; border-radius: 40px; cursor: pointer; box-shadow: 0 4px 20px rgba(26,92,161,0.4); transition: all 0.3s; font-size: 14px; font-weight: 600; }
.wx-float-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(26,92,161,0.5); }
.wx-float-icon { font-size: 18px; }

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-content { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .header .container { flex-wrap: wrap; height: auto; padding: 15px 20px; }
    .nav { display: none; width: 100%; flex-direction: column; padding-top: 15px; }
    .nav.open { display: flex; }
    .mobile-menu-btn { display: block; }
    .banner { height: 350px; }
    .banner-content h2 { font-size: 28px; }
    .banner-content p { font-size: 16px; }
    .section { padding: 50px 0; }
    .section-header h2 { font-size: 24px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .gallery-main { height: 300px; }
    .gallery-thumb { width: 60px; height: 60px; }
    .news-list { grid-template-columns: 1fr; }
    .about-content { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-branches { grid-template-columns: 1fr; }
    .contact-form-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .product-page-layout { grid-template-columns: 1fr; }
    .product-sidebar { position: static; }
    .factory-gallery { grid-template-columns: repeat(2, 1fr); }
    .factory-features { grid-template-columns: repeat(2, 1fr); }
    .wx-popup { bottom: 15px; right: 15px; }
    .wx-popup-card { width: 180px; }
    .wx-popup-qr { width: 130px; height: 130px; }
    .wx-float-btn { bottom: 15px; right: 15px; padding: 10px 16px; font-size: 13px; }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr; }
    .factory-gallery { grid-template-columns: 1fr; }
    .factory-features { grid-template-columns: 1fr; }
}
