/* =============================================
   公開頁 - 全新視覺設計 (Mobile + Desktop)
   ============================================= */

:root {
  --brand: #b45309;
  --brand-dark: #92400e;
  --brand-light: #fff7ed;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 4px rgba(28,25,23,.06);
  --shadow: 0 4px 16px rgba(28,25,23,.08);
  --shadow-lg: 0 12px 40px rgba(28,25,23,.1);
  --text: #292524;
  --text-2: #57534e;
  --text-3: #78716c;
  --border: #e7e5e4;
  --bg: #faf9f7;
  --white: #ffffff;
  --transition: .22s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, 'PingFang TC', 'Microsoft JhengHei', BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 76px;
  line-height: 1.6;
}

/* ─── 修正中文字型在按鈕內垂直偏上 ─── */
.nav-btn,
.social-btn,
.contact-bar-btn,
.btn-search,
.btn-clear,
.page-btn {
  line-height: 1 !important;
}

@media (min-width: 1024px) {
  body { padding-bottom: 0; }
}

/* ═══════════════════════════════════════
   NAV
   ═══════════════════════════════════════ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-nav .brand {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--brand);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 55%;
  overflow: hidden;
}

.site-nav .brand img { height: 34px; object-fit: contain; }
.site-nav .brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* 手機：Logo 置中、電話/LINE 隱藏（底部固定列已有） */
@media (max-width: 767px) {
  .site-nav {
    justify-content: center;
    position: relative;
  }
  .site-nav .brand {
    max-width: 70%;
    justify-content: center;
  }
  .site-nav .nav-actions {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
  }
  .nav-btn-phone,
  .nav-btn-line { display: none !important; }
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: filter var(--transition);
}

.nav-btn:active { transform: scale(.95); }
.nav-btn-phone { background: var(--brand); color: #fff; }
.nav-btn-line  { background: #06c755; color: #fff; }
.nav-btn-phone:hover, .nav-btn-line:hover { filter: brightness(.9); }

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.agent-hero {
  background: var(--white);
  padding: 0;
}

.agent-hero-body {
  padding: 20px 20px;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.agent-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 0;
  margin-bottom: 14px;
}

.agent-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--white);
  box-shadow: var(--shadow);
  flex-shrink: 0;
  background: #e2e8f0;
}

.agent-name-wrap { padding-bottom: 4px; }
.agent-name { font-size: 1.25rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.agent-agency { font-size: .82rem; color: var(--text-2); margin-top: 3px; display: flex; align-items: center; gap: 4px; }

.agent-bio {
  font-size: .875rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 16px;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 社群按鈕列 */
.agent-social { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid var(--border);
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
}

.social-btn:hover { border-color: currentColor; }
.social-btn-phone  { color: var(--brand); }
.social-btn-line   { color: #06c755; }
.social-btn-wechat { color: #07c160; }
.social-btn-fb     { color: #1877f2; }
.social-btn-ig     { color: #e1306c; }
.social-btn-yt     { color: #ff0000; }
.social-btn-tt     { color: #010101; }
.social-btn-threads { color: #000000; }

/* 統計 */
.agent-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.agent-stat {
  background: var(--white);
  padding: 12px 8px;
  text-align: center;
}

.agent-stat-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
}

.agent-stat-label {
  font-size: .7rem;
  color: var(--text-3);
  margin-top: 4px;
  font-weight: 500;
}

/* ═══════════════════════════════════════
   FILTER BAR
   ═══════════════════════════════════════ */
.filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  position: sticky;
  top: 60px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.filter-bar form {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.filter-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: .875rem;
  background: var(--bg);
  outline: none;
  color: var(--text);
  transition: border-color var(--transition);
}

.filter-input:focus { border-color: var(--brand); background: #fff; }

.filter-select {
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: .82rem;
  background: var(--bg);
  outline: none;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition);
}

.filter-select:focus { border-color: var(--brand); }

.btn-search {
  height: 42px;
  width: 42px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: filter var(--transition);
}

.btn-search:hover { filter: brightness(.9); }

.btn-clear {
  height: 42px;
  width: 42px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
  text-decoration: none;
}

/* ═══════════════════════════════════════
   LISTINGS
   ═══════════════════════════════════════ */
.listings-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px;
}

@media (min-width: 768px) {
  .listings-section { padding: 28px 16px; }
}

@media (min-width: 1280px) {
  .listings-section { padding: 32px 0; }
}

.listings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.listings-title { font-size: 1.05rem; font-weight: 800; display: flex; align-items: baseline; gap: 8px; }
.listings-count { font-size: .78rem; color: var(--text-3); font-weight: 500; }

/* Grid */
.property-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 600px)  { .property-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 900px)  { .property-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .property-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

/* 卡片 */
.prop-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .prop-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
  }
}

.prop-card:active { transform: scale(.97); }

.prop-card-img {
  position: relative;
  padding-top: 65%;
  overflow: hidden;
  background: #e2e8f0;
}

.prop-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

@media (hover: hover) {
  .prop-card:hover .prop-card-img img { transform: scale(1.08); }
}

.prop-card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.badge-type {
  font-size: .64rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--brand);
  color: #fff;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.badge-category {
  font-size: .64rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
  background: rgba(255,255,255,.88);
  color: #374151;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
}
.badge-category:hover {
  background: #fff;
  color: #111;
}

.badge-featured {
  font-size: .64rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 100px;
  background: #f59e0b;
  color: #fff;
}

.badge-status-sold {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .05em;
}

.prop-card-price-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  padding: 24px 10px 8px;
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
}

.prop-card-body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.prop-card-title {
  font-size: .875rem;
  font-weight: 700;
  margin-bottom: 5px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.45;
  color: var(--text);
}

.prop-card-location {
  font-size: .75rem;
  color: var(--text-3);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.prop-card-specs {
  display: flex;
  gap: 10px;
  font-size: .72rem;
  color: var(--text-2);
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.prop-card-specs span {
  display: flex;
  align-items: center;
  gap: 2px;
}

.prop-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.prop-card-price {
  font-size: 1rem;
  font-weight: 900;
  color: var(--brand);
  letter-spacing: -.02em;
}

.prop-card-view-btn {
  font-size: .72rem;
  color: var(--brand);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ═══════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════ */
.pagination-wrap {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 28px 0 12px;
}

.page-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: .875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition);
}

.page-btn:hover { border-color: var(--brand); color: var(--brand); }
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ═══════════════════════════════════════
   CONTACT SECTION
   ═══════════════════════════════════════ */
.contact-section {
  background: var(--white);
  border-top: 6px solid var(--bg);
  padding: 28px 20px 32px;
}

@media (min-width: 768px) {
  .contact-section { padding: 40px 40px 48px; }
}

.contact-section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.contact-section h2 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-links { display: flex; flex-direction: column; gap: 10px; }

/* 聯絡列表嵌入 Hero 區 */
.agent-contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.contact-link-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
}

.contact-link-item:hover {
  background: var(--brand-light);
  border-color: color-mix(in srgb, var(--brand) 30%, transparent);
}

.contact-link-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.contact-link-label { font-size: .72rem; color: var(--text-3); font-weight: 500; }
.contact-link-value { font-size: .95rem; font-weight: 700; margin-top: 1px; }
.contact-link-arrow { margin-left: auto; color: var(--text-3); font-size: .9rem; }

/* ═══════════════════════════════════════
   BOTTOM CONTACT BAR
   ═══════════════════════════════════════ */
.contact-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  gap: 10px;
  box-shadow: 0 -6px 24px rgba(0,0,0,.1);
}

@media (min-width: 1024px) { .contact-bar { display: none; } }

.contact-bar-btn {
  flex: 1;
  height: 50px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  transition: filter var(--transition), transform .1s;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: .01em;
}

.contact-bar-btn:active { transform: scale(.96); }
.btn-phone { background: var(--brand); color: #fff; }
.btn-phone:hover { filter: brightness(.9); color: #fff; }
.btn-line  { background: #06c755; color: #fff; }
.btn-line:hover { filter: brightness(.9); color: #fff; }
.btn-wechat { background: #07c160; color: #fff; }
.btn-share { background: #f1f5f9; color: #334155; border: 1.5px solid #e2e8f0; }
.btn-share:hover { background: #e2e8f0; color: #1e293b; }

/* 分享備援面板 */
.share-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0,0,0,.4);
}
.share-overlay.show { display: block; }

.share-fallback {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 401;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 32px rgba(0,0,0,.12);
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(0.32,0.72,0,1);
}
.share-fallback.show { transform: translateY(0); }

.share-fallback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.share-fallback-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-1, #1c1917);
}
.share-fallback-close {
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}
.share-fallback-label {
  font-size: .8rem;
  font-weight: 600;
  color: #64748b;
  display: block;
  margin-bottom: 8px;
}
.share-fallback-row {
  display: flex;
  gap: 8px;
}
.share-fallback-input {
  flex: 1;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .82rem;
  color: #334155;
  background: #f8fafc;
  outline: none;
  min-width: 0;
}
.share-fallback-copy-btn {
  background: var(--brand, #2563eb);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: filter .15s;
}
.share-fallback-copy-btn:hover { filter: brightness(.9); }

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.site-footer {
  padding: 24px 20px;
  text-align: center;
  font-size: .78rem;
  color: var(--text-3);
  background: var(--white);
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════
   TOAST
   ═══════════════════════════════════════ */
.toast-success {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  background: #16a34a;
  color: #fff;
  padding: 11px 22px;
  border-radius: 100px;
  font-size: .875rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  white-space: nowrap;
  animation: fadeUp .3s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════
   PROPERTY DETAIL PAGE
   ═══════════════════════════════════════ */

/* Gallery */
.gallery-wrap {
  background: #f4f2ee;
  position: relative;
  overflow: hidden;
}

.gallery-main {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  transition: opacity .2s;
}

@media (min-width: 640px)  { .gallery-main { height: 380px; } }
@media (min-width: 1024px) { .gallery-main { height: 480px; } }

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}

.gallery-nav-btn:hover { background: var(--white); box-shadow: var(--shadow-sm); }
.gallery-nav-prev { left: 12px; }
.gallery-nav-next { right: 12px; }

.gallery-counter {
  position: absolute;
  bottom: 12px;
  right: 14px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
}

.gallery-thumbs {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  overflow-x: auto;
  background: #e7e5e4;
  scrollbar-width: none;
}

.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumb {
  width: 60px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  opacity: .5;
  border: 2px solid transparent;
  cursor: pointer;
  transition: opacity var(--transition), border-color var(--transition);
}

.gallery-thumb.active { opacity: 1; border-color: var(--brand); }
.gallery-thumb:hover { opacity: .8; }

/* Detail layout - Desktop side-by-side */
.prop-detail-layout {
  max-width: 1280px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .prop-detail-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 0;
    align-items: start;
  }
}

/* 物件資訊 */
.prop-detail-header {
  background: var(--white);
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.prop-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.prop-badge {
  font-size: .68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: .03em;
}

.prop-badge-type   { background: var(--brand); color: #fff; }
.prop-badge-cat    { background: #f1f5f9; color: #475569; }
.prop-badge-status-sold   { background: #475569; color: #fff; }
.prop-badge-featured { background: #f59e0b; color: #fff; }

.prop-detail-title {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--text);
}

@media (min-width: 768px) {
  .prop-detail-title { font-size: 1.5rem; }
}

.prop-detail-price {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--brand);
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: 8px;
}

.prop-detail-location {
  font-size: .82rem;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 規格 Grid */
.specs-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 16px;
}

.spec-item {
  background: var(--white);
  padding: 12px 10px;
  text-align: center;
}

.spec-val { font-size: .95rem; font-weight: 800; color: var(--text); }
.spec-label { font-size: .68rem; color: var(--text-3); margin-top: 3px; font-weight: 500; }

/* 區塊 */
.prop-section {
  background: var(--white);
  margin-top: 8px;
  padding: 18px 20px;
}

.prop-section-title {
  font-size: .7rem;
  font-weight: 800;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}

.feature-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.feature-tag {
  padding: 6px 14px;
  background: var(--brand-light);
  color: var(--brand);
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 700;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
}

.prop-description {
  font-size: .9rem;
  line-height: 1.85;
  color: var(--text-2);
  white-space: pre-line;
}

.prop-views {
  font-size: .75rem;
  color: var(--text-3);
  padding: 12px 20px;
  text-align: right;
  background: var(--white);
  border-top: 1px solid var(--border);
}

/* ── 桌機 右側業務名片 ── */
.agent-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .agent-sidebar {
    display: block;
    position: sticky;
    top: 70px;
    border-left: 1px solid var(--border);
    background: #f8fafc;
    height: calc(100vh - 70px);
    overflow-y: auto;
  }
}

.agent-sidebar-inner { padding: 16px; }

.agent-sidebar-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
}

/* 頭像區：白底置中，無漸層 */
.agent-sidebar-header {
  padding: 24px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
}

.agent-sidebar-header img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e2e8f0;
  margin-bottom: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.agent-sidebar-header .agent-sn {
  font-weight: 800;
  font-size: 1.05rem;
  color: #1e293b;
}
.agent-sidebar-header .agent-sa {
  font-size: .78rem;
  color: #64748b;
  margin-top: 1px;
}

/* 個人簡介 */
.agent-sidebar-bio-wrap {
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}
.agent-sidebar-bio {
  font-size: .81rem;
  line-height: 1.7;
  margin: 0;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 聯絡按鈕區 */
.agent-sidebar-social { padding: 14px 14px 16px; background: #fff; }

/* 主要全寬按鈕 */
.sbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 44px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  margin-bottom: 8px;
  transition: filter .15s, transform .1s;
}
.sbar-btn:last-of-type { margin-bottom: 0; }
.sbar-btn:active { filter: brightness(.88); transform: scale(.98); }
.sbar-btn-phone { background: var(--brand); color: #fff; }
.sbar-btn-line  { background: #06c755; color: #fff; }

/* 次要平台 pill 行 */
.sbar-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.sbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid var(--pc, #64748b);
  color: var(--pc, #64748b);
  background: transparent;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.sbar-pill:hover { background: var(--pc, #64748b); color: #fff; }
.sbar-pill svg { width: 13px; height: 13px; fill: currentColor; flex-shrink: 0; }

/* 更多物件連結 */
.sbar-more-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 12px;
  text-decoration: none;
  color: #475569;
  font-size: .84rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  transition: background .15s, box-shadow .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.sbar-more-link:hover { background: #f8fafc; box-shadow: 0 2px 8px rgba(0,0,0,.07); }

/* ═══════════════════════════════════════
   VIEW TOGGLE
   ═══════════════════════════════════════ */
.view-toggle {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.vtbtn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: none;
  cursor: pointer;
  color: var(--text-3);
  font-size: .95rem;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.vtbtn + .vtbtn { border-left: 1.5px solid var(--border); }
.vtbtn.active   { background: var(--brand); color: #fff; }
.vtbtn:hover:not(.active) { background: var(--bg); color: var(--text); }

/* ═══════════════════════════════════════
   LIST VIEW - 條列模式
   ═══════════════════════════════════════ */
#viewList { display: flex; flex-direction: column; gap: 10px; }

.prop-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .prop-list-item:hover {
    border-color: var(--brand);
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    transform: translateX(3px);
  }
}

.prop-list-item:active { transform: scale(.98); }

.prop-list-thumb {
  width: 110px;
  height: 80px;
  flex-shrink: 0;
  position: relative;
  background: #e2e8f0;
}

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

@media (min-width: 480px) {
  .prop-list-thumb { width: 130px; height: 90px; }
}

.prop-list-sold {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
}

.prop-list-body {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
}

.prop-list-top { display: flex; gap: 4px; margin-bottom: 5px; }

.prop-list-title {
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--text);
}

.prop-list-loc {
  font-size: .75rem;
  color: var(--text-3);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.prop-list-specs {
  display: flex;
  gap: 8px;
  font-size: .72rem;
  color: var(--text-2);
  flex-wrap: wrap;
}

.prop-list-price {
  font-size: .95rem;
  font-weight: 900;
  color: var(--brand);
  padding: 0 16px 0 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 400px) {
  .prop-list-price { font-size: .82rem; padding-right: 10px; }
}

/* ═══════════════════════════════════════
   EMPTY / UTILITY
   ═══════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-3);
}

.empty-state-icon { font-size: 3.5rem; opacity: .2; margin-bottom: 14px; display: block; }
.empty-state-text { font-size: .95rem; font-weight: 500; }

/* Desktop 最大寬容器 */
@media (min-width: 1024px) {
  .agent-hero-body { max-width: 900px; margin: 0 auto; }
  .agent-avatar { width: 100px; height: 100px; }
  .agent-name { font-size: 1.5rem; }
  .filter-bar { padding: 12px 24px; }
}

/* ═══════════════════════════════════════
   TEMPLATE: MODERN  (tpl-modern)
   深色 Hero 帶、強視覺卡片
   ═══════════════════════════════════════ */

body.tpl-modern {
  background: #f4f4f2;
  font-family: 'Noto Sans TC', ui-sans-serif, sans-serif;
}

/* NAV */
body.tpl-modern .site-nav {
  background: #1c1917;
  border-bottom: none;
  box-shadow: none;
}

body.tpl-modern .brand {
  color: #fff !important;
  opacity: 0.92;
}

body.tpl-modern .brand:hover {
  opacity: 1;
}

body.tpl-modern .nav-btn-phone {
  background: var(--brand) !important;
  color: #fff !important;
  border: none;
}

body.tpl-modern .nav-btn-line {
  background: #06c755 !important;
  color: #fff !important;
  border: none;
}

/* HERO */
body.tpl-modern .agent-hero {
  background: #1c1917;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: none;
}

body.tpl-modern .agent-hero-body {
  max-width: 900px;
  margin: 0 auto;
}

body.tpl-modern .agent-avatar {
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

body.tpl-modern .agent-name {
  color: #fafaf8;
}

body.tpl-modern .agent-agency {
  color: rgba(255, 255, 255, 0.55);
}

body.tpl-modern .agent-bio {
  color: rgba(255, 255, 255, 0.6);
}

body.tpl-modern .agent-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  margin-top: 0.75rem;
}

body.tpl-modern .agent-stat-num {
  color: var(--brand) !important;
  font-size: 1.35rem;
}

body.tpl-modern .agent-stat-label {
  color: rgba(255, 255, 255, 0.4);
}

body.tpl-modern .social-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

body.tpl-modern .social-btn:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
}

/* FILTER */
body.tpl-modern .filter-bar {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  box-shadow: 0 1px 6px rgba(28, 25, 23, 0.06);
}

/* LISTINGS */
body.tpl-modern .listings-section {
  padding-top: 2rem;
}

/* CARDS */
body.tpl-modern .prop-card {
  border-radius: 14px;
  border: none;
  box-shadow: 0 2px 12px rgba(28, 25, 23, 0.07);
  background: #fff;
  transition: box-shadow 0.25s, transform 0.25s;
}

body.tpl-modern .prop-card:hover {
  box-shadow: 0 12px 36px rgba(28, 25, 23, 0.14);
  transform: translateY(-4px);
}

body.tpl-modern .prop-card-img {
  border-radius: 14px 14px 0 0;
}

body.tpl-modern .prop-card-img img {
  border-radius: 14px 14px 0 0;
}

/* CONTACT */
body.tpl-modern .contact-section {
  background: #1c1917;
  color: #fafaf8;
}

body.tpl-modern .contact-section h2 {
  color: #fafaf8;
}

/* modern 模板：Hero 深色背景，聯絡列表文字用白色 */
body.tpl-modern .agent-contact-links .contact-link-item {
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.1) !important;
}
body.tpl-modern .agent-contact-links .contact-link-item:hover {
  background: rgba(255,255,255,.12) !important;
}
body.tpl-modern .agent-contact-links .contact-link-label,
body.tpl-modern .agent-contact-links .contact-link-value,
body.tpl-modern .agent-contact-links .contact-link-arrow {
  color: rgba(255,255,255,.85) !important;
}

body.tpl-modern .contact-link-item {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.tpl-modern .contact-link-item:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

body.tpl-modern .contact-link-label {
  color: rgba(255, 255, 255, 0.45);
}

body.tpl-modern .contact-link-value,
body.tpl-modern .contact-link-arrow {
  color: rgba(255, 255, 255, 0.85);
}

/* FOOTER */
body.tpl-modern .site-footer {
  background: #111010;
  color: rgba(255, 255, 255, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ═══════════════════════════════════════
   TEMPLATE: MINIMAL  (tpl-minimal)
   純白、線條感、清爽易讀
   ═══════════════════════════════════════ */

body.tpl-minimal {
  background: #ffffff;
}

/* NAV */
body.tpl-minimal .site-nav {
  background: #fff;
  border-bottom: 1.5px solid #e5e7eb;
  box-shadow: none;
}

body.tpl-minimal .nav-btn-phone,
body.tpl-minimal .nav-btn-line {
  background: transparent;
  border: 1.5px solid #e5e7eb;
  color: var(--text-1);
}

body.tpl-minimal .nav-btn-phone:hover,
body.tpl-minimal .nav-btn-line:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: transparent;
}

/* HERO */
body.tpl-minimal .agent-hero {
  background: #fff;
  border-bottom: 1.5px solid #e5e7eb;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

body.tpl-minimal .agent-avatar {
  box-shadow: none;
}

body.tpl-minimal .agent-bio {
  color: #6b7280;
}

body.tpl-minimal .agent-stats {
  border-top: 1.5px solid #e5e7eb;
  margin-top: 0.75rem;
  padding-top: 0.85rem;
}

body.tpl-minimal .agent-stat-num {
  font-size: 1.05rem;
}

body.tpl-minimal .social-btn {
  background: transparent !important;
  border: 1.5px solid #e5e7eb !important;
  color: var(--text-2) !important;
  border-radius: 4px !important;
}

body.tpl-minimal .social-btn:hover {
  border-color: var(--brand) !important;
  color: var(--brand) !important;
}

/* FILTER */
body.tpl-minimal .filter-bar {
  background: #fff;
  border-bottom: 1.5px solid #e5e7eb;
  box-shadow: none;
}

body.tpl-minimal .filter-input,
body.tpl-minimal .filter-select {
  border-radius: 4px;
  border-color: #e5e7eb;
}

body.tpl-minimal .btn-search {
  border-radius: 4px !important;
}

/* CARDS */
body.tpl-minimal .prop-card {
  border-radius: 4px;
  border: 1.5px solid #e5e7eb;
  box-shadow: none;
  transition: border-color 0.2s;
}

body.tpl-minimal .prop-card:hover {
  border-color: var(--brand);
  box-shadow: none;
  transform: none;
}

body.tpl-minimal .prop-card-img img {
  border-radius: 3px 3px 0 0;
}

/* LIST items */
body.tpl-minimal .prop-list-item {
  border-radius: 4px;
  border: 1.5px solid #e5e7eb;
  box-shadow: none;
}

body.tpl-minimal .prop-list-item:hover {
  border-color: var(--brand);
  box-shadow: none;
  transform: none;
}

/* CONTACT */
body.tpl-minimal .contact-section {
  background: #f9fafb;
  border-top: 1.5px solid #e5e7eb;
}

body.tpl-minimal .contact-link-item {
  border-radius: 4px !important;
  border: 1.5px solid #e5e7eb !important;
  box-shadow: none !important;
}

body.tpl-minimal .contact-link-item:hover {
  border-color: var(--brand) !important;
  background: #fff !important;
}

/* FOOTER */
body.tpl-minimal .site-footer {
  background: #fff;
  border-top: 1.5px solid #e5e7eb;
  color: #9ca3af;
}

/* PAGINATION */
body.tpl-minimal .page-btn {
  border-radius: 4px !important;
}

/* CONTACT BAR */
body.tpl-minimal .contact-bar {
  border-top: 1.5px solid #e5e7eb;
  background: #fff;
}

body.tpl-minimal .contact-bar-btn {
  border-radius: 4px;
}

/* ═══════════════════════════════════════
   HERO 置中佈局（可套用於任何模板）
   body 加上 hero-center class 即生效
   ═══════════════════════════════════════ */
body.hero-center .agent-hero     { text-align: center; }
body.hero-center .agent-hero-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 560px;
  margin: 0 auto;
}
body.hero-center .agent-avatar-wrap {
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
body.hero-center .agent-avatar     { width: 96px; height: 96px; margin: 0 auto; }
body.hero-center .agent-name-wrap  { text-align: center; }
body.hero-center .agent-agency     { justify-content: center; }
body.hero-center .agent-bio        { text-align: center; max-width: 28rem; margin: 0 auto 0.75rem; }
body.hero-center .agent-social     { justify-content: center; }
body.hero-center .agent-stats      { justify-content: center; }

/* ═══════════════════════════════════════
   TEMPLATE: CENTERED  (tpl-centered)
   大頭像置中，資訊縱向排列，乾淨輪廓
   ═══════════════════════════════════════ */

body.tpl-centered {
  background: #faf9f7;
}

body.tpl-centered .agent-hero {
  background: #fff;
  border-bottom: 1px solid #e7e5e4;
  padding-top: 2.5rem;
  padding-bottom: 2.25rem;
  text-align: center;
}

body.tpl-centered .agent-hero-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 540px;
  margin: 0 auto;
}

body.tpl-centered .agent-avatar-wrap {
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

body.tpl-centered .agent-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto;
}

body.tpl-centered .agent-name-wrap {
  text-align: center;
}

body.tpl-centered .agent-name {
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

body.tpl-centered .agent-agency {
  justify-content: center;
}

body.tpl-centered .agent-bio {
  text-align: center;
  max-width: 28rem;
  margin: 0 auto 0.75rem;
}

body.tpl-centered .agent-social {
  justify-content: center;
}

body.tpl-centered .agent-stats {
  justify-content: center;
  border-top: 1px solid #e7e5e4;
  padding-top: 1rem;
  margin-top: 0.75rem;
  width: 100%;
}

body.tpl-centered .agent-stat {
  min-width: 70px;
}

/* NAV */
body.tpl-centered .site-nav {
  background: #fff;
  border-bottom: 1px solid #e7e5e4;
  box-shadow: none;
}

/* CARDS */
body.tpl-centered .prop-card {
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(28, 25, 23, 0.06);
  border: 1px solid #f0ede8;
  transition: box-shadow 0.25s, transform 0.25s;
}

body.tpl-centered .prop-card:hover {
  box-shadow: 0 8px 28px rgba(28, 25, 23, 0.1);
  transform: translateY(-3px);
}

/* CONTACT */
body.tpl-centered .contact-section {
  background: #fff;
  border-top: 1px solid #e7e5e4;
}

/* FOOTER */
body.tpl-centered .site-footer {
  background: #faf9f7;
  border-top: 1px solid #e7e5e4;
}


/* ═══════════════════════════════════════
   TEMPLATE: COVER  (tpl-cover)
   品牌色滿版 Hero Banner，大頭像置中
   ═══════════════════════════════════════ */

body.tpl-cover {
  background: #f4f4f4;
}

/* NAV：透明覆蓋在 Banner 上 */
body.tpl-cover .site-nav {
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  z-index: 10;
  transition: background .25s, border-color .25s, box-shadow .25s;
}
/* 滾動後 nav 改為白底深字（由 JS 加 .scrolled class） */
body.tpl-cover .site-nav.scrolled {
  background: #fff !important;
  border-bottom-color: var(--border) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.07) !important;
}
body.tpl-cover .site-nav.scrolled .brand,
body.tpl-cover .site-nav.scrolled .nav-btn-phone,
body.tpl-cover .site-nav.scrolled .nav-btn-line {
  color: inherit !important;
}
body.tpl-cover .site-nav.scrolled .nav-btn-phone {
  background: var(--brand) !important;
  border-color: transparent !important;
  color: #fff !important;
}
body.tpl-cover .site-nav.scrolled .nav-btn-line {
  background: #06c755 !important;
  border-color: transparent !important;
  color: #fff !important;
}
body.tpl-cover .site-nav.scrolled .brand {
  color: var(--text) !important;
}

body.tpl-cover .brand {
  color: rgba(255, 255, 255, 0.92) !important;
}

body.tpl-cover .nav-btn-phone,
body.tpl-cover .nav-btn-line {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff !important;
}

body.tpl-cover .nav-btn-phone:hover,
body.tpl-cover .nav-btn-line:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Hero：品牌色背景，Nav 重疊其上 */
body.tpl-cover .agent-hero {
  margin-top: -56px; /* 將 hero 拉到 Nav 下方，讓 nav 浮在上面 */
  padding-top: calc(56px + 2.5rem);
  background: var(--brand);
  padding-bottom: 3rem;
  position: relative;
}

body.tpl-cover.hero-center .agent-hero {
  text-align: center;
}

body.tpl-cover .agent-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: #f4f4f4;
  clip-path: ellipse(55% 100% at 50% 100%);
}

body.tpl-cover .agent-hero-body {
  position: relative;
  z-index: 2;
}

body.tpl-cover.hero-center .agent-hero-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 580px;
  margin: 0 auto;
}

body.tpl-cover .agent-avatar-wrap {
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

body.tpl-cover.hero-center .agent-avatar-wrap {
  flex-direction: column;
  align-items: center;
}

body.tpl-cover .agent-avatar {
  width: 100px;
  height: 100px;
  border-color: rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

body.tpl-cover .agent-name-wrap {
  /* 由 hero-center 控制對齊 */
}

body.tpl-cover.hero-center .agent-name-wrap {
  text-align: center;
}

body.tpl-cover .agent-name {
  color: #fff;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 6px rgba(0,0,0,.25);
}

body.tpl-cover .agent-agency {
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 3px rgba(0,0,0,.2);
}

body.tpl-cover.hero-center .agent-agency {
  justify-content: center;
}

body.tpl-cover .agent-agency i {
  color: rgba(255, 255, 255, 0.82) !important;
}

body.tpl-cover .agent-bio {
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 3px rgba(0,0,0,.2);
}

body.tpl-cover.hero-center .agent-bio {
  text-align: center;
  max-width: 30rem;
  margin: 0 auto 0.75rem;
}

body.tpl-cover .agent-social {
  /* 由 hero-center 控制對齊 */
}

body.tpl-cover.hero-center .agent-social {
  justify-content: center;
}

body.tpl-cover .social-btn {
  background: rgba(255, 255, 255, 0.15) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

body.tpl-cover .social-btn:hover {
  background: rgba(255, 255, 255, 0.28) !important;
  color: #fff !important;
}

body.tpl-cover .agent-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  margin-top: 0.75rem;
  justify-content: center;
  width: 100%;
  background: transparent;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
}

body.tpl-cover .agent-stat {
  background: transparent;
}

body.tpl-cover .agent-stat-num {
  color: #fff !important;
  text-shadow: 0 1px 4px rgba(0,0,0,.25);
}

body.tpl-cover .agent-stat-label {
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 2px rgba(0,0,0,.15);
}

/* 內容區（在 hero 下方）*/
body.tpl-cover .filter-bar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  color: var(--text);
}
body.tpl-cover .filter-bar input,
body.tpl-cover .filter-bar select,
body.tpl-cover .filter-bar label {
  color: var(--text) !important;
}

body.tpl-cover .listings-section {
  padding-top: 1.5rem;
}

body.tpl-cover .prop-card {
  border-radius: 12px;
  border: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.25s, transform 0.25s;
}

body.tpl-cover .prop-card:hover {
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.14);
  transform: translateY(-4px);
}

body.tpl-cover .contact-section {
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

/* cover 模板：Hero 品牌色背景，聯絡項目用半透明白底 */
body.tpl-cover .agent-contact-links .contact-link-item {
  background: rgba(255,255,255,.18) !important;
  border-color: rgba(255,255,255,.25) !important;
  color: #fff !important;
}
body.tpl-cover .agent-contact-links .contact-link-item:hover {
  background: rgba(255,255,255,.28) !important;
}
body.tpl-cover .agent-contact-links .contact-link-label,
body.tpl-cover .agent-contact-links .contact-link-value,
body.tpl-cover .agent-contact-links .contact-link-arrow {
  color: rgba(255,255,255,.9) !important;
}

body.tpl-cover .site-footer {
  background: #f4f4f4;
  border-top: 1px solid #e5e7eb;
}

/* ═══════════════════════════════════════
   手機版搜尋列：兩列排版（放在所有樣式之後確保優先級）
   ═══════════════════════════════════════ */
@media (max-width: 767px) {
  .filter-bar {
    top: 0 !important;
  }
  .filter-bar form {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .filter-input {
    width: 100% !important;
    flex: none !important;
  }
  .filter-select {
    flex: 1 !important;
    min-width: 0 !important;
  }
  .btn-search,
  .btn-clear {
    flex-shrink: 0;
  }
}

/* ═══════════════════════════════════════
   TEMPLATE: DARK  (tpl-dark)
   深色暗黑主題
   ═══════════════════════════════════════ */
body.tpl-dark {
  background: #0f172a;
  color: #e2e8f0;
}
body.tpl-dark .site-nav {
  background: rgba(15,23,42,.92);
  border-bottom: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(10px);
}
body.tpl-dark .brand { color: #f1f5f9 !important; }
body.tpl-dark .nav-btn-phone { background: var(--brand); color: #fff; border-color: transparent; }
body.tpl-dark .nav-btn-line  { background: #06c755; color: #fff; border-color: transparent; }
body.tpl-dark .agent-hero {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%) !important;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
body.tpl-dark .agent-hero-bg { background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%) !important; }
body.tpl-dark .agent-name    { color: #f1f5f9; }
body.tpl-dark .agent-agency  { color: #94a3b8; }
body.tpl-dark .agent-bio     { color: #94a3b8; }
body.tpl-dark .social-btn {
  background: rgba(255,255,255,.06);
  color: #e2e8f0;
  border: 1px solid rgba(255,255,255,.12);
}
body.tpl-dark .social-btn:hover { background: rgba(255,255,255,.13); }
body.tpl-dark .filter-bar {
  background: #1e293b;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
body.tpl-dark .filter-input,
body.tpl-dark .filter-select {
  background: #0f172a !important;
  border-color: rgba(255,255,255,.12) !important;
  color: #e2e8f0 !important;
}
body.tpl-dark .btn-search { background: var(--brand); }
body.tpl-dark .listings-section { background: #0f172a; }
body.tpl-dark .listings-title   { color: #f1f5f9; }
body.tpl-dark .listings-count   { color: #64748b; }
body.tpl-dark .prop-card {
  background: #1e293b;
  border: 1px solid rgba(255,255,255,.08);
  color: #e2e8f0;
}
body.tpl-dark .prop-card:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
}
body.tpl-dark .prop-card-title { color: #f1f5f9; }
body.tpl-dark .prop-card-price { color: var(--brand); }
body.tpl-dark .prop-card-meta  { color: #64748b; }
body.tpl-dark .prop-list-item {
  background: #1e293b;
  border-color: rgba(255,255,255,.06);
  color: #e2e8f0;
}
body.tpl-dark .prop-list-item:hover { border-color: var(--brand); background: #253347; }
body.tpl-dark .prop-list-title { color: #f1f5f9; }
body.tpl-dark .prop-list-price { color: var(--brand); }
body.tpl-dark .prop-list-meta  { color: #64748b; }
body.tpl-dark .site-footer { background: #020617; color: #475569; border-top: 1px solid rgba(255,255,255,.05); }
body.tpl-dark .contact-bar { background: #1e293b; border-top: 1px solid rgba(255,255,255,.08); }
body.tpl-dark .contact-bar-btn.btn-phone { background: var(--brand); }
body.tpl-dark .badge-category { background: rgba(255,255,255,.08); color: #94a3b8; }
body.tpl-dark .page-btn { background: #1e293b; color: #94a3b8; border-color: rgba(255,255,255,.08); }
body.tpl-dark .page-btn.active { background: var(--brand); color: #fff; }

/* ═══════════════════════════════════════
   TEMPLATE: GLASS  (tpl-glass)
   毛玻璃漸層主題
   ═══════════════════════════════════════ */
body.tpl-glass {
  background: linear-gradient(145deg, #eff6ff 0%, #f5f3ff 55%, #fdf4ff 100%);
  min-height: 100vh;
}
body.tpl-glass .site-nav {
  background: rgba(255,255,255,.72);
  border-bottom: 1px solid rgba(255,255,255,.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.tpl-glass .agent-hero {
  background: transparent !important;
  border-bottom: 1px solid rgba(255,255,255,.5);
}
body.tpl-glass .agent-hero-bg {
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--brand) 8%, transparent),
    color-mix(in srgb, var(--brand) 4%, transparent)) !important;
}
body.tpl-glass .agent-name   { color: #1e293b; }
body.tpl-glass .agent-agency { color: #64748b; }
body.tpl-glass .agent-bio    { color: #475569; }
body.tpl-glass .social-btn {
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
body.tpl-glass .social-btn:hover {
  background: rgba(255,255,255,.9);
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
}
body.tpl-glass .filter-bar {
  background: rgba(255,255,255,.65);
  border-bottom: 1px solid rgba(255,255,255,.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
body.tpl-glass .filter-input,
body.tpl-glass .filter-select {
  background: rgba(255,255,255,.75) !important;
  border-color: rgba(255,255,255,.9) !important;
}
body.tpl-glass .listings-section { background: transparent; }
body.tpl-glass .prop-card {
  background: rgba(255,255,255,.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
body.tpl-glass .prop-card:hover {
  background: rgba(255,255,255,.92);
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,.1);
  border-color: var(--brand);
}
body.tpl-glass .prop-list-item {
  background: rgba(255,255,255,.68);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.8);
}
body.tpl-glass .prop-list-item:hover {
  background: rgba(255,255,255,.9);
  border-color: var(--brand);
}
body.tpl-glass .site-footer {
  background: rgba(255,255,255,.5);
  border-top: 1px solid rgba(255,255,255,.6);
}
body.tpl-glass .contact-bar {
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,.6);
}
body.tpl-glass .page-btn {
  background: rgba(255,255,255,.7);
  border-color: rgba(255,255,255,.85);
}
body.tpl-glass .page-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ═══════════════════════════════════════
   TEMPLATE: ELEGANT  (tpl-elegant)
   深海軍藍 × 暖金 優雅主題
   ═══════════════════════════════════════ */
body.tpl-elegant {
  background: #f8f6f1;
  color: #2c2c2c;
}
body.tpl-elegant .site-nav {
  background: #1a1a2e;
  border-bottom: 1px solid rgba(212,175,55,.15);
}
body.tpl-elegant .brand         { color: #d4af37 !important; }
body.tpl-elegant .nav-btn-phone { background: rgba(212,175,55,.15); color: #d4af37; border-color: rgba(212,175,55,.3); }
body.tpl-elegant .nav-btn-line  { background: #06c755; color: #fff; border-color: transparent; }
body.tpl-elegant .nav-btn-phone:hover { background: rgba(212,175,55,.28); }
body.tpl-elegant .agent-hero {
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 100%) !important;
  border-bottom: 3px solid #d4af37;
}
body.tpl-elegant .agent-hero-bg { background: linear-gradient(160deg, #1a1a2e 0%, #16213e 100%) !important; }
body.tpl-elegant .agent-name   { color: #f8f4e8; }
body.tpl-elegant .agent-agency { color: #d4af37; font-style: italic; }
body.tpl-elegant .agent-bio    { color: #b0aaa0; }
body.tpl-elegant .social-btn {
  background: rgba(212,175,55,.08);
  color: #f8f4e8;
  border: 1px solid rgba(212,175,55,.28);
}
body.tpl-elegant .social-btn:hover { background: rgba(212,175,55,.18); border-color: rgba(212,175,55,.55); }
body.tpl-elegant .filter-bar {
  background: #fff;
  border-bottom: 2px solid #e8e0d0;
}
body.tpl-elegant .listings-section { background: #f8f6f1; }
body.tpl-elegant .listings-title   { color: #1a1a2e; letter-spacing: .03em; }
body.tpl-elegant .prop-card {
  background: #fff;
  border: 1px solid #e8e0d0;
  box-shadow: 0 2px 10px rgba(26,26,46,.05);
}
body.tpl-elegant .prop-card:hover {
  border-color: #d4af37;
  box-shadow: 0 6px 22px rgba(212,175,55,.15);
  transform: translateY(-3px);
}
body.tpl-elegant .prop-card-price { color: #b8860b; font-weight: 800; }
body.tpl-elegant .prop-list-item {
  background: #fff;
  border: 1px solid #e8e0d0;
}
body.tpl-elegant .prop-list-item:hover { border-color: #d4af37; background: #fffdf8; }
body.tpl-elegant .prop-list-price { color: #b8860b; font-weight: 800; }
body.tpl-elegant .page-btn { border-color: #e8e0d0; background: #fff; color: #1a1a2e; }
body.tpl-elegant .page-btn.active { background: #1a1a2e; color: #d4af37; border-color: #1a1a2e; }
body.tpl-elegant .site-footer { background: #1a1a2e; color: #8b7d6b; border-top: 2px solid #d4af37; }
body.tpl-elegant .contact-bar { background: #1a1a2e; border-top: 2px solid #d4af37; }
body.tpl-elegant .contact-bar-btn { color: #f8f4e8; border-color: rgba(212,175,55,.25); }
body.tpl-elegant .contact-bar-btn.btn-phone { background: #d4af37; color: #1a1a2e; }
body.tpl-elegant .contact-bar-btn.btn-line  { background: #06c755; color: #fff; }
