/* =========================================================
   演示交互增量样式 demo.css
   原则：只新增类名，不覆盖 style.css 既有规则；
        全部复用既有设计令牌（--blue / --orange / --line / --radius / --shadow）
   ========================================================= */

/* ---------- 缩略图（替换 .ph 占位） ---------- */
.ph > img{width:100%;height:100%;object-fit:cover;display:block}
.ph.has-img{background:#EDF2F9}
.ph.has-img::after{display:none}

/* ---------- 状态角标 ---------- */
.st-badge{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 9px;border-radius:6px;
  font-size:12px;font-weight:500;line-height:1}
.st-badge::before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}
.st-open{background:#EAF6EE;color:#2E9E5B}
.st-review{background:var(--orange-100);color:#C24A05}
.st-closed{background:#EEF1F5;color:var(--muted2)}

/* ---------- 收藏 ---------- */
.fav-btn{position:absolute;top:10px;right:10px;width:32px;height:32px;border-radius:9px;border:0;cursor:pointer;
  background:rgba(255,255,255,.9);display:flex;align-items:center;justify-content:center;
  box-shadow:0 2px 8px rgba(6,43,92,.14);transition:.2s;padding:0}
.fav-btn:hover{background:#fff;transform:translateY(-1px)}
.fav-btn svg{width:17px;height:17px;fill:none;stroke:var(--muted2);stroke-width:1.7;transition:.2s}
.fav-btn.on svg{fill:var(--orange);stroke:var(--orange)}
.inst-card{position:relative}
/* 行内变体：跟在文字旁，不做绝对定位，默认安静灰阶、hover 才出色 */
.fav-btn--inline{position:static;top:auto;right:auto;width:28px;height:28px;border-radius:8px;
  background:transparent;box-shadow:none;flex:none}
.fav-btn--inline:hover{background:var(--blue-100);transform:none}
.side-top{display:flex;align-items:center;gap:6px}

/* ---------- 排序条 ---------- */
.sortbar{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.sortbar .lb{margin-right:2px}
.sortbar button{height:28px;padding:0 12px;border-radius:7px;border:1px solid var(--line);background:#fff;
  font:inherit;font-size:13px;color:var(--muted);cursor:pointer;transition:.2s}
.sortbar button:hover{color:var(--blue);border-color:var(--blue)}
.sortbar button.active{background:var(--blue-100);border-color:var(--blue);color:var(--blue);font-weight:600}

/* ---------- 空结果 ---------- */
.empty{background:#fff;border:1px dashed var(--line);border-radius:var(--radius);padding:56px 24px;text-align:center}
.empty .ico{width:56px;height:56px;margin:0 auto 14px;border-radius:16px;background:var(--blue-100);
  display:flex;align-items:center;justify-content:center}
.empty .ico svg{width:26px;height:26px;stroke:var(--blue);fill:none;stroke-width:1.6}
.empty h4{font-size:16px;font-weight:600;color:var(--ink)}
.empty p{font-size:13px;color:var(--muted);margin-top:8px}
.empty .btn{margin-top:18px}

/* ---------- 检索中提示 ---------- */
.result-head .kw{color:var(--blue);font-weight:600}
.clear-filter{margin-left:10px;font-size:12px;color:var(--muted2);cursor:pointer;border:0;background:none;
  font-family:inherit;text-decoration:underline}
.clear-filter:hover{color:var(--orange)}

/* =========================================================
   仪器详情页
   ========================================================= */
.dt-layout{display:grid;grid-template-columns:1fr 380px;gap:28px;align-items:start;padding:32px 0 56px}
.dt-panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);padding:26px}
.dt-panel + .dt-panel{margin-top:22px}
.dt-panel h3{font-size:16px;font-weight:600;color:var(--ink);margin-bottom:16px;
  display:flex;align-items:center;gap:9px}
.dt-panel h3::before{content:"";width:4px;height:15px;border-radius:2px;background:var(--blue)}

/* 图集 */
.dt-gallery{display:grid;grid-template-columns:1fr 96px;gap:14px}
.dt-main-img{border-radius:var(--radius);overflow:hidden;background:#EDF2F9;aspect-ratio:3/2}
.dt-main-img img{width:100%;height:100%;object-fit:cover}
.dt-thumbs{display:flex;flex-direction:column;gap:10px}
.dt-thumbs button{width:96px;height:64px;padding:0;border-radius:9px;overflow:hidden;border:2px solid transparent;
  background:#EDF2F9;cursor:pointer;transition:.2s}
.dt-thumbs button img{width:100%;height:100%;object-fit:cover}
.dt-thumbs button:hover{border-color:#BFD8F6}
.dt-thumbs button.active{border-color:var(--blue)}

/* 标题区 */
.dt-title h1{font-size:26px;font-weight:700;color:var(--ink);line-height:1.35}
.dt-title .sub{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin-top:12px;font-size:13px;color:var(--muted)}
.dt-title .sub .model{font-family:Inter,"Noto Sans SC",sans-serif;color:var(--ink2)}
.dt-title .sub a:hover{color:var(--blue)}
.dt-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;margin-top:22px;background:var(--line);
  border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.dt-kpis div{background:#fff;padding:16px 12px;text-align:center}
.dt-kpis b{display:block;font-size:22px;font-weight:700;color:var(--blue-d);font-family:Inter,"Noto Sans SC",sans-serif}
.dt-kpis span{font-size:12px;color:var(--muted2);margin-top:3px;display:block}
.dt-desc{font-size:14px;color:var(--muted);line-height:1.85}

/* 参数表 */
.spec-table{width:100%;border-collapse:collapse;font-size:13.5px}
.spec-table th,.spec-table td{border:1px solid var(--line);padding:11px 14px;text-align:left}
.spec-table th{background:var(--bg);color:var(--muted);font-weight:500;width:180px}
.spec-table td{color:var(--ink2)}
.spec-table tr:hover td{background:var(--blue-50)}

/* 应用 / 要求列表 */
.plain-list li{display:flex;gap:10px;font-size:13.5px;color:var(--ink2);line-height:1.7;padding:7px 0}
.plain-list li + li{border-top:1px dashed var(--line)}
.plain-list li::before{content:"";width:5px;height:5px;border-radius:50%;background:var(--blue);
  flex:none;margin-top:9px}
.warn-box{background:var(--orange-100);border:1px solid rgba(255,122,24,.4);border-radius:12px;
  padding:16px 18px;font-size:13.5px;color:#8A4A1E;line-height:1.8}
.warn-box b{color:#C24A05}

/* 时段表 */
.slot-days{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;margin-bottom:16px}
.slot-days button{flex:none;min-width:78px;padding:9px 6px;border-radius:10px;border:1px solid var(--line);
  background:#fff;cursor:pointer;font:inherit;text-align:center;transition:.2s}
.slot-days button b{display:block;font-size:13px;color:var(--ink2);font-weight:600;font-family:Inter,"Noto Sans SC",sans-serif}
.slot-days button span{display:block;font-size:11px;color:var(--muted2);margin-top:2px}
.slot-days button:hover{border-color:var(--blue)}
.slot-days button.active{background:var(--blue);border-color:var(--blue)}
.slot-days button.active b,.slot-days button.active span{color:#fff}
.slot-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.slot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-radius:10px;
  border:1px solid var(--line);background:var(--bg);font-size:13px;color:var(--ink2);cursor:pointer;transition:.2s}
.slot:hover{border-color:var(--blue);background:var(--blue-50)}
.slot.free::after{content:"可约";font-size:11px;color:#2E9E5B;font-weight:600}
.slot.taken{background:#F5F6F8;color:var(--muted2);cursor:not-allowed;border-style:dashed}
.slot.taken:hover{border-color:var(--line);background:#F5F6F8}
.slot.taken::after{content:"已约满";font-size:11px;color:var(--muted2)}
.slot.sel{background:var(--blue);border-color:var(--blue);color:#fff}
.slot.sel:hover{background:var(--blue-d);border-color:var(--blue-d)}
.slot.sel.free::after{color:#CFE2FF}
.slot-tip{font-size:12px;color:var(--muted2);margin-top:12px}

/* 右侧订购卡 */
.dt-side{position:sticky;top:100px;display:flex;flex-direction:column;gap:18px}
.buy-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);padding:24px;box-shadow:var(--shadow)}
.buy-price{font-size:13px;color:var(--muted)}
.buy-price b{display:block;font-size:26px;font-weight:700;color:var(--orange-d);margin-top:4px;
  font-family:Inter,"Noto Sans SC",sans-serif}
.buy-meta{margin:18px 0;display:flex;flex-direction:column;gap:10px;font-size:13px;color:var(--muted)}
.buy-meta div{display:flex;justify-content:space-between;gap:12px}
.buy-meta em{font-style:normal;color:var(--ink2);text-align:right}
.buy-card .btn{width:100%}
.buy-card .btn + .btn{margin-top:10px}
.buy-card .btn[disabled]{background:#EEF1F5;color:var(--muted2);cursor:not-allowed;box-shadow:none;transform:none}
.contact-box{font-size:13px;color:var(--muted);line-height:2}
.contact-box b{color:var(--ink2);font-weight:500}

/* 相关推荐 */
.rel-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}

/* =========================================================
   预约弹窗
   ========================================================= */
.mask{position:fixed;inset:0;background:rgba(6,43,92,.5);backdrop-filter:blur(3px);z-index:200;
  display:flex;align-items:center;justify-content:center;padding:24px;opacity:0;pointer-events:none;transition:.24s}
.mask.on{opacity:1;pointer-events:auto}
.modal{width:640px;max-width:100%;max-height:88vh;overflow:auto;background:#fff;border-radius:var(--radius-lg);
  box-shadow:var(--shadow-lg);transform:translateY(14px) scale(.98);transition:.24s}
.mask.on .modal{transform:none}
.modal-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 26px;
  border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:2}
.modal-head h3{font-size:17px;font-weight:700;color:var(--ink)}
.modal-head p{font-size:12px;color:var(--muted2);margin-top:4px}
.modal-x{width:32px;height:32px;border-radius:8px;border:0;background:var(--bg);color:var(--muted);cursor:pointer;
  font-size:18px;line-height:1;display:flex;align-items:center;justify-content:center;flex:none;transition:.2s;
  font-family:inherit}
.modal-x:hover{background:var(--blue-100);color:var(--blue)}
.modal-body{padding:24px 26px}
.modal-foot{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 26px;
  border-top:1px solid var(--line);position:sticky;bottom:0;background:#fff}
.modal-foot .tip{font-size:12px;color:var(--muted2);flex:1;line-height:1.6}
.modal-actions{display:flex;align-items:center;gap:14px;flex:none}
.modal-actions .btn{white-space:nowrap}

.field{margin-bottom:18px}
.field > label{display:block;font-size:13px;font-weight:600;color:var(--ink2);margin-bottom:8px}
.field .req{color:var(--orange-d);margin-left:2px}
.field input[type=text],.field input[type=tel],.field textarea,.field select{
  width:100%;border:1px solid var(--line);border-radius:10px;background:var(--bg);padding:11px 14px;
  font:inherit;font-size:13.5px;color:var(--ink2);outline:0;transition:.2s}
.field textarea{min-height:88px;resize:vertical;line-height:1.7}
.field input:focus,.field textarea:focus,.field select:focus{background:#fff;border-color:var(--blue);
  box-shadow:0 0 0 3px rgba(18,102,214,.1)}
.field .hint{font-size:12px;color:var(--muted2);margin-top:6px}
.field.bad input,.field.bad textarea,.field.bad select{border-color:var(--orange-d);background:#FFF7F2}
.field .err-msg{display:none;font-size:12px;color:var(--orange-d);margin-top:6px}
.field.bad .err-msg{display:block}
.form-2{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
.pick-days{display:flex;gap:8px;flex-wrap:wrap}
.pick-days button{padding:8px 12px;border-radius:9px;border:1px solid var(--line);background:#fff;cursor:pointer;
  font:inherit;font-size:12.5px;color:var(--ink2);transition:.2s}
.pick-days button:hover{border-color:var(--blue)}
.pick-days button.active{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600}
.pick-times{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:10px}
.file-box{display:flex;align-items:center;gap:12px;padding:14px;border:1px dashed var(--line);border-radius:10px;
  background:var(--bg);font-size:13px;color:var(--muted)}
.file-box .name{color:var(--ink2);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.summary{background:var(--blue-50);border:1px solid #C9DFF6;border-radius:12px;padding:16px 18px;font-size:13px;
  color:var(--ink2);line-height:2}
.summary div{display:flex;justify-content:space-between;gap:14px}
.summary em{font-style:normal;color:var(--muted);flex:none}
.ok-view{text-align:center;padding:34px 26px 10px}
.ok-view .ring{width:64px;height:64px;border-radius:50%;background:#EAF6EE;margin:0 auto 18px;
  display:flex;align-items:center;justify-content:center}
.ok-view .ring svg{width:30px;height:30px;stroke:#2E9E5B;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.ok-view h3{font-size:19px;font-weight:700;color:var(--ink)}
.ok-view .no{display:inline-block;margin:14px 0 4px;padding:8px 18px;border-radius:9px;background:var(--bg);
  font-family:Inter,"Noto Sans SC",sans-serif;font-size:14px;font-weight:600;color:var(--blue-d);letter-spacing:.5px}
.ok-view p{font-size:13px;color:var(--muted);line-height:1.9;margin-top:8px}

/* =========================================================
   Toast
   ========================================================= */
.toast-wrap{position:fixed;top:96px;left:50%;transform:translateX(-50%);z-index:300;display:flex;
  flex-direction:column;gap:10px;align-items:center;pointer-events:none}
.toast{display:flex;align-items:center;gap:10px;padding:12px 22px;border-radius:10px;background:rgba(10,22,38,.92);
  color:#fff;font-size:14px;box-shadow:var(--shadow-lg);opacity:0;transform:translateY(-10px);transition:.26s;
  max-width:520px}
.toast.on{opacity:1;transform:none}
.toast .dot{width:16px;height:16px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;
  background:var(--blue)}
.toast.warn .dot{background:var(--orange)}
.toast.ok .dot{background:#2E9E5B}
.toast .dot svg{width:10px;height:10px;stroke:#fff;fill:none;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}

/* ---------- 我的收藏计数 ---------- */
.fav-count{display:inline-flex;align-items:center;justify-content:center;min-width:17px;height:17px;padding:0 5px;
  border-radius:9px;background:var(--orange);color:#fff;font-size:11px;font-weight:700;margin-left:5px;
  font-family:Inter,sans-serif;vertical-align:1px}
.fav-count:empty{display:none}

/* ---------- 响应式（沿用既有断点） ---------- */
@media (max-width:1080px){
  .dt-layout{grid-template-columns:1fr}
  .dt-side{position:static}
  .rel-grid,.dt-kpis{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:760px){
  .form-2,.slot-grid,.pick-times{grid-template-columns:1fr}
  .dt-gallery{grid-template-columns:1fr}
  .dt-thumbs{flex-direction:row;overflow-x:auto}
  .modal-foot{flex-direction:column;align-items:stretch}
  .modal-actions{justify-content:flex-end}
  .modal-actions .btn{flex:1}
}
