/* ==========================================================================
   base.css —— 三套主题共用的结构层样式（重置 / 栅格 / 组件骨架）
   视觉风格全部在各主题的 theme.css 中定义
   ========================================================================== */

:root {
  --wrap: 1240px;
  --gap: 24px;
  --radius: 0px;
  --header-h: 72px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: var(--font);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); line-height: 1.7;
  background: var(--bg); color: var(--fg);
  -webkit-font-smoothing: antialiased;
}
img, video, canvas { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .6em; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap {
  width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
@media (min-width: 761px) { .wrap { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); } }
.sect { padding: clamp(48px, 7vw, 100px) 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.grid { display: grid; gap: var(--gap); }
/* grid/flex 子项的 min-width 默认是 auto，会被内容撑破；统一归零后由容器决定宽度 */
.grid > *, .pd > *, .ab-in > *, .c-main > *, .mv > *, .proc > *, .form-grid > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.ratio { position: relative; overflow: hidden; }
.ratio > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.r-43 { aspect-ratio: 4 / 3; }
.r-169 { aspect-ratio: 16 / 9; }
.r-11 { aspect-ratio: 1 / 1; }

/* ------------------------------------------------------------ 头部 / 导航 */
.hdr { position: sticky; top: 0; z-index: 50; }
.hdr-in { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .04em; }
.brand img { height: 34px; width: auto; }
.brand small { display: block; font-weight: 400; font-size: 11px; opacity: .6; letter-spacing: .18em; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 10px 16px; display: block; position: relative; white-space: nowrap; }
.hdr-cta { display: flex; align-items: center; gap: 14px; }
.hdr-tel { font-weight: 700; white-space: nowrap; }
.burger { display: none; width: 44px; height: 44px; background: none; border: 1px solid currentColor; cursor: pointer; }
.burger span { display: block; width: 18px; height: 2px; background: currentColor; margin: 3px auto; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border: 1px solid transparent; cursor: pointer;
  font-weight: 600; white-space: nowrap; transition: all .25s var(--ease);
}
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 34px; }

/* ---------------------------------------------------------------- 通用块 */
.page-hero { position: relative; overflow: hidden; }
.page-hero .ph-bg { position: absolute; inset: 0; }
.page-hero .ph-bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero .ph-in { position: relative; padding-block: clamp(52px, 9vw, 130px); }
.crumb { font-size: 13px; opacity: .7; margin-bottom: 14px; }
.crumb a:hover { text-decoration: underline; }
.sect-head { margin-bottom: clamp(28px, 4vw, 52px); }
.sect-head h2 { font-size: clamp(24px, 3.2vw, 38px); margin-bottom: 10px; }
.sect-head p { opacity: .7; margin: 0; max-width: 720px; }

/* ------------------------------------------------------------- 产品卡片 */
.p-card { display: flex; flex-direction: column; overflow: hidden; transition: all .3s var(--ease); }
.p-card .p-media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; }
.p-card .p-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.p-card:hover .p-media img { transform: scale(1.06); }
.p-card .p-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.p-card h3 { font-size: 17px; margin-bottom: 8px; }
.p-card .p-sum { font-size: 13.5px; opacity: .7; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.p-card .p-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.badge3d { position: absolute; top: 12px; left: 12px; font-size: 11px; letter-spacing: .1em; padding: 4px 10px; font-weight: 700; }
.tag { display: inline-block; font-size: 11.5px; padding: 3px 9px; margin: 0 6px 6px 0; }

/* ---------------------------------------------------- 产品详情：媒体区 */
.pd { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.pd-media, .pd-info { min-width: 0; }
.pd-thumbs { min-width: 0; }
.pd-stage { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.pd-stage > img, .pd-stage > video { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pd-thumb { width: 78px; aspect-ratio: 4 / 3; overflow: hidden; cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s; border: 2px solid transparent; position: relative; }
.pd-thumb.on, .pd-thumb:hover { opacity: 1; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb .tk { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.45); color: #fff; }
.spec-table th, .spec-table td { padding: 11px 14px; text-align: left; font-size: 14px; vertical-align: top; }
.spec-table th { width: 34%; font-weight: 600; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tabs button { padding: 12px 22px; background: none; border: none; cursor: pointer; font-weight: 600; }
.tab-panel { padding: 26px 0; }
.tab-panel[hidden] { display: none !important; }
.prose { line-height: 1.9; }
.prose h3 { font-size: 19px; margin-top: 1.6em; }
.prose img { margin: 1em 0; }

/* ------------------------------------------------------------- 3D 展示器 */
.v3d { position: relative; width: 100%; height: 100%; touch-action: none; }
.v3d canvas { width: 100% !important; height: 100% !important; display: block; }
.v3d-hint {
  position: absolute; left: 12px; bottom: 12px; font-size: 11.5px; letter-spacing: .04em;
  padding: 5px 11px; background: rgba(0,0,0,.5); color: #fff; pointer-events: none; border-radius: 99px;
}
.v3d-load { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; opacity: .7; }
.v3d-spin { width: 100%; height: 100%; position: relative; cursor: grab; }
.v3d-spin img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.v3d-spin img.on { opacity: 1; }
.media-ph { display: grid; place-items: center; width: 100%; height: 100%; text-align: center; font-size: 13px; opacity: .65; padding: 20px; }

/* ------------------------------------------------------------------ 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea {
  padding: 12px 14px; border: 1px solid var(--line); background: var(--field-bg, transparent);
  color: inherit; width: 100%; transition: border-color .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field .hp { position: absolute; left: -9999px; }
.form-msg { font-size: 14px; padding: 12px 14px; margin-top: 14px; display: none; }
.form-msg.on { display: block; }

/* ------------------------------------------------------------------ 页脚 */
.ftr { padding: clamp(44px, 6vw, 76px) 0 0; }
.ftr-top { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr; gap: 40px; padding-bottom: 40px; }
.ftr-top-compact { grid-template-columns: minmax(0, 1.6fr) minmax(280px, .9fr); }
.ftr-brand { margin-bottom: 16px; }
.ftr-about { max-width: 34em; margin-bottom: 0; font-size: 14px; }
.ftr-contact { width: min(100%, 400px); justify-self: end; }
.ftr h4 { font-size: 14px; letter-spacing: .1em; margin-bottom: 18px; }
.ftr li { margin-bottom: 10px; font-size: 14px; opacity: .8; }
.ftr-contact li { display: flex; align-items: flex-start; gap: 8px; }
.ftr-contact li svg { flex: 0 0 auto; margin-top: .35em; }
.ftr-bot { padding: 20px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 32px; font-size: 13px; }
.ftr-legal, .ftr-nav ul { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; }
.ftr-nav { justify-self: end; }

/* ------------------------------------------------------------- 响应式 */
@media (max-width: 1024px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body .pd { grid-template-columns: minmax(0, 1fr); }   /* 提高一级特异性，压过主题里的两列定义 */
  .ftr-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
/* 导航抽屉断点设在 900px：iPad 竖屏（768px）下横向菜单会挤爆头部 */
@media (max-width: 900px) {
  /* --- 导航：汉堡靠右 + 全屏抽屉 + 遮罩 --- */
  .burger { display: block; }
  .hdr-cta { margin-left: auto; }          /* nav 变 fixed 后接管右对齐 */
  .hdr-cta .btn, .hdr-tel { display: none; }
  .brand { font-size: 15px; }
  .brand img { height: 28px; }
  /* 相对 .hdr（sticky，已是包含块）定位，自动贴在头部下方，
     不依赖 --header-h，主题改了头部高度也不会错位。
     用高度折叠而非位移，关闭时不会从头部上方漏出来。 */
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); margin-left: 0; padding: 0;
    max-height: 0; overflow: hidden; opacity: 0; border-bottom: 0 solid var(--line);
    transition: max-height .32s var(--ease), opacity .22s var(--ease), padding .32s var(--ease);
  }
  .nav.open {
    max-height: 74dvh; opacity: 1; padding: 6px 0 10px; border-bottom-width: 1px;
    overflow-y: auto; overscroll-behavior: contain;
  }
  .nav a { padding: 15px 22px; font-size: 16px; }
  .nav-mask {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 46;
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav-mask { opacity: 1; pointer-events: auto; }

  /* --- 底部吸底询盘条：与导航同断点，平板竖屏下头部 CTA 已隐藏 --- */
  body { padding-bottom: 62px; }
  .mcta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; display: grid;
    grid-template-columns: 1fr 1fr; gap: 1px;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -6px 20px rgba(0,0,0,.14);
  }
  .mcta a {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    height: 52px; font-size: 15px; font-weight: 600;
  }
}

@media (max-width: 760px) {

  /* --- 通用栅格塌陷 --- */
  .g2, .g3, .g4, .form-grid, .ftr-top { grid-template-columns: minmax(0, 1fr); }
  .ftr-contact, .ftr-nav { width: 100%; justify-self: start; }
  .ftr-bot { grid-template-columns: minmax(0, 1fr); }
  .sect { padding: 40px 0; }
  .sect-head { margin-bottom: 24px; }

  /* --- 表单：iOS 聚焦时 <16px 会自动放大页面 --- */
  .field input, .field select, .field textarea { font-size: 16px; padding: 13px 14px; }
  .field textarea { min-height: 120px; }
  .btn { padding: 13px 22px; }
  .btn-lg { padding: 15px 26px; }
  .hero-btns .btn, .pd-btns .btn { flex: 1 1 100%; min-width: 0; }

  /* --- 产品详情：缩略图横滑一行，标签栏横滑 --- */
  .pd-thumbs {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; padding-bottom: 4px;
  }
  .pd-thumbs::-webkit-scrollbar { height: 0; }
  .pd-thumb { width: 64px; flex: 0 0 auto; scroll-snap-align: start; }
  body .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; justify-content: flex-start; }
  body .tabs::-webkit-scrollbar { height: 0; }
  .tabs button { padding: 12px 16px; font-size: 14px; white-space: nowrap; }
  .tab-panel { padding: 20px 0; }
  .spec-table th, .spec-table td { padding: 10px; font-size: 13.5px; }
  .spec-table th { width: 42%; }

}
@media (min-width: 901px) { .mcta, .nav-mask { display: none; } }

/* --------------------------------------------------------- 滚动进场动画 */
[data-rv] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-rv].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-rv] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
