/* 訪客收藏愛心 / 右側浮動抽屜（首頁、物件列表、地圖找房） */
.fav-btn {
  position: absolute;
  z-index: 4;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #64748b;
  box-shadow: 0 2px 8px rgba(15,23,42,.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.fav-btn i { font-size: .95rem; line-height: 1; }
.fav-btn.is-on { color: #e88996; background: #fff; }
.fav-btn--card { top: 8px; right: 8px; }
.fav-btn--list { top: 6px; right: 6px; width: 30px; height: 30px; }
.fav-btn--detail {
  position: static;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1.5px solid #e2e8f0;
  box-shadow: none;
}
.fav-btn--detail.is-on { border-color: #fecdd3; background: #fff1f2; }
.fav-btn--row {
  position: static;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  box-shadow: none;
  background: #fff1f2;
  color: #e88996;
}
.fav-count {
  position: absolute;
  top: -6px;
  left: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: #e88996;
  color: #fff;
  font-size: .64rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}
.fav-fab {
  display: none;
  position: fixed;
  right: 0;
  top: 42%;
  z-index: 520;
  transform: translateY(-50%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 36px;
  min-height: 92px;
  padding: 12px 2px;
  border: 0;
  border-radius: 14px 0 0 14px;
  background: var(--brand, var(--clr-primary, #6FA98B));
  color: #fff;
  box-shadow: -4px 6px 20px color-mix(in srgb, var(--brand, var(--clr-primary, #6FA98B)) 28%, transparent);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.fav-fab.is-show { display: flex; }
.fav-fab i { font-size: 1.05rem; }
.fav-fab-label {
  writing-mode: vertical-rl;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
}
.fav-fab .fav-count {
  position: static;
  top: auto;
  left: auto;
  min-width: 18px;
  height: 16px;
  line-height: 16px;
  margin-top: 2px;
  background: #fff;
  color: var(--brand, var(--clr-primary, #6FA98B));
}
body.fav-drawer-open { overflow: hidden; }
.fav-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 530;
  background: rgba(15,23,42,.42);
}
.fav-drawer-overlay.is-open { display: block; }
.fav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 531;
  width: min(400px, 92vw);
  background: #fff;
  box-shadow: -12px 0 40px rgba(15,23,42,.18);
  transform: translateX(100%);
  transition: transform .28s ease;
  display: flex;
  flex-direction: column;
}
.fav-drawer.is-open { transform: translateX(0); }
.fav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #e2e8f0;
}
.fav-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.02rem;
  font-weight: 800;
}
.fav-drawer-title i { color: var(--brand, var(--clr-primary, #6FA98B)); }
.fav-drawer-title .fav-count {
  position: static;
  background: var(--brand, var(--clr-primary, #6FA98B));
  color: #fff;
}
.fav-drawer-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
}
.fav-drawer-list {
  flex: 1;
  overflow: auto;
  padding: 12px 12px 24px;
  background: #f6f7f6;
  -webkit-overflow-scrolling: touch;
}
.fav-drawer-empty {
  padding: 48px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: .9rem;
}
.fav-group {
  margin: 0 0 10px;
  padding: 0;
  border: 1px solid #e6ebe7;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
  overflow: hidden;
}
.fav-group:last-child { margin-bottom: 0; }
.fav-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 0;
  border-radius: 0;
  background: #f4f7f5;
  border-bottom: 1px solid #eef2ef;
  color: #2f3a34;
  text-decoration: none;
  font-size: .86rem;
  font-weight: 800;
  transition: background .18s ease, color .18s ease;
}
a.fav-group-head:hover {
  background: color-mix(in srgb, var(--brand, var(--clr-primary, #6FA98B)) 10%, #fff);
  color: var(--brand, var(--clr-primary, #6FA98B));
}
.fav-group-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8eee9;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #d5e0d9;
}
.fav-group-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fav-group-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}
.fav-group-count {
  flex-shrink: 0;
  min-width: 0;
  height: 22px;
  padding: 0 8px;
  border-radius: 99px;
  background: #fff;
  color: #6b756f;
  font-size: .68rem;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
  box-shadow: inset 0 0 0 1px #e4ebe6;
}
.fav-group-head .bi-chevron-right {
  font-size: .78rem;
  color: #b0b8b3;
  flex-shrink: 0;
}
a.fav-group-head:hover .bi-chevron-right { color: inherit; }
.fav-group-head.is-static { cursor: default; }
.fav-group.is-current {
  border-color: color-mix(in srgb, var(--brand, var(--clr-primary, #6FA98B)) 32%, #e6ebe7);
  box-shadow: 0 2px 12px color-mix(in srgb, var(--brand, var(--clr-primary, #6FA98B)) 14%, transparent);
}
.fav-group.is-current .fav-group-head {
  background: color-mix(in srgb, var(--brand, var(--clr-primary, #6FA98B)) 9%, #fff);
}
.fav-group.is-current .fav-group-avatar {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--brand, var(--clr-primary, #6FA98B));
}
.fav-group.is-current .fav-group-count {
  background: color-mix(in srgb, var(--brand, var(--clr-primary, #6FA98B)) 12%, #fff);
  color: var(--brand, var(--clr-primary, #6FA98B));
  box-shadow: none;
}
.fav-group-items { padding: 4px 4px 6px; }
.fav-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
}
.fav-row:hover { background: #f6f8f7; }
.fav-row-link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.fav-row-thumb {
  position: relative;
  width: 72px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  background: #e2e8f0;
  flex-shrink: 0;
}
.fav-row-badge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2px 0;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
  line-height: 1.3;
}
.fav-row.is-off { opacity: .78; }
.fav-row.is-off .fav-row-thumb img { filter: grayscale(.45); }
.fav-row.is-off .fav-row-price,
.fav-row.is-sold .fav-row-price,
.fav-row.is-rented .fav-row-price { color: #94a3b8; }
.fav-row.is-sold .fav-row-badge,
.fav-row.is-rented .fav-row-badge { background: rgba(185, 28, 28, .82); }
.fav-row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fav-row-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fav-row-title {
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fav-row-meta {
  font-size: .7rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fav-row-price {
  font-size: .8rem;
  font-weight: 800;
  color: #c0392b;
}
.fav-toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  z-index: 5400;
  background: rgba(15,23,42,.92);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  white-space: nowrap;
}
.fav-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.hp-card-img,
.pcard-img,
.lst-card-img,
.mp-card-img,
.mp-popup-img-wrap,
.mp-detail-img,
.mp-mobile-card-img {
  position: relative;
}
.mp-card-img .fav-btn--card,
.mp-popup .fav-btn--card,
.mp-mobile-card .fav-btn--card {
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
}
.mp-popup-img-wrap { display: block; }
.mp-detail-title-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.mp-detail-title-top .mp-detail-title-text { flex: 1; min-width: 0; }
.mp-detail-img .fav-btn--card { z-index: 6; }
