/* ==========================================================================
   德昌矿机 · 页面级组件（内页 / 产品详情 / 解决方案 / 落地页）
   依赖 tokens.css + main.css，勿在此重定义基础令牌
   ========================================================================== */

/* ---------- 本地演示提示条（上线前删除 .demo-bar 整块） ---------- */
.demo-bar {
  background: var(--amber-50);
  border-bottom: 1px solid rgba(232,163,61,.45);
  color: #7a4e08;
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  letter-spacing: .02em;
}
.demo-bar .wrap { display: flex; align-items: center; gap: var(--sp-3); min-height: 34px; flex-wrap: wrap; }
.demo-bar b { color: #6b4407; }
.demo-bar__close { margin-left: auto; padding: .2rem .5rem; border: 1px solid rgba(122,78,8,.35); border-radius: var(--r-1); font-size: var(--fs-xs); }
.demo-bar__close:hover { background: rgba(232,163,61,.2); }

/* ---------- 内页页头（深色带宽，克制） ---------- */
.phead { background: var(--ink-950); color: #fff; position: relative; overflow: hidden; }
.phead--plain { background: linear-gradient(120deg, var(--ink-950) 0%, var(--ink-800) 100%); }
.phead .wrap { position: relative; z-index: 1; padding-block: clamp(2.5rem, 1.6rem + 4vw, 4.5rem) clamp(2.5rem, 1.6rem + 4vw, 4rem); }
.phead h1 { font-size: var(--fs-h1); letter-spacing: -.025em; max-width: 26ch; }
.phead__lead { margin-top: var(--sp-4); color: var(--steel-300); max-width: 66ch; font-size: clamp(1rem, .96rem + .3vw, 1.12rem); }
.phead__facts { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }
.phead__fact {
  font-family: var(--font-mono); font-size: var(--fs-xs);
  border: 1px solid rgba(255,255,255,.2); padding: .3rem .65rem; border-radius: var(--r-1); color: var(--steel-200);
}
.phead__bg { position: absolute; inset: 0; }
.phead__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .22; }
.phead__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,19,34,.95) 12%, rgba(7,19,34,.55) 70%, rgba(7,19,34,.35) 100%); }

/* ---------- 面包屑 ---------- */
.crumb { border-bottom: var(--hairline); background: var(--paper); }
.crumb .wrap { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; min-height: 46px; font-size: var(--fs-xs); color: var(--c-text-muted); font-family: var(--font-mono); }
.crumb a:hover { color: var(--copper-600); }
.crumb span[aria-hidden] { opacity: .45; }
.crumb .is-here { color: var(--c-text); font-weight: 600; }

/* ---------- 通用小组件 ---------- */
.kvs { border-top: var(--hairline); }
.kv { display: grid; grid-template-columns: 11rem minmax(0,1fr); gap: var(--sp-4); padding: .8rem 0; border-bottom: var(--hairline); font-size: var(--fs-sm); }
.kv dt { color: var(--c-text-muted); }
.kv dd { margin: 0; }
.kv dd.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .kv { grid-template-columns: minmax(0,1fr); gap: .15rem; } }

.note {
  border-left: 3px solid var(--copper-500); background: var(--copper-50);
  padding: var(--sp-4) var(--sp-5); font-size: var(--fs-sm); color: #7a3a13; border-radius: 0 var(--r-1) var(--r-1) 0;
}
.note--amber { border-left-color: var(--amber-500); background: var(--amber-50); color: #7a4e08; }
.note--steel { border-left-color: var(--steel-400); background: var(--steel-50); color: var(--steel-800); }
.note b { font-weight: 700; }
.on-dark .note { background: rgba(255,255,255,.06); color: var(--steel-200); }

/* ---------- 数据表（参数表） ---------- */
.table-scroll { overflow-x: auto; border: var(--hairline); border-radius: var(--r-1); background: var(--paper); }
table.spec { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 640px; }
table.spec caption { text-align: left; padding: var(--sp-4) var(--sp-5); font-size: var(--fs-xs); font-family: var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--steel-500); border-bottom: var(--hairline); }
table.spec th, table.spec td { padding: .7rem var(--sp-4); border-bottom: var(--hairline); text-align: left; white-space: nowrap; }
table.spec thead th { background: var(--steel-50); font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; color: var(--steel-800); position: sticky; top: 0; }
table.spec tbody tr:hover { background: var(--steel-50); }
table.spec tbody tr:last-child td { border-bottom: 0; }
table.spec td:first-child { font-weight: 600; }

/* ---------- 产品详情 ---------- */
.detail { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: start; }
@media (max-width: 900px) { .detail { grid-template-columns: minmax(0,1fr); } }
.detail__media { border: var(--hairline); border-radius: var(--r-1); background: var(--steel-50); overflow: hidden; }
.detail__media img { width: 100%; }
.detail__thumbs { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.detail__thumbs span { flex: 1; aspect-ratio: 4/3; border: var(--hairline); border-radius: var(--r-1); background: var(--steel-50); display: grid; place-items: center; font-size: var(--fs-xs); color: var(--steel-400); font-family: var(--font-mono); }
.detail h1 { font-size: var(--fs-h1); letter-spacing: -.025em; }
.detail__en { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--steel-500); margin-top: var(--sp-2); }
.detail__brief { margin-top: var(--sp-5); padding: var(--sp-4) var(--sp-5); background: var(--steel-50); border-left: 3px solid var(--ink-800); font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--steel-800); }

/* ---------- 产品列表卡（紧凑型，用于分类页/筛选结果） ---------- */
.plist { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--sp-5); }
@media (max-width: 980px) { .plist { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px) { .plist { grid-template-columns: minmax(0,1fr); } }
.pcard { display: grid; grid-template-columns: 108px minmax(0,1fr); gap: var(--sp-4); align-items: center;
  border: var(--hairline); border-radius: var(--r-1); background: var(--paper); padding: var(--sp-4);
  transition: border-color var(--t), box-shadow var(--t); }
.pcard:hover { border-color: var(--steel-300); box-shadow: var(--sh-2); }
.pcard__img { aspect-ratio: 4/3; background: var(--steel-50); border-radius: var(--r-1); overflow: hidden; }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; }
.pcard__name { font-weight: 600; font-size: .98rem; }
.pcard__brief { font-size: var(--fs-xs); color: var(--c-text-muted); margin-top: .25rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__go { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--copper-600); margin-top: .4rem; display: inline-block; }

/* ---------- 静态筛选条（演示用，无后端） ---------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-6); align-items: center; padding: var(--sp-4) var(--sp-5); border: var(--hairline); border-radius: var(--r-1); background: var(--steel-50); }
.filters__g { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.filters__l { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .1em; color: var(--steel-500); text-transform: uppercase; }
.filters__i { font-size: var(--fs-xs); padding: .3rem .65rem; border: 1px solid var(--c-border); border-radius: var(--r-1); background: var(--paper); }
.filters__i.is-on { background: var(--ink-800); border-color: var(--ink-800); color: #fff; }

/* ---------- 方案页：结构段 ---------- */
.seg { border-top: var(--hairline); padding-top: var(--sp-5); margin-top: var(--sp-7); }
.seg:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.seg__n { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .14em; color: var(--copper-600); font-weight: 700; }
.seg h2 { font-size: var(--fs-h2); margin-top: var(--sp-2); }
.seg h3 { font-size: var(--fs-h3); margin-top: var(--sp-6); }
.seg p { margin-top: var(--sp-4); }

.bullets { display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }
.bullets li { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: var(--sp-3); font-size: var(--fs-sm); color: var(--steel-800); }
.bullets li::before { content: ""; width: 7px; height: 7px; margin-top: .55rem; background: var(--copper-500); border-radius: 50%; }

/* 工艺流程图（横向 5 步，复用 .flow 令牌但独立命名以便方案页加长） */
.flowline { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); border: var(--hairline); border-radius: var(--r-1); overflow: hidden; margin-top: var(--sp-6); background: var(--paper); }
.flowline__s { padding: var(--sp-5) var(--sp-4); border-right: var(--hairline); position: relative; }
.flowline__s:last-child { border-right: 0; }
.flowline__s::after { content: "▸"; position: absolute; right: -8px; top: 50%; transform: translateY(-50%); color: var(--copper-500); font-size: .8rem; background: var(--paper); z-index: 1; }
.flowline__s:last-child::after { display: none; }
.flowline__n { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--copper-600); font-weight: 700; letter-spacing: .12em; }
.flowline__s h3 { font-size: .95rem; margin-top: var(--sp-2); }
.flowline__s p { font-size: var(--fs-xs); color: var(--c-text-muted); margin-top: var(--sp-2); line-height: 1.6; }
@media (max-width: 900px) { .flowline { grid-template-columns: repeat(2, minmax(0,1fr)); } .flowline__s { border-bottom: var(--hairline); } .flowline__s:nth-child(2n)::after { display: none; } }
@media (max-width: 520px) { .flowline { grid-template-columns: minmax(0,1fr); } .flowline__s::after { display: none; } }

/* 案例卡（参数标签式，照黎明重工逻辑） */
.case { border: var(--hairline); border-left: 3px solid var(--ink-800); border-radius: 0 var(--r-1) var(--r-1) 0; background: var(--paper); padding: var(--sp-5); }
.case__title { font-weight: 700; font-size: 1rem; }
.case__loc { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--steel-500); margin-top: .2rem; }
.case__tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: var(--sp-3); }
.case__desc { font-size: var(--fs-sm); color: var(--c-text-muted); margin-top: var(--sp-3); }
.case--placeholder { border-left-color: var(--amber-500); background: var(--amber-50); }
.case--placeholder .case__title { color: #7a4e08; }

/* ---------- 落地页（移动端优先，窄版心） ---------- */
.lp { max-width: 720px; margin-inline: auto; padding-inline: var(--gutter); }
.lp-hero { background: var(--ink-950); color: #fff; padding-block: var(--sp-7) var(--sp-8); position: relative; overflow: hidden; }
.lp-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .3; }
.lp-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--ink-950) 6%, rgba(7,19,34,.7) 60%); }
.lp-hero > * { position: relative; z-index: 1; }
.lp-hero h1 { font-size: clamp(1.7rem, 1.2rem + 3vw, 2.6rem); letter-spacing: -.02em; }
.lp-hero p { color: var(--steel-300); margin-top: var(--sp-4); }
.lp-badge { display: inline-block; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--copper-400); border: 1px solid rgba(245,119,68,.45); border-radius: var(--r-pill); padding: .3rem .75rem; margin-bottom: var(--sp-4); }
.lp-form { border: var(--hairline); border-radius: var(--r-1); background: var(--paper); padding: var(--sp-5); box-shadow: var(--sh-2); }
.lp-form h2 { font-size: var(--fs-h3); }
.lp-field { margin-top: var(--sp-4); }
.lp-field label { display: block; font-size: var(--fs-xs); color: var(--c-text-muted); margin-bottom: .35rem; font-family: var(--font-mono); letter-spacing: .06em; }
.lp-field input, .lp-field select, .lp-field textarea {
  width: 100%; padding: .7rem .85rem; font: inherit; font-size: var(--fs-sm);
  border: 1px solid var(--c-border); border-radius: var(--r-1); background: var(--paper); color: var(--c-text);
}
.lp-field input:focus, .lp-field select:focus, .lp-field textarea:focus { outline: 2px solid var(--copper-500); outline-offset: 1px; border-color: transparent; }
.lp-form .btn { width: 100%; margin-top: var(--sp-5); }
.lp-trust { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); font-size: var(--fs-xs); color: var(--c-text-muted); }
.lp-trust span::before { content: "✓ "; color: var(--copper-600); font-weight: 700; }
.lp-callbar { position: fixed; inset: auto 0 0; z-index: 90; background: var(--ink-900); border-top: 1px solid rgba(255,255,255,.16); padding-bottom: env(safe-area-inset-bottom); }
.lp-callbar__in { max-width: 720px; margin-inline: auto; display: grid; grid-template-columns: 1.4fr 1fr; }
.lp-callbar a { display: grid; place-items: center; padding: .85rem .5rem; font-weight: 600; font-size: var(--fs-sm); }
.lp-callbar a:first-child { background: var(--c-accent); color: #fff; }
.lp-callbar a:last-child { color: #fff; }
body.has-lp-callbar { padding-bottom: 56px; }

/* ---------- 站点地图 / 列表页 ---------- */
.smap { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--sp-7); }
@media (max-width: 800px) { .smap { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .smap { grid-template-columns: minmax(0,1fr); } }
.smap h3 { font-size: var(--fs-h3); margin-bottom: var(--sp-4); padding-bottom: var(--sp-3); border-bottom: var(--hairline); }
.smap li { margin-bottom: .6rem; font-size: var(--fs-sm); }
.smap a:hover { color: var(--copper-600); }

/* ---------- 步骤 / 时间线 ---------- */
.steps { display: grid; gap: var(--sp-5); counter-reset: st; }
.step { display: grid; grid-template-columns: 46px minmax(0,1fr); gap: var(--sp-5); }
.step__n { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--c-border); border-radius: var(--r-1); font-family: var(--font-mono); font-weight: 700; color: var(--ink-800); background: var(--paper); }
.step h3 { font-size: var(--fs-h3); }
.step p { margin-top: var(--sp-2); color: var(--c-text-muted); font-size: var(--fs-sm); }

/* ---------- 资质占位卡 ---------- */
.certs { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--sp-5); }
@media (max-width: 900px) { .certs { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .certs { grid-template-columns: minmax(0,1fr); } }
.cert { border: 1px dashed var(--steel-300); border-radius: var(--r-1); background: var(--steel-50); aspect-ratio: 3/4; display: grid; place-content: center; text-align: center; padding: var(--sp-4); gap: .35rem; }
.cert b { font-size: var(--fs-sm); }
.cert span { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--steel-500); }

/* ---------- 图集占位 ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--sp-4); }
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.gallery figure { margin: 0; border: var(--hairline); border-radius: var(--r-1); overflow: hidden; background: var(--paper); }
.gallery img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.gallery figcaption { padding: .6rem .8rem; font-size: var(--fs-xs); color: var(--c-text-muted); border-top: var(--hairline); }
.gallery .is-empty { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--steel-50); font-size: var(--fs-xs); color: var(--steel-400); font-family: var(--font-mono); }

/* ---------- 双栏内容布局（侧栏） ---------- */
.with-side { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: start; }
@media (max-width: 960px) { .with-side { grid-template-columns: minmax(0,1fr); } }
.side { position: sticky; top: 88px; border: var(--hairline); border-radius: var(--r-1); background: var(--paper); padding: var(--sp-5); }
@media (max-width: 960px) { .side { position: static; } }
.side h3 { font-size: .98rem; }
.side__list { margin-top: var(--sp-4); }
.side__list a { display: block; padding: .5rem 0; border-bottom: var(--hairline); font-size: var(--fs-sm); color: var(--steel-800); }
.side__list a:hover { color: var(--copper-600); }
.side__list li:last-child a { border-bottom: 0; }
