/* 古都找铺出租 H5 — 与小程序同款蓝色主题 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --blue: #2b6de8;
  --blue-light: #aecbff;
  --blue-bg: rgba(43, 109, 232, 0.08);
  --red: #e0342b;
  --orange: #f2802e;
  --text: #22262e;
  --text-2: #4a5464;
  --text-3: #8a94a6;
  --bg: #f5f6f9;
  --card: #ffffff;
}

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  padding-bottom: calc(58px + env(safe-area-inset-bottom));
}

.hidden { display: none !important; }

/* ---- 顶部 ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(135deg, #4a86f0, #2b6de8);
  color: #fff;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
}
.topbar-inner { display: flex; align-items: baseline; gap: 10px; max-width: 720px; margin: 0 auto; }
.brand { font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.brand-sub { font-size: 11px; opacity: .85; }

main { max-width: 720px; margin: 0 auto; }
.page { padding: 12px; }
.page-title { font-size: 17px; margin: 6px 2px 12px; }

/* ---- 轮播 ---- */
.banner-swiper { position: relative; border-radius: 12px; overflow: hidden; }
.banner-track { display: flex; transition: transform .45s ease; }
.banner-slide { position: relative; flex: 0 0 100%; height: 132px; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-mask { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.45)); }
.banner-copy { position: absolute; left: 14px; bottom: 12px; color: #fff; }
.banner-copy .t { font-size: 16px; font-weight: 600; }
.banner-copy .s { font-size: 11px; opacity: .9; margin-top: 2px; }
.banner-dots { position: absolute; right: 12px; bottom: 8px; display: flex; gap: 5px; }
.banner-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.4); }
.banner-dots i.on { background: #fff; }

/* ---- 搜索与筛选 ---- */
.search-bar {
  display: flex; gap: 8px; margin: 12px 0 10px;
  background: var(--card); border-radius: 10px; padding: 8px;
  box-shadow: 0 2px 8px rgba(28,36,51,.05);
}
.search-bar input { flex: 1; border: none; outline: none; font-size: 14px; padding: 6px 10px; background: transparent; }
.search-btn {
  border: none; background: var(--blue); color: #fff; font-size: 14px;
  padding: 0 18px; border-radius: 8px;
}

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; font-size: 13px; color: var(--text-2);
  background: var(--card); border: 1px solid #e6eaf1; border-radius: 16px;
  padding: 5px 14px;
}
.chip.on { color: #fff; background: var(--blue); border-color: var(--blue); }

.result-bar { font-size: 12px; color: var(--text-3); padding: 2px 4px 8px; }
.list-tip { text-align: center; color: var(--text-3); font-size: 13px; padding: 18px 0; }

/* ---- 铺源卡片 ---- */
.shop-list { display: flex; flex-direction: column; gap: 12px; }
.shop-card {
  display: flex; background: var(--card); border-radius: 12px; overflow: hidden;
  border: 1px solid var(--blue-light);
  box-shadow: 0 3px 12px rgba(43,109,232,.08);
}
.shop-media { position: relative; width: 128px; flex-shrink: 0; }
.shop-cover { width: 100%; height: 100%; min-height: 108px; object-fit: cover; display: block; }
.img-ph {
  width: 100%; height: 100%; min-height: 108px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.9); letter-spacing: 3px; font-size: 14px;
}
.ph-blue { background: linear-gradient(135deg,#6ea8ff,#2b6de8); }
.ph-orange { background: linear-gradient(135deg,#ffc06e,#f2802e); }
.ph-teal { background: linear-gradient(135deg,#6edcc8,#1fa88f); }
.ph-purple { background: linear-gradient(135deg,#b39cf5,#7a5af5); }

.media-tag {
  position: absolute; top: 0; left: 0; color: #fff;
  font-size: 11px; letter-spacing: 1px; padding: 3px 9px;
}
.mt-blue { background: rgba(30,95,224,.92); }
.mt-orange { background: rgba(224,122,30,.92); }
.media-tag-top {
  position: absolute; top: 0; right: 0; color: #fff;
  font-size: 11px; letter-spacing: 1px; padding: 3px 9px;
  background: rgba(224,52,43,.95);
}

.shop-body { flex: 1; min-width: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.shop-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-row { display: flex; align-items: baseline; gap: 8px; }
.price-main { color: var(--red); font-size: 17px; font-weight: 700; }
.area-badge { font-size: 12px; color: var(--text-2); background: var(--blue-bg); border-radius: 4px; padding: 1px 7px; }
.tag-row { display: flex; gap: 6px; flex-wrap: nowrap; overflow: hidden; }
.tag-chip { font-size: 11px; color: var(--blue); background: var(--blue-bg); border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
.foot-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); }
.foot-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- 案例卡片 ---- */
.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.case-card { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(28,36,51,.05); }
.case-img { width: 100%; height: 100px; object-fit: cover; display: block; }
.case-img-ph { width: 100%; height: 100px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.9); letter-spacing: 3px; }
.case-body { padding: 10px 12px; }
.case-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-meta { display: flex; justify-content: space-between; font-size: 12px; }
.case-price { color: var(--red); font-weight: 600; }
.case-area { color: var(--text-3); }

/* ---- 求租卡片 ---- */
.rent-list { display: flex; flex-direction: column; gap: 12px; }
.rent-card { background: var(--card); border-radius: 12px; padding: 14px; box-shadow: 0 2px 8px rgba(28,36,51,.05); }
.rent-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rent-avatar {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 17px; background: linear-gradient(135deg,#6ea8ff,#2b6de8);
}
.rent-title { font-size: 15px; font-weight: 600; }
.rent-time { font-size: 11px; color: var(--text-3); }
.rent-line { display: flex; gap: 8px; font-size: 13px; color: var(--text-2); padding: 3px 0; }
.rent-line b { color: var(--text); font-weight: 500; }
.rent-desc { font-size: 13px; color: var(--text-3); margin-top: 6px; line-height: 1.6; }

/* ---- 联系页 ---- */
.contact-card { background: var(--card); border-radius: 14px; padding: 26px 18px; text-align: center; box-shadow: 0 2px 8px rgba(28,36,51,.05); }
.contact-qr { width: 200px; height: 200px; object-fit: cover; border-radius: 10px; border: 1px solid #eef1f6; }
.contact-hint { font-size: 13px; color: var(--text-3); margin: 14px 0 10px; }
.contact-wechat { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 8px; padding: 9px 14px; font-size: 14px; }
.contact-wechat b { color: var(--blue); }
.copy-btn { border: none; background: var(--blue); color: #fff; font-size: 13px; border-radius: 6px; padding: 5px 14px; margin-left: 6px; }
.contact-note { font-size: 12px; color: var(--text-3); margin-top: 14px; }

/* ---- 详情层 ---- */
.detail-layer { position: fixed; inset: 0; z-index: 100; background: var(--bg); overflow-y: auto; padding-bottom: 90px; }
.detail-topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  box-shadow: 0 1px 6px rgba(28,36,51,.06);
}
.detail-back, .detail-share { border: none; background: transparent; font-size: 15px; color: var(--text-2); padding: 4px 6px; }
.detail-share { color: var(--blue); }
.detail-title { font-size: 15px; font-weight: 600; }

.detail-hero { position: relative; background: #000; }
.detail-hero video, .detail-hero img { width: 100%; max-height: 300px; object-fit: contain; display: block; }
.detail-body-wrap { padding: 12px; max-width: 720px; margin: 0 auto; }

.detail-card { background: var(--card); border-radius: 12px; padding: 14px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(28,36,51,.05); }
.detail-name { font-size: 17px; font-weight: 700; line-height: 1.4; }
.detail-price { color: var(--red); font-size: 20px; font-weight: 700; margin-top: 8px; }
.detail-price small { font-size: 12px; font-weight: 400; color: var(--text-3); }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 6px; }
.metric { text-align: center; padding: 8px 2px; background: var(--bg); border-radius: 8px; }
.metric-label { font-size: 12px; color: var(--blue); font-weight: 600; }
.metric-value { font-size: 14px; font-weight: 600; margin-top: 4px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-value.price { color: var(--red); }

.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.detail-tags .tag-chip { font-size: 12px; padding: 3px 10px; }

.desc-text { font-size: 14px; color: var(--text-2); line-height: 1.7; white-space: pre-wrap; }
.addr-line { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.map-link { display: inline-block; margin-top: 8px; color: var(--blue); font-size: 13px; text-decoration: none; border: 1px solid var(--blue-light); border-radius: 6px; padding: 4px 12px; }

/* 底部联系栏 */
.detail-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
  display: flex; align-items: center; gap: 12px;
  background: var(--card); padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -3px 14px rgba(28,36,51,.08);
}
.contact-note-line { flex: 1; font-size: 12px; color: var(--text-3); line-height: 1.5; }
.contact-note-line b { color: var(--text); font-size: 14px; }
.call-btn {
  border: none; color: #fff; font-size: 16px; font-weight: 600;
  background: linear-gradient(90deg, #ffb056, #f0631d);
  border-radius: 24px; padding: 12px 28px;
  box-shadow: 0 4px 12px rgba(240,99,29,.35);
}

/* 上下铺源悬浮按钮 */
.detail-fabs { position: fixed; right: 14px; bottom: 88px; z-index: 105; display: flex; flex-direction: column; gap: 10px; }
.fab {
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: var(--card); color: var(--blue); font-size: 18px;
  box-shadow: 0 3px 10px rgba(28,36,51,.15);
}
.fab:disabled { color: #c8cedb; }
.fab.hidden-slot { visibility: hidden; }

/* ---- 底部导航 ---- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  display: flex; background: var(--card);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(28,36,51,.06);
}
.tab-item {
  flex: 1; border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; color: var(--text-3); padding: 7px 0 6px;
}
.tab-icon { font-size: 20px; line-height: 1; }
.tab-item.active { color: var(--blue); font-weight: 600; }

@media (min-width: 720px) {
  .shop-media { width: 160px; }
}
