/* ============================================
   宝鸡秦明传感器有限公司 - 全新响应式网站样式
   兼容 Chrome / Edge / Firefox / Safari
   PC / 平板 / 手机 全屏响应式（内容横向全屏铺满）
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: #2b2b2b; background: #f4f6f9; line-height: 1.7; font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
/* 容器：横向全屏，仅保留小间距，不再限制 1200px 居中留白 */
.container { width: 100%; max-width: 100%; margin: 0 auto; padding: 0 28px; }
/* 纯文本阅读区块（公司简介/联系方式等）在超大屏下限制行宽，避免一行过长 */
.read-box { max-width: 1100px; margin-left: auto; margin-right: auto; }

/* ---------- 顶部导航栏 ---------- */
.site-header {
  background: #0a2a5e; position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand .logo-mark {
  width: 42px; height: 42px; border-radius: 8px; background: linear-gradient(135deg,#2e8bff,#1c5fc9);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; color: #fff;
  box-shadow: 0 2px 8px rgba(46,139,255,.5);
}
.brand .logo-text { line-height: 1.2; }
.brand .logo-text .cn { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.brand .logo-text .en { font-size: 11px; color: #a9c4ec; letter-spacing: 1px; text-transform: uppercase; }

.nav-links { display: flex; gap: 6px; }
.nav-links a {
  color: #dce6f5; padding: 8px 16px; border-radius: 6px; font-size: 15px;
  transition: background .25s, color .25s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  background: #1c5fc9; color: #fff;
}
.nav-toggle { display: none; width: 40px; height: 40px; border: none; background: transparent; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px auto; transition: .3s; }

/* ---------- 底部版权栏 ---------- */
.site-footer { background: #071f44; color: #c7d4ea; margin-top: 50px;}
.footer-top { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px 0 28px; }
.footer-col { padding: 0 22px}
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 14px; position: relative; padding-bottom: 8px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 14px; position: relative; padding-bottom: 8px; }
.footer-col h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; background: #2e8bff; border-radius: 2px; }
.footer-col p, .footer-col li { font-size: 13.5px; margin-bottom: 7px; color: #b9c7df; }
.footer-col li i { color: #2e8bff; margin-right: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; text-align: center; font-size: 13px; color: #8aa0c0; }

/* ---------- 通用页面横幅 ---------- */
.page-banner {
  position: relative; color: #fff; padding: 60px 0; text-align: center; overflow: hidden;
  background: linear-gradient(135deg,#0a2a5e 0%,#16448a 55%,#1c5fc9 100%);
}
.page-banner::before { content:""; position:absolute; inset:0;
  background: radial-gradient(circle at 20% 20%, rgba(46,139,255,.35), transparent 45%),
             radial-gradient(circle at 80% 60%, rgba(0,200,255,.22), transparent 50%); }
.page-banner .container { position: relative; }
.page-banner h1 { font-size: 32px; letter-spacing: 2px; margin-bottom: 10px; text-shadow: 0 2px 12px rgba(0,0,0,.3); }
.page-banner p { color: #cfe0f7; font-size: 15px; }

/* ---------- 区块标题 ---------- */
.section { padding: 50px 0; }
.section-head { text-align: center; margin-bottom: 32px; }
.section-head h2 { font-size: 26px; color: #0a2a5e; position: relative; display: inline-block; padding-bottom: 12px; }
.section-head h2::after { content:""; position:absolute; left:50%; transform:translateX(-50%); bottom:0; width:60px; height:4px; background:#2e8bff; border-radius:2px; }
.section-head p { color:#6b7a90; margin-top:10px; font-size:14px; }

/* ---------- 首页：轮播 Banner ---------- */
.hero-slider { position: relative; height: 520px; overflow: hidden; background: #071f44; }
.slides { position: relative; height: 100%; }
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease;
  background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; text-align: center;
}
.slide.active { opacity: 1; }
.slide::after { content:""; position:absolute; inset:0; background: linear-gradient(135deg, rgba(7,31,68,.72) 0%, rgba(7,31,68,.42) 100%); }
.slide .slide-content { position: relative; z-index: 2; color: #fff; max-width: 900px; width: 100%; padding: 0 28px; text-align: center; }
.slide .slide-content .btn-primary { margin: 0 auto; }
.slide .slide-content h2 { font-size: 38px; line-height: 1.3; margin-bottom: 14px; text-shadow: 0 2px 14px rgba(0,0,0,.4); }
.slide .slide-content p { font-size: 16px; color: #dbe7fa; margin-bottom: 22px; }
.btn-primary {
  display: inline-block; padding: 11px 26px; background: #2e8bff; color: #fff; border-radius: 30px;
  font-size: 15px; transition: .3s; box-shadow: 0 4px 14px rgba(46,139,255,.45);
}
.btn-primary:hover { background: #1c5fc9; transform: translateY(-2px); }

.slider-dots { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 10px; }
.slider-dots .dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.45); cursor: pointer; transition: .3s; border: none; }
.slider-dots .dot.active { background: #2e8bff; transform: scale(1.2); }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,.22); color: #fff; font-size: 20px; cursor: pointer; transition: .3s; display: flex; align-items: center; justify-content: center; }
.slider-arrow:hover { background: rgba(46,139,255,.85); }
.slider-arrow.prev { left: 24px; } .slider-arrow.next { right: 24px; }

/* ---------- 首页：公司简介 ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-text p { margin-bottom: 14px; color: #465367; text-align: justify; }
.about-img { border-radius: 14px; overflow: hidden; box-shadow: 0 8px 30px rgba(10,42,94,.14); }
.about-img img { width: 100%; }

/* ---------- 首页：产品滚动展示（全宽横向铺满，自动滚屏） ---------- */
.product-scroll-section { background: #eef2f8; }
.scroll-wrap { position: relative; }
.scroll-track { display: flex; gap: 22px; overflow-x: auto; scroll-behavior: smooth; padding: 6px 4px 18px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.scroll-track::-webkit-scrollbar { height: 8px; } .scroll-track::-webkit-scrollbar-thumb { background: #b9c7df; border-radius: 4px; }
.prod-card { min-width: 260px; max-width: 260px; flex: 0 0 260px; background: #fff; border-radius: 14px; overflow: hidden; scroll-snap-align: start; box-shadow: 0 6px 20px rgba(10,42,94,.08); transition: .35s; }
.prod-card:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(10,42,94,.16); }
.prod-card .pic { height: 180px; overflow: hidden; background: #f0f3f8; display: flex; align-items: center; justify-content: center; }
.prod-card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.prod-card:hover .pic img { transform: scale(1.06); }
.prod-card .info { padding: 16px; }
.prod-card .info h3 { font-size: 16px; color: #0a2a5e; margin-bottom: 6px; }
.prod-card .info p { font-size: 13px; color: #6b7a90; }
.scroll-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: none; background: #fff; color: #0a2a5e; font-size: 20px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.15); z-index: 4; display: flex; align-items: center; justify-content: center; transition: .3s; }
.scroll-btn:hover { background: #2e8bff; color: #fff; }
.scroll-btn.left { left: -8px; } .scroll-btn.right { right: -8px; }

/* ---------- 首页：联系方式 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info { background: #fff; border-radius: 14px; padding: 30px; box-shadow: 0 6px 22px rgba(10,42,94,.08); }
.contact-info h3 { color: #0a2a5e; margin-bottom: 16px; font-size: 19px; }
.contact-info li { margin-bottom: 12px; font-size: 14.5px; color: #465367; display: flex; gap: 10px; align-items: flex-start; }
.contact-info li i { color: #2e8bff; font-size: 16px; margin-top: 3px; }
.contact-form { background: #fff; border-radius: 14px; padding: 30px; box-shadow: 0 6px 22px rgba(10,42,94,.08); }
.contact-form h3 { color: #0a2a5e; margin-bottom: 16px; font-size: 19px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-control { width: 100%; padding: 11px 14px; border: 1px solid #d5dde8; border-radius: 8px; font-size: 14px; transition: border .3s; font-family: inherit; }
.form-control:focus { outline: none; border-color: #2e8bff; box-shadow: 0 0 0 3px rgba(46,139,255,.15); }
textarea.form-control { resize: vertical; min-height: 110px; }
.contact-form .btn-primary { border: none; cursor: pointer; width: 100%; padding: 12px; font-size: 16px; }

/* ---------- 企业简介页 ---------- */
.about-detail { background: #fff; border-radius: 14px; padding: 40px; box-shadow: 0 6px 22px rgba(10,42,94,.07); margin-top: 24px; }
.about-detail h3 { color: #0a2a5e; font-size: 20px; margin: 22px 0 12px; padding-left: 12px; border-left: 4px solid #2e8bff; }
.about-detail h3:first-child { margin-top: 0; }
.about-detail p { color: #465367; margin-bottom: 12px; text-align: justify; text-indent: 2em; line-height: 1.9; }
.about-detail .highlight { color: #1c5fc9; font-weight: 600; }

/* 发展大事记 时间轴 */
.timeline { position: relative; margin: 20px 0 10px; padding-left: 8px; }
.timeline::before { content:""; position:absolute; left:18px; top:6px; bottom:6px; width:3px; background: linear-gradient(#2e8bff,#1c5fc9); border-radius:2px; }
.tl-item { position: relative; padding: 0 0 22px 52px; }
.tl-item::before { content:""; position:absolute; left:11px; top:4px; width:16px; height:16px; border-radius:50%; background:#2e8bff; border:3px solid #d6e6fb; }
.tl-item .year { font-weight: 700; color: #1c5fc9; font-size: 16px; }
.tl-item .txt { color: #465367; font-size: 14px; margin-top: 3px; }

/* 重磅产品：全宽自适应列数 */
.feature-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-top: 16px; }
.fprod { background: #f6f9fd; border-radius: 12px; overflow: hidden; text-align: center; transition: .3s; border: 1px solid #e6edf5; }
.fprod:hover { transform: translateY(-5px); box-shadow: 0 12px 26px rgba(10,42,94,.12); }
.fprod .pic { height: 170px; overflow: hidden; }
.fprod .pic img { width:100%; height:100%; object-fit: cover; }
.fprod h4 { font-size: 15px; color: #0a2a5e; padding: 12px 10px 14px; }

/* ---------- 企业产品页 (顶部大类横排 + 系列列表) ---------- */
.prod-layout { display: block; margin-top: 24px; }
.prod-cats { display: flex; flex-direction: row; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.prod-cats .cat-btn { flex: 1 1 0; min-width: 150px; padding: 14px 16px; border: none; border-radius: 10px; background: #fff; color: #465367; font-size: 15px; cursor: pointer; text-align: left; transition: .3s; box-shadow: 0 2px 10px rgba(10,42,94,.05); font-family: inherit; font-weight: 600; display: flex; align-items: center; gap: 10px; justify-content: center; }
.prod-cats .cat-btn .ic { width: 30px; height: 30px; border-radius: 7px; background: #e8f0fb; color: #2e8bff; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.prod-cats .cat-btn:hover { background: #e8f0fb; }
.prod-cats .cat-btn.active { background: #1c5fc9; color: #fff; }
.prod-cats .cat-btn.active .ic { background: rgba(255,255,255,.22); color: #fff; }

.series-panel { background: #fff; border-radius: 14px; padding: 30px; box-shadow: 0 6px 22px rgba(10,42,94,.07); display: none; }
.series-panel.active { display: block; animation: fadeIn .4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.series-panel h3 { color: #0a2a5e; font-size: 20px; margin-bottom: 6px; }
.series-panel .sub { color: #6b7a90; font-size: 13.5px; margin-bottom: 20px; }
/* 产品系列：全宽自适应列数 */
.prod-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.prod-item { border: 1px solid #e6edf5; border-radius: 10px; padding: 18px; transition: .3s; }
a.prod-item { text-decoration: none; color: inherit; display: block; }
a.prod-item:hover { border-color: #2e8bff; background: #f6f9fd; }
.prod-item h4 { color: #1c5fc9; font-size: 15px; margin-bottom: 6px; }
.prod-item p { font-size: 13px; color: #6b7a90; }

/* ---------- 企业资质页：全宽自适应列数，图片完整显示 ---------- */
.qual-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 26px; margin-top: 24px; }
.qual-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 22px rgba(10,42,94,.07); transition: .35s; display: flex; flex-direction: column; }
.qual-card:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(10,42,94,.14); }
.qual-card .pic { flex: 1; min-height: 320px; background: #f7f9fc; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 20px; }
.qual-card .pic img { width: 100%; height: auto; max-height: 460px; object-fit: contain; }
.qual-card .txt { padding: 22px; }
.qual-card .txt h3 { color: #0a2a5e; font-size: 17px; margin-bottom: 6px; }
.qual-card .txt p { color: #6b7a90; font-size: 13.5px; }

/* ---------- 联系我们页 ---------- */
.contact-page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 24px; }
.info-block { background: #fff; border-radius: 14px; padding: 32px; box-shadow: 0 6px 22px rgba(10,42,94,.07); }
.info-block h3 { color: #0a2a5e; font-size: 19px; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid #e8f0fb; }
.info-block .line { display: flex; gap: 12px; margin-bottom: 14px; font-size: 14.5px; color: #465367; align-items: flex-start; }
.info-block .line i { color: #2e8bff; font-size: 17px; margin-top: 3px; min-width: 20px; }
.info-block .line .lb { font-weight: 600; color: #0a2a5e; min-width: 90px; }

/* ---------- 回到顶部 ---------- */
.back-top { position: fixed; right: 22px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%; border: none; background: #1c5fc9; color: #fff; font-size: 20px; cursor: pointer; box-shadow: 0 4px 14px rgba(28,95,201,.45); display: none; align-items: center; justify-content: center; z-index: 999; transition: .3s; }
.back-top.show { display: flex; }
.back-top:hover { background: #2e8bff; }

/* ================= 响应式断点 ================= */
/* 平板 */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; padding: 40px 24px 28px; }
  .footer-bottom { padding: 16px 24px; }
  .slide .slide-content h2 { font-size: 30px; }
  .hero-slider { height: 420px; }
  .prod-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
/* 手机 */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .nav-wrap { height: 60px; }
  .brand .logo-text .cn { font-size: 15px; }
  .brand .logo-text .en { display: none; }
  .nav-toggle { display: block; }
  .nav-links { position: fixed; top: 60px; left: 0; right: 0; flex-direction: column; background: #0a2a5e; padding: 14px; gap: 4px; transform: translateY(-140%); transition: transform .35s ease; box-shadow: 0 10px 24px rgba(0,0,0,.2); }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 11px 14px; border-radius: 8px; }

  .page-banner { padding: 40px 0; } .page-banner h1 { font-size: 24px; }
  .section { padding: 36px 0; } .section-head h2 { font-size: 22px; }

  .hero-slider { height: 340px; }
  .slide .slide-content h2 { font-size: 22px; }
  .slide .slide-content p { font-size: 14px; }
  .slider-arrow { width: 36px; height: 36px; font-size: 16px; }
  .slider-arrow.prev { left: 8px; } .slider-arrow.next { right: 8px; }

  .contact-grid, .contact-page-grid { grid-template-columns: 1fr; gap: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 22px; padding: 30px 16px 20px; }
  .footer-bottom { padding: 16px 16px 22px; }
  .prod-card { min-width: 220px; max-width: 220px; flex-basis: 220px; }
  .feature-prods { grid-template-columns: 1fr; }
  .qual-grid { grid-template-columns: 1fr; }
  .prod-list { grid-template-columns: 1fr; }
  .prod-cats .cat-btn { flex: 1 1 45%; padding: 12px; font-size: 14px; }
  .about-detail { padding: 22px; }
  .timeline::before { left: 14px; }
  .tl-item { padding-left: 42px; }
  .tl-item::before { left: 7px; }
}
@media (max-width: 480px) {
  .hero-slider { height: 280px; }
  .slide .slide-content h2 { font-size: 19px; }
  .prod-cats .cat-btn { flex: 1 1 100%; }
}

/* ---------- 产品详情页 cpinfo ---------- */
.cpinfo-layout { display: grid; grid-template-columns: 360px 1fr; gap: 28px; margin-top: 24px; align-items: flex-start; }
.cpinfo-side { background: #fff; border-radius: 14px; padding: 18px 14px; box-shadow: 0 6px 22px rgba(10,42,94,.07); position: sticky; top: 90px; height: auto; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; }
.cpinfo-side::-webkit-scrollbar { width: 6px; } .cpinfo-side::-webkit-scrollbar-thumb { background: #c5d2e6; border-radius: 3px; }
.cp-cat { border-bottom: 1px solid #eef2f7; }
.cp-cat:last-child { border-bottom: none; }
.cp-cat > .cat-title { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px; cursor: pointer; font-weight: 700; color: #0a2a5e; font-size: 15px; user-select: none; }
.cp-cat > .cat-title .arr { transition: transform .3s; font-size: 12px; color: #8aa0c0; }
.cp-cat.open > .cat-title .arr { transform: rotate(90deg); }
.cp-cat-list { display: none; padding: 4px 6px 12px 6px; }
.cp-cat.open .cp-cat-list { display: block; animation: fadeIn .3s ease; }
.cp-cat-list a { display: block; padding: 8px 10px; border-radius: 7px; font-size: 14px; color: #465367; transition: .25s; white-space: normal; border: 1px solid transparent; }
.cp-cat-list a:hover { background: #e8f0fb; color: #1c5fc9; }
.cp-cat-list a.active { background: #1c5fc9; color: #fff; border-color: #1c5fc9; font-weight: 600; }
.cp-cat-list .cnt { font-size: 11px; color: #8aa0c0; margin-left: 6px; font-weight: 400; }
.cp-detail { background: #fff; border-radius: 14px; padding: 40px; box-shadow: 0 6px 22px rgba(10,42,94,.07); }
.prod-name { font-size: 24px; color: #0a2a5e; text-align: center; margin-bottom: 10px; font-weight: 700; }
.prod-model { text-align: center; color: #6b7a90; font-size: 14px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px dashed #e0e7f1; }
.prod-model .lb { color: #0a2a5e; font-weight: 600; margin-right: 6px; }
.prod-model .tag { display: inline-block; margin: 3px 4px; padding: 3px 12px; background: #e8f0fb; color: #1c5fc9; border-radius: 20px; font-size: 13px; }
.prod-figure { margin: 8px 0 24px; text-align: center; }
.prod-figure img { width: 100%; max-height: 380px; object-fit: contain; background: #f6f9fd; border-radius: 12px; padding: 14px; }
.prod-figure figcaption { font-size: 13px; color: #8aa0c0; margin-top: 8px; }
.prod-body { color: #465367; line-height: 1.9; }
.prod-body h3 { color: #0a2a5e; font-size: 17px; margin: 22px 0 10px; padding-left: 12px; border-left: 4px solid #2e8bff; }
.prod-body h3:first-of-type { margin-top: 0; }
.prod-body p { margin-bottom: 10px; text-align: justify; }
.prod-params { width: 100%; border-collapse: collapse; margin: 8px 0 14px; }
.prod-params td { border: 1px solid #e6edf5; padding: 9px 12px; font-size: 14px; }
.prod-params td:first-child { background: #f2f6fb; color: #0a2a5e; font-weight: 600; width: 32%; }
/* 上/下一个产品 */
.prod-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; padding-top: 22px; border-top: 1px solid #e6edf5; }
.prod-nav a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 12px; background: #f6f9fd; border: 1px solid #e6edf5; transition: .3s; text-decoration: none; color: inherit; }
.prod-nav a:hover { border-color: #2e8bff; background: #e8f0fb; transform: translateY(-3px); }
.prod-nav .lab { font-size: 12px; color: #8aa0c0; }
.prod-nav .tt { font-size: 14.5px; color: #1c5fc9; font-weight: 600; }
.prod-nav .next { text-align: right; }
@media (max-width: 1000px) {
  .cpinfo-layout { grid-template-columns: 1fr; }
  .cpinfo-side { position: static; max-height: none; overflow: visible; }
  .prod-nav { grid-template-columns: 1fr; }
  .cp-detail { padding: 28px 22px; }
}
