/* ============================================================
   UI-3 · 业务块：搜索、服务卡、需求卡、服务商卡、表格、筛选、表单
   ============================================================ */

/* ---------- 搜索 ---------- */
.searchbar {
  display: flex; align-items: center; gap: 0; height: 52px; background: #fff;
  border: 2px solid var(--brand-700); border-radius: var(--r-3); overflow: hidden;
  box-shadow: var(--shadow-2);
}
.searchbar__cat {
  display: flex; align-items: center; gap: 6px; height: 100%; padding: 0 14px;
  border: 0; border-right: 1px solid var(--line); background: var(--surface-2);
  color: var(--text-2); font-size: var(--fs-14); cursor: pointer; white-space: nowrap;
}
.searchbar__cat:hover { color: var(--brand-800); background: var(--brand-050); }
.searchbar input {
  flex: 1; min-width: 0; height: 100%; padding: 0 16px; border: 0; background: transparent;
  font-size: var(--fs-15); color: var(--text);
}
.searchbar input::placeholder { color: var(--text-3); }
.searchbar input:focus { outline: none; }
.searchbar__btn {
  height: 100%; width: 116px; border: 0; background: var(--brand-700); color: #fff;
  font-size: var(--fs-16); font-weight: 700; cursor: pointer; letter-spacing: 2px;
}
.searchbar__btn:hover { background: var(--brand-600); }
.hotwords { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-top: 12px; font-size: var(--fs-13); color: var(--text-3); }
.hotwords b { color: var(--text-2); font-weight: 400; }
.hotwords a { color: inherit; }
.hotwords a:hover { color: var(--brand-700); text-decoration: underline; }

/* 首屏内的搜索框：白底蓝描边 + 蓝色焦点环（淘宝搜索条形态） */
.hero .searchbar { box-shadow: 0 6px 20px rgba(16, 24, 40, .08); }
.hero .searchbar:focus-within { border-color: var(--brand-600); box-shadow: 0 6px 20px rgba(16, 24, 40, .10), var(--glow-focus); }

/* ---------- 服务卡 ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
.svc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.svc-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.svc {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-3); overflow: hidden; box-shadow: var(--shadow-1);
  transition: box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}
.svc:hover { border-color: var(--brand-500); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.svc__cover {
  position: relative; height: 100px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: linear-gradient(135deg, var(--brand-050), #fff 74%);
  border-bottom: 1px solid var(--line);
}
.svc__cover--info { background: linear-gradient(135deg, var(--info-050), #fff 74%); }
.svc__cover--trust { background: linear-gradient(135deg, var(--trust-050), #fff 74%); }
.svc__cover--deal { background: linear-gradient(135deg, var(--deal-050), #fff 74%); }
.svc__cover b { font-size: var(--fs-12); font-weight: 600; color: var(--brand-800); letter-spacing: 1px; }
.svc__cover .glyph { width: 42px; height: 42px; color: var(--brand-700); opacity: .92; }
.svc__cover--info .glyph { color: var(--info-600); }
.svc__cover--trust .glyph { color: var(--trust-500); }
.svc__cover--deal .glyph { color: var(--deal-600); }
.svc__flag {
  position: absolute; top: 10px; left: 10px; height: 20px; padding: 0 7px; border-radius: var(--r-1);
  background: var(--brand-700); color: #fff; font-size: var(--fs-11); line-height: 20px; font-weight: 600;
}
.svc__body { padding: 12px 14px 0; flex: 1; }
.svc__title { font-size: var(--fs-15); font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 43px; }
.svc__title a { color: var(--text); }
.svc__title a:hover { color: var(--brand-700); }
.svc__seller { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: var(--fs-12); color: var(--text-2); }
.svc__seller .icon { width: 13px; height: 13px; color: var(--trust-500); }
.svc__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.svc__meta { display: flex; align-items: center; gap: var(--sp-3); margin-top: 10px; font-size: var(--fs-12); color: var(--text-2); }
.svc__meta .star { color: var(--trust-500); font-weight: 700; font-family: var(--font-num); }
.svc__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 12px 14px; margin-top: 10px; border-top: 1px dashed var(--line); }

.price { display: inline-flex; align-items: baseline; gap: 2px; color: var(--deal-600); font-family: var(--font-num); }
.price .cur { font-size: var(--fs-13); font-weight: 700; }
.price .val { font-size: var(--fs-22); font-weight: 700; letter-spacing: -.5px; }
.price .unit { font-size: var(--fs-12); color: var(--text-3); font-family: var(--font); margin-left: 2px; }
.price--sm .val { font-size: var(--fs-18); }

/* ---------- 需求卡 ---------- */
.dmd-list { display: grid; gap: var(--sp-3); }
.dmd {
  display: grid; grid-template-columns: 1fr 190px; gap: var(--sp-4);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-3);
  padding: var(--sp-4) 18px; box-shadow: var(--shadow-1);
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.dmd:hover { border-color: var(--brand-500); box-shadow: var(--shadow-2); }
.dmd__top { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.dmd__title { font-size: var(--fs-16); font-weight: 600; margin: 8px 0 6px; }
.dmd__title a { color: var(--text); }
.dmd__title a:hover { color: var(--brand-700); }
.dmd__desc { font-size: var(--fs-13); color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dmd__meta { display: flex; flex-wrap: wrap; gap: 6px var(--sp-4); margin-top: 10px; font-size: var(--fs-12); color: var(--text-3); }
.dmd__meta b { color: var(--text-2); font-weight: 600; font-family: var(--font-num); }
.dmd__side { border-left: 1px dashed var(--line); padding-left: var(--sp-4); display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; text-align: right; }
.dmd__budget { font-family: var(--font-num); font-size: var(--fs-22); font-weight: 700; color: var(--deal-600); line-height: 1.2; }
.dmd__budget small { display: block; font-family: var(--font); font-size: var(--fs-11); color: var(--text-3); font-weight: 400; }
.dmd__cd { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-12); color: var(--text-2); }
.dmd__cd b { font-family: var(--font-num); color: var(--deal-700); }

/* ---------- 服务商卡 ---------- */
.prov { display: flex; flex-direction: column; gap: 10px; padding: var(--sp-4); }
.prov__row { display: flex; align-items: center; gap: 10px; }
.prov__logo { width: 40px; height: 40px; border-radius: var(--r-2); background: var(--brand-050); color: var(--brand-800); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-15); flex: none; }
.prov__name { font-size: var(--fs-14); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.prov__name .icon { width: 14px; height: 14px; color: var(--trust-500); }
.prov__sub { font-size: var(--fs-12); color: var(--text-3); }
.prov__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.prov__stats b { display: block; font-family: var(--font-num); font-size: var(--fs-16); }
.prov__stats span { font-size: var(--fs-11); color: var(--text-3); }

/* ---------- 信任条 ---------- */
.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; }
.trust__item { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #fff; }
.trust__item .icon { width: 22px; height: 22px; color: var(--brand-700); }
.trust__item b { display: block; font-size: var(--fs-13); }
.trust__item span { font-size: var(--fs-11); color: var(--text-3); }

/* ---------- 表单 ---------- */
.field { display: grid; gap: 6px; }
.field > label, .lbl { font-size: var(--fs-13); color: var(--text-2); font-weight: 600; }
.lbl .req { color: var(--risk-500); margin-left: 2px; }
.input, .select, .textarea {
  height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-2);
  background: #fff; color: var(--text); font-size: var(--fs-14); width: 100%;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-050); }
.textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235A6663' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.hint { font-size: var(--fs-12); color: var(--text-3); }
.err { font-size: var(--fs-12); color: var(--risk-700); }
.form { display: grid; gap: var(--sp-4); }
.form .field { gap: 7px; }
.form .field > input, .form .field > select, .form .field > textarea {
  height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-2);
  background: #fff; color: var(--text); font-size: var(--fs-14); width: 100%;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.form .field > textarea { height: auto; min-height: 88px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.form .field > input::placeholder, .form .field > textarea::placeholder { color: var(--text-3); }
.form .field > input:focus, .form .field > select:focus, .form .field > textarea:focus {
  outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-050);
}
.form > .btn, .form .field > .btn { justify-self: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col-2 { grid-column: 1 / -1; }

.check { display: flex; align-items: flex-start; gap: 8px; font-size: var(--fs-13); color: var(--text-2); cursor: pointer; }
.check input { appearance: none; width: 16px; height: 16px; margin: 2px 0 0; border: 1px solid var(--line-strong); border-radius: 3px; background: #fff; cursor: pointer; flex: none; }
.check input:checked { background: var(--brand-700) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--brand-700); }
.check input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.check span.cnt { margin-left: auto; color: var(--text-3); font-family: var(--font-num); font-size: var(--fs-12); }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--fs-13); }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: var(--r-pill); background: var(--line-strong); position: relative; cursor: pointer; transition: background var(--dur-fast); }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--dur-fast) var(--ease); }
.switch input:checked { background: var(--brand-600); }
.switch input:checked::after { transform: translateX(16px); }

.range { width: 100%; height: 6px; appearance: none; border-radius: var(--r-pill); background: var(--line); cursor: pointer; }
.range::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--deal-500); box-shadow: var(--shadow-1); cursor: pointer; }

/* ---------- 筛选 ---------- */
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--r-3); }
.filters__grp { padding: 14px var(--sp-4); border-bottom: 1px solid var(--line); }
.filters__grp:last-child { border-bottom: 0; }
.filters__grp h4 { font-size: var(--fs-13); font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.filters__list { display: grid; gap: 7px; }
.cat-tree { display: grid; gap: 2px; }
.cat-tree a { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: var(--r-1); font-size: var(--fs-13); color: var(--text-2); }
.cat-tree a:hover { background: var(--brand-050); color: var(--brand-800); }
.cat-tree a.is-on { background: var(--brand-050); color: var(--brand-800); font-weight: 600; }
.cat-tree a .cnt { margin-left: auto; font-family: var(--font-num); font-size: var(--fs-11); color: var(--text-3); }

/* ---------- 表格 ---------- */
.tbl { font-size: var(--fs-13); }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: var(--fs-12); white-space: nowrap; }
.tbl tbody tr:hover { background: var(--brand-050); }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.tbl td b { font-weight: 600; }
.tbl__num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* ---------- 标签页 ---------- */
.tabs { display: flex; align-items: center; gap: var(--sp-5); border-bottom: 1px solid var(--line); }
.tabs__btn {
  position: relative; height: 42px; padding: 0 2px; border: 0; background: none;
  color: var(--text-2); font-size: var(--fs-14); cursor: pointer; white-space: nowrap;
}
.tabs__btn:hover { color: var(--brand-800); }
.tabs__btn.is-on { color: var(--brand-800); font-weight: 700; }
.tabs__btn.is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand-700); border-radius: 2px; }
.tabs__btn .cnt { margin-left: 4px; font-family: var(--font-num); font-size: var(--fs-12); color: var(--text-3); }
.tabpane { display: none; }
.tabpane.is-on { display: block; }

/* ---------- 面包屑与分页 ---------- */
.crumb { display: flex; align-items: center; gap: 6px; padding: 12px 0; font-size: var(--fs-12); color: var(--text-3); }
.crumb a { color: var(--text-3); }
.crumb a:hover { color: var(--brand-700); }
.crumb .sep { opacity: .6; }
.crumb b { color: var(--text-2); font-weight: 500; }

.pager { display: flex; align-items: center; justify-content: center; gap: 6px; padding: var(--sp-5) 0 0; }
.pager button {
  min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--line-strong);
  border-radius: var(--r-1); background: #fff; color: var(--text-2); font-size: var(--fs-13); cursor: pointer;
  font-family: var(--font-num);
}
.pager button:hover { border-color: var(--brand-600); color: var(--brand-800); }
.pager button.is-on { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.pager__sum { margin-left: var(--sp-3); font-size: var(--fs-12); color: var(--text-3); }

/* ---------- 空态 ---------- */
.empty { display: grid; place-items: center; gap: 10px; padding: var(--sp-8) var(--sp-4); text-align: center; color: var(--text-3); }
.empty .icon { width: 40px; height: 40px; color: var(--line-strong); }
.empty b { color: var(--text-2); font-size: var(--fs-15); }

/* 输入组合（手机号 / 验证码） */
.input-group { display: flex; align-items: center; height: 42px; border: 1px solid var(--line-strong); border-radius: var(--r-2); background: #fff; overflow: hidden; }
.input-group:focus-within { border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }
.input-group .input { flex: 1; height: 40px; border: 0; border-radius: 0; box-shadow: none !important; padding: 0 12px; }
.input-group__pre { flex: none; padding: 0 10px 0 12px; font-size: var(--fs-13); color: var(--text-3); border-right: 1px solid var(--line); line-height: 40px; }
.input-group__btn { flex: none; align-self: stretch; padding: 0 12px; border: 0; border-left: 1px solid var(--line); background: var(--brand-050); color: var(--brand-700); font-size: var(--fs-12); font-weight: 600; cursor: pointer; }
.input-group__btn:hover { background: var(--brand-100); }

.input.is-error, .textarea.is-error { border-color: var(--risk-500); background: #FFF8F7; }
.input.is-error:focus { box-shadow: 0 0 0 3px var(--risk-050); }
.empty__ico { width: 56px; height: 56px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-3); }
.empty__ico .icon { width: 22px; height: 22px; }
