/* =====================================================
   PbootCMS 实验室设备企业官网模板 样式表
   主题：科技蓝 + 深灰 + 白色（B端工业高信任配色）
   ===================================================== */

:root {
  --primary: #0f4c81;
  --primary-dark: #0a3860;
  --primary-light: #eaf2fa;
  --accent: #e87722;
  --text: #333333;
  --text-light: #666666;
  --border: #e5e9f0;
  --bg: #f5f7fa;
  --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; vertical-align: middle; border: 0; }
ul, ol { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ---------- 顶部信息条 ---------- */
.topbar { background: var(--primary-dark); color: #cfe0f0; font-size: 13px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar-tel { font-weight: 600; color: #fff; }

/* ---------- 页头 ---------- */
.header { background: var(--white); box-shadow: 0 2px 8px rgba(10, 56, 96, .08); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.logo img { height: 52px; width: auto; display: block; }

.header-right { display: flex; align-items: center; gap: 24px; }
.header-search { display: flex; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.header-search input {
  border: 0; outline: none; padding: 7px 12px; width: 190px;
  font-size: 13px; color: var(--text);
}
.header-search button {
  border: 0; background: var(--primary); color: #fff;
  padding: 7px 16px; cursor: pointer; font-size: 13px;
}
.header-search button:hover { background: var(--primary-dark); }
.header-tel { text-align: right; line-height: 1.4; }
.header-tel span { display: block; font-size: 12px; color: var(--text-light); }
.header-tel strong { display: block; font-size: 20px; color: var(--accent); font-weight: 700; }

/* ---------- 导航 ---------- */
.nav { background: var(--primary); }
.nav-list { display: flex; }
.nav-list > li { position: relative; }
.nav-list > li > a {
  display: block; padding: 0 26px; height: 48px; line-height: 48px;
  color: #e6eef7; font-size: 15px; transition: background .2s;
}
.nav-list > li:hover > a,
.nav-list > li.active > a { background: var(--primary-dark); color: #fff; }

.subnav {
  display: none; position: absolute; top: 100%; left: 0; z-index: 99;
  min-width: 170px; background: #fff; box-shadow: 0 6px 16px rgba(10, 56, 96, .15);
}
.nav-list > li:hover .subnav { display: block; }
.subnav li a {
  display: block; padding: 10px 18px; color: var(--text);
  font-size: 14px; border-left: 3px solid transparent;
}
.subnav li a:hover { background: var(--primary-light); color: var(--primary); border-left-color: var(--primary); }

/* 移动端菜单按钮（默认隐藏） */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 6px;
}
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--primary); border-radius: 2px; transition: all .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- 首屏 Banner ---------- */
.banner { position: relative; height: 460px; background: var(--primary-dark); overflow: hidden; }
.banner-slider, .banner-item, .banner-item a { position: absolute; inset: 0; }
.banner-item { opacity: 0; transition: opacity .8s ease; }
.banner-item.active { opacity: 1; z-index: 1; }
.banner-item img { width: 100%; height: 100%; object-fit: cover; }
.banner-text {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 40px 0 36px;
  background: linear-gradient(180deg, rgba(10, 56, 96, 0) 0%, rgba(10, 56, 96, .78) 100%);
  color: #fff;
}
.banner-text h2 { font-size: 32px; margin-bottom: 6px; }
.banner-text p { font-size: 16px; color: #d7e5f3; }

/* ---------- 通用区块 ---------- */
.section { padding: 56px 0; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 {
  font-size: 26px; color: var(--primary-dark); position: relative;
  padding-bottom: 14px; display: inline-block;
}
.section-head h2::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 46px; height: 3px; background: var(--accent); border-radius: 2px;
}
.section-head p { margin-top: 8px; color: var(--text-light); font-size: 14px; }

.products, .solutions, .whyus { background: var(--bg); }
.contact { background: var(--primary-light); }

/* ---------- 核心业务 ---------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.service-card {
  background: var(--white); border: 1px solid var(--border);
  border-top: 4px solid var(--primary); border-radius: 6px;
  padding: 28px 24px; transition: transform .2s, box-shadow .2s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(10, 56, 96, .12); }
.service-icon { font-size: 34px; font-weight: 800; color: var(--primary-light); margin-bottom: 8px; }
.service-card h3 { font-size: 19px; margin-bottom: 10px; }
.service-card p { color: var(--text-light); font-size: 14px; margin-bottom: 14px; min-height: 44px; }
.service-card .more { color: var(--accent); font-weight: 600; font-size: 14px; }

/* ---------- 产品精选 ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-item {
  background: var(--white); border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden; transition: box-shadow .2s;
}
.product-item:hover { box-shadow: 0 8px 20px rgba(10, 56, 96, .12); }
.product-pic { display: block; height: 190px; background: #f0f3f8; }
.product-pic img { width: 100%; height: 100%; object-fit: cover; }
.product-item h3 { font-size: 15px; padding: 12px 14px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-item h3 a { color: var(--text); }
.product-item h3 a:hover { color: var(--primary); }
.product-desc { padding: 0 14px 14px; color: var(--text-light); font-size: 13px; height: 42px; overflow: hidden; }

/* ---------- 解决方案 ---------- */
.solution-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.solution-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 6px; padding: 22px 24px; position: relative;
}
.solution-tag {
  position: absolute; top: 0; right: 22px;
  background: var(--primary); color: #fff; font-size: 12px;
  padding: 3px 12px; border-radius: 0 0 4px 4px;
}
.solution-item h3 { font-size: 17px; margin-bottom: 8px; }
.solution-item p { color: var(--text-light); font-size: 14px; }

/* ---------- 成功案例 ---------- */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case-item { background: var(--white); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.case-pic { display: block; height: 180px; background: #f0f3f8; }
.case-pic img { width: 100%; height: 100%; object-fit: cover; }
.case-item h4 { font-size: 14px; padding: 12px 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 为什么选择我们 ---------- */
.whyus-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.whyus-item {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 6px; padding: 24px 20px; text-align: center;
}
.whyus-item h3 { font-size: 17px; color: var(--primary); margin-bottom: 8px; }
.whyus-item p { color: var(--text-light); font-size: 13px; }

/* ---------- 在线咨询 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 30px; }
.contact-info { background: var(--primary); color: #e6eef7; border-radius: 6px; padding: 26px; }
.contact-info h3 { color: #fff; font-size: 19px; margin-bottom: 14px; }
.contact-info p { font-size: 14px; margin-bottom: 10px; word-break: break-all; }

.contact-form { background: var(--white); border-radius: 6px; padding: 26px; box-shadow: 0 4px 16px rgba(10, 56, 96, .08); }
.contact-form input[type="text"],
.contact-form textarea,
.contact-form select {
  width: 100%; border: 1px solid var(--border); border-radius: 4px;
  padding: 10px 12px; font-size: 14px; color: var(--text);
  margin-bottom: 14px; outline: none; font-family: inherit; background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 2px rgba(15, 76, 129, .12);
}
.form-row { display: flex; gap: 14px; }
.form-row > * { flex: 1; }
.code-input { flex: 1; margin-bottom: 0; }
.code-img { height: 40px; cursor: pointer; border-radius: 4px; }
.btn { display: inline-block; border: 0; border-radius: 4px; cursor: pointer; font-size: 15px; }
.btn-primary {
  background: var(--accent); color: #fff; padding: 11px 34px; font-weight: 600;
}
.btn-primary:hover { background: #cf6415; color: #fff; }

/* ---------- 页内横幅（列表/详情页） ---------- */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff; padding: 46px 0 42px; text-align: center;
}
.page-banner h2 { font-size: 28px; margin-bottom: 6px; }
.page-banner p { color: #cfe0f0; font-size: 14px; }

/* ---------- 面包屑 ---------- */
.page-main { padding: 24px 0 50px; }
.breadcrumb { font-size: 13px; color: var(--text-light); margin-bottom: 20px; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }

/* ---------- 列表页 ---------- */
.list-wrap { display: grid; gap: 18px; }
.list-item {
  display: flex; gap: 20px; background: var(--white);
  border: 1px solid var(--border); border-radius: 6px; padding: 16px;
  transition: box-shadow .2s;
}
.list-item:hover { box-shadow: 0 6px 18px rgba(10, 56, 96, .1); }
.list-pic { display: block; width: 260px; height: 160px; flex-shrink: 0; background: #f0f3f8; border-radius: 4px; overflow: hidden; }
.list-pic img { width: 100%; height: 100%; object-fit: cover; }
.list-info h3 { font-size: 17px; margin-bottom: 8px; }
.list-info h3 a { color: var(--text); }
.list-info h3 a:hover { color: var(--primary); }
.list-desc { color: var(--text-light); font-size: 14px; }
.list-meta { margin-top: 10px; font-size: 13px; color: var(--text-light); display: flex; gap: 16px; }
.list-sort { color: var(--primary); }

/* ---------- 分页 ---------- */
.pagination { text-align: center; margin-top: 30px; }
.pagination a, .pagination span {
  display: inline-block; min-width: 34px; height: 34px; line-height: 34px;
  padding: 0 10px; margin: 0 3px; border: 1px solid var(--border);
  border-radius: 4px; color: var(--text); background: #fff; font-size: 13px;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .page-num-current {
  background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600;
}
.pagination .page-status { border: 0; color: var(--text-light); background: none; }

/* ---------- 内容详情页 ---------- */
.content-detail { background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 26px 30px; }
.content-detail h1 { font-size: 24px; color: var(--primary-dark); margin-bottom: 12px; }
.content-meta {
  font-size: 13px; color: var(--text-light); padding-bottom: 16px;
  border-bottom: 1px dashed var(--border); margin-bottom: 20px; display: flex; gap: 20px;
}
.content-pics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.content-pics img { width: 100%; height: 150px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
.content-params { margin-bottom: 20px; }
.content-params h3 { font-size: 17px; color: var(--primary); margin-bottom: 10px; }
.content-params table { width: 100%; border-collapse: collapse; font-size: 14px; }
.content-params th, .content-params td {
  border: 1px solid var(--border); padding: 9px 14px; text-align: left;
}
.content-params th { background: var(--primary-light); color: var(--primary-dark); width: 120px; font-weight: 600; }
.content-body { font-size: 15px; line-height: 1.9; }
.content-body p { margin-bottom: 14px; }
.content-body img { max-width: 100%; height: auto; border-radius: 4px; margin: 6px 0; }
.content-body table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.content-body th, .content-body td { border: 1px solid var(--border); padding: 8px 12px; }
.content-body h2, .content-body h3 { color: var(--primary-dark); margin: 18px 0 10px; }

.content-prevnext {
  margin-top: 26px; padding-top: 16px; border-top: 1px dashed var(--border);
  font-size: 14px; color: var(--text-light);
}
.content-prevnext p { margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.related { margin-top: 26px; }
.related h3 {
  font-size: 17px; color: var(--primary-dark); margin-bottom: 12px; padding-left: 12px;
  border-left: 4px solid var(--accent);
}
.related li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 4px; border-bottom: 1px dashed var(--border); font-size: 14px;
}
.related a { color: var(--text); }
.related a:hover { color: var(--primary); }
.related-date { color: var(--text-light); font-size: 13px; flex-shrink: 0; }

/* ---------- 底部 ---------- */
.footer { background: var(--primary-dark); color: #b9cde1; margin-top: 0; }
.footer-inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; padding: 44px 15px 30px;
}
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.footer-about p { font-size: 13px; line-height: 1.9; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a { color: #b9cde1; font-size: 13px; }
.footer-nav a:hover { color: #fff; }
.footer-contact p { font-size: 13px; margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 16px 0; }
.footer-bottom p { text-align: center; font-size: 13px; color: #8fa8c0; }

/* ---------- 侧边悬浮 ---------- */
.float-bar {
  position: fixed; right: 14px; bottom: 90px; z-index: 999;
  display: flex; flex-direction: column; gap: 10px;
}
.float-item {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; text-align: center; line-height: 1.3;
  box-shadow: 0 4px 12px rgba(10, 56, 96, .25);
}
.float-tel { background: var(--accent); }
.float-msg { background: var(--primary); }
.float-item:hover { color: #fff; opacity: .9; transform: translateY(-2px); }

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
  .header-inner { height: 64px; }
  .header-right { display: none; }
  .nav-toggle { display: flex; }

  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px; z-index: 100;
    box-shadow: 0 8px 20px rgba(10, 56, 96, .2);
  }
  .nav.open { display: block; }
  .nav-list { flex-direction: column; background: var(--primary); }
  .nav-list > li > a { height: 44px; line-height: 44px; padding: 0 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .subnav { display: none; position: static; box-shadow: none; background: var(--primary-dark); }
  .nav-list > li:hover .subnav { display: none; }
  .nav-list > li.sub-open .subnav { display: block; }
  .subnav li a { color: #cfe0f0; border-left: 0; padding: 9px 28px; font-size: 13px; }
  .subnav li a:hover { background: rgba(255, 255, 255, .08); color: #fff; }

  .banner { height: 300px; }
  .banner-text h2 { font-size: 22px; }
  .banner-text p { font-size: 13px; }
  .section { padding: 40px 0; }
  .services-grid, .whyus-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .solution-list { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 576px) {
  .topbar-inner { justify-content: center; }
  .topbar-welcome { display: none; }
  .logo img { height: 40px; }
  .section-head h2 { font-size: 21px; }
  .product-grid, .case-grid, .services-grid, .whyus-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .product-pic { height: 130px; }
  .case-pic { height: 120px; }
  .form-row { flex-direction: column; gap: 0; }
  .list-item { flex-direction: column; }
  .list-pic { width: 100%; height: 170px; }
  .content-detail { padding: 18px 16px; }
  .content-detail h1 { font-size: 20px; }
  .content-pics { grid-template-columns: 1fr 1fr; }
  .content-pics img { height: 110px; }
  .content-meta { flex-wrap: wrap; gap: 8px; }
}
