/* ============================================================
   基础层：只提供盒模型、语义元素与最小可用结构
   不含配色、不含栅格列数、不含圆角与分隔线风格
   —— 这些全部由各主题自己决定，避免 14 套站被基础层拉成一样
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-b, system-ui, -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif);
  font-size: var(--fs, 16px);
  line-height: 1.75;
  color: var(--ink, #222);
  background: var(--paper, #fff);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; border: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, p, figure, dl, dd, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
svg { display: block; }
::selection { background: var(--accent, #b45); color: #fff; }

/* ---------- 容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap, 1240px);
  margin: 0 auto;
  padding: 0 var(--gut, 34px);
}

.sec { padding: var(--sec-y, 84px) 0; }

/* ---------- 页头（内页通用） ---------- */
.page-head {
  padding: calc(var(--sec-y, 84px) * .62) 0 24px;
}
.page-head h1 {
  font-family: var(--font-h);
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  font-weight: var(--hw, 600);
  line-height: 1.28;
  letter-spacing: var(--htrack, 0);
}
.page-head .lead {
  margin-top: 12px;
  max-width: 60ch;
  font-size: 15px;
  color: var(--ink-3, #666);
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--ink-3, #777);
}
.crumb a:hover { color: var(--accent); }

/* ---------- 区块标题 ---------- */
.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.sec-head h2 {
  font-family: var(--font-h);
  font-size: clamp(1.32rem, 2.2vw, 1.92rem);
  font-weight: var(--hw, 600);
  line-height: 1.34;
}
.sec-num {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  letter-spacing: .26em;
  color: var(--ink-3, #888);
}
.sec-sub {
  max-width: 52ch;
  font-size: 14px;
  color: var(--ink-3, #777);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid currentColor;
  font-size: 14px;
  letter-spacing: .02em;
  transition: background .22s, color .22s, opacity .22s;
}
.btn-d { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-p { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn:hover { opacity: .85; }

/* ---------- 长文 ---------- */
.prose { max-width: 74ch; }
.prose p { margin: 0 0 1.05em; color: var(--ink-2, #444); line-height: 1.95; }
.prose h2, .prose h3 {
  font-family: var(--font-h);
  font-weight: 600;
  margin: 1.6em 0 .55em;
  line-height: 1.4;
}

/* ---------- 详情 ---------- */
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(22px, 3.2vw, 50px);
  align-items: start;
}
.detail-media { min-width: 0; }
.detail-media figure { margin: 0; background: var(--paper-2, #eee); overflow: hidden; }
.detail-media figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.detail-info { min-width: 0; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.thumbs img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; cursor: pointer; opacity: .66; transition: opacity .2s; }
.thumbs img.on, .thumbs img:hover { opacity: 1; }
.spec { margin-top: 16px; }
.spec-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  font-size: 14px;
}
.spec-row dt { font-size: 12.5px; letter-spacing: .08em; color: var(--ink-3, #777); }
.spec-row dd { color: var(--ink-2, #444); }
.detail-tel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  height: 48px;
  padding: 0 20px;
  background: var(--ink);
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}

/* ---------- 结尾行动区 ---------- */
.cta { padding: clamp(28px, 4vw, 50px) 0; }
.cta-in { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.cta-in h2 { font-family: var(--font-h); font-size: clamp(1.3rem, 2.1vw, 1.85rem); font-weight: var(--hw, 600); line-height: 1.42; }
.cta-in p { margin-top: 8px; font-size: 14px; color: var(--ink-3, #777); }
.cta-act { text-align: right; }
.cta-tel {
  font-family: var(--font-h);
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.cta-note { display: block; margin-top: 7px; font-size: 11.5px; letter-spacing: .14em; color: var(--ink-3, #888); }

/* ---------- 产品网格（列数/间隙由主题定义） ---------- */
.pgrid { display: grid; }
.pcard { display: block; min-width: 0; }
.pcard-img { overflow: hidden; background: var(--paper-2, #eee); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.22,.61,.36,1); }
.pcard:hover .pcard-img img { transform: scale(1.045); }
.pcard-body { min-width: 0; }
.pcard-idx { display: block; font-size: 11px; letter-spacing: .18em; color: var(--ink-3, #999); }
.pcard-body h3 { font-family: var(--font-h); font-weight: 600; }
.pcard-body p { color: var(--ink-3, #777); }
.pcard-go { display: block; color: var(--accent); }
.pcard-full { display: block; min-width: 0; }

/* ---------- 分类筛选标签（列数/外观由主题覆盖） ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px 8px; margin-bottom: clamp(26px, 3.5vw, 44px); }
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px;
  border: 1px solid var(--line, #ddd);
  font-size: 14px; letter-spacing: .02em; white-space: nowrap;
  color: var(--ink-2, #444);
  transition: border-color .2s, color .2s, background .2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.empty { padding: 56px 0; color: var(--ink-3, #888); }
.more { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--accent); }

/* ---------- 案例 ---------- */
.wall { display: grid; gap: var(--wall-gap, 16px); }
.cc { display: block; min-width: 0; overflow: hidden; }
.cc-img { overflow: hidden; background: var(--paper-2, #eee); }
.cc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s cubic-bezier(.22,.61,.36,1); }
.cc:hover .cc-img img { transform: scale(1.035); }
.cc-meta h3 { font-family: var(--font-h); font-weight: 600; }
.cc-meta p { color: var(--ink-3, #777); }
.loc { font-size: 11.5px; letter-spacing: .16em; color: var(--accent); }

/* ---------- 资讯 ---------- */
.news-list { border-top: 1px solid var(--line, #ddd); }
.news-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 22px;
  gap: 18px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line, #ddd);
  min-width: 0;
}
.news-row time { font-size: 12px; color: var(--ink-3, #888); font-variant-numeric: tabular-nums; }
.news-row h3 { font-family: var(--font-h); font-size: 17px; font-weight: 500; line-height: 1.5; }
.news-row .arw { text-align: right; color: var(--ink-3, #888); }

/* ---------- 关于 / 联系 ---------- */
.adv { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(22px, 4vw, 54px); }
.adv-side { min-width: 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(22px, 3.4vw, 50px); align-items: start; }
.contact-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  font-size: 15px;
}
.contact-row dt { font-size: 12px; letter-spacing: .1em; color: var(--ink-3, #888); }
.contact-row dd { min-width: 0; word-break: break-word; }
.map-card { padding: 26px; background: var(--ink); color: var(--paper); }
.map-card h3 { font-family: var(--font-h); font-size: 1.1rem; margin-bottom: 10px; }
.tel-btn { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- 搜索页 ---------- */
.search-page .prose { max-width: none; }

@media (max-width: 960px) {
  .detail, .adv, .contact-grid, .cta-in { grid-template-columns: minmax(0, 1fr); }
  .cta-act { text-align: left; }
  .news-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .news-row .arw { display: none; }
  :root { --gut: 20px; --sec-y: 54px; }
}

/* ============================================================
   搜索层 / 分享层：结构与可用性，外观交给各主题的变量与覆盖
   ============================================================ */
.ov-search, .ov-share {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(6px);
}
.ov-search { align-items: flex-start; justify-content: center; padding: 8vh 20px 20px; overflow-y: auto; }
.ov-share { align-items: center; justify-content: center; padding: 20px; }
.ov-search.on, .ov-share.on { opacity: 1; visibility: visible; }

.ov-search-in {
  width: 100%;
  max-width: 720px;
  background: var(--paper);
  color: var(--ink);
  padding: clamp(22px, 3vw, 34px);
}
.ov-search-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ov-search-kicker { font-size: 11px; letter-spacing: .24em; color: var(--ink-3, #888); }
.ov-close { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; }
.ov-close:hover { color: var(--accent); }

.ov-search-box { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.ov-search-box input { flex: 1 1 auto; min-width: 0; border: 0; background: none; outline: none; font-size: clamp(1.15rem, 2.4vw, 1.6rem); font-family: var(--font-h); }
.ov-search-box svg { width: 22px; height: 22px; flex: none; color: var(--ink-3, #888); }
.ov-search-hint { margin-top: 10px; font-size: 12px; color: var(--ink-3, #888); }

.ov-res { margin-top: 18px; max-height: 52vh; overflow-y: auto; }
.sr-item { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 4px 12px; padding: 12px 2px; border-bottom: 1px solid var(--line, #e2ddd2); }
.sr-item .t { font-size: 11px; letter-spacing: .12em; color: var(--accent); }
.sr-item .h { font-size: 15.5px; font-family: var(--font-h); }
.sr-item .d { grid-column: 2; font-size: 12.5px; color: var(--ink-3, #888); }
.sr-item:hover .h { color: var(--accent); }
.sr-empty { padding: 20px 0; font-size: 14px; color: var(--ink-3, #888); }

.ov-share-card { position: relative; width: 100%; max-width: 420px; background: var(--paper); color: var(--ink); padding: clamp(22px, 3vw, 30px); }
.ov-share-card h3 { font-family: var(--font-h); font-size: 1.22rem; margin-bottom: 6px; }
.ov-share-card p { font-size: 13.5px; color: var(--ink-3, #888); }
.ov-share-card .ov-close { position: absolute; top: 10px; right: 10px; }
.ov-share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.ov-share-grid > * { display: flex; align-items: center; justify-content: center; height: 44px; border: 1px solid var(--line, #ddd); font-size: 13.5px; }
.ov-share-grid > *:hover { background: var(--paper-2, #f0ece2); }
.ov-qr { display: none; margin-top: 14px; text-align: center; }
.ov-qr.on { display: block; }
.ov-qr img { margin: 0 auto 6px; }
.ov-qr span { font-size: 11.5px; color: var(--ink-3, #888); }
.ov-share-tel { display: block; margin-top: 16px; font-size: 13.5px; color: var(--accent); }

/* 滚动显现 */
.pre { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,.61,.36,1); }
.pre.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .pre { opacity: 1; transform: none; transition: none; } }
