/* 五世智能官网样式 — 版式参考 cn.fs.com */
:root {
  --red: #d8232a;
  --red-dark: #b41c22;
  --navy: #16232e;
  --ink: #22272c;
  --gray: #5c6670;
  --line: #e6e9ec;
  --bg: #f5f6f8;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink); background: #fff; line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* 顶部条 */
.topbar { background: var(--navy); color: #b9c4cd; font-size: 13px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 36px; }
.topbar a:hover { color: #fff; }

/* 头部 */
.site-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 100; }
.site-header .container { display: flex; align-items: center; gap: 32px; height: 72px; }
.logo { display: flex; align-items: baseline; gap: 8px; }
.logo .cn { font-size: 26px; font-weight: 800; color: var(--navy); letter-spacing: 1px; }
.logo .en { font-size: 14px; font-weight: 700; color: var(--red); letter-spacing: 2px; }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav > .nav-item { position: relative; }
.main-nav > .nav-item > a {
  display: block; padding: 24px 18px; font-size: 16px; font-weight: 600; color: var(--ink);
}
.main-nav > .nav-item > a:hover, .main-nav > .nav-item.active > a { color: var(--red); }
.nav-item .dropdown {
  display: none; position: absolute; top: 100%; left: 0; background: #fff;
  box-shadow: 0 12px 32px rgba(0,0,0,.14); border-top: 3px solid var(--red);
  min-width: 560px; padding: 20px 24px;
}
.nav-item:hover .dropdown { display: flex; gap: 32px; }
.dropdown .col { min-width: 150px; }
.dropdown h4 { font-size: 15px; color: var(--navy); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.dropdown h4 small { display: block; font-size: 11px; color: var(--gray); font-weight: 400; }
.dropdown .col a { display: block; padding: 5px 0; font-size: 14px; color: var(--gray); }
.dropdown .col a:hover { color: var(--red); }
.header-search { display: flex; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.header-search input { border: 0; padding: 8px 12px; width: 180px; outline: none; font-size: 14px; }
.header-search button { border: 0; background: var(--red); color: #fff; padding: 0 16px; cursor: pointer; font-size: 14px; }

/* Hero 轮播 */
.hero { position: relative; overflow: hidden; background: var(--navy); }
.hero-slide { display: none; position: relative; height: 420px; }
.hero-slide.active { display: block; }
.hero-slide img { width: 100%; height: 420px; object-fit: cover; opacity: .55; }
.hero-slide .hero-text {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: center; max-width: 1200px; margin: 0 auto; padding: 0 16px; color: #fff;
}
.hero-text h1 { font-size: 38px; font-weight: 800; margin-bottom: 14px; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.hero-text p { font-size: 18px; color: #dbe3ea; margin-bottom: 26px; }
.btn {
  display: inline-block; background: var(--red); color: #fff; padding: 12px 32px;
  border-radius: 3px; font-weight: 600; font-size: 15px; border: 0; cursor: pointer; width: fit-content;
}
.btn:hover { background: var(--red-dark); }
.btn.ghost { background: transparent; border: 1px solid #fff; }
.hero-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dots span { width: 28px; height: 4px; background: rgba(255,255,255,.35); cursor: pointer; }
.hero-dots span.active { background: var(--red); }

/* 分区 */
.section { padding: 56px 0; }
.section.gray { background: var(--bg); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 32px; }
.section-head h2 { font-size: 28px; font-weight: 800; color: var(--navy); }
.section-head h2 small { display: block; font-size: 13px; color: var(--gray); font-weight: 400; letter-spacing: 2px; margin-top: 4px; }
.section-head .more { color: var(--gray); font-size: 14px; }
.section-head .more:hover { color: var(--red); }

/* 分类网格 */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat-card { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 24px 16px; text-align: center; transition: box-shadow .2s; }
.cat-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); border-color: var(--red); }
.cat-card .cat-icon { font-size: 34px; margin-bottom: 12px; }
.cat-card h3 { font-size: 16px; color: var(--navy); margin-bottom: 4px; }
.cat-card p { font-size: 12px; color: var(--gray); letter-spacing: 1px; }

/* 产品卡片 */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.prod-card { background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; transition: box-shadow .2s; display: block; }
.prod-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.prod-card .thumb { height: 200px; display: flex; align-items: center; justify-content: center; background: #fff; padding: 12px; }
.prod-card .thumb img { max-height: 180px; object-fit: contain; }
.prod-card .info { padding: 14px 16px; border-top: 1px solid var(--line); }
.prod-card h3 { font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.prod-card p { font-size: 13px; color: var(--gray); }
.prod-card .cat-tag { font-size: 12px; color: var(--red); margin-top: 8px; }

/* 统计带 */
.stats-band { background: var(--navy); color: #fff; padding: 48px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.stats-grid .num { font-size: 36px; font-weight: 800; color: var(--red); }
.stats-grid .label { font-size: 14px; color: #b9c4cd; margin-top: 6px; }

/* 解决方案卡片 */
.sol-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sol-card { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: #fff; display: block; }
.sol-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.sol-card .thumb { height: 160px; overflow: hidden; background: var(--navy); }
.sol-card .thumb img { width: 100%; height: 160px; object-fit: cover; opacity: .9; }
.sol-card .info { padding: 18px; }
.sol-card h3 { font-size: 17px; color: var(--navy); margin-bottom: 8px; }
.sol-card p { font-size: 13px; color: var(--gray); }

/* 服务 */
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.svc-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 4px; padding: 28px; }
.svc-card h3 { font-size: 18px; color: var(--navy); margin-bottom: 10px; }
.svc-card p { color: var(--gray); font-size: 14px; }

/* 合作伙伴 */
.partner-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.partner-strip span {
  border: 1px solid var(--line); border-radius: 3px; padding: 10px 20px;
  font-size: 14px; color: var(--gray); background: #fff;
}
.partner-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.partner-cell {
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  height: 88px; display: flex; align-items: center; justify-content: center;
  padding: 10px 14px;
}
.partner-cell img { max-width: 100%; max-height: 64px; object-fit: contain; }
.partner-text span { font-size: 14px; color: var(--gray); }
@media (max-width: 900px) { .partner-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .partner-grid { grid-template-columns: repeat(2, 1fr); } }

/* 页脚 */
.site-footer { background: var(--navy); color: #93a1ad; margin-top: 0; }
.footer-main { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 32px; padding: 48px 0 32px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer a { display: block; font-size: 13px; padding: 4px 0; }
.site-footer a:hover { color: #fff; }
.footer-brand .cn { font-size: 24px; font-weight: 800; color: #fff; }
.footer-brand p { font-size: 13px; margin-top: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; font-size: 12px; text-align: center; }

/* 规格参数表 */
.spec-table { width: 100%; max-width: 860px; border-collapse: collapse; font-size: 14px; }
.spec-table th, .spec-table td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.spec-table th { background: var(--bg); color: var(--navy); font-weight: 600; width: 220px; }

/* 列表页 */
.page-hero { background: var(--navy); color: #fff; padding: 40px 0; }
.page-hero h1 { font-size: 30px; font-weight: 800; }
.page-hero .crumb { font-size: 13px; color: #93a1ad; margin-top: 8px; }
.page-hero .crumb a:hover { color: #fff; }
.list-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 32px 0 56px; }
.side-cats { background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; align-self: start; }
.side-cats h3 { background: var(--navy); color: #fff; font-size: 15px; padding: 12px 16px; }
.side-cats .top { border-bottom: 1px solid var(--line); }
.side-cats .top > a { display: block; padding: 10px 16px; font-weight: 600; font-size: 14px; color: var(--navy); }
.side-cats .top > a:hover, .side-cats .top > a.on { color: var(--red); }
.side-cats .sub a { display: block; padding: 7px 16px 7px 30px; font-size: 13px; color: var(--gray); }
.side-cats .sub a:hover, .side-cats .sub a.on { color: var(--red); }
.result-info { color: var(--gray); font-size: 14px; margin-bottom: 16px; }
.empty { text-align: center; color: var(--gray); padding: 60px 0; }

/* 详情页 */
.detail-layout { display: grid; grid-template-columns: 420px 1fr; gap: 40px; padding: 40px 0; }
.detail-img { border: 1px solid var(--line); border-radius: 4px; padding: 24px; display: flex; align-items: center; justify-content: center; }
.detail-img img { max-height: 360px; object-fit: contain; }
.detail-info h1 { font-size: 26px; color: var(--navy); margin-bottom: 8px; }
.detail-info .sub { color: var(--gray); margin-bottom: 20px; }
.detail-info .actions { display: flex; gap: 12px; margin: 24px 0; }
.detail-section { padding-bottom: 48px; }
.detail-section h2 { font-size: 20px; color: var(--navy); border-left: 4px solid var(--red); padding-left: 12px; margin-bottom: 16px; }
.detail-section .text { white-space: pre-line; color: #3a4148; font-size: 15px; }

/* 表单 */
.form-card { max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 32px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; font-size: 14px; outline: none; font-family: inherit;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { border-color: var(--red); }
.notice { background: #e8f6ec; border: 1px solid #b7e2c3; color: #237a3c; padding: 12px 16px; border-radius: 3px; margin-bottom: 16px; }

/* 关于我们 */
.about-hero { background: linear-gradient(120deg, var(--navy), #24435c); color: #fff; padding: 64px 0; }
.about-hero h1 { font-size: 32px; margin-bottom: 16px; }
.about-hero p { max-width: 800px; color: #cfdae3; white-space: pre-line; }

/* 404 */
.nf { text-align: center; padding: 100px 0; }
.nf h1 { font-size: 64px; color: var(--red); }

/* ===== 后台 ===== */
.admin-body { background: var(--bg); min-height: 100vh; }
.admin-top { background: var(--navy); color: #fff; }
.admin-top .container { display: flex; align-items: center; gap: 24px; height: 56px; }
.admin-top .brand { font-weight: 800; }
.admin-top nav { display: flex; gap: 4px; flex: 1; }
.admin-top nav a { padding: 8px 14px; font-size: 14px; border-radius: 3px; color: #cfdae3; }
.admin-top nav a:hover, .admin-top nav a.on { background: rgba(255,255,255,.12); color: #fff; }
.admin-main { padding: 32px 0; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 24px; margin-bottom: 20px; }
.admin-card h2 { font-size: 18px; color: var(--navy); margin-bottom: 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; background: var(--bg); padding: 10px 12px; color: var(--gray); font-weight: 600; }
.admin-table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.admin-table img.thumb { width: 56px; height: 56px; object-fit: contain; }
.btn-sm { display: inline-block; padding: 5px 14px; font-size: 13px; border-radius: 3px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.btn-sm:hover { border-color: var(--red); color: var(--red); }
.btn-sm.danger:hover { background: var(--red); color: #fff; }
.btn-sm.primary { background: var(--red); color: #fff; border-color: var(--red); }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-cards .admin-card { text-align: center; }
.stat-cards .num { font-size: 32px; font-weight: 800; color: var(--red); }
.login-wrap { max-width: 380px; margin: 100px auto; }
.error-msg { background: #fdecea; border: 1px solid #f5c6c2; color: #a02a20; padding: 10px 14px; border-radius: 3px; margin-bottom: 16px; font-size: 14px; }

@media (max-width: 960px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .sol-grid, .svc-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .list-layout, .detail-layout { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .header-search { display: none; }
  .hero-text h1 { font-size: 26px; }
  .main-nav > .nav-item > a { padding: 24px 10px; font-size: 15px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
