/* ==========================================================================
   C 端前台信息流 / 详情 / 我的（feed.css）
   视觉令牌复用 style.css 中的 :root；本文件只补 C 端版面。
   依据 design/visual-spec.md 与 design/样张，字段取值见 docs/c-end-api-contract.md。
   ========================================================================== */

/* C 端页面把手机壳限高为视口，保证内部列表独立滚动、底部 tab 固定在视口 */
.phone { height: 100vh; overflow: hidden; }
@media (min-width: 420px) {
  .phone { height: calc(100vh - 48px); }
}

/* ---------- 顶部：城市 + 搜索 + 收藏入口 ---------- */
.feed-topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 0 12px; flex: none; }
.feed-topbar-row { height: 44px; display: flex; align-items: center; gap: 10px; }
.feed-city { display: flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600; color: var(--text-1); white-space: nowrap; cursor: pointer; }
.feed-city svg { flex: none; }
.feed-search {
  flex: 1; height: 30px; background: #F2F3F5; border-radius: 999px;
  display: flex; align-items: center; gap: 6px; padding: 0 12px;
  color: var(--text-3); font-size: 13px; min-width: 0;
}
.feed-search input {
  flex: 1; border: none; background: transparent; outline: none;
  font-size: 13px; color: var(--text-1); min-width: 0;
}
.feed-search input::placeholder { color: var(--text-3); }
.feed-top-icon { flex: none; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--text-2); cursor: pointer; }

/* ---------- 筛选胶囊行（极简：少量高频胶囊 + 筛选 + 收藏） ---------- */
.feed-filters {
  background: #fff; border-bottom: 1px solid var(--line); height: 40px;
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
  overflow-x: auto; scrollbar-width: none; flex: none;
}
.feed-filters::-webkit-scrollbar { display: none; }
.feed-filters .pill { flex: none; cursor: pointer; }
.pill-count { font-size: 11px; color: var(--brand); margin-left: 2px; }
.pill.fav { display: inline-flex; align-items: center; gap: 4px; }

/* 选中态：深蓝 #123A63 细描边，未选中白底灰字 */
.feed-filters .pill.active { background: #fff; border-color: var(--brand); color: var(--brand); }

/* ---------- 信息流容器 ---------- */
.feed-scroll { flex: 1; overflow-y: auto; padding: 8px 12px 72px; }
.feed-scroll::-webkit-scrollbar { display: none; }
.refresh-tip { height: 32px; display: none; align-items: center; justify-content: center; font-size: 12px; color: var(--text-3); }
.refresh-tip.show { display: flex; }

/* ---------- 卡片 ---------- */
.feed-card { background: var(--card); border-radius: var(--radius-card); padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow-card); }
.fc-head { display: flex; align-items: center; gap: 9px; height: 36px; }
.fc-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600;
}
.fc-avatar-img img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.fc-head-meta { flex: 1; min-width: 0; }
.fc-name { font-size: 15px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.fc-name .ver-badge { flex: none; font-size: 10px; color: var(--brand); background: var(--brand-soft); border-radius: 4px; height: 16px; line-height: 16px; padding: 0 5px; }
.fc-name .pin { flex: none; font-size: 10px; color: var(--text-3); background: var(--bg); border-radius: 4px; height: 16px; line-height: 16px; padding: 0 5px; }
.fc-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.fc-body { font-size: 15px; line-height: 1.55; margin-top: 9px; color: var(--text-1); }
.fc-body .tag-hash { color: var(--brand); }
.fc-body .price { color: var(--gold); font-weight: 600; }

.fc-badges { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.tbadge { font-size: 10px; height: 16px; line-height: 16px; padding: 0 6px; border-radius: 4px; display: inline-flex; align-items: center; gap: 3px; }
.tbadge.pano { background: var(--brand-soft); color: var(--brand); }
.tbadge.book { background: #fff; border: 1px solid var(--brand); color: var(--brand); }
.tbadge.deal { background: var(--gold); color: #fff; }
.tbadge.demo { background: var(--bg); color: var(--text-3); }
.fc-quote { font-size: 13px; color: var(--text-2); margin-left: auto; }
.fc-quote b { color: var(--gold); font-size: 15px; }

/* 九宫格：3 列等宽；1 图 16:10 单图；2 图两列；4 图 2×2；其余三列顺排 */
.fc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 10px; }
.fc-cell { position: relative; overflow: hidden; border-radius: 6px; background: #eee; }
.fc-cell img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.fc-grid.g1 { grid-template-columns: 1fr; }
.fc-grid.g1 img { aspect-ratio: 16 / 10; border-radius: 8px; }
.fc-grid.g2 { grid-template-columns: repeat(2, 1fr); }
.fc-grid.g4 { grid-template-columns: repeat(2, 1fr); }
/* 全景角标：浮在最后一格右下角，不占整行 */
.gc-pano {
  position: absolute; right: 4px; bottom: 4px; background: rgba(0, 0, 0, .62);
  color: #fff; font-size: 10px; line-height: 16px; padding: 0 8px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 3px;
}

.fc-meta { display: flex; align-items: center; margin-top: 10px; font-size: 12px; color: var(--text-3); }
.fc-meta .loc { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-meta .time { margin: 0 8px; flex: none; }
.fc-more { flex: none; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--text-3); cursor: pointer; border-radius: 6px; }
.fc-more:active { background: var(--bg); }

/* 卡片操作行：评论 / 收藏 / 电话 */
.fc-actions { display: flex; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.fc-action { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); padding: 4px 10px 4px 0; cursor: pointer; }
.fc-action:active { opacity: .7; }
.fc-action .count { font-variant-numeric: tabular-nums; }
.fc-action.faved { color: var(--gold); }
.fc-action.right { margin-left: auto; padding-left: 0; padding-right: 0; }

/* 预约留资引导条 */
.fc-cta {
  margin-top: 10px; height: 36px; border-radius: 8px; background: var(--brand-soft);
  color: var(--brand); font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
}
.fc-cta:active { background: var(--brand); color: #fff; }

/* 底部加载 */
.load-more { height: 40px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-3); }

/* ---------- 底部 tab bar：仅首页 / 我的 ---------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 52px; background: #fff;
  border-top: 1px solid var(--line); display: flex; z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #8A9099; cursor: pointer; }
.tab.active { color: var(--brand); }
.tab .t-label { font-size: 11px; }

/* ---------- 通用页面（详情 / 我的子列表） ---------- */
.page-scroll { flex: 1; overflow-y: auto; padding: 8px 12px 76px; }
.page-scroll::-webkit-scrollbar { display: none; }

/* ---------- 详情 ---------- */
.detail-card { background: var(--card); border-radius: var(--radius-card); padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow-card); }
.detail-content { font-size: 15px; line-height: 1.6; margin-top: 9px; color: var(--text-1); white-space: pre-wrap; }
.contact-row { display: flex; gap: 10px; margin-top: 12px; }
.btn-row { flex: 1; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.btn-row.primary { background: var(--brand); color: #fff; }
.btn-row.ghost { background: var(--brand-soft); color: var(--brand); }
.detail-sub { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* 评论区 */
.comment-section-title { font-size: 13px; color: var(--text-3); margin: 16px 4px 8px; }
.comment-item { background: #fff; border-radius: var(--radius-card); padding: 12px; margin-bottom: 8px; }
.comment-top { display: flex; align-items: center; gap: 8px; }
.comment-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: none; }
.comment-name { font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.comment-time { font-size: 12px; color: var(--text-3); margin-left: auto; }
.comment-text { font-size: 14px; line-height: 1.55; margin-top: 8px; color: var(--text-1); }
.comment-status { font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.comment-status.pending { color: var(--gold); }
.comment-status.rejected { color: var(--danger); }
.comment-status .reason { color: var(--text-3); }
.comment-tag { font-size: 10px; height: 16px; line-height: 16px; padding: 0 5px; border-radius: 4px; }
.comment-tag.virtual { background: var(--bg); color: var(--text-3); }
.comment-tag.mine { background: var(--brand-soft); color: var(--brand); }

/* 评论输入条 */
.comment-bar {
  position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line);
  display: flex; gap: 8px; align-items: center; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); z-index: 30;
}
.comment-bar input {
  flex: 1; height: 36px; border: 1px solid var(--line); border-radius: 999px;
  padding: 0 14px; font-size: 14px; background: #F7F8FA; outline: none;
}
.comment-bar input:focus { border-color: var(--brand); background: #fff; }
.comment-bar .send { flex: none; height: 36px; padding: 0 16px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 600; border: none; cursor: pointer; }
.comment-bar .send:disabled { opacity: .5; }
.comment-bar .login-hint { flex: 1; font-size: 13px; color: var(--text-3); text-align: center; }

/* ---------- 我的 ---------- */
.mine-head { display: flex; align-items: center; gap: 12px; padding: 4px 0 16px; }
.mine-head .fc-avatar { width: 48px; height: 48px; font-size: 20px; }
.mine-nick { font-size: 17px; font-weight: 600; color: var(--text-1); }
.mine-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.mine-group { background: #fff; border-radius: var(--radius-card); overflow: hidden; margin-bottom: 8px; }
.mine-row { height: 52px; display: flex; align-items: center; padding: 0 12px; font-size: 15px; color: var(--text-1); border-bottom: 1px solid var(--line); cursor: pointer; }
.mine-group .mine-row:last-child { border-bottom: none; }
.mine-row .row-count { margin-left: auto; font-size: 13px; color: var(--text-3); }
.mine-row .arrow { margin-left: 8px; color: var(--text-3); }
.mine-row.disabled { color: var(--text-3); cursor: default; }

/* 子列表卡片（收藏 / 留言 / 转发） */
.list-item { background: #fff; border-radius: var(--radius-card); padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow-card); }
.list-item .li-title { font-size: 15px; font-weight: 600; color: var(--text-1); }
.list-item .li-body { font-size: 13px; line-height: 1.55; color: var(--text-2); margin-top: 6px; }
.list-item .li-meta { font-size: 12px; color: var(--text-3); margin-top: 8px; display: flex; gap: 8px; align-items: center; }

/* ---------- 空态 / 断网态 ---------- */
.empty { background: #fff; border-radius: var(--radius-card); padding: 48px 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty svg { opacity: .5; }
.empty-text { font-size: 14px; color: var(--text-3); text-align: center; line-height: 1.6; }
.empty .retry { margin-top: 4px; }
.offline-banner {
  display: none; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 8px;
  background: #FBEAE9; color: var(--danger); font-size: 13px; margin-bottom: 12px;
}
.offline-banner.show { display: flex; }

/* ---------- 大图浏览 ---------- */
.viewer { position: fixed; inset: 0; background: rgba(0, 0, 0, .92); display: none; z-index: 50; }
.viewer.open { display: block; }
.viewer-img { width: 100%; height: 100%; object-fit: contain; }
.viewer-count { position: absolute; top: 20px; left: 0; right: 0; text-align: center; color: #fff; font-size: 13px; }
.viewer-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; color: #fff; display: flex; align-items: center; justify-content: center; opacity: .8; cursor: pointer; }
.viewer-nav.prev { left: 8px; }
.viewer-nav.next { right: 8px; }

/* ---------- 底部弹层 ---------- */
.sheet-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); display: none; z-index: 40; }
.sheet-mask.open { display: block; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 12px 12px 0 0;
  z-index: 41; transform: translateY(100%); transition: transform .2s ease; overflow: hidden; display: none;
}
.sheet.open { display: block; transform: translateY(0); }
.sheet-item { height: 48px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text-1); border-bottom: 1px solid var(--line); cursor: pointer; }
.sheet-item.danger { color: var(--danger); }
.sheet-options { padding: 4px 16px 8px; max-height: 56vh; overflow-y: auto; }
.sheet-options .sheet-item { justify-content: flex-start; padding: 0 4px; }
.sheet-options .sheet-item.selected { color: var(--brand); font-weight: 600; }
.sheet-options .sheet-item:last-child { border-bottom: none; }
.sheet-cancel { height: 48px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text-3); margin-top: 8px; background: #fff; cursor: pointer; }
.sheet-title { padding: 18px 16px 6px; font-size: 15px; font-weight: 600; text-align: center; }
.sheet-desc { padding: 0 16px 16px; font-size: 13px; color: var(--text-3); text-align: center; line-height: 1.5; }
.sheet-desc b { color: var(--brand); }
.sheet-actions { display: flex; border-top: 1px solid var(--line); }
.sheet-actions .a { flex: 1; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 15px; cursor: pointer; }
.sheet-actions .a.cancel { color: var(--text-3); border-right: 1px solid var(--line); }
.sheet-actions .a.ok { color: var(--brand); font-weight: 600; }
.sheet-form { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.sheet-form input, .sheet-form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #F7F8FA;
  padding: 10px 12px; font-size: 14px; outline: none;
}
.sheet-form input:focus, .sheet-form textarea:focus { border-color: var(--brand); background: #fff; }
.sheet-form .agree { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.phone-num { padding: 0 16px 16px; text-align: center; font-size: 18px; font-weight: 600; color: var(--brand); letter-spacing: 1px; display: none; }
.phone-num.empty { color: var(--text-3); font-size: 14px; font-weight: 400; letter-spacing: 0; }
