/* style.css - 富强磁业官网前台样式（中英双语） */
:root {
  --primary: #1f6feb;
  --primary-dark: #1657c4;
  --accent: #ff7a00;
  --bg: #f5f7fb;
  --bg-alt: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(0,0,0,.06);
  --maxw: 1200px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", Roboto, Helvetica, Arial, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; font-size: 15px; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.accent { color: var(--accent); }

/* ---------- 头部 ---------- */
.site-header { background: #fff; box-shadow: 0 1px 0 var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; white-space: nowrap; }
.logo-mark { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 8px; font-weight: 500; color: var(--text); }
.nav a:hover { background: #eef4ff; color: var(--primary); }
.nav a.active { color: var(--primary); background: #e8f0fe; }
.header-tools { display: flex; align-items: center; gap: 14px; }
.hotline-top { font-size: 13px; color: var(--muted); white-space: nowrap; }
.hotline-top b { color: var(--accent); font-size: 16px; }
.lang-switch { border: 1px solid var(--border); padding: 5px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; color: var(--primary); }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- 首屏 ---------- */
.hero { background: linear-gradient(135deg, #123a8f 0%, #1f6feb 60%, #2b8bf0 100%); color: #fff; padding: 90px 0; }
.hero h1 { font-size: 42px; line-height: 1.25; margin-bottom: 18px; }
.hero .subtitle { font-size: 17px; opacity: .92; max-width: 720px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; }
.cta { display: inline-block; background: var(--accent); color: #fff; padding: 13px 28px; border-radius: 30px; font-weight: 600; font-size: 16px; border: none; cursor: pointer; transition: .2s; }
.cta:hover { background: #e56e00; transform: translateY(-2px); }
.cta.ghost { background: transparent; border: 2px solid #fff; }
.cta.ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- 交付承诺条 ---------- */
.promise-strip { background: linear-gradient(135deg, #123a8f, #1f6feb); color: #fff; padding: 30px 0; }
.promise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; }
.promise-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.p-big { font-size: 34px; font-weight: 800; color: #ffd166; }
.p-label { font-size: 15px; font-weight: 600; letter-spacing: 1px; }
@media (max-width: 560px) { .p-big { font-size: 26px; } .p-label { font-size: 13px; } }

/* ---------- 区块 ---------- */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: 30px; margin-bottom: 8px; }
.section-head .sub { color: var(--muted); }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.1); }
.card .icon { font-size: 30px; margin-bottom: 12px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14px; }
.card .icon b { font-size: 24px; color: var(--primary); }

/* ---------- 统计 ---------- */
.stats { display: flex; flex-wrap: wrap; justify-content: space-around; gap: 20px; text-align: center; }
.stat .num { font-size: 38px; font-weight: 800; color: var(--primary); }
.stat .label { color: var(--muted); margin-top: 4px; }

/* ---------- 产品卡片 ---------- */
.product-card { overflow: hidden; padding: 0; }
.product-img { display: block; background: linear-gradient(135deg, #eef4ff, #fdf3e7); height: 150px; display: flex; align-items: center; justify-content: center; font-size: 56px; }
.product-body { padding: 18px; }
.product-body h3 { font-size: 17px; }
.product-body h3 a:hover { color: var(--primary); }
.product-body .spec { font-size: 13px; color: var(--muted); }
.tag { display: inline-block; background: #e8f0fe; color: var(--primary); border-radius: 4px; padding: 2px 8px; font-size: 12px; margin-right: 6px; margin-top: 8px; }

/* ---------- 分类 ---------- */
.cat-cloud { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cat-pill { border: 1px solid var(--border); background: #fff; padding: 10px 20px; border-radius: 30px; font-weight: 500; transition: .2s; }
.cat-pill:hover { border-color: var(--primary); color: var(--primary); background: #eef4ff; }
.cat-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; }
.cat-nav a { border: 1px solid var(--border); padding: 6px 14px; border-radius: 20px; font-size: 13px; }
.cat-nav a.active, .cat-nav a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 特点 ---------- */
.feature .f-sub { color: var(--primary); font-weight: 600; }

/* ---------- 案例 ---------- */
.case-card { text-align: center; }
.case-icon { font-size: 40px; margin-bottom: 10px; }

/* ---------- 流程 ---------- */
.process-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.step { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 12px; text-align: center; }
.step-num { width: 34px; height: 34px; line-height: 34px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; margin: 0 auto 10px; }
.step h4 { font-size: 14px; margin-bottom: 6px; }
.step p { font-size: 12px; color: var(--muted); }

/* ---------- 新闻 ---------- */
.news-card { display: flex; gap: 16px; }
.news-date { flex: 0 0 56px; background: var(--primary); color: #fff; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; padding: 8px 4px; }
.news-date b { font-size: 22px; }
.news-date span { font-size: 11px; opacity: .85; }
.news-body h3 { font-size: 16px; margin-bottom: 6px; }
.news-body h3 a:hover { color: var(--primary); }
.tab-nav { display: flex; gap: 8px; margin: 18px 0 26px; }
.tab-nav a { border: 1px solid var(--border); padding: 7px 16px; border-radius: 20px; font-size: 13px; }
.tab-nav a.active, .tab-nav a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- 详情 ---------- */
.page-hero { background: linear-gradient(135deg, #123a8f, #1f6feb); color: #fff; padding: 50px 0; }
.page-hero h1 { font-size: 30px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin: 16px 0; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb i { font-style: normal; margin: 0 6px; color: #cbd5e1; }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.detail-img { background: linear-gradient(135deg, #eef4ff, #fdf3e7); border-radius: var(--radius); min-height: 280px; display: flex; align-items: center; justify-content: center; font-size: 110px; }
.detail-info h2 { font-size: 24px; margin-bottom: 16px; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.spec-table th, .spec-table td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.spec-table th { background: #f9fafb; width: 120px; font-weight: 600; }
.detail-desc { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.detail-desc h3 { margin-bottom: 10px; }
.article { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.article-meta { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.article-body { line-height: 1.9; }

/* ---------- 关于 ---------- */
.profile { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.profile p { margin-bottom: 16px; }
.history { display: flex; flex-direction: column; gap: 0; position: relative; }
.history-item { display: flex; gap: 20px; padding: 10px 0; }
.history-item .year { flex: 0 0 70px; font-weight: 800; color: var(--primary); font-size: 18px; }
.honor { text-align: center; }
.honor span { color: var(--accent); font-weight: 600; }
.honor-img img { width: 100%; height: 240px; object-fit: contain; border-radius: 8px; margin-bottom: 12px; background: #f8fafc; }

/* ---------- 客户 ---------- */
.clients { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.client { background: #fff; border: 1px solid var(--border); padding: 12px 24px; border-radius: 8px; font-weight: 600; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 14px 18px; margin-bottom: 12px; }
.faq-item summary { font-weight: 600; cursor: pointer; }
.faq-item p { margin-top: 10px; color: var(--muted); }

/* ---------- 表单 ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form input, .form textarea { border: 1px solid var(--border); border-radius: 8px; padding: 11px 14px; font-size: 14px; font-family: inherit; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--primary); }
.contact-grid .card h2 { margin-bottom: 16px; }
#formMsg { margin-top: 10px; font-weight: 600; }

/* ---------- 页脚 ---------- */
.site-footer { background: #101b33; color: #cbd5e1; padding: 50px 0 20px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 2fr; gap: 30px; margin-bottom: 30px; }
.foot-logo { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.foot-desc { font-size: 13px; opacity: .8; }
.foot-col h4 { color: #fff; margin-bottom: 12px; }
.foot-col a, .foot-col span { display: block; font-size: 13px; margin-bottom: 8px; opacity: .8; }
.foot-col a:hover { color: var(--accent); opacity: 1; }
.copyright { text-align: center; font-size: 13px; opacity: .7; border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; }
.admin-entry { text-align: center; margin-top: 10px; }
.admin-entry a { color: #64748b; font-size: 12px; text-decoration: none; }
.admin-entry a:hover { color: var(--accent); }

/* ---------- 侧边工具 + AI ---------- */
.side-tools { position: fixed; right: 20px; bottom: 90px; display: flex; flex-direction: column; gap: 10px; z-index: 90; }
.side-tool { width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; transition: .2s; }
.side-tool:hover { transform: scale(1.1); }
.ai-toggle { background: var(--primary); color: #fff; border: none; }
.ai-panel { position: fixed; right: 20px; bottom: 260px; width: 340px; max-width: 90vw; background: #fff; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.2); overflow: hidden; display: flex; flex-direction: column; z-index: 80; }
.ai-panel.minimized .ai-body, .ai-panel.minimized .ai-input { display: none; }
.ai-head { background: var(--primary); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; cursor: pointer; }
.ai-head button { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; }
.ai-body { height: 320px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.ai-msg.bot { background: #f1f5f9; align-self: flex-start; border-bottom-left-radius: 4px; }
.ai-msg.user { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ai-input { display: flex; border-top: 1px solid var(--border); }
.ai-input input { flex: 1; border: none; padding: 13px 14px; font-size: 14px; outline: none; }
.ai-input button { background: var(--primary); color: #fff; border: none; padding: 0 18px; cursor: pointer; font-weight: 600; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  body.nav-open .nav { display: flex; flex-direction: column; position: absolute; top: 84px; left: 0; right: 0; background: #fff; padding: 16px; box-shadow: 0 10px 20px rgba(0,0,0,.1); }
  .header-tools { margin-left: auto; }
  .hotline-top { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .hero { padding: 60px 0; }
  .logo-img { height: 56px; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
  .hero .subtitle { font-size: 15px; }
  .section { padding: 40px 0; }
  .section-head h2 { font-size: 24px; }
  .logo-img { height: 48px; }
  .page-hero { padding: 36px 0; }
  .page-hero h1 { font-size: 24px; }
  .side-tools { left: 0; right: 0; bottom: 12px; flex-direction: row; justify-content: center; gap: 16px; }
  .ai-panel { left: 10px; right: 10px; width: auto; max-width: none; bottom: 70px; }
}

/* ---------- 图片 ---------- */
.logo-img { height: 72px; width: auto; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img .emoji { font-size: 56px; }
.news-card { position: relative; }
.news-thumb { flex: 0 0 auto; display: block; }
.news-thumb img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; }
.case-icon img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; margin-bottom: 4px; }
.feature-img img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; }
.adv-img img { width: 100%; height: 130px; object-fit: cover; border-radius: 8px; margin-bottom: 12px; }
.client { display: flex; flex-direction: column; align-items: center; }
.client img { display: block; height: 40px; width: auto; margin: 0 auto 6px; object-fit: contain; }
.culture-card img { width: 100%; height: 90px; object-fit: contain; margin-bottom: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.photo { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.photo img { width: 100%; height: 180px; object-fit: cover; display: block; }
.photo span { display: block; padding: 10px; text-align: center; font-size: 13px; color: var(--muted); }
.detail-img { overflow: hidden; }
.detail-img img { width: 100%; height: 100%; object-fit: contain; }
.article-cover img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 8px; margin-bottom: 16px; }
.footer-qr { display: flex; gap: 24px; justify-content: center; margin: 10px 0 24px; }
.footer-qr .qr { text-align: center; }
.footer-qr .qr img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; background: #fff; display: block; margin: 0 auto; }
.footer-qr .qr span { font-size: 12px; display: block; margin-top: 6px; color: #cbd5e1; }
@media (max-width: 900px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .photo-grid { grid-template-columns: 1fr; } }
