/* ==========================================================================
   Rieohm 设计系统 — 工业精密风格
   主色 #ff7a00（工业橙）承载行动，深藏青 #0F172A 承载导航与高冲击区块
   中性色系保持冷调，强调工程精度而非装饰感
   ========================================================================== */

:root {
  /* 品牌 */
  --brand: #ff7a00;
  --brand-dark: #e56b00;
  --brand-light: #ff9440;
  --brand-soft: #fff4e8;

  /* 中性 / 结构 */
  --navy: #0f172a;
  --navy-2: #1e293b;
  --navy-3: #334155;
  --ink: #111827;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e2e8f0;
  --line-2: #cbd5e1;

  /* 表面 */
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --bg-3: #f1f5f9;

  /* 语义 */
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --err: #dc2626;
  --err-soft: #fef2f2;
  --info-soft: #f1f5f9;

  --radius: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;

  --shadow: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 2px 8px rgba(15, 23, 42, .07);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12);

  --wrap: 1240px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.22; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(1.85rem, 3.6vw, 2.65rem); }
h2 { font-size: clamp(1.45rem, 2.8vw, 1.95rem); }
h3 { font-size: 1.12rem; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }

/* 可见焦点态 —— 键盘可达性 */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap { width: min(var(--wrap), calc(100% - 2.5rem)); margin-inline: auto; }
.section { padding: clamp(2.75rem, 6vw, 4.5rem) 0; }
.section--alt { background: var(--bg-2); }
.section--navy { background: var(--navy); color: #e2e8f0; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy p { color: #cbd5e1; }

.section__head { margin-bottom: 2.25rem; }
.section__head p { color: var(--muted); margin: 0; max-width: 64ch; }
.section--navy .section__head p { color: #cbd5e1; }
.section__head--split {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}

.eyebrow {
  display: inline-block; font-size: .74rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); margin-bottom: .6rem;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.4rem; border-radius: var(--radius);
  font-weight: 600; font-size: .93rem; line-height: 1.25;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
  white-space: nowrap;
}
.btn:hover { box-shadow: var(--shadow-md); }
.btn:active { box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; box-shadow: none; }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }

.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-2); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-dark); }

.btn--on-navy { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .38); }
.btn--on-navy:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .08); }

.btn--sm { padding: .42rem .85rem; font-size: .84rem; }
.btn--lg { padding: .85rem 1.75rem; font-size: 1rem; }
.btn--block { width: 100%; }

/* ---------- 顶部栏与导航 ---------- */
.topbar {
  background: var(--navy); color: #94a3b8;
  font-size: .8rem; padding: .45rem 0;
}
.topbar .wrap { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; }
.topbar a { color: #cbd5e1; }
.topbar a:hover { color: var(--brand-light); }
/* 长文本（邮箱/电话）允许换行，不撑破布局 */
.topbar span { min-width: 0; overflow-wrap: anywhere; }

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(15, 23, 42, .97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 70px; }
.brand { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.brand img { height: 34px; width: auto; }
.brand__name { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; color: #fff; }

.nav__menu { display: flex; align-items: center; gap: .1rem; list-style: none; margin: 0; padding: 0; }
.nav__menu li { margin: 0; position: relative; }
.nav__menu-cta { display: none; }

.nav__menu > li > a {
  display: block; padding: .55rem .8rem; border-radius: var(--radius);
  font-size: .92rem; font-weight: 500; color: #cbd5e1;
  transition: background-color .16s ease, color .16s ease;
}
.nav__menu > li > a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav__menu > li > a.is-active { color: var(--brand-light); }

/* Products 下拉 */
.nav__menu li.has-mega > a::after {
  content: ""; display: inline-block; width: 7px; height: 7px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); margin-left: .45rem;
  opacity: .75;
}
.mega {
  position: absolute; top: 100%; left: 0; min-width: 560px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: .9rem;
  display: none; z-index: 70;
}
.has-mega:hover .mega, .has-mega:focus-within .mega { display: block; }
.mega__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .15rem; }
.mega__link {
  display: flex; align-items: center; gap: .7rem;
  padding: .5rem .6rem; border-radius: var(--radius); color: var(--ink);
}
.mega__link:hover { background: var(--bg-2); }
.mega__link img {
  width: 40px; height: 40px; object-fit: contain; flex-shrink: 0;
  background: var(--bg-2); border-radius: 4px; padding: 3px;
}
.mega__name { font-size: .88rem; font-weight: 600; line-height: 1.3; }
.mega__count { font-size: .74rem; color: var(--muted); }
.mega__foot {
  margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.mega__all { font-size: .86rem; font-weight: 600; color: var(--brand-dark); }
.mega__all:hover { color: var(--brand); }

.nav__cta { flex-shrink: 0; }

.nav__toggle {
  display: none; background: none; border: 1px solid rgba(255, 255, 255, .25);
  border-radius: var(--radius); width: 42px; height: 38px;
  cursor: pointer; padding: 0; position: relative; flex-shrink: 0;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  content: ""; position: absolute; left: 11px; width: 18px; height: 2px;
  background: #fff; transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle span { top: 17px; }
.nav__toggle span::before { top: -6px; left: 0; }
.nav__toggle span::after { top: 6px; left: 0; }

/* ---------- Hero ---------- */
.hero {
  background: var(--navy);
  color: #fff;
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  position: relative;
  overflow: hidden;
}
/* 细网格纹理 —— 暗示工程制图，不喧宾夺主 */
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 3.5rem); align-items: center;
}
.hero__copy { max-width: 640px; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero p { color: #cbd5e1; font-size: 1.05rem; margin-bottom: 1.75rem; max-width: 56ch; }
.hero .eyebrow { color: var(--brand-light); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__media {
  position: relative; z-index: 1;
  border-radius: var(--radius-xl); overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  background: var(--navy-2);
  aspect-ratio: 4 / 3;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media--empty {
  display: grid; place-items: center; text-align: center;
  color: #64748b; padding: 2rem;
  border: 1px dashed rgba(255, 255, 255, .22);
}

.page-head {
  background: var(--bg-2); border-bottom: 1px solid var(--line);
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
}
.page-head h1 { margin: 0; font-size: clamp(1.55rem, 3.2vw, 2.1rem); }
.page-head p { color: var(--muted); margin: .5rem 0 0; max-width: 68ch; }

/* ---------- 卡片 ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); }
.card__body { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: 1rem; margin: 0 0 .35rem; line-height: 1.4; }
.card__title a:hover { color: var(--brand-dark); }
.card__text { color: var(--muted); font-size: .89rem; margin: 0 0 1rem; flex: 1; }
.card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }

/* 产品图：保持原始比例，不裁切技术细节 */
.card__media {
  aspect-ratio: 4 / 3; background: var(--bg-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.card__media img { width: 100%; height: 100%; object-fit: contain; padding: .75rem; }
.card__media--empty { color: var(--muted-2); font-size: .8rem; }

/* 规格高亮条 */
.spec-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .8rem; }
.spec-chip {
  display: inline-flex; align-items: baseline; gap: .3rem;
  padding: .2rem .5rem; border-radius: 4px;
  background: var(--bg-3); border: 1px solid var(--line);
  font-size: .74rem; color: var(--ink-3);
}
.spec-chip b { font-weight: 600; color: var(--ink); }
.spec-chip span { color: var(--muted); }

.badge {
  display: inline-block; padding: .2rem .6rem; border-radius: 4px;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: .73rem; font-weight: 600; letter-spacing: .02em;
}
.badge--muted { background: var(--bg-3); color: var(--muted); }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--navy { background: var(--navy); color: #fff; }

.part-no {
  font-family: var(--font-mono);
  font-size: .78rem; color: var(--muted); font-weight: 600;
}

/* ---------- 面包屑 ---------- */
.crumbs { font-size: .84rem; color: var(--muted); padding: 1rem 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.crumbs li::after { content: "/"; margin-left: .4rem; color: var(--line-2); }
.crumbs li:last-child::after { content: ""; }
.crumbs a:hover { color: var(--brand-dark); }

/* ---------- 产品详情 ---------- */
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.75rem; align-items: start; }

/* 主图左 / 缩略图右 */
.gallery { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: .75rem; align-items: start; }
.gallery__main {
  aspect-ratio: 1 / 1; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.gallery__main img { width: 100%; height: 100%; object-fit: contain; padding: .6rem; }
.gallery__thumbs { display: flex; flex-direction: column; gap: .5rem; }
.gallery__thumb {
  aspect-ratio: 1/1; border: 2px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; background: var(--bg-2); padding: 0;
  transition: border-color .16s ease;
}
.gallery__thumb:hover { border-color: var(--line-2); }
.gallery__thumb.is-active { border-color: var(--brand); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }

/* 规格表 */
.spec-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 0; }
.spec-table th, .spec-table td { padding: .65rem .85rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th {
  width: 38%; font-weight: 600; color: var(--muted);
  background: var(--bg-2); font-size: .84rem; white-space: nowrap;
}
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table tbody tr:hover { background: var(--bg-2); }

.spec-list { list-style: none; margin: 1.25rem 0; padding: 0; }
.spec-list li {
  padding: .5rem 0; border-bottom: 1px solid var(--line);
  display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem;
}
.spec-list li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); margin-top: .58rem; flex-shrink: 0; }

/* Datasheet 链接（紧邻 Description 标题） */
.datasheet-link {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .38rem .7rem; border-radius: var(--radius);
  border: 1px solid var(--line-2); background: var(--bg);
  font-size: .82rem; font-weight: 600; color: var(--ink);
  transition: border-color .16s ease, color .16s ease;
}
.datasheet-link:hover { border-color: var(--brand); color: var(--brand-dark); }
.datasheet-link svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }

.doc-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.doc-list li { border-bottom: 1px solid var(--line); }
.doc-list li:last-child { border-bottom: 0; }
.doc-list a { display: flex; align-items: center; gap: .85rem; padding: .8rem 1rem; transition: background-color .16s ease; }
.doc-list a:hover { background: var(--bg-2); }
.doc-list .ext {
  font-size: .66rem; font-weight: 700; padding: .2rem .45rem; border-radius: 4px;
  background: var(--brand-soft); color: var(--brand-dark); flex-shrink: 0;
}
.doc-list .nm { flex: 1; min-width: 0; font-size: .89rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-list .sz { color: var(--muted-2); font-size: .77rem; flex-shrink: 0; }

/* 章节标题 + 右侧操作 */
.section-title-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem;
}
.section-title-row h2, .section-title-row h3 { margin: 0; }

.cta-band {
  background: var(--navy); color: #fff; border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 4vw, 2.75rem); text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: .5rem; }
.cta-band p { color: #cbd5e1; margin-bottom: 1.5rem; max-width: 60ch; margin-inline: auto; }
.cta-band .hero__actions { justify-content: center; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: .35rem; color: var(--ink-3); }
.field .req { color: var(--err); }
.field .opt { color: var(--muted-2); font-weight: 400; font-size: .8rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .68rem .85rem; font: inherit; font-size: .94rem;
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: #fff; color: var(--ink); transition: border-color .16s ease, box-shadow .16s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.field textarea { min-height: 125px; resize: vertical; }
.field input[type="file"] { padding: .5rem; font-size: .88rem; }
.field__hint { font-size: .79rem; color: var(--muted); margin-top: .3rem; }
.field__error { font-size: .79rem; color: var(--err); margin-top: .3rem; }
.honeypot { position: absolute; left: -9999px; opacity: 0; }

.alert { padding: .85rem 1.05rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-size: .91rem; border: 1px solid; }
.alert--ok { background: var(--ok-soft); border-color: #a7f3d0; color: #065f46; }
.alert--err { background: var(--err-soft); border-color: #fecaca; color: #991b1b; }
.alert--info { background: var(--info-soft); border-color: var(--line); color: var(--ink-3); }
.alert--warn { background: var(--warn-soft); border-color: #fde68a; color: #92400e; }

/* ---------- 信息块 ---------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.info-item { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.25rem; }
.info-item h3 { font-size: 1rem; margin-bottom: .5rem; }
.info-item p, .info-item a { margin: 0; color: var(--muted); font-size: .91rem; }
.info-item a:hover { color: var(--brand-dark); }

/* ---------- 正文排版（自然换行，绝不 break-all） ---------- */
.prose, .rich { max-width: 74ch; overflow-wrap: break-word; word-wrap: break-word; }
.prose h2, .rich h2 { margin-top: 1.75rem; }
.prose h3, .rich h3 { margin-top: 1.35rem; }
.prose ul, .prose ol, .rich ul, .rich ol { padding-left: 1.35rem; margin: 0 0 1rem; }
.prose li, .rich li { margin-bottom: .35rem; }
.prose img, .rich img { border-radius: var(--radius); margin: 1rem 0; }
.rich table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .9rem; }
.rich th, .rich td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; }
.rich th { background: var(--bg-2); font-weight: 600; }

/* ---------- 应用市场 ---------- */
.app-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.25rem; display: flex; gap: .95rem; align-items: flex-start;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.app-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); }
.app-card__icon {
  width: 42px; height: 42px; border-radius: var(--radius); flex-shrink: 0;
  background: var(--brand-soft); color: var(--brand-dark);
  display: grid; place-items: center;
}
.app-card__icon svg { width: 21px; height: 21px; fill: currentColor; }
.app-card h3 { font-size: .98rem; margin: 0 0 .3rem; }
.app-card p { font-size: .87rem; color: var(--muted); margin: 0; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--navy); color: #94a3b8; padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.5rem; margin-top: auto; }
.site-footer h4 { color: #fff; font-size: .92rem; margin-bottom: .9rem; letter-spacing: .02em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: #94a3b8; font-size: .89rem; }
.site-footer a:hover { color: var(--brand-light); }
.site-footer .small { font-size: .83rem; }
.footer-grid { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 2.25rem; margin-bottom: 2.25rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: .83rem; color: #64748b;
}
.social-row { display: flex; gap: .55rem; margin-top: 1rem; }
.social-row a {
  width: 34px; height: 34px; border-radius: var(--radius);
  background: rgba(255, 255, 255, .08); display: grid; place-items: center;
}
.social-row a:hover { background: var(--brand); color: #fff; }
.social-row svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- WhatsApp 悬浮按钮 ---------- */
.wa-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 55;
  width: 52px; height: 52px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, .38);
  transition: transform .16s ease;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 26px; height: 26px; fill: currentColor; }

/* ---------- 工具类 ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.stack > * + * { margin-top: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.text-center { text-align: center; }
.flex { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.flex--between { justify-content: space-between; }
.grid-auto-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 1rem; }

.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0 .6rem; font-size: .89rem;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand-dark); }
.pagination .is-current { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.pagination .is-disabled { color: var(--muted-2); }

.empty-state {
  text-align: center; padding: 3.5rem 1rem; color: var(--muted);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.empty-state h3 { color: var(--ink); }
.empty-state p { margin-bottom: 1.25rem; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { max-width: 560px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; gap: 1.75rem; }
  .gallery { grid-template-columns: 1fr; }
  .gallery__thumbs { flex-direction: row; flex-wrap: wrap; }
  .gallery__thumb { width: 76px; }
}

@media (max-width: 768px) {
  .nav { height: 62px; gap: .6rem; }
  .nav__toggle { display: block; order: 3; }
  .nav__cta { order: 2; padding: .45rem .7rem; font-size: .8rem; }
  .brand img { height: 28px; }
  .brand__name { font-size: 1.1rem; }
  .nav__menu {
    position: fixed; left: 0; right: 0; top: 0;
    padding: 4.5rem 1.25rem 1.5rem;
    background: var(--navy); flex-direction: column; align-items: stretch; gap: .2rem;
    box-shadow: var(--shadow-lg);
    /* 折叠时完全移出视口并禁用交互，避免残影与误触 */
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform .25s ease, visibility .25s ease;
    z-index: 100; overflow-y: auto; max-height: 100vh;
  }
  .nav__menu.is-open { transform: translateY(0); visibility: visible; }
  .nav__menu > li > a { padding: .7rem .75rem; font-size: .98rem; }
  .nav__menu-cta { display: block; margin-top: .75rem; }
  .mega {
    position: static; display: none; min-width: 0; box-shadow: none;
    border: 0; border-left: 2px solid rgba(255,255,255,.15);
    border-radius: 0; margin: .2rem 0 .2rem .75rem; padding: .25rem 0 .25rem .5rem;
    background: transparent;
  }
  .has-mega.is-open .mega { display: block; }
  .mega__grid { grid-template-columns: 1fr; }
  .mega__link { color: #cbd5e1; padding: .45rem .5rem; }
  .mega__name { color: #fff; }
  .mega__count { color: #94a3b8; }
  .mega__foot { border-top-color: rgba(255,255,255,.12); }
  .mega__all { color: var(--brand-light); }
  .topbar .wrap { justify-content: center; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .hero__actions .btn { flex: 1 1 100%; }
  .wrap { width: min(var(--wrap), calc(100% - 2rem)); }
  .wa-float { right: .9rem; bottom: .9rem; width: 48px; height: 48px; }
  .spec-table th { width: 45%; }
}

@media (max-width: 480px) {
  /* 产品卡片改两列：单列下 4 列布局放不下「详情 + 询价」两个按钮 */
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
  .grid--3 { grid-template-columns: 1fr; }
  .card__body { padding: .9rem 1rem 1rem; }
  .card__title { font-size: .94rem; }
  .card__text { font-size: .84rem; }
  /* 卡片底部按钮改为纵向排列，避免溢出 */
  .card__foot { flex-direction: column; align-items: stretch; gap: .4rem; }
  .card__foot .btn { width: 100%; }
  .hero__actions .btn { width: 100%; }
  /* 规格高亮最多两项，窄屏更紧凑 */
  .spec-chips { gap: .3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .cta-band, .btn, .wa-float, .topbar { display: none; }
  body { color: #000; }
}
