/* 客户端配置报价器样式
   配色跟 ipetmed.com 的深色/红色主题一致（品牌红 #C8102E），
   让客户从官网点进来不觉得跳到了另一个网站。
   布局参考汽车配置器：左边选配置，右边价格常驻；手机上价格条吸在底部。 */

:root {
  --brand: #C8102E;
  --brand-2: #e11d34;
  --ink: #0d0f12;
  --ink-2: #16191f;
  --line: #262b33;
  --text: #e8eaed;
  --text-2: #9aa3af;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--ink);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
}

a { color: inherit; text-decoration: none; }

.pw { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── 顶栏 ── */
.pnav {
  height: 60px; display: flex; align-items: center; gap: 20px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0;
  background: rgba(13,15,18,.92); backdrop-filter: blur(8px); z-index: 60;
}
.pnav .brand { font-weight: 700; font-size: 17px; letter-spacing: .5px; }
.pnav .brand span { color: var(--brand); }
.pnav .spacer { flex: 1; }
.pnav .link { color: var(--text-2); font-size: 14px; }
.pnav .link:hover { color: var(--text); }

/* ── 首页 hero ── */
.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 { font-size: 38px; margin: 0 0 12px; line-height: 1.25; font-weight: 800; }
.hero h1 em { color: var(--brand); font-style: normal; }
.hero p { color: var(--text-2); max-width: 620px; margin: 0 auto; font-size: 16px; }

/* ── 机型卡片 ── */
.models { display: grid; gap: 18px; padding-bottom: 60px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.mcard {
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .18s, transform .18s;
  display: flex; flex-direction: column;
}
.mcard:hover { border-color: var(--brand); transform: translateY(-2px); }
.mcard .thumb {
  height: 168px; background: #1c2027; display: flex;
  align-items: center; justify-content: center; overflow: hidden;
}
.mcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.mcard .thumb .ph { color: #3f4652; font-size: 26px; font-weight: 800; letter-spacing: 1px; }
.mcard .body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; }
.mcard h3 { margin: 0 0 6px; font-size: 18px; }
.mcard .note { color: var(--text-2); font-size: 13px; flex: 1; min-height: 40px; }
.mcard .foot {
  margin-top: 14px; display: flex; justify-content: space-between; align-items: baseline;
}
.mcard .price { color: var(--brand); font-size: 20px; font-weight: 700; }
.mcard .price small { color: var(--text-2); font-size: 12px; font-weight: 400; }

.chip {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  background: #232830; color: var(--text-2); font-size: 12px; margin-right: 6px;
}

.seclabel {
  font-size: 13px; letter-spacing: 2px; color: var(--text-2);
  text-transform: uppercase; margin: 34px 0 14px;
}

/* ── 配置页布局 ── */
.cfg { display: grid; gap: 26px; padding: 26px 0 120px;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, .9fr); }
@media (max-width: 900px) { .cfg { grid-template-columns: 1fr; } }

.panel {
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px;
}
.panel h2 { margin: 0 0 4px; font-size: 17px; }
.panel .desc { color: var(--text-2); font-size: 13px; margin: 0 0 16px; }

/* 选项行（升级 / 选配都用它） */
.opt {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 15px; margin-bottom: 9px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.opt:hover { border-color: #3a4250; }
.opt.on { border-color: var(--brand); background: rgba(200,16,46,.07); }
.opt input { accent-color: var(--brand); width: 17px; height: 17px; flex-shrink: 0; }
.opt .t { flex: 1; }
.opt .t b { font-weight: 600; }
.opt .t small { display: block; color: var(--text-2); font-size: 12.5px; }
.opt .p { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.opt .p.free { color: var(--text-2); font-weight: 400; }

/* 配色块 */
.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch {
  border: 2px solid var(--line); border-radius: 10px; padding: 10px 14px;
  cursor: pointer; text-align: center; min-width: 96px;
}
.swatch.on { border-color: var(--brand); }
.swatch .dot { width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 7px;
  background: #444; border: 1px solid #555; }
.swatch small { display: block; color: var(--text-2); font-size: 12px; }

/* ── 价格面板 ── */
.sum { position: sticky; top: 84px; }
.sum .total { font-size: 34px; font-weight: 800; color: #fff; letter-spacing: -.5px; }
.sum .total small { font-size: 15px; color: var(--text-2); font-weight: 400; }
.sumrow {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px;
}
.sumrow:last-child { border-bottom: none; }
.sumrow .k { color: var(--text-2); }
.sumrow .v { font-variant-numeric: tabular-nums; white-space: nowrap; }

.pbtn {
  display: block; width: 100%; text-align: center;
  padding: 13px 20px; border: none; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 16px; font-weight: 600;
  cursor: pointer; font-family: inherit; margin-top: 16px;
}
.pbtn:hover { background: var(--brand-2); }
.pbtn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.pbtn.ghost:hover { border-color: var(--brand); background: transparent; }

/* ── 留资弹窗 ── */
.mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.72);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.mask.on { display: flex; }
.modal {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; width: 100%; max-width: 440px;
}
.modal h3 { margin: 0 0 6px; font-size: 19px; }
.modal p.d { color: var(--text-2); font-size: 13px; margin: 0 0 18px; }
.modal label { display: block; font-size: 13px; color: var(--text-2); margin: 0 0 5px; }
.modal input {
  width: 100%; padding: 10px 12px; margin-bottom: 12px;
  background: #0f1216; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); font-size: 15px; font-family: inherit;
}
.modal input:focus { outline: none; border-color: var(--brand); }
.modal .err { color: #ff6b7d; font-size: 13px; margin-bottom: 10px; min-height: 18px; }

.pfoot { border-top: 1px solid var(--line); padding: 26px 0 40px;
  color: var(--text-2); font-size: 13px; text-align: center; }

/* 手机上价格条吸底，不用滚回去看总价 */
@media (max-width: 900px) {
  .sum { position: static; }
  .mobilebar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: rgba(13,15,18,.97); border-top: 1px solid var(--line);
    padding: 10px 16px; display: flex; align-items: center; gap: 14px;
  }
  .mobilebar .t { flex: 1; font-size: 20px; font-weight: 700; }
  .mobilebar .pbtn { width: auto; margin: 0; padding: 10px 20px; }
}
@media (min-width: 901px) { .mobilebar { display: none; } }
