/* ===== 弘百机械 - 主样式 ===== */
:root {
    --primary: #c0392b;
    --primary-dark: #96281b;
    --primary-light: #e74c3c;
    --accent: #f39c12;
    --dark: #1a1a2e;
    --gray: #666;
    --light: #f8f9fa;
    --border: #e8e8e8;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:"Microsoft YaHei","PingFang SC",sans-serif; color:#333; line-height:1.7; background:#fff; }
a { text-decoration:none; color:inherit; }
img { max-width:100%; }
.container { max-width:1200px; margin:0 auto; padding:0 20px; }

/* 顶部条 */
.topbar { background:var(--dark); color:#aaa; font-size:13px; padding:6px 0; }
.topbar .container { display:flex; justify-content:space-between; }
.topbar-right { color:#ddd; }

/* 导航 */
.header { background:#fff; box-shadow:0 2px 20px rgba(0,0,0,.08); position:sticky; top:0; z-index:100; }
.nav-wrap { display:flex; align-items:center; justify-content:space-between; height:80px; }
.logo { display:flex; align-items:center; gap:10px; }
.logo-icon { font-size:36px; }
.logo-text strong { font-size:22px; color:var(--primary); display:block; line-height:1.2; }
.logo-text small { font-size:10px; color:#999; letter-spacing:2px; }
.nav { display:flex; gap:8px; align-items:center; }
.nav a { padding:8px 18px; font-size:15px; border-radius:6px; transition:.2s; }
.nav a:hover, .nav a.active { color:var(--primary); background:#fdf0ef; }
.nav-cta { background:linear-gradient(135deg,var(--primary),var(--primary-light)); color:#fff !important; }
.nav-cta:hover { opacity:.9; }
.menu-btn { display:none; background:none; border:none; font-size:28px; cursor:pointer; }

/* Banner */
.hero {
    background: linear-gradient(135deg, rgba(26,26,46,.92), rgba(192,57,43,.85)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="600"><rect fill="%231a1a2e" width="1200" height="600"/><g fill="%23c0392b" opacity="0.1"><circle cx="100" cy="100" r="80"/><circle cx="1100" cy="500" r="120"/><rect x="800" y="50" width="200" height="200"/></g></svg>');
    background-size:cover; background-position:center;
    color:#fff; padding:100px 0; text-align:center;
}
.hero h1 { font-size:42px; margin-bottom:16px; text-shadow:0 2px 10px rgba(0,0,0,.3); }
.hero h1 span { color:var(--accent); }
.hero p { font-size:18px; opacity:.9; margin-bottom:32px; max-width:700px; margin-left:auto; margin-right:auto; }
.hero-btns { display:flex; gap:16px; justify-content:center; flex-wrap:wrap; }
.btn-primary, .btn-outline {
    padding:14px 36px; border-radius:50px; font-size:16px; transition:.3s; display:inline-block;
}
.btn-primary { background:linear-gradient(135deg,var(--primary),var(--primary-light)); color:#fff; box-shadow:0 4px 20px rgba(192,57,43,.4); }
.btn-primary:hover { transform:translateY(-2px); box-shadow:0 6px 25px rgba(192,57,43,.5); }
.btn-outline { border:2px solid #fff; color:#fff; }
.btn-outline:hover { background:#fff; color:var(--primary); }

/* 通用section */
.section { padding:80px 0; }
.section-title { text-align:center; margin-bottom:50px; }
.section-title h2 { font-size:32px; color:var(--dark); margin-bottom:10px; }
.section-title h2 span { color:var(--primary); }
.section-title p { color:var(--gray); }
.section-title::after {
    content:''; display:block; width:60px; height:3px; background:linear-gradient(90deg,var(--primary),var(--accent));
    margin:16px auto 0; border-radius:2px;
}

/* 产品卡片 */
.product-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:30px; }
.product-card {
    background:#fff; border-radius:12px; overflow:hidden; box-shadow:0 2px 15px rgba(0,0,0,.06);
    transition:.3s; border:1px solid var(--border);
}
.product-card:hover { transform:translateY(-5px); box-shadow:0 10px 30px rgba(192,57,43,.15); border-color:var(--primary-light); }
.product-img {
    height:220px; background:linear-gradient(135deg,#f5f5f5,#e8e8e8);
    display:flex; align-items:center; justify-content:center; font-size:64px;
}
.product-body { padding:24px; }
.product-body h3 { font-size:18px; margin-bottom:8px; color:var(--dark); }
.product-body .sub { color:var(--primary); font-size:13px; margin-bottom:10px; }
.product-body p { color:var(--gray); font-size:14px; margin-bottom:16px; }
.product-body .more { color:var(--primary); font-weight:600; font-size:14px; }

/* 优势 */
.features { background:var(--light); }
.feature-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:24px; }
.feature-item { text-align:center; padding:30px 20px; background:#fff; border-radius:12px; box-shadow:0 2px 10px rgba(0,0,0,.04); }
.feature-icon { font-size:48px; margin-bottom:16px; }
.feature-item h4 { font-size:17px; margin-bottom:8px; color:var(--dark); }
.feature-item p { font-size:13px; color:var(--gray); }

/* 关于简介 */
.about-preview { display:grid; grid-template-columns:1fr 1fr; gap:50px; align-items:center; }
.about-preview img { border-radius:12px; }
.about-text h3 { font-size:26px; margin-bottom:16px; color:var(--dark); }
.about-text p { color:var(--gray); margin-bottom:16px; }
.about-text .highlight { color:var(--primary); font-weight:600; }

/* FAQ */
.faq-list { max-width:800px; margin:0 auto; }
.faq-item { border:1px solid var(--border); border-radius:8px; margin-bottom:12px; overflow:hidden; }
.faq-q { padding:16px 20px; background:#fafafa; cursor:pointer; font-weight:600; display:flex; justify-content:space-between; }
.faq-q::after { content:'+'; font-size:20px; color:var(--primary); }
.faq-a { padding:0 20px; max-height:0; overflow:hidden; transition:.3s; color:var(--gray); }
.faq-item.open .faq-a { padding:16px 20px; max-height:500px; }
.faq-item.open .faq-q::after { content:'−'; }

/* 文章列表 */
.article-list { max-width:900px; margin:0 auto; }
.article-item {
    display:flex; gap:24px; padding:24px; border:1px solid var(--border); border-radius:12px;
    margin-bottom:16px; transition:.2s; background:#fff;
}
.article-item:hover { box-shadow:0 4px 20px rgba(0,0,0,.08); border-color:var(--primary-light); }
.article-date { text-align:center; min-width:70px; }
.article-date .day { font-size:28px; font-weight:700; color:var(--primary); line-height:1; }
.article-date .ym { font-size:12px; color:#999; }
.article-info h3 { font-size:18px; margin-bottom:8px; }
.article-info h3 a:hover { color:var(--primary); }
.article-info p { color:var(--gray); font-size:14px; }

/* 面包屑 */
.breadcrumb { padding:16px 0; font-size:13px; color:#999; }
.breadcrumb a { color:var(--gray); }
.breadcrumb a:hover { color:var(--primary); }

/* 产品详情 */
.product-detail { display:grid; grid-template-columns:1fr 1fr; gap:40px; }
.product-detail-img { background:#f5f5f5; border-radius:12px; height:400px; display:flex; align-items:center; justify-content:center; font-size:100px; }
.product-detail-info h1 { font-size:28px; margin-bottom:8px; }
.product-detail-info .sub { color:var(--primary); margin-bottom:20px; }
.params-table { width:100%; border-collapse:collapse; margin:20px 0; }
.params-table td { padding:10px 16px; border:1px solid var(--border); font-size:14px; }
.params-table td:first-child { background:#fafafa; font-weight:600; width:120px; }

/* 文章详情 */
.article-detail { max-width:800px; margin:0 auto; }
.article-detail h1 { font-size:28px; margin-bottom:12px; }
.article-meta { color:#999; font-size:13px; margin-bottom:30px; padding-bottom:20px; border-bottom:1px solid var(--border); }
.article-content { font-size:16px; line-height:1.9; }
.article-content h3 { margin:24px 0 12px; color:var(--dark); }
.article-content p { margin-bottom:12px; }

/* 联系页 */
.contact-grid { display:grid; grid-template-columns:1fr 1fr; gap:40px; }
.contact-form input, .contact-form textarea {
    width:100%; padding:12px 16px; border:1px solid var(--border); border-radius:8px; margin-bottom:12px; font-size:14px;
}
.contact-form input:focus, .contact-form textarea:focus { border-color:var(--primary); outline:none; }
.contact-form button {
    width:100%; padding:14px; background:linear-gradient(135deg,var(--primary),var(--primary-light));
    color:#fff; border:none; border-radius:8px; font-size:16px; cursor:pointer;
}
.contact-info-item { display:flex; gap:16px; margin-bottom:24px; }
.contact-info-item .icon { font-size:32px; }

/* 底部 */
.footer { background:var(--dark); color:#aaa; padding:60px 0 0; margin-top:60px; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1.5fr; gap:40px; margin-bottom:40px; }
.footer h3 { color:#fff; font-size:16px; margin-bottom:16px; }
.footer p { font-size:14px; margin-bottom:8px; }
.footer a:hover { color:var(--primary-light); }
.footer-intro { font-size:13px; line-height:1.8; }
.footer-bottom { border-top:1px solid #333; padding:16px 0; font-size:13px; }
.footer-bottom .container { display:flex; flex-wrap:wrap; gap:8px 16px; }
.footer-beian { display:flex; flex-wrap:wrap; gap:8px 16px; }
.footer-beian a { color:#aaa; }
.footer-beian a:hover { color:var(--primary-light); }

/* 悬浮电话 */
.float-phone {
    position:fixed; right:20px; bottom:80px; width:60px; height:60px; border-radius:50%;
    background:linear-gradient(135deg,var(--primary),var(--primary-light)); color:#fff;
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    box-shadow:0 4px 20px rgba(192,57,43,.4); z-index:99; font-size:20px;
}
.float-phone small { font-size:9px; }

/* 页面banner（内页） */
.page-banner { background:linear-gradient(135deg,var(--dark),var(--primary-dark)); color:#fff; padding:50px 0; text-align:center; }
.page-banner h1 { font-size:32px; }

/* 分页 */
.pagination { text-align:center; margin-top:30px; }
.pagination a { display:inline-block; padding:8px 16px; border:1px solid var(--border); margin:0 4px; border-radius:4px; }
.pagination a.current { background:var(--primary); color:#fff; border-color:var(--primary); }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .product-grid, .feature-grid { grid-template-columns:repeat(2,1fr); }
    .about-preview, .contact-grid, .product-detail { grid-template-columns:1fr; }
    .footer-grid { grid-template-columns:1fr 1fr; }
    .hero h1 { font-size:28px; }
    .nav { display:none; position:absolute; top:80px; left:0; right:0; background:#fff; flex-direction:column; padding:20px; box-shadow:0 10px 20px rgba(0,0,0,.1); }
    .nav.show { display:flex; }
    .menu-btn { display:block; }
}
@media (max-width: 600px) {
    .product-grid, .feature-grid { grid-template-columns:1fr; }
    .footer-grid { grid-template-columns:1fr; }
    .topbar .container { flex-direction:column; gap:4px; }
}
