/* ==========================================================================
   SEIMEC Motor Configurator — original layout
   ========================================================================== */

:root {
  --accent: #1f6feb;
  --accent-dark: #1558c4;
  --accent-soft: rgba(31, 111, 235, .10);
  --ink: #161a1f;
  --ink-2: #2b3440;
  --muted: #6b7684;
  --muted-2: #98a2b0;
  --line: #e3e8ef;
  --line-2: #eef2f7;
  --bg: #f5f7fa;
  --surface: #fff;
  --ok: #15803d;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 8px 28px rgba(16, 24, 40, .08);
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC",
          "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --topbar-h: 78px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 108px;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }

.empty { padding: 60px 20px; text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1240px; height: 100%; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.brand-logo { height: 38px; width: auto; }
.brand-name {
  font-size: 10px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}
.lang-switch {
  display: flex; align-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px;
  background: #fff;
}
.lang-switch button {
  border: 0; background: transparent; cursor: pointer;
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  transition: background .15s, color .15s;
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  background:
    radial-gradient(720px 260px at 88% -30%, rgba(31, 111, 235, .16), transparent 70%),
    linear-gradient(180deg, #ffffff, #f2f6fc);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(22, 26, 31, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 26, 31, .035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, transparent, #000 40%, #000 70%, transparent);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1240px; margin: 0 auto; padding: 44px 28px 38px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px;
}
.hero-copy h1 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; color: var(--ink); }
.hero-copy p { margin: 14px 0 0; max-width: 56ch; color: var(--muted); font-size: 15px; }
.hero-stats { display: flex; gap: 30px; flex: 0 0 auto; }
.hero-stats .stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stats b { font-size: 26px; line-height: 1.1; color: var(--ink); }
.hero-stats span { font-size: 11.5px; color: var(--muted-2); letter-spacing: .04em; }

/* --------------------------------------------------------------- stepper */

.stepper-wrap {
  position: sticky; top: var(--topbar-h); z-index: 30;
  background: rgba(245, 247, 250, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.stepper {
  position: relative;
  max-width: 1240px; margin: 0 auto; padding: 14px 28px 12px;
}
.stepper-track {
  position: absolute; left: 40px; right: 40px; top: 32px; height: 3px;
  background: #dde4ee; border-radius: 3px; overflow: hidden;
}
.stepper-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s ease; }
.stepper-items { position: relative; display: flex; justify-content: space-between; gap: 2px; }
.step {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  flex: 1 1 0; min-width: 0;
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--muted-2);
}
.step-index {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; border: 2px solid #d7dfe9;
  font-size: 13px; font-weight: 700; color: var(--muted);
  transition: all .18s;
}
.step-label {
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.step[data-state="active"] .step-index {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.step[data-state="active"] .step-label { color: var(--ink); }
.step[data-state="done"] .step-index {
  background: #fff; border-color: var(--accent); color: var(--accent);
}
.step[data-state="done"] .step-label { color: var(--ink-2); }
.step:hover .step-index { border-color: var(--accent); }

/* ------------------------------------------------------------------ main */

.main { max-width: 1240px; margin: 0 auto; padding: 34px 28px 10px; }
.stage { min-height: 46vh; }

.step-head { margin-bottom: 26px; }
.step-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.step-title { font-size: clamp(22px, 2.2vw, 30px); color: var(--ink); }
.step-hint { margin: 8px 0 0; color: var(--muted); font-size: 14px; }


/* 步骤示意图 */
.stage-figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin: 0 0 26px; max-width: 900px;
}
.stage-figure {
  margin: 0; text-align: center; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}
.stage-figure img { width: 100%; max-height: 240px; object-fit: contain; }
.stage-figure figcaption { font-size: 11.5px; color: var(--muted-2); margin-top: 8px; }

/* 选项卡片 */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.tile {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0; overflow: hidden; cursor: pointer; text-align: left;
  color: inherit;
  transition: border-color .18s, box-shadow .18s, transform .18s;
  box-shadow: var(--shadow-sm);
}
.tile:hover { border-color: #b9c6d8; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tile[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tile-media {
  display: grid; place-items: center;
  background: linear-gradient(180deg, #f7f9fc, #eef3f9);
  padding: 18px 16px; min-height: 168px;
}
.tile-media img { height: 142px; width: auto; max-width: 100%; object-fit: contain; }
.tile-body { display: flex; flex-direction: column; gap: 7px; padding: 16px 18px 18px; }
.tile-title { font-size: 16.5px; font-weight: 700; color: var(--ink); }
.tile-desc { font-size: 12.8px; color: var(--muted); line-height: 1.6; }
.tile-cta {
  margin-top: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent); opacity: 0; transform: translateX(-4px);
  transition: opacity .18s, transform .18s;
}
.tile:hover .tile-cta, .tile[aria-pressed="true"] .tile-cta { opacity: 1; transform: none; }


/* 机座号等纯文字选项：紧凑网格 */
.tiles-compact { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.tiles-compact .tile-media { display: none; }
.tiles-compact .tile-body { padding: 14px 14px 16px; gap: 4px; }
.tiles-compact .tile-title { font-size: 15px; }
.tiles-compact .tile-cta { display: none; }
.tiles-compact .tile:hover { transform: translateY(-1px); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 10px 16px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink);
  transition: all .16s; box-shadow: var(--shadow-sm);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-unit { margin-left: 5px; font-size: 11.5px; font-weight: 500; opacity: .65; }

/* ------------------------------------------------------------- actionbar */

.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(16, 24, 40, .06);
}
.actionbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: center; gap: 18px;
}
.actionbar-left { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.actionbar-label {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted-2);
}
.actionbar-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 58px; overflow: hidden; }
.actionbar-empty { font-size: 12.5px; color: var(--muted-2); }
.mini-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 5px 10px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); cursor: pointer;
  transition: all .15s;
}
.mini-chip:hover { border-color: var(--accent); color: var(--accent); }
.actionbar-right { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.actionbar-progress {
  font-size: 12px; font-weight: 700; color: var(--muted-2);
  font-variant-numeric: tabular-nums; margin-right: 4px;
}

/* ------------------------------------------------------------------ btn */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px;
  padding: 10px 18px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .16s, border-color .16s, transform .12s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(31, 111, 235, .25); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-light:hover { border-color: #b9c6d8; }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--ink); background: #eef2f7; }

/* ---------------------------------------------------------------- result */

.result {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-md); overflow: hidden;
  animation: fade-up .35s ease both;
}
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.result-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 26px 32px 22px;
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, #fbfcfe, #fff);
}
.result-kicker {
  font-size: 10.5px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
}
.result-code { font-size: clamp(26px, 3vw, 38px); margin-top: 6px; color: var(--ink); letter-spacing: -.02em; }
.result-sub { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.result-selection {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 14px 32px; border-bottom: 1px solid var(--line-2);
}
.selchip {
  display: inline-flex; align-items: baseline; gap: 7px;
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 12px; cursor: pointer; transition: all .15s;
}
.selchip:hover { border-color: var(--accent); }
.selchip-k { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.selchip-v { font-size: 12px; font-weight: 600; color: var(--ink); }

.result-body {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  border-bottom: 1px solid var(--line-2);
}
.result-figure {
  margin: 0; padding: 26px 32px;
  display: flex; flex-direction: column; gap: 10px; justify-content: center;
  background:
    linear-gradient(90deg, rgba(22, 26, 31, .03) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(rgba(22, 26, 31, .03) 1px, transparent 1px) 0 0 / 24px 24px,
    #fcfdff;
  border-right: 1px solid var(--line-2);
}
.result-figure img { width: 100%; max-height: 320px; object-fit: contain; }
.result-figure figcaption {
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted-2); text-align: center;
}

.result-summary { padding: 26px 32px 28px; display: flex; flex-direction: column; gap: 10px; }
.result-badge {
  align-self: flex-start; font-size: 10px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); background: var(--accent-soft);
  border-radius: 6px; padding: 4px 9px;
}
.result-summary h3 { font-size: 19px; color: var(--ink); }
.result-summary p { margin: 0; font-size: 12.8px; line-height: 1.65; color: var(--muted); }
.result-quick {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin: 10px 0 0; padding-top: 16px; border-top: 1px solid var(--line-2);
}
.result-quick dt { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.result-quick dd { margin: 3px 0 0; font-size: 15px; font-weight: 700; color: var(--ink); }

.result-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 24px 32px 30px; }
.spec-col + .spec-col { padding-left: 30px; border-left: 1px solid var(--line-2); }

.spec-block { margin-bottom: 24px; }
.spec-block h3 {
  display: flex; align-items: center; gap: 9px;
  font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.spec-block h3::before {
  content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--accent);
}
.spec-block dl { margin: 0; }
.spec-block .row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 8px 0; border-bottom: 1px solid var(--line-2);
}
.spec-block dt { font-size: 12.8px; color: var(--muted); }
.spec-block dd {
  margin: 0; font-size: 13px; font-weight: 700; color: var(--ink); text-align: right;
  font-variant-numeric: tabular-nums;
}
.spec-block .unit { font-weight: 500; color: var(--muted-2); font-size: 11px; margin-left: 4px; }
.spec-block .note { font-weight: 600; color: var(--muted-2); font-size: 10.5px; margin-left: 4px; }
.spec-block .sep { color: #c9d3df; margin: 0 4px; font-weight: 400; }

/* ----------------------------------------------------------------- toast */

.toast {
  position: fixed; left: 50%; bottom: 116px; transform: translate(-50%, 16px);
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: .22s; z-index: 90;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1020px) {
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 22px; }
  .hero-stats { gap: 26px; }
  .result-body { grid-template-columns: 1fr; }
  .result-figure { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .result-specs { grid-template-columns: 1fr; }
  .spec-col + .spec-col { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-2); padding-top: 6px; margin-top: 6px; }
}

@media (max-width: 760px) {
  :root { --topbar-h: 70px; }
  body { padding-bottom: 132px; }
  .topbar-inner, .hero-inner, .stepper, .main, .actionbar-inner { padding-left: 16px; padding-right: 16px; }
  .hero-inner { padding-top: 30px; padding-bottom: 26px; }
  .hero-copy h1 { font-size: 26px; }
  .hero-stats b { font-size: 20px; }
  .stepper-track { display: none; }
  .stepper-items { gap: 6px; overflow-x: auto; padding-bottom: 2px; }
  .step { flex: 0 0 58px; }
  .step-label { font-size: 10px; }
  .step-index { width: 30px; height: 30px; font-size: 12px; }
  .tiles { grid-template-columns: 1fr; }
  .actionbar-inner { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .actionbar-left { gap: 8px; }
  .actionbar-chips { max-height: 30px; flex-wrap: nowrap; overflow: hidden; }
  .actionbar-right { justify-content: flex-end; }
  .actionbar-progress { margin-right: auto; }
  .result-head { padding: 20px 18px 16px; }
  .result-selection { padding: 12px 18px; }
  .result-figure { padding: 18px; }
  .result-summary { padding: 20px 18px 22px; }
  .result-specs { padding: 18px 18px 22px; }
  .result-quick { grid-template-columns: 1fr 1fr; }
}

/* ------------------------------------------------------------------ print */

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; padding: 0; font-size: 11px; }
  .topbar, .hero, .stepper-wrap, .actionbar, .toast { display: none !important; }
  .main { max-width: none; padding: 0; }
  .result { border: 0; box-shadow: none; border-radius: 0; }
  .result-head { padding: 0 0 12px; }
  .result-actions { display: none; }
  .result-selection { padding: 8px 0; }
  .result-body { grid-template-columns: 1fr 1fr; }
  .result-figure { padding: 10px 12px; background: #fff; }
  .result-figure img { max-height: 230px; }
  .result-summary { padding: 10px 12px; }
  .result-specs { padding: 10px 0 0; }
  .spec-block .row { break-inside: avoid; padding: 5px 0; }
  .result-badge, .spec-block h3::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}


/* 页脚：四栏（品牌 / 公司信息 / 社交 / 消息） */
.site-footer { background:#0d1117; color:#c9d1d9; margin-top:56px; }
.footer-inner {
  max-width:1240px; margin:0 auto; padding:40px 32px 96px; display:grid;
  grid-template-columns: 200px 1.1fr 1fr 1.2fr; gap:40px; align-items:start;
}
.f-brand img { max-width:150px; max-height:54px; object-fit:contain; filter:brightness(0) invert(1); }
.f-info { display:flex; flex-direction:column; gap:6px; font-size:13px; }
.f-info strong { color:#fff; font-size:14px; letter-spacing:.04em; margin-bottom:4px; }
.f-info a { color:#9aa4b2; text-decoration:none; }
.f-info a:hover { color:#fff; }
.f-social h4, .f-msg h4 { color:#fff; font-size:14px; margin:0 0 14px; font-weight:700; }
.social-list { display:flex; flex-wrap:wrap; gap:14px; }
.social-list a {
  color:#c9d1d9; text-decoration:none; font-size:13px; padding-bottom:2px;
  border-bottom:1px solid #2b333d;
}
.social-list a:hover { color:#fff; border-color:#fff; }
.social-empty { color:#5b6673; font-size:12.5px; }
.msg-form { display:flex; gap:0; }
.msg-form input {
  flex:1; height:44px; padding:0 14px; border:1px solid #2b333d; background:#161b22;
  color:#e6edf3; border-radius:4px 0 0 4px; font-size:13px; outline:none;
}
.msg-form input::placeholder { color:#6e7781; }
.msg-form button {
  height:44px; padding:0 22px; border:none; background:#ff6a00; color:#fff;
  font-weight:800; letter-spacing:.08em; font-size:12.5px; border-radius:0 4px 4px 0; cursor:pointer;
}
.msg-form button:hover { background:#ff7d1f; }
@media (max-width: 900px) {
  .footer-inner { grid-template-columns:1fr 1fr; gap:28px; padding:32px 20px 100px; }
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns:1fr; }
}

/* 功率/转速配图：按原图尺寸显示，最大占满容器宽度 */
.stage-figures.is-art { max-width: none; grid-template-columns: 1fr; }
.stage-figure.stage-art {
  padding: 0; border: none; background: none; text-align: left;
}
.stage-figure.stage-art img {
  width: auto; height: auto; max-width: 100%; max-height: none;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  cursor: zoom-in;
}
.stage-figure.stage-art a { display: inline-block; max-width: 100%; }

.draw-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; justify-content:center; }
.draw-actions .btn { font-size: 12.5px; padding: 8px 14px; }

.stage-figures.is-art .stage-art + .stage-art { margin-top: 18px; }

/* 社交 App 图标 */
.social-list { display:flex; gap:12px; }
.social-app {
  width:44px; height:44px; padding:0; border:none; background:none;
  border-radius:12px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.social-app svg { width:44px; height:44px; display:block; }
.social-app:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.qr-layer {
  position:fixed; inset:0; z-index:999; background:rgba(6,10,15,.72);
  display:flex; align-items:center; justify-content:center;
}
.qr-box {
  background:#fff; border-radius:14px; padding:20px; width:300px; text-align:center;
  box-shadow:0 24px 60px rgba(0,0,0,.4); position:relative;
}
.qr-box h4 { margin:0 0 12px; font-size:15px; color:#0d1117; }
.qr-box img { width:240px; height:240px; object-fit:contain; }
.qr-box .btn { margin-top:14px; display:inline-block; }
.qr-close {
  position:absolute; top:6px; right:10px; border:none; background:none;
  font-size:22px; line-height:1; cursor:pointer; color:#666;
}
