/* ===== 安徽众一电气科技有限公司 - 完整CSS（参考启航电子风格） ===== */
:root {
    --primary-color: #1a1a2e;
    --primary-dark: #0f0f1a;
    --accent-color: #1260aa;
    --accent-hover: #0e4f8f;
    --text-dark: #333;
    --text-gray: #898989;
    --text-light: #999;
    --bg-light: #f5f5f5;
    --bg-white: #fff;
    --border-color: #e3e2e2;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
    font-family: 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.section, .page-with-sidebar { flex: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Header 导航栏（仿启航深色） ===== */
#header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: #1a1a2e;
    z-index: 1000;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.logo {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
}
.nav-menu {
    display: flex;
    gap: 6px;
    list-style: none;
}
.nav-menu li { position:relative; }
.nav-menu a {
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: 6px;
    transition: all 0.3s;
}
.nav-menu a:hover {
    color: #fff;
    background: rgba(255,255,255,0.12);
}
.nav-menu a.active {
    color: #fff;
    background: rgba(255,255,255,0.15);
}
.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}
.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}

/* ===== 页面横幅 ===== */
.page-banner {
    margin-top: 70px;
    background: #1a1a2e;
    color: #fff;
    padding: 60px 0;
    text-align: center;
}
.page-banner h1 { font-size: 32px; margin-bottom: 10px; font-weight: 700; }
.page-banner p { font-size: 15px; opacity: 0.85; }

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 3px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-primary { background: var(--accent-color); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--accent-color); border: 1px solid var(--accent-color); }
.btn-secondary:hover { background: var(--accent-color); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.15); }

/* ===== 区块 ===== */
.section { padding: 60px 0; }
.section-title {
    font-size: 24px;
    text-align: center;
    margin-bottom: 4px;
    color: #434343;
    font-weight: 700;
}
.section-subtitle {
    font-size: 12px;
    text-align: center;
    color: #7d7d7d;
    margin-bottom: 35px;
    font-family: Arial, sans-serif;
}

/* ===== 滚动渐入动画 ===== */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== 轮播 ===== */
.slider {
    position: relative;
    margin-top: 70px;
    overflow: hidden;
    height: 450px;
    min-height: 450px;
    display: block;
}
.slider-container { display: flex; transition: transform 0.5s ease; height: 100%; }
.slide {
    min-width: 100%; height: 100%;
    background-size: cover; background-position: center;
    position: relative;
}
.slide-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(26,26,46,0.75), rgba(15,15,26,0.65));
}
.slide-content {
    position: relative; z-index: 1;
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    height: 100%; display: flex; flex-direction: column; justify-content: center;
    color: #fff;
}
.slide-content h1 { font-size: 42px; margin-bottom: 16px; max-width: 600px; }
.slide-content p { font-size: 18px; margin-bottom: 30px; opacity: 0.95; max-width: 600px; }
.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.15); color: #fff;
    border: none; border-radius: 50%;
    font-size: 22px; cursor: pointer; z-index: 10;
    transition: background 0.3s;
}
.slider-arrow:hover { background: rgba(255,255,255,0.3); }
.slider-prev { left: 20px; }
.slider-next { right: 20px; }
.slider-dots {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 10;
}
.slider-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(255,255,255,0.4); border: none; cursor: pointer;
    transition: all 0.3s;
}
.slider-dot.active { background: #fff; width: 26px; border-radius: 5px; }

/* ===== 产品网格 ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px 20px;
}
.product-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card .product-image {
    width: 100%; height: 160px;
    object-fit: contain; background: #f9f9f9;
}
.product-card .product-content { padding: 14px 14px 18px; display: flex; flex-direction: column; flex: 1; }
.product-card .product-title {
    font-size: 15px; margin-bottom: 8px;
    color: #434343; font-weight: 600;
}
.product-card .product-excerpt {
    color: var(--text-gray); font-size: 13px;
    margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card .btn { width: 100%; text-align: center; font-size: 13px; padding: 8px 0; margin-top: auto; }

/* ===== 产品中心页产品列表 ===== */
.product-item { text-align: center; background: #fff; display: flex; flex-direction: column; }
.product-item a { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.product-item-image {
    width: 100%; height: 160px; margin-bottom: 10px;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    background: #f9f9f9;
}
.product-item-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-item-title {
    font-size: 14px; font-weight: 500;
    color: #434343; padding-bottom: 6px;
    line-height: 1.5;
}

/* ===== 搜索栏 ===== */
.products-search-bar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 25px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}
.products-search-bar h2 { color: #434343; font-size: 20px; font-weight: 700; }
.products-search-form { display: flex; gap: 8px; }
.products-search-form input[type="text"] {
    width: 220px; padding: 7px 14px;
    border: 1px solid #ddd; border-radius: 3px;
    font-size: 13px;
}
.products-search-form input[type="text"]:focus { outline: none; border-color: var(--accent-color); }

/* ===== 侧边栏布局 ===== */
.page-with-sidebar {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 25px;
    align-items: start;
    width: 100%;
}
.sidebar {
    background: #fff;
    border-radius: 6px;
    box-shadow: var(--shadow);
    padding: 16px;
    position: sticky;
    top: 90px;
    align-self: start;
}
.sidebar-title {
    background: var(--accent-color);
    color: #fff;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    border-radius: 3px;
}
.sidebar-menu { list-style: none; padding: 0; margin: 0; }
.sidebar-menu li { margin-bottom: 4px; }
.sidebar-menu li a {
    display: block;
    padding: 9px 14px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.3s;
}
.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: var(--accent-color);
    color: #fff;
}

/* ===== 面包屑 ===== */
.page-breadcrumb {
    padding: 12px 0 16px;
    font-size: 13px;
    color: var(--text-gray);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.page-breadcrumb a { color: var(--text-gray); text-decoration: none; font-size: 13px; }
.page-breadcrumb a:hover { color: var(--accent-color); }
.page-breadcrumb span { color: var(--accent-color); font-size: 13px; }

/* ===== 新闻列表 ===== */
.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-list-item {
    background: #fff;
    border-radius: 6px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border-left: 3px solid var(--accent-color);
}
.news-list-item-plain { padding: 16px 20px; }
.news-list-header { margin-bottom: 8px; }
.news-list-date {
    display: inline-block;
    color: #fff;
    background: var(--accent-color);
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 3px;
    margin-bottom: 6px;
}
.news-list-title { font-size: 17px; color: #434343; margin-bottom: 6px; font-weight: 600; line-height: 1.5; }
.news-list-title a:hover { color: var(--accent-color); }
.news-list-excerpt { color: var(--text-gray); line-height: 1.7; margin-bottom: 10px; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.btn-link { color: var(--accent-color); text-decoration: none; font-size: 13px; font-weight: 500; }
.btn-link:hover { text-decoration: underline; }

/* ===== 联系我们侧边栏 ===== */
.contact-sidebar-info { padding: 0; }
.contact-sidebar-item { padding: 16px 0; border-bottom: 1px solid #eee; display: flex; gap: 12px; align-items: flex-start; }
.contact-sidebar-item:last-child { border-bottom: none; }
.contact-sidebar-icon { width: 28px; height: 28px; background: var(--accent-color); mask-size: contain; mask-repeat: no-repeat; mask-position: center; -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; flex-shrink: 0; margin-top: 2px; }
.contact-sidebar-item strong { display: block; color: #434343; margin-bottom: 3px; font-size: 14px; }
.contact-sidebar-item p { color: var(--text-gray); font-size: 13px; line-height: 1.6; margin: 0; }

/* ===== 联系我们表单 ===== */
.contact-container { background: #fff; padding: 30px; border-radius: 6px; box-shadow: var(--shadow); }
.contact-form-container { background: #fff; padding: 24px; border-radius: 6px; box-shadow: var(--shadow); }
.form-row { display: flex; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group.half { width: 50%; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: #434343; font-weight: 500; }
.form-control { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 3px; font-size: 14px; }
.form-control:focus { outline: none; border-color: var(--accent-color); }

/* ===== 新闻详情 ===== */
.news-detail-container { background: #fff; padding: 28px; border-radius: 6px; box-shadow: var(--shadow); }
.news-detail-title { font-size: 22px; color: #434343; margin-bottom: 12px; font-weight: 700; }
.news-detail-meta { color: var(--text-gray); font-size: 13px; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #eee; }
.news-detail-image { width: 100%; border-radius: 6px; margin-bottom: 20px; overflow: hidden; }
.news-detail-image img { width: 100%; display: block; }
.news-detail-content { line-height: 1.8; color: var(--text-dark); font-size: 15px; }
.news-detail-content p { margin-bottom: 16px; }
.news-detail-nav { display: flex; justify-content: space-between; margin-top: 30px; padding-top: 16px; border-top: 1px solid #eee; }
.news-detail-nav a { color: var(--accent-color); text-decoration: none; font-size: 14px; max-width: 45%; }
.news-detail-nav a:hover { text-decoration: underline; }

/* ===== 产品详情 ===== */
.product-detail-container { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.product-carousel { position: relative; border-radius: 6px; overflow: hidden; background: #f9f9f9; }
.carousel-track { display: flex; transition: transform 0.4s ease; }
.carousel-slide { min-width: 100%; }
.carousel-slide img { width: 100%; height: 380px; object-fit: contain; display: block; }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; background: rgba(0,0,0,0.3); color: #fff; border: none; font-size: 20px; cursor: pointer; border-radius: 50%; z-index: 5; transition: background 0.3s; }
.carousel-arrow:hover { background: rgba(0,0,0,0.5); }
.carousel-arrow.prev { left: 10px; }
.carousel-arrow.next { right: 10px; }
.product-info h1 { font-size: 22px; color: #434343; margin-bottom: 12px; }
.product-detail-content { margin-top: 20px; }
.product-detail-content h3 { font-size: 18px; color: #434343; margin-bottom: 10px; }
.product-detail-content .content-text { line-height: 1.8; color: var(--text-gray); font-size: 14px; }
.product-detail-nav { display: flex; justify-content: space-between; margin-top: 30px; padding-top: 16px; border-top: 1px solid #eee; }
.product-detail-nav a { color: var(--accent-color); text-decoration: none; font-size: 14px; max-width: 45%; }

/* ===== 相关产品 ===== */
.related-products { margin-top: 40px; }
.related-products h3 { font-size: 20px; color: #434343; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.related-card { background: #fff; border-radius: 6px; box-shadow: var(--shadow); overflow: hidden; text-align: center; }
.related-card a { text-decoration: none; color: inherit; }
.related-card img { width: 100%; height: 130px; object-fit: contain; background: #f9f9f9; }
.related-card h4 { font-size: 14px; padding: 10px; color: #434343; }

/* ===== 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 30px; }
.pagination a {
    display: inline-block; padding: 7px 14px;
    border: 1px solid #dbdbdb; border-radius: 3px;
    text-decoration: none; color: var(--accent-color); font-size: 13px;
    transition: all 0.3s;
}
.pagination a:hover,
.pagination a.active {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* ===== Footer ===== */
footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.75);
    padding: 50px 0 20px;
    width: 100%;
    margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-about h3, .footer-links h4 { color: #fff; margin-bottom: 14px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: rgba(255,255,255,0.6); text-decoration: none; }
.footer-links a:hover { color: var(--accent-color); }
.footer-bottom { text-align: center; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 13px; }

/* ===== 产品详情页响应式（内联样式替代） ===== */

/* ===== 桌面端隐藏手机底部导航 ===== */
.mobile-footer-bar { display: none; }

/* ===== 手机端响应式（参考hnqhdz.com风格） ===== */
@media (max-width: 768px) {
    body { padding-bottom: 58px; background: #f5f5f5; }
    .container { padding: 0 14px; }
    .logo { font-size: 16px; }

    /* 导航 */
    .header-inner { position: relative; height: 50px; }
    .mobile-menu-btn { display: flex !important; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: #fff;
        flex-direction: column;
        padding: 0;
        z-index: 999;
        border-top: 1px solid #ddd;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    .nav-menu.active { display: flex; }
    .nav-menu li { width: 100%; }
    .nav-menu a {
        display: block;
        padding: 14px 18px;
        font-size: 15px;
        color: #333;
        border-bottom: 1px solid #eee;
        background: #fff;
        border-radius: 0;
    }
    .nav-menu a.active { background: #f0f4fa; color: var(--primary-color); }
    .nav-menu a:active { background: #e8edf5; color: var(--primary-color); }

    /* 底部固定导航条 */
    .mobile-footer-bar {
        display: flex !important;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 52px;
        background: #fff;
        border-top: 1px solid #ddd;
        z-index: 999;
    }
    .mobile-footer-bar a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #666;
        font-size: 11px;
        border-right: 1px solid #eee;
        padding: 6px 0;
    }
    .mobile-footer-bar a:last-child { border-right: none; }
    .mobile-footer-bar .mfb-icon { font-size: 20px; line-height: 1; margin-bottom: 2px; }
    .mobile-footer-bar .mfb-label { font-size: 11px; color: #666; }
    .mobile-footer-bar .mfb-phone { background: #1260aa; color: #fff; }
    .mobile-footer-bar .mfb-phone .mfb-icon { }

    /* hero区 */
    .section.hero {
        padding: 40px 0 30px !important;
        margin-top: 50px !important;
    }
    .section.hero h1 { font-size: 24px !important; }
    .section.hero p { font-size: 13px !important; margin-bottom: 18px !important; }
    .section.hero .btn { width: 100%; margin-right: 0 !important; margin-bottom: 8px; padding: 12px 0; font-size: 14px; }

    /* 区块 */
    .section { padding: 28px 0; }
    .section-title { font-size: 18px; margin-bottom: 2px; }
    .section-subtitle { font-size: 11px; margin-bottom: 18px; }
    .page-banner { padding: 28px 0 18px; margin-top: 56px; }
    .page-banner h1 { font-size: 18px; }
    .page-banner p { font-size: 12px; }

    /* 产品网格 */
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-card .product-image { height: 100px; object-fit: cover; }
    .product-card .product-content { padding: 8px 10px; }
    .product-card .product-title { font-size: 13px; margin-bottom: 2px; }
    .product-card .product-excerpt { display: none; }
    .product-card .btn { display: none; }

    /* 产品中心页 */
    .product-item-image { height: 100px; }
    .product-item-title { font-size: 12px; }
    .products-search-bar { flex-direction: column; gap: 8px; }
    .products-search-bar h2 { font-size: 16px; }

    /* 侧边栏：手机上隐藏 */
    .page-with-sidebar { grid-template-columns: 1fr; }
    .sidebar { display: none; }

    /* 面包屑 */
    .page-breadcrumb { font-size: 12px; padding: 6px 0 8px; margin-bottom: 10px; }

    /* 新闻列表 */
    .news-list-item-plain { padding: 12px 14px; }
    .news-list-title { font-size: 14px; }
    .news-list-excerpt { font-size: 12px; -webkit-line-clamp: 2; }

    /* 详情页 */
    .news-detail-container { padding: 12px; }
    .news-detail-title { font-size: 16px; }
    .news-detail-content { font-size: 14px; }
    .news-detail-nav, .product-detail-nav { flex-direction: column; gap: 6px; }
    .news-detail-nav a, .product-detail-nav a { max-width: 100%; }
    .product-detail-container { grid-template-columns: 1fr !important; gap: 12px !important; }

    /* about */
    .about-content-grid, .home-about-grid { grid-template-columns: 1fr !important; gap: 12px !important; }

    /* 联系我们 */
    .contact-container { padding: 14px; }
    .contact-form-container { padding: 12px; }
    .contact-sidebar-item { padding: 8px 0; }

    /* footer */
    footer { padding: 20px 0 5px; }
    .footer-grid { grid-template-columns: 1fr; gap: 14px; }
    .footer-about p { font-size: 13px; }

    /* 分页 */
    .pagination { gap: 4px; flex-wrap: wrap; }
    .pagination a { padding: 5px 9px; font-size: 12px; }

    /* 按钮 */
    .btn { padding: 8px 16px; font-size: 13px; }

    /* CTA */
    .cta-section h2 { font-size: 18px !important; }
    .cta-section p { font-size: 13px !important; margin-bottom: 14px !important; }
    .cta-section .btn { font-size: 14px !important; padding: 10px 22px !important; }

    /* 轮播 */
    .slider { height: 280px; margin-top: 56px; }
    .slide-content h1 { font-size: 24px; }
    .slide-content p { font-size: 14px; margin-bottom: 20px; }
    .slider-arrow { width: 32px; height: 32px; font-size: 16px; }

    /* 响应式表单 */
    .form-row { flex-direction: column; gap: 0; }
    .form-group.half { width: 100%; }
}
