:root {
  --brand: #c8102e;
  --brand-dark: #9e0c24;
  --ink: #1f2329;
  --muted: #6b7280;
  --line: #e8eaed;
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(31, 35, 41, 0.08);
  --maxw: 1180px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.7; font-size: 15px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.muted { color: var(--muted); }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: .5px; }
.logo .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 16px; }
.logo small { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 2px; }
.logo-img { height: 40px; width: auto; max-width: 220px; display: block; object-fit: contain; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 8px; color: var(--ink); font-weight: 500; transition: .2s; }
.nav a:hover, .nav a.active { color: var(--brand); background: var(--bg-soft); }
/* 导航栏「常用链接」下拉菜单 */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { font: inherit; font-weight: 500; color: var(--ink); background: none; border: none; padding: 8px 14px; border-radius: 8px; cursor: pointer; transition: .2s; display: inline-flex; align-items: center; gap: 4px; }
.nav-dropdown-toggle:hover { color: var(--brand); background: var(--bg-soft); }
.nav-dropdown .caret { font-size: 10px; }
.nav-dropdown-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.12); padding: 6px; display: none; z-index: 50; flex-direction: column; }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a { display: block; padding: 9px 12px; border-radius: 7px; color: var(--ink); font-weight: 500; white-space: nowrap; }
.nav-dropdown-menu a:hover { background: var(--bg-soft); color: var(--brand); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; font-size: 18px; }

.auth-box { display: flex; align-items: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 8px;
  font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: .2s; font-size: 14px;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { border-color: var(--brand); color: var(--brand); background: #fff; }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-ghost { background: var(--bg-soft); color: var(--ink); }
.btn-ghost:hover { background: #eef0f3; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.user-chip { position: relative; font-size: 14px; }
.user-toggle { display: flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; font-size: 14px; color: var(--ink); padding: 4px 8px; border-radius: 8px; transition: background .15s; }
.user-toggle:hover { background: var(--bg-soft); }
.user-toggle .uname { font-weight: 600; }
.user-toggle .caret { font-size: 10px; color: var(--muted); }
.user-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 150px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.12); padding: 6px; display: none; z-index: 50; flex-direction: column; }
.user-chip.open .user-menu { display: flex; }
.user-menu a.user-item, .user-menu button.user-item { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 7px; color: var(--ink); font-weight: 500; white-space: nowrap; background: none; border: none; font-size: 14px; cursor: pointer; }
.user-menu a.user-item:hover, .user-menu button.user-item:hover { background: var(--bg-soft); color: var(--brand); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color:#fff; display:grid; place-items:center; font-size:13px; font-weight:700; }

/* hero */
.hero { position: relative; background: linear-gradient(120deg, #1f2329 0%, #2b3340 18%, #c8102e 100%); color: #fff; overflow: hidden; }
.hero::after { content:""; position:absolute; right:-120px; top:-120px; width:420px; height:420px; border-radius:50%; background: radial-gradient(circle, rgba(200,16,46,.45), transparent 70%); }
.hero-inner { padding: 56px 0 52px; position: relative; z-index: 2; }
.hero h1 { font-size: 44px; line-height: 1.25; font-weight: 800; letter-spacing: .5px; }
.hero p { margin-top: 18px; font-size: 17px; color: #d7dce2; max-width: 640px; }
.hero .actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

/* sections */
section.block { padding: 70px 0; }
section.soft { background: var(--bg-soft); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 { font-size: 30px; font-weight: 800; }
.section-head .sub { color: var(--muted); margin-top: 10px; }
.section-head .bar { width: 46px; height: 4px; background: var(--brand); margin: 16px auto 0; border-radius: 4px; }

/* grids / cards */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: #f0c9d0; }
.card .ico { width: 44px; height: 44px; border-radius: 10px; background: #fdeaed; color: var(--brand); display: grid; place-items: center; font-size: 20px; font-weight: 800; margin-bottom: 14px; }
/* product media (image) */
.prod-media { width: calc(100% + 52px); margin: -26px -26px 16px; height: 168px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: linear-gradient(135deg,#e60012,#ff6a3d); display: grid; place-items: center; }
.prod-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod-media .ico { width: 64px; height: 64px; font-size: 28px; margin: 0; }
.prod-detail-media { width: 100%; height: 240px; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg,#e60012,#ff6a3d); display: grid; place-items: center; margin-bottom: 16px; }
.prod-detail-media .ico { width: 84px; height: 84px; font-size: 36px; margin: 0; }
.thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; background: #f0f0f0; display: inline-block; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card .tag { display: inline-block; font-size: 12px; color: var(--brand); background: #fdeaed; padding: 2px 10px; border-radius: 20px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14px; }

/* feature list */
.feat { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.feat span { font-size: 12px; background: var(--bg-soft); border: 1px solid var(--line); padding: 4px 10px; border-radius: 20px; color: var(--muted); }

/* news */
.news-item { display: flex; gap: 18px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background:#fff; transition:.2s; }
.news-item:hover { box-shadow: var(--shadow); }
.news-date { min-width: 64px; text-align: center; color: var(--brand); font-weight: 800; }
.news-date .d { font-size: 26px; line-height: 1; }
.news-date .m { font-size: 12px; color: var(--muted); }
.news-body h3 { font-size: 16px; margin-bottom: 6px; }
.news-body p { color: var(--muted); font-size: 14px; }

/* news (homepage two-column card grid, same style as "我们的业务") */
.news-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.news-list-item { display: flex; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; text-decoration: none; color: inherit; transition: .2s; }
.news-list-item:hover { box-shadow: var(--shadow); }
.news-list-item .news-body h3 { font-size: 16px; margin-bottom: 6px; }

/* stats */
.stats-block { padding: 23px 0; }
.cta-block { padding: 47px 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: center; }
.stat .n { font-size: 38px; font-weight: 800; color: var(--brand); }
.stat .l { color: var(--muted); margin-top: 4px; }

/* forms */
.form { max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); }
.field textarea { min-height: 110px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hint { font-size: 13px; color: var(--muted); }
.note { padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 14px; }
.note-err { background: #fdecef; color: #b4232a; border: 1px solid #f6cdd2; }
.note-ok { background: #e9f7ee; color: #1f9254; border: 1px solid #c5ead2; }

/* doc list */
.doc-row { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 12px; transition:.2s; }
.doc-row:hover { box-shadow: var(--shadow); }
.doc-ico { width: 42px; height: 42px; border-radius: 9px; background: #eef3ff; color: #2b59c3; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.doc-meta { flex: 1; }
.doc-meta h4 { font-size: 15px; }
.doc-meta .d { font-size: 12px; color: var(--muted); margin-top: 3px; }
.locked { color: var(--muted); font-size: 13px; }

/* footer */
.site-footer { background: #16191e; color: #c7ccd3; padding: 54px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-grid a { display: block; color: #c7ccd3; padding: 4px 0; font-size: 14px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #2a2f37; margin-top: 32px; padding-top: 18px; text-align: center; color: #8b919b; font-size: 13px; }
.footer-bottom .beian { margin-top: 8px; display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: nowrap; white-space: nowrap; }
.footer-bottom .beian a { color: #8b919b; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.footer-bottom .beian a:hover { color: #c7ccd3; }
.footer-brand { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 10px; }

/* breadcrumb */
.crumb { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 16px 0; font-size: 13px; color: var(--muted); }
.crumb a:hover { color: var(--brand); }

/* detail */
.detail h1 { font-size: 28px; margin-bottom: 10px; }
.detail .meta { color: var(--muted); margin-bottom: 24px; font-size: 14px; }
.detail p { margin-bottom: 14px; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; place-items: center; z-index: 100; padding: 20px; }
.modal-bg.open { display: grid; }
.modal { background: #fff; border-radius: var(--radius); max-width: 420px; width: 100%; padding: 26px; }
.modal h3 { margin-bottom: 16px; }

/* responsive */
@media (max-width: 900px) {
  .grid-3, .grid-2, .stats, .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { position: absolute; top: 66px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 10px; border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 32px; }
  .row2 { grid-template-columns: 1fr; }
  /* 移动端：下拉菜单改为内联堆叠，随导航一起展开 */
  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle { width: 100%; justify-content: space-between; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; padding: 0 0 0 10px; min-width: 0; }
  .nav-dropdown-menu a { padding: 10px 12px; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2, .stats, .footer-grid, .news-split { grid-template-columns: 1fr; }
  .auth-box .btn-outline { display: none; }
}
