/* ============================================================
   Y&Q 官网全站样式 · 浅色现代风
   ============================================================ */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-soft: #eff6ff;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #334155;
  --text-strong: #1e293b;
  --text-muted: #64748b;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 2px 10px rgba(15, 23, 42, .06);
  --shadow-hover: 0 8px 24px rgba(37, 99, 235, .14);
  --maxw: 1200px;
  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  --mono: Consolas, "JetBrains Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.75; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; height: 64px; gap: 40px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark { width: 38px; height: 38px; border-radius: 9px; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; letter-spacing: .5px; }
.logo-text { font-size: 19px; font-weight: 700; color: var(--text-strong); line-height: 1.2; }
.logo-text small { display: block; font-size: 11px; color: var(--text-muted); font-weight: 400; letter-spacing: 1.5px; }
.main-nav { display: flex; gap: 34px; list-style: none; margin-left: auto; }
.main-nav a { color: var(--text); font-size: 15px; padding: 4px 0; border-bottom: 2px solid transparent; transition: color .15s; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- 按钮 ---------- */
.btn { display: inline-block; padding: 11px 30px; border-radius: var(--radius); font-size: 15px; font-weight: 500; border: 1px solid transparent; cursor: pointer; transition: all .15s; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary-soft); }
.btn-sm { padding: 6px 16px; font-size: 13px; border-radius: 8px; }

/* ---------- 首页 Hero ---------- */
.hero { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%); padding: 88px 0 84px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%; background: rgba(255, 255, 255, .06); top: -200px; right: -140px; }
.hero::after { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: rgba(255, 255, 255, .05); bottom: -140px; left: -90px; }
.hero-inner { display: flex; gap: 60px; align-items: center; position: relative; z-index: 1; }
.hero-copy { flex: 1.15; }
.hero h1 { font-size: 42px; color: #ffffff; line-height: 1.3; text-shadow: 0 2px 12px rgba(15, 23, 42, .18); }
.hero h1 em { font-style: normal; color: #93c5fd; }
.hero .sub { margin: 18px 0 32px; font-size: 17px; color: rgba(255, 255, 255, .86); max-width: 540px; }
.hero-actions { display: flex; gap: 16px; }
.hero-actions .btn-outline { border-color: rgba(255, 255, 255, .65); color: #fff; background: rgba(255, 255, 255, .08); }
.hero-actions .btn-outline:hover { background: rgba(255, 255, 255, .18); }
.hero-visual { flex: 1; }
.hero-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-hover); padding: 28px; }
.hero-panel h3 { font-size: 15px; color: var(--text-strong); margin-bottom: 16px; }
.hero-panel .row { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px dashed var(--border); }
.hero-panel .row:last-child { border-bottom: none; }
.hero-panel .dot { width: 34px; height: 34px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.hero-panel .row b { color: var(--text-strong); font-size: 14.5px; display: block; }
.hero-panel .row span { font-size: 12.5px; color: var(--text-muted); }

/* ---------- 通用区块 ---------- */
.section { padding: 68px 0; }
.section-title { text-align: center; font-size: 30px; color: var(--text-strong); font-weight: 700; }
.section-title::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #2563eb, #06b6d4); margin: 12px auto 0; }
.section-sub { text-align: center; color: var(--text-muted); margin: 10px 0 44px; font-size: 15.5px; }

/* ---------- 产品分类卡片 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px 24px; text-align: center; transition: all .2s; display: block; color: var(--text); }
.cat-card:hover { border-color: var(--primary); box-shadow: var(--shadow-hover); transform: translateY(-5px); }
.cat-icon { width: 60px; height: 60px; border-radius: 14px; background: var(--primary-soft); margin: 0 auto 18px; display: flex; align-items: center; justify-content: center; }
.cat-icon svg { width: 30px; height: 30px; stroke: var(--primary); }
.cat-icon.blue   { background: #eff6ff; } .cat-icon.blue svg   { stroke: #2563eb; }
.cat-icon.green  { background: #ecfdf5; } .cat-icon.green svg  { stroke: #059669; }
.cat-icon.orange { background: #fff7ed; } .cat-icon.orange svg { stroke: #ea580c; }
.cat-icon.purple { background: #f5f3ff; } .cat-icon.purple svg { stroke: #7c3aed; }
.cat-icon.teal  { background: #f0fdfa; }  .cat-icon.teal svg  { stroke: #0d9488; }
.cat-icon.rose  { background: #fff1f2; }  .cat-icon.rose svg  { stroke: #e11d48; }
.cat-card h3 { font-size: 17px; color: var(--text-strong); margin-bottom: 8px; }
.cat-card p { font-size: 13.5px; color: var(--text-muted); }

/* ---------- 产品卡片 ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.prod-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all .2s; display: block; color: var(--text); }
.prod-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-5px); }
.prod-img { height: 185px; background: linear-gradient(135deg, #eef2ff, #dbeafe); display: flex; align-items: center; justify-content: center; color: #93a8c9; font-size: 14px; letter-spacing: 2px; }
.prod-body { padding: 18px 20px 20px; }
.prod-name { font-size: 16px; font-weight: 600; color: var(--text-strong); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.badge { font-size: 12px; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 2px 11px; font-family: var(--mono); white-space: nowrap; }
.prod-desc { font-size: 13px; color: var(--text-muted); margin: 9px 0 12px; min-height: 46px; }
.prod-link { font-size: 14px; font-weight: 500; color: var(--primary); }

/* ---------- 技术文档区 ---------- */
.docs-split { display: flex; gap: 56px; align-items: center; }
.docs-copy { flex: 1; }
.docs-copy h2 { font-size: 30px; color: var(--text-strong); font-weight: 700; }
.docs-copy p { margin: 16px 0 26px; color: var(--text-muted); font-size: 15.5px; }
.docs-copy ul { list-style: none; margin-bottom: 30px; }
.docs-copy li { padding-left: 26px; position: relative; margin: 10px 0; font-size: 14.5px; }
.docs-copy li::before { content: "✓"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
.docs-recent { flex: 1.1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 28px; }
.docs-recent h3 { font-size: 16px; color: var(--text-strong); padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.doc-item { display: flex; align-items: center; gap: 14px; padding: 14px 2px; border-bottom: 1px dashed var(--border); }
.doc-item:last-child { border-bottom: none; }
.doc-tag { font-size: 12px; border-radius: 6px; padding: 2px 9px; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
.doc-item .t { flex: 1; font-size: 14.5px; color: var(--text-strong); }
.doc-item .d { font-size: 12.5px; color: var(--text-muted); flex-shrink: 0; }

/* ---------- 页脚 ---------- */
.site-footer { background: #1e293b; color: #cbd5e1; margin-top: 40px; border-top: 4px solid var(--primary); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 40px; padding: 56px 0 40px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-grid p, .footer-grid li { font-size: 13.5px; color: #94a3b8; line-height: 2; }
.footer-grid ul { list-style: none; }
.footer-grid a { color: #94a3b8; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #334155; padding: 18px 0; display: flex; justify-content: space-between; font-size: 12.5px; color: #64748b; }

/* ---------- 子页面通用 ---------- */
.page-hero { background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%); border-bottom: 1px solid var(--border); padding: 44px 0; }
.page-hero h1 { font-size: 28px; color: var(--text-strong); }
.page-hero p { color: var(--text-muted); font-size: 14.5px; margin-top: 6px; }
.breadcrumb { font-size: 13px; color: var(--text-muted); margin: 18px 0; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 8px; color: #cbd5e1; }

/* ---------- 表格 ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { background: var(--primary-dark); color: #fff; padding: 11px 18px; text-align: left; font-weight: 500; white-space: nowrap; }
table.data td { padding: 11px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--primary-soft); }
table.data .num { font-family: var(--mono); color: var(--primary); font-weight: 600; }

/* ---------- 产品详情页 ---------- */
.detail-layout { display: flex; gap: 48px; margin-top: 8px; }
.detail-media { flex: 1; text-align: center; }
.detail-media .img-box { background: linear-gradient(135deg, #eef2ff, #dbeafe); border: 1px solid var(--border); border-radius: var(--radius-lg); height: 340px; display: flex; align-items: center; justify-content: center; color: #93a8c9; letter-spacing: 2px; }
.detail-media .img-cap { font-size: 13px; color: var(--text-muted); margin-top: 10px; }
.detail-media .img-box.has-img { background: var(--surface); padding: 10px; }
.detail-media .img-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.detail-info { flex: 1.2; }
.detail-info h1 { font-size: 26px; color: var(--text-strong); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.detail-info .brief { color: var(--text-muted); margin: 14px 0 20px; font-size: 15px; }
.detail-info h2 { font-size: 17px; color: var(--text-strong); margin: 26px 0 10px; padding-left: 10px; border-left: 4px solid var(--primary); }
.feature-list { list-style: none; }
.feature-list li { padding: 5px 0 5px 24px; position: relative; font-size: 14.5px; }
.feature-list li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.detail-actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; align-items: center; }
.notice { background: #fefce8; border-left: 4px solid #eab308; border-radius: 0 8px 8px 0; padding: 10px 16px; font-size: 13.5px; color: #854d0e; margin: 16px 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .cat-grid, .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-main .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner, .docs-split, .detail-layout { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { gap: 20px; }
  .hero h1 { font-size: 32px; }
}
@media (max-width: 640px) {
  .cat-grid, .prod-grid { grid-template-columns: 1fr; }
  .cat-main .prod-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
}

/* ---------- 产品中心 · 开发板系列紧凑表格 ---------- */
.section-lead { color: var(--text-muted); font-size: 14px; margin: -6px 0 16px; }
.board-entries { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.board-entry { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 18px; color: var(--text); transition: all .2s; }
.board-entry:hover { box-shadow: var(--shadow-hover); border-color: var(--primary); }
.be-icon { width: 46px; height: 46px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.be-icon-alt { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; }
.be-text { min-width: 0; }
.be-text b { display: block; font-size: 15px; color: var(--text-strong); }
.be-text small { display: block; color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }
.be-go { margin-left: auto; color: var(--primary); font-size: 13px; white-space: nowrap; flex-shrink: 0; }
.series-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 6px; }
.series-nav-label { font-size: 13px; color: var(--text-muted); }
.series-nav a { font-size: 13px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); transition: all .15s; }
.series-nav a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.series-nav a i { font-style: normal; color: var(--text-muted); font-size: 12px; margin-left: 5px; }
.series-title { font-size: 18px; color: var(--text-strong); margin: 26px 0 10px; scroll-margin-top: 80px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.series-title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--primary); flex-shrink: 0; }
.series-count { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.board-wrap { overflow-x: auto; }
.board-table { min-width: 660px; }
.board-table th { padding: 9px 14px; }
.board-table td { padding: 7px 14px; }
.board-thumb { width: 52px; height: 44px; object-fit: contain; border-radius: 6px; border: 1px solid var(--border); background: #fff; display: block; }
.board-thumb-ph { width: 52px; height: 44px; border-radius: 6px; border: 1px dashed var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; color: #94a3b8; background: var(--bg); }
.board-name { font-weight: 600; color: var(--text-strong); }
.board-name:hover { color: var(--primary); }
.board-pkg { font-family: var(--mono); font-size: 12.5px; color: var(--text-muted); }
@media (max-width: 900px) {
  .board-entries { grid-template-columns: 1fr; }
  .be-go { display: none; }
}

/* ---------- 产品中心 · 分类左侧导航 ---------- */
.cat-layout { display: flex; gap: 28px; align-items: flex-start; }
.cat-side { position: sticky; top: 80px; width: 208px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow); }
.cat-side-title { font-size: 12px; color: var(--text-muted); letter-spacing: 2px; padding: 2px 10px 9px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.cat-tab { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 8px; border: 1px solid transparent; color: var(--text); font-size: 14px; transition: all .15s; }
.cat-tab i { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--text-muted); }
.cat-tab:hover { background: var(--primary-soft); color: var(--primary); }
.cat-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.cat-tab.active i { color: rgba(255, 255, 255, .85); }
.cat-main { flex: 1; min-width: 0; }
.cat-main .prod-grid { grid-template-columns: repeat(3, 1fr); }
.cat-panel { scroll-margin-top: 84px; }
.cat-panel[hidden] { display: none; }
.cat-panel .series-title { scroll-margin-top: 84px; }
@media (max-width: 900px) {
  .cat-layout { flex-direction: column; gap: 16px; }
  .cat-side { position: static; width: 100%; flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 10px; }
  .cat-side-title { display: none; }
  .cat-tab { padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; }
}
.cat-soon { margin-top: 22px; padding: 12px 18px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface); font-size: 13px; color: var(--text-muted); }
.cat-soon a { margin: 0 2px; }
.prod-img img { width: 100%; height: 100%; object-fit: contain; }
