/* ============================================================
   GinmM — 站点样式表
   所有可调项集中在 :root，改这里等于改全站。
   ============================================================ */

/* ============================================================
   自托管字体：IBM Plex Sans / IBM Plex Mono
   许可 SIL Open Font License 1.1，可免费商用、可自托管、可修改。
   只包含拉丁字符集（约 100KB），中文不托管，走访问者系统字体。
   注意：字体 url 必须带 ?sharecode=，否则线上会被服务端拒绝。
   ============================================================ */
@font-face {
  font-family: "Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/plex-sans-400.woff2?sharecode=K3G3PVJI3D") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/plex-sans-500.woff2?sharecode=K3G3PVJI3D") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/plex-sans-600.woff2?sharecode=K3G3PVJI3D") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/plex-mono-400.woff2?sharecode=K3G3PVJI3D") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/plex-mono-500.woff2?sharecode=K3G3PVJI3D") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* 颜色 */
  --bg:          #ffffff;
  --bg-soft:     #f6f7f8;
  --ink:         #12141a;
  --ink-soft:    #565c68;
  --ink-faint:   #9aa0ab;
  --line:        #e6e7e9;
  --accent:      #142440;
  --accent-hover: #24406e;
  --accent-deep: #0b1626;

  /* 字体：拉丁字符用自托管 IBM Plex（可商用），中文与缺字回退到系统字体。
     换字体只需替换 assets/fonts/ 下的 woff2 与上面 @font-face，再改这两行。 */
  --font-sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* 交互节奏：全站过渡时长与缓动，改这里等于改所有 hover / 动画手感 */
  --dur:      0.2s;
  --dur-slow: 0.32s;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* 字号 */
  --fs-display: clamp(2.3rem, 6vw, 4rem);
  --fs-h1:      clamp(1.9rem, 4vw, 2.8rem);
  --fs-h2:      clamp(1.25rem, 2.2vw, 1.6rem);
  --fs-body:    16px;
  --fs-small:   13.5px;

  /* 版心与节奏 */
  --page:        1120px;
  --gutter:      24px;
  --section-gap: clamp(56px, 7vw, 96px);
  --radius:      0;        /* 区块圆角：0 = 直角 */
  --radius-pill: 0;        /* 按钮 / 指示点圆角：0 = 直角 */
  --media-ratio: 7 / 5;   /* 产品图比例：轮播图与详情主图共用 */
  --header-h:    66px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 { font-weight: 500; margin: 0; }
p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}

.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav a {
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--ink); }

.nav a.nav-cta {
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav a.nav-cta:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* ---------- 页头右侧：搜索 + 导航 ---------- */
.header-right {
  display: flex;
  align-items: center;
  gap: 26px;
  min-width: 0;
}

.nav-search {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 3px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  transition: border-color var(--dur) var(--ease);
}
.nav-search:focus-within { border-color: var(--accent); }
.nav-search input[type="search"] {
  width: clamp(76px, 15vw, 132px);
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  transition: width var(--dur) var(--ease);
}
.nav-search input[type="search"]::placeholder { color: var(--ink-faint); }
.nav-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.nav-search:focus-within input[type="search"] { width: clamp(110px, 20vw, 190px); }
.nav-search button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-search button:hover { color: var(--ink); background: var(--bg-soft); }

/* ---------- 分类维度切换（两种分类方式平行） ---------- */
.dim-switch {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 18px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}
.dim-switch[hidden] { display: none; }
.dim-switch button {
  padding: 6px 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.dim-switch button:hover { color: var(--ink); }
.dim-switch button.is-on {
  background: var(--accent);
  color: #fff;
}

/* 维度切换条：产品页放在轮播之上，先选维度再看轮播 */
.dim-bar {
  padding-top: clamp(18px, 2.6vw, 28px);
}
.dim-bar .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.dim-bar-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.dim-bar .dim-switch { margin-bottom: 0; }

/* 轮播上方的范围说明，随维度变化 */
.carousel-cap {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}

/* ---------- 区块骨架 ---------- */
.section {
  padding-block: var(--section-gap);
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.section-head h2 {
  font-size: var(--fs-h2);
  letter-spacing: -0.015em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 20px;
}

.link-arrow {
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
.link-arrow:hover { color: var(--accent); }

/* ---------- 按钮 ----------
   三类按钮共用一套颜色插槽，hover 规则只写一次：
     浅色（默认） 透明底 → 主色填充 + 白字
     深色（primary） 主色底 → 亮一档主色
     深底描边（on-dark） 透明白字 → 白填充 + 主色字
   改颜色只动 :root，改交互只动下面的变量。
   想新增一种按钮，复制一组插槽值即可，不用再写 hover 规则。 */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line);
  --btn-bg-hover: var(--accent);
  --btn-fg-hover: #fff;
  --btn-bd-hover: var(--accent);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding-inline: 24px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-pill);
  font-size: 14px;
  text-decoration: none;
  color: var(--btn-fg);
  background: var(--btn-bg);
  cursor: pointer;
  transition: background var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.btn:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-fg-hover);
  border-color: var(--btn-bd-hover);
}

.btn-primary {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  --btn-bd: var(--accent);
  --btn-bg-hover: var(--accent-hover);
  --btn-fg-hover: #fff;
  --btn-bd-hover: var(--accent-hover);
}

.btn-on-dark {
  --btn-bg: transparent;
  --btn-fg: #fff;
  --btn-bd: rgba(255, 255, 255, 0.45);
  --btn-bg-hover: #fff;
  --btn-fg-hover: var(--accent);
  --btn-bd-hover: #fff;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  padding-block: clamp(64px, 11vh, 120px) clamp(52px, 8vh, 88px);
}

.hero-title {
  font-size: var(--fs-display);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
  max-width: 18ch;
}

.hero-sub {
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- 首页浮动介绍卡（可拖动） ----------
   默认贴在首屏右侧空白处：首屏文字都在左侧（标题 18ch、副标题 52ch），
   右侧这块空间在 760px 以上一定是空的，所以不会挡住任何现有文字。
   往下滚动它会跟着首屏一起离开，不压后面的分类卡。 */
.intro-card {
  position: absolute;
  z-index: 20;
  top: clamp(18px, 5vh, 56px);
  right: max(24px, calc((100% - var(--page)) / 2 + 8px));
  width: clamp(224px, 18vw, 262px);
  min-height: 244px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 44px -30px rgba(18, 20, 26, 0.45);
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  /* 只动位置不动透明度：万一动画没跑起来，卡片也照样看得见 */
  animation: intro-in 0.5s var(--ease) 0.1s;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
@keyframes intro-in {
  from { transform: translateY(10px); }
  to { transform: none; }
}
.intro-card:hover { border-color: var(--ink-faint); }
.intro-card.is-dragging {
  cursor: grabbing;
  border-color: var(--accent);
  box-shadow: 0 28px 56px -28px rgba(18, 20, 26, 0.55);
}
.intro-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.intro-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.intro-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.intro-grip {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--ink-faint);
  background-image: radial-gradient(currentColor 1.1px, transparent 1.2px);
  background-size: 6px 6px;
  background-position: 1px 1px;
  opacity: 0.85;
}
.intro-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.intro-text {
  font-size: 12.8px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.intro-hint {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity: 0.75;
}
.intro-card.is-moved .intro-hint { visibility: hidden; }

/* 窄屏没有右侧空位：改成首屏正文下方的一块，不再浮着 */
@media (max-width: 780px) {
  .intro-card {
    position: static;
    width: auto;
    min-height: 0;
    margin: 28px var(--gutter) 0;
    cursor: default;
    touch-action: auto;
    box-shadow: none;
  }
  .intro-grip, .intro-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-card { animation: none; }
}

/* ---------- 分类卡 ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 148px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: var(--bg);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cat-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.cat-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

.cat-card h3 {
  font-size: 18px;
  letter-spacing: -0.01em;
  margin-top: 14px;
}

.cat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}

.cat-card .arrow {
  transition: transform var(--dur) var(--ease);
}
.cat-card:hover .arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* ---------- 联系区 ---------- */
/* ---------- 首页底部联系条 ---------- */
.contact-band {
  background: var(--accent-deep);
  color: #fff;
  border-top: none;
}

.contact-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 44px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}
.contact-bar a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  transition: border-color var(--dur) var(--ease);
}
.contact-bar a:hover { border-color: #fff; }

/* ---------- 询盘页 ---------- */
.contact-page {
  padding-block: var(--section-gap);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.contact-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.contact-note {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.contact-facts { margin: 0; border-top: 1px solid var(--line); }

.fact {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.fact dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 4px;
}
.fact dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink);
}
.fact a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease);
}
.fact a:hover { border-color: var(--accent); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 28px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--ink); }

/* ---------- 内页页头 ---------- */
.page-head {
  padding-block: clamp(44px, 7vh, 72px) clamp(32px, 5vh, 52px);
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  font-size: var(--fs-h1);
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin-bottom: 14px;
}

.page-sub {
  color: var(--ink-soft);
  font-size: 15.5px;
  max-width: 58ch;
  line-height: 1.7;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  margin-bottom: 22px;
  transition: color var(--dur) var(--ease);
}
.back:hover { color: var(--accent); }

/* ---------- 轮播 ---------- */
.carousel-block {
  padding-block: clamp(28px, 4vw, 44px) 0;
}

.carousel {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cr-bg, var(--accent-deep));
}

.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.slides::-webkit-scrollbar { display: none; }

.slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  min-height: clamp(230px, 32vw, 340px);
  padding: clamp(28px, 4.5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  color: var(--cr-title, #fff);
  text-decoration: none;
  background: var(--cr-bg, var(--accent-deep));
  position: relative;
}

.slide-num {
  position: absolute;
  top: clamp(24px, 3.4vw, 40px);
  right: clamp(24px, 3.4vw, 40px);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--cr-muted, rgba(255, 255, 255, 0.62));
}

.slide h3 {
  font-size: clamp(1.4rem, 3.2vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 22ch;
}

.slide p {
  font-size: 14.5px;
  color: var(--cr-muted, rgba(255, 255, 255, 0.78));
  max-width: 46ch;
  line-height: 1.65;
}

.slide-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--cr-title, #fff);
  margin-top: 6px;
}
.slide-cta span { transition: transform var(--dur) var(--ease); }
.slide:hover .slide-cta span { transform: translateX(4px); }

/* 产品轮播：左图右述 */
.slide-product {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  align-items: center;
  align-content: center;
  gap: clamp(22px, 4vw, 48px);
}

.slide-media {
  aspect-ratio: var(--media-ratio);
  border-radius: var(--radius);
  border: 1px solid var(--cr-media-border, rgba(255, 255, 255, 0.22));
  background: var(--cr-media-bg, rgba(255, 255, 255, 0.1));
  display: grid;
  place-items: center;
  overflow: hidden;
}
.slide-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slide-code {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--cr-muted, rgba(255, 255, 255, 0.75));
}

.slide-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.slide-cat {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cr-muted, rgba(255, 255, 255, 0.62));
}

.slide-product h3 { max-width: 26ch; }

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 2px 0;
}

.carousel-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--cr-title, #fff);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.carousel-btn:hover { background: var(--cr-ctrl-hover, rgba(255, 255, 255, 0.14)); }
.carousel-btn:active { background: var(--cr-ctrl-active, rgba(255, 255, 255, 0.22)); }

.dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--cr-dot, rgba(255, 255, 255, 0.32));
  cursor: pointer;
  transition: background var(--dur) var(--ease), width var(--dur) var(--ease);
}
.dot:hover { background: var(--cr-dot-hover, rgba(255, 255, 255, 0.6)); }
.dot.is-active {
  width: 20px;
  background: var(--cr-dot-active, #fff);
}

/* ---------- 产品总览 ---------- */
.catalog {
  padding-block: var(--section-gap);
}

.catalog-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.filters {
  position: sticky;
  top: calc(var(--header-h) + 28px);
}

.filter-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}

.tree { border-top: 1px solid var(--line); }

.tree-cat > button,
.tree-sub button,
.tree-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 11px 2px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}
.tree-cat > button:hover,
.tree-sub button:hover,
.tree-all:hover { color: var(--ink); padding-left: 6px; }

.tree-cat > button[aria-expanded="true"] { color: var(--ink); }

.tree-cat .count,
.tree-sub .count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
}

.tree-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-slow) var(--ease);
}
.tree-cat.is-open .tree-sub { max-height: 420px; }

.tree-sub ul { padding-left: 14px; border-left: 1px solid var(--line); margin-left: 6px; }
.tree-sub button {
  border-bottom: none;
  padding: 8px 2px;
  font-size: 13.5px;
}

.tree button.is-current,
.tree-cat > button.is-current {
  color: var(--accent);
  font-weight: 500;
}
.tree button.is-current .count { color: var(--accent); }

.results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}

.results-head h2 {
  font-size: 19px;
  letter-spacing: -0.015em;
}

.results-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}

.results-id { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }

/* 访客可选的排序：置顶永远在最前，其余按所选方式 */
.sort-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.sort-box select {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  cursor: pointer;
}
.sort-box select:hover { border-color: var(--ink-soft); }

.alt-cat {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-faint);
}
.alt-cat a { color: var(--ink-soft); }
.alt-cat a:hover { color: var(--accent); }

.search-note {
  margin: -6px 0 22px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.search-note b { color: var(--ink); font-weight: 600; }
.search-note a { color: var(--accent); }

mark {
  background: rgba(255, 208, 0, 0.34);
  color: inherit;
  padding: 0 1px;
}
.p-pin { color: var(--accent); font-size: 10px; margin-right: 3px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.p-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--bg);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.p-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.thumb {
  aspect-ratio: var(--media-ratio);
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-code {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}

.p-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.p-cat {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.p-name {
  font-size: 14.5px;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

.p-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
}

.empty {
  padding: 48px 0;
  color: var(--ink-faint);
  font-size: 14px;
}

/* ---------- 产品详情 ---------- */
.product-head {
  padding-block: clamp(28px, 4.5vh, 44px) clamp(22px, 3.5vh, 34px);
}

.product-head h1 {
  font-size: var(--fs-h1);
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin-bottom: 10px;
}

.product-main { padding-bottom: clamp(44px, 6vw, 76px); }

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: start;
}

.product-media {
  aspect-ratio: var(--media-ratio);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
}

.product-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-code {
  font-family: var(--font-mono);
  font-size: clamp(15px, 2.2vw, 22px);
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}

.product-info { padding-top: 6px; }

.info-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

.product-summary {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.78;
  max-width: 44ch;
  margin-bottom: 30px;
}

.spec-table {
  border-top: 1px solid var(--line);
  margin-bottom: 30px;
}

.spec-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 16px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}

.spec-row dt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
}

.spec-row dd {
  font-size: 13.5px;
  color: var(--ink);
}

.detail-inner { max-width: 760px; }

.detail-title {
  font-size: var(--fs-h2);
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}

.detail-body p {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.85;
  margin-bottom: 16px;
  max-width: 70ch;
}

.feature-list {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.feature-list li {
  display: flex;
  gap: 14px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.feature-list li::before {
  content: "—";
  color: var(--ink-faint);
  font-family: var(--font-mono);
  flex: none;
}

@media (max-width: 860px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .detail-inner { max-width: none; }
  .spec-row { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ---------- 入场动画 ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .cat-card:hover, .p-card:hover { transform: none; }
}

/* ============================================================
   移动端适配
   断点：900 表格转单列 / 720 页头折两行 / 640 紧凑排版 / 420 极窄
   原则：只改布局与触控尺寸，不改颜色和内容；桌面端完全不受影响。
   ============================================================ */

/* 触屏设备没有真 hover：取消位移与高亮残留，避免点完卡片卡在悬停态 */
@media (hover: none) {
  .cat-card:hover,
  .p-card:hover { transform: none; }
  .tree-cat > button:hover,
  .tree-sub button:hover,
  .tree-all:hover { padding-left: 2px; color: var(--ink-soft); }
  .link-arrow:hover { color: var(--ink-soft); }
}

/* 筛选折叠条：只在窄屏出现，桌面端完全不渲染 */
.filter-toggle { display: none; }

/* ---------- ≤900px：产品总览改单列，分类树收成一行折叠条 ---------- */
@media (max-width: 900px) {
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .filters { position: static; }
  .tree { border-top: none; }
  .filter-title { display: none; }

  .filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    background: var(--bg);
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .filter-toggle-mark {
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--ink-faint);
    transition: transform var(--dur) var(--ease);
  }
  .filter-toggle[aria-expanded="true"] .filter-toggle-mark { transform: rotate(45deg); }

  /* 折叠态：只剩一行入口，产品网格紧跟上 */
  .filters.is-collapsed .tree { display: none; }
  .filters.is-collapsed { margin-bottom: 4px; }
}

/* ---------- ≤720px：页头折两行（品牌 + 导航 / 整行搜索框） ---------- */
@media (max-width: 720px) {
  .header-inner {
    height: auto;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding-block: 9px;
  }
  /* 让搜索与导航成为页头的直接子项，才能各占一行 */
  .header-right { display: contents; }

  .brand { order: 1; }

  .nav {
    order: 2;
    margin-left: auto;
    gap: 18px;
  }
  .nav a {
    font-size: 13px;
    padding-block: 7px;
    -webkit-tap-highlight-color: transparent;
  }
  /* 窄屏收起 CTA：Contact 已在导航里，避免挤成两行 */
  .nav a.nav-cta { display: none; }

  .nav-search {
    order: 3;
    flex: 1 1 100%;
    height: 40px;
    padding: 0 4px 0 14px;
  }
  .nav-search input[type="search"],
  .nav-search:focus-within input[type="search"] {
    flex: 1 1 auto;
    width: auto;
    /* 16px 是 iOS 的临界值，小于它聚焦时页面会被自动放大 */
    font-size: 16px;
  }
  .nav-search button { width: 34px; height: 34px; }

  /* 轮播：单列纵向排列，图片在上文字在下 */
  .slide-product {
    grid-template-columns: 1fr;
    gap: 18px;
    align-content: start;
  }
  .slide-num { position: static; order: -1; }
  .slide-product h3 { max-width: none; }
  .slide { padding: 22px 20px 24px; }

  /* 轮播左右箭头加大到 44px，方便拇指点按 */
  .carousel-btn { width: 44px; height: 44px; font-size: 17px; }
}

/* ---------- ≤640px：整体收紧节奏与字号 ---------- */
@media (max-width: 640px) {
  :root {
    --gutter: 18px;
    --section-gap: 48px;
    --header-h: 56px;
  }
  .hero { padding-block: clamp(44px, 9vh, 72px) clamp(36px, 6vh, 56px); }
  .hero-sub { font-size: 15.5px; }
  .page-sub { font-size: 15px; }
  .section-head { margin-bottom: 24px; gap: 10px 16px; }

  .dim-bar .wrap { gap: 10px 12px; }
  .dim-switch button { padding: 6px 12px; font-size: 12.5px; }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
  }
  .p-body { padding: 12px 12px 14px; }
  .p-name { font-size: 13.5px; }
  .p-cat { font-size: 10px; letter-spacing: 0.08em; }

  .results-head { gap: 10px 16px; }
  .contact-bar { gap: 8px 20px; font-size: 12.5px; }
  .spec-row { grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
  .fact { grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
  .detail-body p { font-size: 15px; line-height: 1.8; }
}

/* ---------- ≤420px：极窄屏（iPhone SE / 小屏安卓） ---------- */
@media (max-width: 420px) {
  .brand { font-size: 17px; }
  .nav { gap: 14px; }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .btn { height: 44px; padding-inline: 18px; font-size: 13.5px; }
  .hero-actions { gap: 10px; }
  .slide { padding: 18px 16px 20px; }
  .dim-switch { width: 100%; justify-content: space-between; }
  .dim-switch button { flex: 1 1 auto; padding-inline: 10px; }
}

/* 长型号 / 长单词不撑破卡片 */
.p-name, .p-code, .slide h3, .slide p, .detail-body p,
.cat-card h3, .spec-row dd, .fact dd { overflow-wrap: break-word; }

/* iOS 横竖屏切换时不要自作主张放大字号 */
html { -webkit-text-size-adjust: 100%; }
