/* ============================================================
   分贝卫士官网 · 设计系统 (科技蓝 + 医疗白, 适老化 + 移动优先)
   ============================================================ */
:root {
  --brand: #1E6FFF;
  --brand-600: #1A5FE0;
  --brand-700: #154BB8;
  --brand-50: #EAF1FF;
  --bg: #F5F8FF;
  --bg-soft: #EEF4FF;
  --accent: #FF8A3D;
  --accent-600: #F2742A;
  --ink: #1F2A37;
  --ink-2: #44506A;
  --ink-3: #6B7689;
  --line: #E2E8F4;
  --white: #FFFFFF;
  --ok: #18A957;
  --shadow-sm: 0 2px 8px rgba(30, 111, 255, .08);
  --shadow: 0 10px 30px rgba(30, 111, 255, .12);
  --shadow-lg: 0 20px 50px rgba(20, 40, 90, .18);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1180px;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; color: var(--ink); }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-3); }
.center { text-align: center; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-size: 17px; font-weight: 600; cursor: pointer; border: 0;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-600)); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-600)); color: #fff; box-shadow: var(--shadow); }
.btn-ghost { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.28); }
.btn-outline { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-outline:hover { background: var(--brand-50); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 15px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; height: 100%; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--brand-700); }
.brand .logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: var(--brand-50); }
.brand .logo-text { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--brand-600)); color:#fff; display:flex; align-items:center; justify-content:center; font-size:20px; font-weight:800; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 16px; }
.nav a:hover { background: var(--bg-soft); color: var(--brand); }
.nav .btn { margin-left: 8px; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 0; font-size: 26px; color: var(--brand); cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 600px at 80% -10%, #2C7BFF 0%, transparent 60%),
              linear-gradient(135deg, #123A8E 0%, #1E6FFF 55%, #36A0FF 100%);
  color: #fff; padding: 84px 0 96px;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='%23ffffff' fill-opacity='0.18'/%3E%3C/svg%3E");
  opacity: .5;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(30px, 6vw, 52px); font-weight: 800; letter-spacing: .5px; }
.hero .sub { font-size: clamp(16px, 2.4vw, 21px); color: rgba(255,255,255,.88); max-width: 640px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; color: rgba(255,255,255,.9); font-size: 15px; }
.hero-badges span { display: inline-flex; align-items: center; gap: 7px; }
.hero-badges b { color: #fff; font-weight: 700; }

/* ---------- 区块 ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--white); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head .eyebrow { color: var(--brand); font-weight: 700; letter-spacing: 2px; font-size: 14px; }
.section-head h2 { font-size: clamp(26px, 4vw, 36px); margin-top: 6px; }
.section-head p { color: var(--ink-3); }

/* ---------- 卡片网格 ---------- */
.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: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .ic { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-50); color: var(--brand); font-size: 26px; margin-bottom: 14px; }
.card h3 { font-size: 20px; }
.card p { color: var(--ink-3); font-size: 15.5px; margin: 0; }

/* ---------- 文章列表 ---------- */
.article-card { cursor: pointer; }
.article-card .cover { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; border-radius: 12px; margin-bottom: 14px; background: var(--bg-soft); }
.article-card .cover-ph { width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: 12px; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--brand-50), #fff); display:flex; align-items:center; justify-content:center; color: var(--brand); font-size: 30px; white-space: pre-line; }
.article-card h3 { font-size: 19px; }
.article-card .meta { color: var(--ink-3); font-size: 13.5px; margin-top: auto; }

/* ---------- 产品橱窗 ---------- */
.product-card { text-align: center; }
.product-card .pic { width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; border-radius: 12px; margin-bottom: 12px; background: var(--bg-soft); }
.product-card .pic-ph { width: 100%; aspect-ratio: 1 / 1; height: auto; border-radius: 12px; margin-bottom:12px; background: linear-gradient(135deg, #fff, var(--bg-soft)); display:flex; align-items:center; justify-content:center; color: var(--brand); font-size: 34px; }
.product-card h3 { font-size: 19px; margin-bottom: 2px; }
.product-card .model { color: var(--ink-3); font-size: 14px; margin-bottom: 14px; }
.price-hint { color: var(--accent-600); font-weight: 700; font-size: 14px; margin-bottom: 12px; }

/* ---------- 表单 ---------- */
.form { max-width: 640px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 7px; font-size: 15.5px; }
.field label .req { color: #E5484D; margin-left: 3px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font-size: 17px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease; font-family: inherit;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50);
}
.field .err { color: #E5484D; font-size: 13.5px; margin-top: 5px; display: none; }
.form-note { font-size: 13.5px; color: var(--ink-3); margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { display: none; padding: 14px 16px; border-radius: var(--radius-sm); margin-top: 16px; font-weight: 600; }
.form-msg.ok { background: #E7F8EE; color: var(--ok); border: 1px solid #BDE9CC; }
.form-msg.bad { background: #FDECEC; color: #E5484D; border: 1px solid #F6C9C9; }

/* ---------- 门店卡片 ---------- */
.store-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.store-card h3 { font-size: 19px; }
.store-card .row { display: flex; gap: 8px; color: var(--ink-2); font-size: 15px; margin: 6px 0; align-items: flex-start; }
.store-card .row .k { color: var(--ink-3); min-width: 56px; }
.store-card .tag { display: inline-block; font-size: 12.5px; padding: 2px 10px; border-radius: 999px; background: var(--brand-50); color: var(--brand); font-weight: 600; }

/* ---------- CTA 横幅 ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--brand), var(--brand-600)); color: #fff;
  border-radius: 22px; padding: 40px; text-align: center; box-shadow: var(--shadow);
}
.cta-banner h2 { color: #fff; font-size: clamp(24px, 4vw, 32px); }
.cta-banner p { color: rgba(255,255,255,.9); }
.cta-banner .hero-cta { justify-content: center; }

/* ---------- 页脚 ---------- */
.site-footer { background: #0E1B3A; color: #C7D2EA; padding: 54px 0 26px; margin-top: 30px; }
.site-footer a { color: #C7D2EA; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.site-footer .f-about p { font-size: 14.5px; line-height: 1.8; }
.footer-links a { display: block; padding: 5px 0; font-size: 14.5px; }
.footer-contact .phone { font-size: 22px; font-weight: 800; color: #fff; }
.qr-mini { display: inline-flex; gap: 16px; margin-top: 8px; }
.qr-box { text-align: center; font-size: 12.5px; color: #C7D2EA; }
.qr-box .qr-img, .qr-box .qr-ph {
  width: 92px; height: 92px; border-radius: 12px; background: #fff; object-fit: contain; padding: 6px; margin-bottom: 6px;
}
.qr-box .qr-ph { display:flex; align-items:center; justify-content:center; color: var(--brand); font-size: 12px; text-align:center; white-space: pre-line; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 30px; padding-top: 18px; text-align: center; font-size: 13px; color: #8FA1C7; }
.footer-bottom a { margin: 0 8px; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(8,16,38,.6); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 18px; max-width: 380px; width: 100%; padding: 26px; text-align: center; box-shadow: var(--shadow-lg); position: relative; }
.modal .qr-lg { width: 240px; height: 240px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 14px; margin: 6px auto 12px; padding: 10px; }
.modal .qr-lg-ph { width: 240px; height: 240px; border: 1px dashed var(--brand); border-radius: 14px; margin: 6px auto 12px; display:flex; align-items:center; justify-content:center; color: var(--brand); padding: 16px; font-size: 14px; white-space: pre-line; }
.modal h3 { font-size: 20px; }
.modal p { color: var(--ink-3); font-size: 14.5px; }
.modal .modal-x { margin-top: 16px; }

/* ---------- 科普详情弹窗 ---------- */
.article-detail { max-width: 720px; text-align: left; }
.article-detail .ad-content { font-size: 17px; line-height: 1.9; color: var(--ink-2); max-height: 56vh; overflow: auto; }
.article-detail .ad-content img { max-width: 100%; border-radius: 10px; margin: 12px 0; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: rgba(14,27,58,.92); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 200; max-width: 90vw;
}
#toast.show { opacity: 1; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  body { font-size: 16px; }
  .nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 12px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 13px 10px; border-radius: 8px; }
  .nav .btn { margin: 8px 0 4px; }
  .menu-toggle { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .hero { padding: 60px 0 70px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .cta-banner { padding: 30px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
