/* =========================================================
   商品详情 / 预约页（仿「好卡智选」移动端）
   ========================================================= */

:root {
  --gm-blue:#0960bd;
  --gm-red: #e8303c;
  --gm-red-2: #c81f2b;
  --gm-orange-1: #fbc45f;
  --gm-orange-2: #f08a2e;
  --gm-text: #1f2733;
  --gm-muted: #8a93a3;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

.gm-body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f3f4f6;
  color: var(--gm-text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.gm-page { width: 100%; max-width: 520px; margin: 0 auto; background: #f3f4f6; min-height: 100vh; padding-bottom: 24px; box-shadow: 0 0 24px rgba(16, 24, 40, .06); }

/* 顶部 */
.gm-nav {
  position: sticky; top: 0; z-index: 10; height: 46px; display: flex; align-items: center;
  padding: 0 12px; background: var(--gm-red); color: #fff;
}
.gm-back {
  width: 30px; height: 30px; display: grid; place-items: center; font-size: 24px;
  color: #fff; text-decoration: none; line-height: 1;
}
.gm-nav-title { flex: 1; text-align: center; font-size: 15px; font-weight: 500; }
.gm-nav-right { width: 30px; }

/* 主图 */
.gm-cover { background: #fff; }
.gm-cover img { display: block; width: 100%; }

/* 信息卡 */
.gm-info { background: #fff; padding: 14px 14px 16px; }
.gm-title { margin: 0 0 8px; font-size: 18px; line-height: 1.4; font-weight: 700; }
.gm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.gm-tag {
  font-size: 11.5px; color: #c0392b; background: #fdecea; border: 1px solid #f7c6c0;
  border-radius: 3px; padding: 1px 7px;
}
.gm-price-row { display: flex; align-items: baseline; gap: 10px; }
.gm-price { color: var(--gm-red); display: flex; align-items: baseline; }
.gm-price i { font-size: 15px; font-style: normal; }
.gm-price b { font-size: 30px; font-weight: 800; line-height: 1; margin: 0 2px; }
.gm-price em { font-size: 12px; font-style: normal; }
.gm-sales { margin-left: auto; font-size: 12px; color: var(--gm-muted); }
.gm-desc { margin: 10px 0 0; font-size: 13px; color: #5c6673; line-height: 1.6; }

/* 规格 */
.gm-spec { margin-top: 8px; background: #fff; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.gm-spec-item {
  display: flex; justify-content: space-between; gap: 8px; padding: 11px 14px;
  font-size: 13px; border-bottom: 1px solid #f2f4f7;
}
.gm-spec-item { min-width: 0; }
.gm-spec-item span { color: var(--gm-muted); flex: none; }
.gm-spec-item b { font-weight: 500; }

/* 详情图 */
.gm-gallery { margin-top: 8px; background: #fff; }
.gm-gallery img { display: block; width: 100%; }

/* 表单区（红底） */
.gm-form-wrap {
  margin: 12px 10px 0; background: var(--gm-red); padding: 12px;
  border-radius: 12px; box-shadow: 0 6px 18px rgba(232, 48, 60, .18);
}
.gm-form { display: flex; flex-direction: column; gap: 10px; }

.gm-field {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 10px; padding: 0 14px; height: 48px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.gm-label { flex: none; font-size: 14px; color: #333; min-width: 62px; }
.gm-input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-size: 14px; color: #333; text-align: right; font-family: inherit;
}
.gm-input::placeholder { color: #b9c0cc; }
.gm-arrow { color: #b9c0cc; font-size: 18px; line-height: 1; transform: translateY(-1px); }

.gm-submit {
  position: relative; height: 52px; border: 0; border-radius: 10px; cursor: pointer;
  background: linear-gradient(90deg, var(--gm-orange-1), var(--gm-orange-2));
  color: #7a3b00; font-size: 17px; font-weight: 700; font-family: inherit;
  box-shadow: 0 2px 6px rgba(240, 138, 46, .35);
  overflow: hidden;
}
.gm-submit:active { transform: translateY(1px); }
.gm-hand {
  position: absolute; right: 18px; bottom: 6px; width: 22px; height: 22px;
  background: no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'><path d='M9 11V5a1.5 1.5 0 0 1 3 0v6h.5V4.5a1.5 1.5 0 0 1 3 0V11h.5V6a1.5 1.5 0 0 1 3 0v8.5c0 3.6-2.4 6.5-6 6.5-2.2 0-3.7-1-4.9-2.6L5 14.6a1.6 1.6 0 0 1 2.5-2l1.5 1.8V11z'/></svg>");
  opacity: .9;
}

.gm-agree { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; color: #fff; line-height: 1.5; padding: 2px 4px 0; }
.gm-agree input { width: 14px; height: 14px; margin-top: 2px; accent-color: #fff; }
.gm-agree a { color: #fff; text-decoration: underline; }

.gm-foot { text-align: center; font-size: 11.5px; color: var(--gm-muted); padding: 14px 0 0; }

/* 弹窗 */
.gm-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; }
.gm-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.gm-dialog {
  position: relative; width: 100%; max-width: 320px; background: #fff; border-radius: 12px;
  padding: 20px 18px 16px; text-align: center;
}
.gm-dialog h3 { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.gm-modal-body { font-size: 13.5px; line-height: 1.75; color: #333; text-align: left; }
.gm-modal-btn {
  margin-top: 16px; width: 100%; height: 44px; border: 0; border-radius: 8px; cursor: pointer;
  background: linear-gradient(90deg, var(--gm-orange-1), #f4792f);
  color: #fff; font-size: 16px; font-family: inherit;
}

/* 城市选择 */
.gm-picker { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; }
.gm-picker-panel {
  position: relative; width: 100%; max-width: 520px; margin: 0 auto; background: #fff;
  border-radius: 12px 12px 0 0; padding-bottom: env(safe-area-inset-bottom, 0);
}
.gm-picker-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #f0f2f5; font-size: 15px; font-weight: 600;
}
.gm-picker-head button { border: 0; background: none; color: var(--gm-muted); font-size: 14px; font-family: inherit; }
.gm-picker-title { flex: 1; text-align: center; }
.gm-picker-back { width: 32px; font-size: 22px !important; line-height: 1; color: #333 !important; }
.gm-picker-item.prov::after { content: '›'; float: right; color: #c3cad6; }
.gm-picker-body:empty::before { content: '加载中…'; display: block; padding: 24px; text-align: center; color: #9aa3b2; }
.gm-picker-body { max-height: 50vh; overflow-y: auto; }
.gm-picker-item {
  display: block; width: 100%; text-align: left; padding: 13px 16px; border: 0;
  border-bottom: 1px solid #f6f7f9; background: #fff; font-size: 14.5px; font-family: inherit;
}
.gm-picker-item:active { background: #f6f7f9; }

/* 协议页 */
.gm-doc-body { background: #fff; margin-top: 8px; padding: 18px 16px 40px; font-size: 14px; line-height: 1.85; color: #333; }
.gm-doc-body h2 { font-size: 16px; margin: 0 0 12px; }
.gm-doc-body p { margin: 0 0 10px; }

/* 商户端装修 */
.gm-deco{padding:0 14px 10px}
.gm-deco-banner{width:100%;border-radius:12px;display:block}
.gm-deco-title{margin:10px 0 4px;font-size:18px;font-weight:700}
.gm-deco-sub{margin:0;color:#888;font-size:13px}
.gm-deco-notice{margin-top:8px;padding:8px 12px;background:#fff7e6;color:#ad6800;border-radius:8px;font-size:13px}
.deco-preview{min-height:200px}
.deco-ph{display:flex;align-items:center;justify-content:center;background:#f2f4f7;border-radius:10px;color:#9aa4b2}
.deco-entry{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px dashed #eee}
/* 客服会话 */
.chat-log{display:flex;flex-direction:column;gap:10px;padding:8px 0;max-height:60vh;overflow:auto}
.chat-row{display:flex;flex-direction:column;max-width:80%}
.chat-row.left{align-self:flex-start}
.chat-row.right{align-self:flex-end;align-items:flex-end}
.chat-bubble{background:#f2f4f7;padding:10px 14px;border-radius:12px;font-size:14px;line-height:1.6;word-break:break-word}
.chat-row.right .chat-bubble{background:var(--gm-blue);color:#fff}
.chat-time{font-size:11px;margin-top:4px;color:#9aa4b2}
.chat-input-bar{position:sticky;bottom:0;background:#fff;padding:10px 14px;border-top:1px solid #eee;display:flex}
.gm-kefu-entry{position:fixed;right:14px;bottom:90px;z-index:20;background:var(--gm-blue);color:#fff;padding:8px 14px;border-radius:20px;font-size:13px;text-decoration:none;box-shadow:0 4px 12px rgba(9,96,189,.3)}
/* 靓号选择 */
.gm-num-pick{display:flex;align-items:center;gap:8px;padding:12px 14px;margin:0 0 10px;background:#f0f7ff;border:1px solid #cfe4ff;border-radius:10px;font-size:14px}
.gm-num-label{color:#666}
.gm-num-val{font-size:18px;letter-spacing:1px;color:var(--gm-blue)}
.gm-num-meta{color:#888;font-size:12px;margin-left:auto}
/* 靓号列表 */
.num-item{display:flex;align-items:center;gap:10px;padding:12px 14px;margin-bottom:8px;background:#fff;border:1px solid #eef0f3;border-radius:10px;text-decoration:none;color:#222}
.num-item b{font-size:18px;letter-spacing:1px;color:var(--gm-blue)}
.num-item span{color:#888;font-size:12px}
.num-item em{margin-left:auto;color:#e5484d;font-style:normal;font-weight:600}
/* ===== 专属店铺（移动端） ===== */
.sh-body{margin:0;background:#f5f7fb;font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;padding-bottom:56px}
.sh-page{max-width:520px;margin:0 auto;background:#f5f7fb;min-height:100vh;overflow-x:hidden}
.sh-head{padding:14px 14px 8px;background:linear-gradient(135deg,var(--gm-blue),#3b82f6);color:#fff}
.sh-shop{display:flex;align-items:center;gap:10px}
.sh-logo{width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.22);display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:700}
.sh-name{font-size:16px;font-weight:600}
.sh-sub{font-size:11px;opacity:.85;margin-top:2px}
.sh-banner{margin:10px 14px;border-radius:10px;overflow:hidden;height:140px;background:#dbeafe}
.sh-banner img{width:100%;height:100%;object-fit:cover;display:block}
.sh-banner-ph{display:flex;align-items:center;justify-content:center;color:#2563eb;font-size:14px;background:linear-gradient(135deg,#dbeafe,#eff6ff)}
.sh-notice{margin:0 14px 8px;background:#fff7e6;color:#b45309;font-size:12px;padding:8px 10px;border-radius:8px}
.sh-tabs{display:flex;gap:8px;padding:6px 14px 10px}
.sh-tab{font-size:13px;padding:5px 14px;border-radius:16px;background:#fff;color:#64748b}
.sh-tab.on{background:var(--gm-blue);color:#fff}
.sh-tab a{color:inherit;text-decoration:none}
.sh-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 14px 16px;overflow:hidden}
.sh-card{background:#fff;border-radius:10px;overflow:hidden;text-decoration:none;color:#0f172a;display:flex;flex-direction:column;min-width:0}
.sh-cover{height:150px;background:#eef2f7;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:12px}
.sh-cover img{width:100%;height:100%;object-fit:cover;display:block}
.sh-body-card{padding:8px 10px}
.sh-title{font-size:13px;font-weight:600;line-height:1.35;height:36px;overflow:hidden;padding:8px 10px 0;word-break:break-all}
.sh-tags{display:flex;gap:4px;padding:4px 10px 0}
.sh-tags em{font-style:normal;font-size:10px;color:var(--gm-blue);background:#e8f0fe;border-radius:3px;padding:1px 5px}
.sh-price{padding:4px 10px;color:#e5484d;display:flex;align-items:baseline;gap:2px}
.sh-price b{font-size:16px}
.sh-price span{font-size:10px;color:#94a3b8}
.sh-btn{margin:6px 10px 10px;text-align:center;background:var(--gm-blue);color:#fff;font-size:12px;padding:7px 0;border-radius:16px}
.sh-empty{grid-column:1/-1;text-align:center;color:#94a3b8;padding:40px 0;font-size:13px}
.sh-tabbar{position:fixed;left:0;right:0;bottom:0;max-width:520px;margin:0 auto;display:flex;background:#fff;border-top:1px solid #eef1f5}
.sh-tabbar a{flex:1;text-align:center;font-size:11px;padding:10px 0;color:#94a3b8;text-decoration:none}
.sh-tabbar a.on{color:var(--gm-blue);font-weight:600}

/* 底部固定办理条 */
.gm-cta-bar{position:fixed;left:0;right:0;bottom:0;z-index:80;display:flex;align-items:center;justify-content:center;
  height:52px;background:var(--gm-red);color:#fff;font-size:16px;font-weight:600;text-decoration:none;
  box-shadow:0 -2px 10px rgba(0,0,0,.08)}
.gm-cta-bar:active{opacity:.9}
body{padding-bottom:60px}

/* 多规格选择 */
.gm-specs{display:flex;flex-wrap:wrap;gap:8px}
.gm-spec{position:relative;display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border:1px solid #e2e8f0;border-radius:8px;font-size:14px;cursor:pointer}
.gm-spec input{display:none}
.gm-spec span{color:#1f2937}
.gm-spec em{font-style:normal;font-size:12px;color:var(--gm-red)}
.gm-spec:has(input:checked){border-color:var(--gm-red);background:#fff5f5}