/* ===== 塞浦路斯房产门户 H5 全局样式 v2 - 2026.09.21 微交互增强 ===== */
:root {
  --primary: #1e6fc4;
  --primary-dark: #16589e;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --bg: #f3f5f7;
  --card: #ffffff;
  --text: #1f2937;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 1px 4px rgba(0, 0, 0, .06);
  --shadow-lg: 0 8px 24px rgba(30, 111, 196, .12);
  --transition: cubic-bezier(.4, 0, .2, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
.page { max-width: 640px; margin: 0 auto; min-height: 100vh; background: var(--bg); }

/* ===== 顶部品牌栏 ===== */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, #2f8ad0 60%, #4fa8e0 100%);
  color: #fff;
  padding: 14px 16px 44px;
  position: relative;
}
.header h1 { font-size: 19px; font-weight: 700; letter-spacing: .5px; }
.header .sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.header-logo { transition: transform .3s var(--transition); }
.header-logo:active { transform: scale(.92); }

.wx-bar {
  display: flex; flex-wrap: wrap; gap: 6px 12px;
  margin-top: 6px; font-size: 11px; color: rgba(255, 255, 255, .92);
}
.wx-bar .wx-item { background: rgba(255, 255, 255, .14); padding: 2px 8px; border-radius: 10px; white-space: nowrap; backdrop-filter: blur(4px); }
.wx-bar .wx-item.rate { background: rgba(255, 214, 102, .25); font-weight: 600; }
.wx-bar .wx-loading { opacity: .7; }

/* ===== 搜索框 - focus 发光动画 ===== */
.search-box {
  position: relative;
  margin-top: 12px;
  display: flex;
  gap: 8px;
}
.search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 22px;
  padding: 10px 14px 10px 38px;
  font-size: 14px;
  outline: none;
  background: rgba(255, 255, 255, .95);
  color: var(--text);
  border: 2px solid transparent;
  transition: all .25s var(--transition);
}
.search-box input:focus {
  border-color: #ffd166;
  box-shadow: 0 0 0 4px rgba(255, 209, 102, .25);
  background: #fff;
}
.search-box select {
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns=http://www.w3.org/2000/svg width=10 height=6><path d=M1 1l4 4 4-4 stroke=%236b7280 fill=none stroke-width=1.5/></svg>") no-repeat right 12px center;
  padding: 0 28px 0 14px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: all .2s var(--transition);
}
.search-box select:active { transform: scale(.96); }
.search-box .icon {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--text-light);
  pointer-events: none;
}

/* ===== 导航按钮 - 渐变+按压效果 ===== */
.nav-btn {
  flex: 1; text-align: center; padding: 8px 4px;
  border-radius: 10px; font-size: 12.5px; text-decoration: none;
  font-weight: 600; transition: all .2s var(--transition);
  cursor: pointer; border: none;
}
.nav-btn:active { transform: scale(.94); }
.nav-btn.active { box-shadow: 0 4px 12px rgba(0,0,0,.18); }

/* ===== 筛选栏 ===== */
.filter-bar {
  background: var(--card);
  margin: -30px 10px 0;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
  padding: 10px 8px 8px;
  position: relative;
  z-index: 5;
}
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 2px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 18px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s var(--transition);
}
.chip:active { transform: scale(.95); }
.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(30, 111, 196, .3);
}
.chip .cnt { opacity: .65; margin-left: 2px; font-size: 11px; }
.chip.active .cnt { opacity: .85; }

.filter-row { display: flex; gap: 6px; }
.filter-row select {
  flex: 1;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid var(--border);
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns=http://www.w3.org/2000/svg width=10 height=6><path d=M1 1l4 4 4-4 stroke=%236b7280 fill=none stroke-width=1.5/></svg>") no-repeat right 10px center;
  padding: 8px 26px 8px 10px;
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: all .2s var(--transition);
}
.filter-row select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30, 111, 196, .15); }
.filter-row select:disabled { color: var(--text-light); background-color: var(--bg); }

/* ===== 结果统计 ===== */
.result-info {
  padding: 14px 16px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-light);
}
.result-info b { color: var(--text); }

/* ===== 房产卡片 - hover上浮+图片缩放 ===== */
.card-list { padding: 0 10px 80px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: block;
  transition: all .3s var(--transition);
  border: 1px solid rgba(0,0,0,.03);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}
.card:active { transform: translateY(-1px) scale(.99); }
.card .thumb { position: relative; aspect-ratio: 16/9; background: #e2e8f0; overflow: hidden; }
.card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s var(--transition);
}
.card:hover .thumb img { transform: scale(1.05); }
.card .thumb .img-count {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  backdrop-filter: blur(4px);
}
.card .thumb .city-tag {
  position: absolute; left: 8px; top: 8px;
  background: rgba(30, 111, 196, .92); color: #fff;
  font-size: 11px; padding: 3px 10px; border-radius: 12px;
  backdrop-filter: blur(4px); font-weight: 600;
}
.card .body { padding: 10px 12px 12px; }
.card .price {
  font-size: 19px; font-weight: 800; color: var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.card .price small { font-size: 12px; font-weight: 500; color: var(--text-light); margin-left: 4px; -webkit-text-fill-color: var(--text-light); }
.card .title {
  font-size: 14.5px; font-weight: 600; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card .meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.card .meta .tag {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; font-size: 11.5px; color: var(--text-light);
  padding: 2px 7px;
}
.card .meta .tag b { color: var(--text); font-weight: 600; }
.card .loc {
  margin-top: 7px; font-size: 12px; color: var(--text-light);
  display: flex; align-items: center; gap: 4px;
}
.card .loc .loc-txt { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }

/* ===== 加载动画 - 精致转圈 ===== */
.load-more, .empty {
  text-align: center; padding: 18px 0; font-size: 13px; color: var(--text-light);
}
.load-more .spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2.5px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s cubic-bezier(.6,.2,.4,.8) infinite;
  vertical-align: -4px; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 底部操作栏 ===== */
.bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--border);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  z-index: 20;
  max-width: 640px; margin: 0 auto;
  display: flex; gap: 8px;
}
.btn {
  flex: 1; border: none; border-radius: 22px;
  padding: 10px 0; font-size: 14px; font-weight: 600;
  cursor: pointer; text-align: center;
  transition: all .2s var(--transition);
}
.btn:active { transform: scale(.96); }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 4px 14px rgba(30, 111, 196, .3); }
.btn.ghost { background: var(--bg); color: var(--text); border: 1.5px solid var(--border); }
.btn.accent { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; box-shadow: 0 4px 14px rgba(245, 158, 11, .3); }

/* ===== 骨架屏 ===== */
.skeleton { background: linear-gradient(90deg, #e5e7eb 25%, #f0f1f3 50%, #e5e7eb 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== 详情页 ===== */
.back-btn {
  position: fixed; top: 10px; left: 10px; z-index: 30;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0, 0, 0, .45); color: #fff;
  border: none; font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  backdrop-filter: blur(8px);
  transition: all .2s var(--transition);
}
.back-btn:active { transform: scale(.9); background: rgba(0,0,0,.7); }

.gallery { position: relative; background: #111; }
.gallery .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.gallery .track::-webkit-scrollbar { display: none; }
.gallery .track img {
  flex: 0 0 100%; width: 100%;
  aspect-ratio: 4/3; object-fit: cover;
  scroll-snap-align: start;
}
.gallery .counter {
  position: absolute; right: 12px; bottom: 12px;
  background: rgba(0, 0, 0, .6); color: #fff;
  font-size: 12px; padding: 3px 10px; border-radius: 12px;
  backdrop-filter: blur(4px);
}
.gallery .dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.gallery .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); transition: all .2s; }
.gallery .dots i.on { background: #fff; width: 18px; border-radius: 3px; }

.detail-body { padding: 14px 14px 100px; }
.detail-price { font-size: 26px; font-weight: 800; color: var(--accent); }
.detail-title { font-size: 17px; font-weight: 700; margin-top: 6px; line-height: 1.4; }
.detail-loc { font-size: 13px; color: var(--text-light); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.detail-tags .tag { background: #eef4fb; border: 1px solid #d5e6f8; color: var(--primary-dark); border-radius: 6px; font-size: 12px; padding: 3px 9px; }

.section {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-top: 12px; padding: 13px 14px;
  transition: box-shadow .2s;
}
.section h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }

.param-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.param-grid .p {
  text-align: center; background: var(--bg); border-radius: 8px; padding: 9px 4px;
  transition: all .2s var(--transition);
}
.param-grid .p:active { transform: scale(.95); background: #e8eef5; }
.param-grid .p .v { font-size: 14.5px; font-weight: 700; color: var(--text); }
.param-grid .p .k { font-size: 11px; color: var(--text-light); margin-top: 2px; }

.tabs { display: flex; background: var(--bg); border-radius: 10px; padding: 3px; margin-bottom: 10px; }
.tabs .tab { flex: 1; text-align: center; padding: 7px 0; font-size: 13px; border-radius: 7px; color: var(--text-light); cursor: pointer; transition: all .2s var(--transition); }
.tabs .tab.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,.1); }
.tabs .tab.disabled { opacity: .35; cursor: default; }
.desc-content { font-size: 13.5px; color: #374151; white-space: pre-wrap; word-break: break-word; line-height: 1.7; }
.desc-content:empty::before { content: "（暂无描述）"; color: var(--text-light); }

.source-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 2px; font-size: 11px;
  border-top: 1px solid var(--border); margin-top: 10px;
  opacity: .55;
}
.source-link span:first-child { color: rgba(0,0,0,.1); }
.source-link a {
  color: transparent; text-decoration: none; font-size: 14px;
  line-height: 1; padding: 4px 6px;
}
.source-link a::selection { color: #111; background: #bfdbfe; }
.source-link a:active { color: rgba(15, 23, 42, .55); }

/* 咨询弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: #fff; border-radius: 16px; width: 100%; max-width: 340px;
  padding: 20px 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
  animation: slideUp .25s var(--transition);
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-title { font-size: 16px; font-weight: 700; text-align: center; }
.modal-tip { font-size: 12.5px; color: var(--text-light); text-align: center; margin: 6px 0 14px; }
.modal-input {
  width: 100%; box-sizing: border-box;
  padding: 11px 12px; font-size: 15px; border: 2px solid var(--border);
  border-radius: 12px; outline: none; text-align: center;
  transition: all .2s var(--transition);
}
.modal-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,111,196,.15); }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }

/* 轮播箭头 */
.gallery { position: relative; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; border: none;
  font-size: 22px; line-height: 1; cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  padding: 0 0 3px;
  backdrop-filter: blur(8px);
  transition: all .2s;
}
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-nav:active { background: rgba(0,0,0,.7); transform: translateY(-50%) scale(.9); }

/* ===== 桌面端响应式 ===== */
@media (min-width: 768px) {
  .page { max-width: 1200px; }
  .header { padding: 22px 32px 68px; }
  .header h1 { font-size: 24px; }
  .header .sub { font-size: 13px; }
  .search-box { max-width: 480px; }
  .filter-bar { margin: -48px 20px 0; padding: 16px; }
  .chips { padding-bottom: 10px; }
  .chip { font-size: 13.5px; padding: 7px 18px; }
  .filter-row { gap: 10px; }
  .filter-row select { padding: 9px 28px 9px 12px; font-size: 13.5px; }
  .result-info { padding: 18px 24px 10px; font-size: 13.5px; }
  .card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    padding: 0 20px 90px;
  }
  .card { margin-bottom: 0; }
  .card .body { padding: 12px 14px 14px; }
  .card .price { font-size: 21px; }
  .card .title { font-size: 15.5px; }
  .bottom-bar { max-width: 1200px; }
  .gallery .track img { aspect-ratio: 16/9; }
  .detail-body { max-width: 900px; margin: 0 auto; padding: 22px 24px 110px; }
  .detail-price { font-size: 30px; }
  .detail-title { font-size: 20px; }
  .param-grid { grid-template-columns: repeat(6, 1fr); }
  .section { padding: 16px 18px; }
  .desc-content { font-size: 14.5px; }
}

/* ===== v2.1 导航Tab样式 ===== */
.header-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.header-top h1 { margin:0; flex:1; min-width:0; }
.header-logo { width:44px; height:44px; border-radius:12px; flex:0 0 auto; box-shadow:0 4px 12px rgba(0,0,0,.2); }

.nav-tabs { display:flex; gap:8px; margin-top:14px; }
.nav-tab {
  flex:1; text-align:center; padding:9px 4px;
  border-radius:12px; font-size:12.5px; font-weight:600;
  text-decoration:none; transition:all .25s cubic-bezier(.4,0,.2,1);
  background:rgba(255,255,255,.15); color:rgba(255,255,255,.9);
  backdrop-filter:blur(8px); border:1px solid rgba(255,255,255,.1);
}
.nav-tab:active { transform:scale(.95); }
.nav-tab.active {
  background:#fff; color:var(--primary);
  box-shadow:0 4px 16px rgba(0,0,0,.15);
  border-color:transparent;
}
.nav-tab:not(.active):hover { background:rgba(255,255,255,.25); }

/* 筛选卡片强化阴影 */
.filter-bar { box-shadow:0 8px 30px rgba(0,0,0,.1); }

/* 卡片图片底部渐变遮罩 */
.card .thumb::after {
  content:""; position:absolute; left:0; right:0; bottom:0;
  height:50px; background:linear-gradient(to top, rgba(0,0,0,.15), transparent);
  pointer-events:none;
}

/* 价格更醒目 */
.card .price { letter-spacing:-.3px; }

/* 城市标签更圆润 */
.card .thumb .city-tag { border-radius:20px; padding:4px 12px; font-size:11.5px; }

/* 重置按钮 */
#resetBtn { padding:8px 20px; border-radius:20px; font-size:12.5px; }
