/* ============================================================
   深圳法拍房源 · 网页版视觉层
   与小程序版同风格：主色 #c8332a / 底 #f5f6f8 / 白卡片
   尺寸按小程序 rpx÷2 折算（375px 宽基准），手机优先，PC 居中容器
   ============================================================ */

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

/* hidden 属性必须压过任何类的 display 声明（否则 .mask 的 display:flex 会让浮层常驻显示） */
[hidden] { display: none !important; }

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #e9ebef;
  color: #1a1d21;
  line-height: 1.5;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f5f6f8;
  position: relative;
}

/* ---------------- 顶部：城市 + 搜索 ---------------- */
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 10px 12px;
}

.city-picker {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1a1d21;
  cursor: pointer;
}

.arrow { font-size: 10px; color: #9aa0a6; margin-left: 2px; }

/* 地图找房入口 */
.map-entry {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: #f4f5f7;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.map-entry:active { background: #e8eaee; }

.search-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  background: #f4f5f7;
  border-radius: 20px;
  height: 38px;
  padding: 0 32px 0 14px;
}

.search-icon { font-size: 13px; margin-right: 6px; opacity: 0.7; }

.search-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: #1a1d21;
}
.search-input::placeholder { color: #a8adb6; }

.search-clear {
  position: absolute;
  right: 8px;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  background: #d5d8dd;
  color: #fff;
  font-size: 11px;
  padding: 0;
}

/* ---------------- 数据总览 ---------------- */
.summary {
  display: flex;
  background: #fff;
  padding: 14px 0 16px;
  margin-bottom: 8px;
}

.summary-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.summary-num {
  font-size: 19px;
  font-weight: 500;
  color: #c8332a;
  line-height: 1.2;
}

.summary-label {
  font-size: 11px;
  color: #8a8f99;
  margin-top: 3px;
}

/* ---------------- 筛选栏（吸顶） ---------------- */
.filter-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  background: #fff;
  border-top: 1px solid #f0f1f3;
  padding: 0 4px;
  overflow-x: auto;
  white-space: nowrap;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-item {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 8px;
  font-size: 13px;
  color: #4b5563;
}

.filter-item.active {
  color: #c8332a;
  font-weight: 600;
}
.filter-item.active .caret { color: #c8332a; }

.caret { font-size: 9px; margin-left: 2px; color: #9aa0a6; }

.type-chip { padding-left: 10px; padding-right: 10px; }

/* ---------------- 结果统计条 ---------------- */
.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 6px;
}

.result-count-col {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.result-count { font-size: 12px; color: #4b5563; }

.result-split {
  font-size: 11px;
  color: #c8332a;
  background: rgba(200, 51, 42, 0.08);
  border: 1px solid rgba(200, 51, 42, 0.25);
  border-radius: 10px;
  padding: 1px 8px;
}
.result-split.active {
  background: #c8332a;
  color: #fff;
  border-color: #c8332a;
  font-weight: 600;
}

.result-sort { font-size: 11px; color: #9aa0a6; flex-shrink: 0; }

/* ---------------- 房源卡片 ---------------- */
.list { padding: 0 12px; }

.card {
  display: flex;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  cursor: pointer;
}

.thumb {
  position: relative;
  width: 118px;
  height: 96px;
  flex-shrink: 0;
  background: #f0f1f3;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #a8adb6;
}

.status-tag {
  position: absolute;
  left: 4px;
  top: 4px;
  padding: 2px 6px;
  font-size: 10px;
  color: #fff;
  border-radius: 3px;
  font-weight: 500;
}
.status-tag.live { background: #c8332a; }
.status-tag.soon { background: rgba(0, 0, 0, 0.55); }

.platform-tag {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 2px 6px;
  font-size: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-top-right-radius: 4px;
}

.discount-tag {
  position: absolute;
  right: 4px;
  top: 4px;
  padding: 2px 6px;
  font-size: 10px;
  color: #fff;
  background: #c8332a;
  border-radius: 3px;
}

.mode-tag {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 2px 6px;
  font-size: 10px;
  color: #fff;
  background: #e67e22;
  border-top-left-radius: 4px;
}

.card-body {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 14px;
  color: #1a1d21;
  line-height: 1.35;
  height: 2.7em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.price-line {
  display: flex;
  align-items: baseline;
  margin-top: 4px;
}

.price-symbol { font-size: 10px; color: #c8332a; margin-right: 3px; }

.price-num {
  font-size: 17px;
  font-weight: 600;
  color: #c8332a;
  line-height: 1;
}

.price-unit { font-size: 10px; color: #c8332a; margin-left: 1px; }

.market {
  font-size: 11px;
  color: #9aa0a6;
  text-decoration: line-through;
  margin-left: 8px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
  color: #6b7280;
}

.foot-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 4px;
}

.foot-time { font-size: 11px; color: #8a8f99; }
.foot-time.live { color: #c8332a; font-weight: 600; }

.foot-type {
  font-size: 10px;
  color: #9aa0a6;
  background: #f4f5f7;
  padding: 1px 6px;
  border-radius: 3px;
}

/* ---------------- 加载 / 空态 ---------------- */
.load-more {
  text-align: center;
  font-size: 12px;
  color: #a8adb6;
  padding: 14px 0 20px;
}
.load-more button { color: #c8332a; font-size: 13px; padding: 6px 16px; }

.empty { text-align: center; font-size: 13px; color: #a8adb6; padding: 50px 20px; }
.loading { text-align: center; font-size: 13px; color: #a8adb6; padding: 30px 0; }

/* ---------------- 数据来源脚注 ---------------- */
.source-note {
  text-align: center;
  font-size: 10px;
  color: #b0b5bd;
  padding: 4px 20px 24px;
  line-height: 1.6;
  cursor: pointer;
}

/* ======================= 浮层通用 ======================= */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.panel {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 12px 12px 0 0;
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 72vh;
  overflow-y: auto;
}

.panel-title {
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 14px;
}

.panel-note {
  font-size: 11px;
  color: #9aa0a6;
  line-height: 1.7;
  margin-top: 12px;
}

.panel-confirm {
  width: 100%;
  margin-top: 16px;
  height: 42px;
  line-height: 42px;
  text-align: center;
  background: #c8332a;
  border-radius: 21px;
  font-size: 14px;
  color: #fff;
}

/* 区域九宫格 */
.district-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.district-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  border: 1px solid #eef0f3;
  border-radius: 8px;
  cursor: pointer;
}
.district-cell.active {
  border-color: #c8332a;
  background: rgba(200, 51, 42, 0.05);
}

.district-name { font-size: 13px; color: #1a1d21; }
.district-cell.active .district-name { color: #c8332a; font-weight: 600; }

.district-count { font-size: 11px; color: #9aa0a6; margin-top: 3px; }

/* 价格输入 */
.price-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-input {
  flex: 1;
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  outline: none;
}
.price-input:focus { border-color: #c8332a; }

.price-sep { color: #9aa0a6; }

.quick-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quick-chip {
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  font-size: 12px;
  color: #4b5563;
}
.quick-chip:active { border-color: #c8332a; color: #c8332a; }

/* 模式 / 排序选项 */
.opt-list .opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 4px;
  border-bottom: 1px solid #f0f1f3;
  cursor: pointer;
}

.opt-name { font-size: 14px; color: #1a1d21; }
.opt-desc { font-size: 11px; color: #9aa0a6; }

.opt.active .opt-name { color: #c8332a; font-weight: 600; }
.opt.active .opt-name::after { content: " ✓"; }

.source-list .source-item {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.8;
  padding: 5px 0;
}

/* ======================= 专家面板 ======================= */
.expert-panel {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 12px 12px 0 0;
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
}

.ep-title { font-size: 15px; font-weight: 600; text-align: center; }
.ep-sub { font-size: 11px; color: #8a8f99; text-align: center; margin: 4px 0 12px; }

.ep-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f1f3;
  cursor: pointer;
}

/* 号码待补充：弱化显示，不可点 */
.ep-item.disabled { cursor: default; opacity: 0.55; }
.ep-item.disabled .ep-call { background: #c3c8d0; }

.ep-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #c8332a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ep-info { flex: 1; margin-left: 12px; display: flex; flex-direction: column; }
.ep-name { font-size: 14px; font-weight: 600; color: #1a1d21; }
.ep-desc { font-size: 11px; color: #8a8f99; margin-top: 3px; }

.ep-call {
  height: 30px;
  line-height: 30px;
  padding: 0 16px;
  border-radius: 15px;
  background: #c8332a;
  color: #fff;
  font-size: 12px;
  flex-shrink: 0;
}

.ep-cancel {
  width: 100%;
  margin-top: 12px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  background: #f4f5f7;
  border-radius: 22px;
  font-size: 14px;
  color: #4b5563;
}

/* ======================= 详情页 ======================= */
.detail-back {
  padding: 10px 12px;
  font-size: 13px;
  color: #4b5563;
  background: #fff;
  cursor: pointer;
}

/* 图集 */
.swiper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f0f1f3;
  overflow: hidden;
}
.swiper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.swiper-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
}
.swiper-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}
.swiper-dot.active { background: #fff; }
.swiper-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 18px;
  line-height: 32px;
  text-align: center;
}
.swiper-nav.prev { left: 8px; }
.swiper-nav.next { right: 8px; }

/* 价格区 */
.price-section {
  background: #fff;
  padding: 14px 12px 12px;
  margin-bottom: 8px;
}

.price-row { display: flex; }

.price-block { flex: 1; display: flex; flex-direction: column; }
.price-label { font-size: 11px; color: #8a8f99; }
.price-main { display: flex; align-items: baseline; margin-top: 4px; }
.price-big { font-size: 22px; font-weight: 600; color: #c8332a; line-height: 1; }
.price-big.market { color: #1a1d21; font-size: 18px; }
.price-big.small { font-size: 17px; color: #1a1d21; }
.price-unit-s { font-size: 11px; color: #8a8f99; margin-left: 2px; }

.discount-bar { margin-top: 12px; }
.discount-track {
  height: 6px;
  background: #f0f1f3;
  border-radius: 3px;
  overflow: hidden;
}
.discount-fill { height: 100%; background: #c8332a; border-radius: 3px; }
.discount-text { font-size: 11px; color: #c8332a; margin-top: 5px; display: block; }

/* 信息区块通用 */
.info-section {
  background: #fff;
  padding: 14px 12px;
  margin-bottom: 8px;
}

.info-title { font-size: 16px; font-weight: 600; line-height: 1.45; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.tag {
  font-size: 11px;
  padding: 2px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  color: #4b5563;
}
.tag.tag-live { color: #fff; background: #c8332a; border-color: #c8332a; }
.tag.tag-soon { color: #fff; background: rgba(0, 0, 0, 0.55); border-color: transparent; }
.tag.tag-orange { color: #fff; background: #e67e22; border-color: #e67e22; }
.tag.tag-red { color: #c8332a; border-color: rgba(200, 51, 42, 0.35); }
.tag.tag-link { color: #c8332a; border-color: rgba(200, 51, 42, 0.35); cursor: pointer; }

.attr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-top: 14px;
}
.attr-item { display: flex; flex-direction: column; }
.attr-label { font-size: 11px; color: #8a8f99; }
.attr-value { font-size: 13px; color: #1a1d21; margin-top: 3px; }

.auction-row { display: flex; margin-top: 16px; border-top: 1px solid #f0f1f3; padding-top: 12px; }
.auction-cell { flex: 1; display: flex; flex-direction: column; }
.auction-time { font-size: 13px; color: #1a1d21; margin-top: 3px; font-weight: 500; }

.end-note {
  font-size: 11px;
  color: #9aa0a6;
  line-height: 1.7;
  margin-top: 10px;
}

.section-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; }

.row-item {
  display: flex;
  padding: 7px 0;
  border-bottom: 1px solid #f6f7f9;
  font-size: 13px;
}
.row-label { width: 52px; color: #8a8f99; flex-shrink: 0; }
.row-value { color: #1a1d21; flex: 1; word-break: break-all; }

.map-btn {
  margin-top: 10px;
  color: #c8332a;
  font-size: 13px;
  cursor: pointer;
}

/* 成本测算 */
.cost-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.cost-item {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
}
.cost-label { font-size: 11px; color: #8a8f99; }
.cost-value { font-size: 15px; font-weight: 600; color: #1a1d21; margin-top: 3px; }
.cost-value.red { color: #c8332a; }

.cost-note { font-size: 10px; color: #9aa0a6; margin-top: 10px; line-height: 1.6; }

/* 拍卖文件 */
.file-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f6f7f9;
  cursor: pointer;
}
.file-icon { font-size: 15px; margin-right: 8px; }
.file-name { flex: 1; font-size: 13px; color: #1a1d21; word-break: break-all; }
.file-arrow { color: #c5c9d0; margin-left: 6px; }

/* 风险提示 */
.risk-section .risk-item {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.8;
}

.memo-row { margin-top: 10px; display: flex; font-size: 11px; }
.memo-label { color: #8a8f99; flex-shrink: 0; }
.memo-value { color: #6b7280; }

/* 详情底部操作栏 */
.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  max-width: 480px;
  margin: 0 auto;
  height: 58px;
  background: #fff;
  border-top: 1px solid #eceef1;
  display: flex;
  align-items: center;
  padding: 0 10px;
  padding-bottom: env(safe-area-inset-bottom);
}

.footer-icon {
  width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.fi-icon { font-size: 18px; color: #6b7280; line-height: 1; }
.fi-label { font-size: 10px; color: #8a8f99; margin-top: 3px; }

.footer-btn {
  flex: 1;
  height: 38px;
  line-height: 38px;
  text-align: center;
  font-size: 14px;
  color: #1a1d21;
  background: #f4f5f7;
  border-radius: 19px;
  margin-left: 8px;
}
.footer-btn.primary { background: #c8332a; color: #fff; }

/* 图片查看器 */
.img-viewer {
  align-items: center;
  background: rgba(0, 0, 0, 0.9);
  cursor: zoom-out;
}
.img-viewer img { max-width: 100%; max-height: 90vh; object-fit: contain; }

/* toast */
.toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 6px;
  max-width: 80%;
  text-align: center;
}

.loading-page { text-align: center; font-size: 13px; color: #a8adb6; padding: 80px 0; }

/* PC 大屏：详情底部栏与内容底部留白 */
#view-detail { padding-bottom: 72px; }
