/* ═══════════════════════════════════════════════════════
   長照服務一覽 — Agoda 式服務列表
   services.css
═══════════════════════════════════════════════════════ */
:root {
  --bg:           #f0f4f8;
  --surface:      #ffffff;
  --surface-soft: #f7f9fc;
  --ink:          #17283a;
  --muted:        #5a6e82;
  --line:         rgba(23, 40, 58, 0.1);
  --primary:      #1a6fba;
  --primary-deep: #124e8a;
  --primary-soft: rgba(26, 111, 186, 0.08);
  --green:        #2e8b57;
  --green-soft:   rgba(46, 139, 87, 0.1);
  --orange:       #d4700a;
  --orange-soft:  rgba(212, 112, 10, 0.1);
  --red-soft:     rgba(200, 40, 40, 0.08);
  --shadow-sm:    0 2px 10px rgba(17, 40, 70, 0.07);
  --shadow-md:    0 8px 28px rgba(17, 40, 70, 0.12);
  --shadow-lg:    0 18px 48px rgba(17, 40, 70, 0.16);
  --radius-xl:    20px;
  --radius-lg:    14px;
  --radius-md:    10px;
  --radius-sm:    7px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans TC", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
}
a { text-decoration: none; color: inherit; }
button { font: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }

/* ════════════════════════════════════════════════
   TOP NAVBAR
════════════════════════════════════════════════ */
.sv-topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--primary-deep);
  color: #fff;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 56px;
  box-shadow: 0 2px 12px rgba(10,30,60,0.18);
}
.sv-topbar-brand {
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.sv-topbar-brand small {
  display: block;
  font-size: 0.66rem;
  font-weight: 500;
  opacity: 0.72;
  letter-spacing: 0.04em;
}
.sv-topbar-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,0.82);
  font-size: 0.84rem;
  transition: color 0.15s;
}
.sv-topbar-back:hover { color: #fff; }
.sv-topbar-spacer { flex: 1; }

/* ════════════════════════════════════════════════
   SEARCH / HERO BAND
════════════════════════════════════════════════ */
.sv-hero-band {
  background: linear-gradient(135deg, var(--primary-deep) 0%, #1e5fa0 100%);
  padding: 32px 24px 28px;
  color: #fff;
  position: relative;
}
/* 3 房子水彩條（hero 右側垂直置中） */
.sv-hero-band .houses3-deco {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 400px;
  pointer-events: none;
  z-index: 0;
}
.sv-hero-band .houses3-deco img { display: block; width: 400px; max-width: 400px; height: auto; }
@media (max-width: 900px) { .sv-hero-band .houses3-deco { display: none; } }
.sv-hero-band h1 {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}
.sv-hero-band > p {
  margin: 0 0 24px;
  font-size: 0.9rem;
  color: #fff;
  opacity: 0.92;
}

/* ── Quick search pill ── */
.sv-quick-search {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(10,30,60,0.22);
  max-width: 780px;
}
.sv-qs-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 18px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.sv-qs-field:last-of-type { border-right: none; }
.sv-qs-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.sv-qs-select, .sv-qs-input {
  border: none;
  outline: none;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
  width: 100%;
  padding: 0;
}
.sv-qs-btn {
  background: var(--primary);
  color: #fff;
  padding: 0 28px;
  font-weight: 800;
  font-size: 0.95rem;
  height: 100%;
  min-height: 68px;
  white-space: nowrap;
  border-radius: 0;
  transition: background 0.15s;
}
.sv-qs-btn:hover { background: var(--primary-deep); }

/* ════════════════════════════════════════════════
   SERVICE TYPE TAB BAR (scrollable)
════════════════════════════════════════════════ */
.sv-tab-band {
  background: var(--primary-deep);
  padding: 14px 24px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.sv-tab-band::-webkit-scrollbar { display: none; }
.sv-tabs {
  display: flex;
  gap: 4px;
  min-width: max-content;
}
.sv-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px 12px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  color: rgba(255,255,255,0.72);
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.sv-tab .sv-tab-icon { font-size: 1.1rem; }
.sv-tab:hover { color: #fff; background: rgba(255,255,255,0.1); }
.sv-tab.active {
  background: var(--bg);
  color: var(--primary);
}
.sv-tab-count { display: none; }

/* ════════════════════════════════════════════════
   FILTER BAR (sticky below tab)
════════════════════════════════════════════════ */
.sv-filter-bar {
  /* sticky 移除 — 用戶要求懸浮列不跟著捲動，改為固定在頁面初始位置 */
  position: static;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 12px 24px;
}
.sv-filter-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 1280px;
  margin: 0 auto;
}
.sv-filter-inner::-webkit-scrollbar { display: none; }

/* Area tabs (北/中/南/東/離島) */
.sv-area-tabs {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.sv-area-tab {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.15s;
}
.sv-area-tab:hover { border-color: var(--primary); color: var(--primary); }
.sv-area-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.sv-filter-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
  flex-shrink: 0;
}

.sv-filter-select {
  padding: 6px 28px 6px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235a6e82'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.sv-filter-select:focus { outline: none; border-color: var(--primary); }


.sv-filter-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.sv-filter-toggle.active {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
}

.sv-filter-sort {
  margin-left: auto;
  flex-shrink: 0;
}

/* result count */
.sv-result-count {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.sv-result-count strong { color: var(--ink); }

/* ════════════════════════════════════════════════
   PAGE BODY — listing + map
════════════════════════════════════════════════ */
.sv-body {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 100px;
  align-items: start;
}

/* listing column */
.sv-listing {
  padding: 20px 20px 0 0;
}

/* map column */
.sv-map-col {
  position: sticky;
  top: calc(56px + 49px + 10px);
  padding-top: 20px;
  height: calc(100vh - 180px);
}
.sv-map-wrap {
  border-radius: var(--radius-xl);
  overflow: hidden;
  height: 100%;
  background: #dce8f0;
  position: relative;
}
.sv-map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  gap: 12px;
}
.sv-map-placeholder .sv-map-icon { font-size: 3rem; opacity: 0.4; }
.sv-map-placeholder p { margin: 0; font-size: 0.84rem; }
.sv-map-toggle-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.sv-map-locate-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #2563eb;
  border: none;
  border-radius: var(--radius-md);
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  z-index: 500;
  transition: background .15s;
}
.sv-map-locate-btn:hover { background: #1d4ed8; }
.sv-map-locate-btn.locating { background: #6b7280; cursor: wait; }

/* ════════════════════════════════════════════════
   SERVICE CARD (Agoda 風格)
════════════════════════════════════════════════ */
.sv-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  margin-bottom: 16px;
  position: relative;
}
.sv-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.sv-card.is-selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(26,111,186,0.25); }

/* Compare checkbox overlay */
.sv-card-compare-wrap {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
}
.sv-compare-check {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.9);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.sv-compare-check input { accent-color: var(--primary); }
.sv-compare-check.checked { color: var(--primary); }

/* Card image */
.sv-card-img {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #e2edf7, #cddcea);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
}
.sv-card-img svg {
  width: 100px;
  height: 100px;
  opacity: 0.85;
}
.sv-card-img-emoji {
  font-size: 4rem;
  opacity: 0.7;
}
.sv-card-tag-overlay {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sv-img-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  backdrop-filter: blur(6px);
}
.sv-img-tag.verified  { background: rgba(255,255,255,0.88); color: #124e8a; }
.sv-img-tag.today     { background: rgba(46,139,87,0.88);   color: #fff; }
.sv-img-tag.new       { background: rgba(212,112,10,0.88);  color: #fff; }
.sv-img-tag.subsidized{ background: rgba(26,111,186,0.88);  color: #fff; }

/* Card body */
.sv-card-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

/* Header row */
.sv-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.sv-card-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
  line-height: 1.3;
}
.sv-card-name a:hover { color: var(--primary); }

/* Rating */
.sv-rating {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.sv-rating-score {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 36px;
  border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 4px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
}
.sv-rating-score.high  { background: var(--green); }
.sv-rating-score.mid   { background: var(--primary); }
.sv-rating-score.low   { background: var(--orange); }
.sv-rating-label { font-size: 0.68rem; color: var(--muted); white-space: nowrap; }

/* Service badge + verified */
.sv-service-badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.sv-verified-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary-deep);
  white-space: nowrap;
}

/* Contact row */
.sv-card-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
}
.sv-contact-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-weight: 600;
}
.sv-contact-item a {
  color: var(--primary);
  font-weight: 700;
}
.sv-contact-item a:hover { text-decoration: underline; }

/* Desc (evaluation/notes) */
.sv-card-desc {
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  line-height: 1.5;
}

/* Meta row */
.sv-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sv-card-address {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.sv-service-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.sv-service-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
}

/* Service list (bullet) */
.sv-card-bullets {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.sv-card-bullet {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}
.sv-card-bullet::before {
  content: '✓';
  color: var(--green);
  font-weight: 800;
  font-size: 0.7rem;
}

/* ── 補助資訊（核心差異點）── */
.sv-subsidy-block {
  background: linear-gradient(135deg, #f0f7ff, #e8f3fd);
  border: 1px solid rgba(26,111,186,0.15);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}
.sv-subsidy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.sv-subsidy-row:last-child { margin-bottom: 0; }
.sv-subsidy-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  width: 88px;
  flex-shrink: 0;
}
.sv-subsidy-bar-wrap {
  flex: 1;
  height: 7px;
  background: rgba(26,111,186,0.12);
  border-radius: 999px;
  overflow: hidden;
}
.sv-subsidy-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #3ea3f0);
  transition: width 0.5s ease;
}
.sv-subsidy-bar-fill.green { background: linear-gradient(90deg, var(--green), #4db87a); }
.sv-subsidy-amount {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}
.sv-self-pay-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(26,111,186,0.18);
}
.sv-self-pay-label { font-size: 0.72rem; color: var(--muted); }
.sv-self-pay-amount {
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--orange);
}
.sv-self-pay-note { font-size: 0.68rem; color: var(--muted); }

/* ── Card footer ── */
.sv-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.sv-avail-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
}
.sv-avail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sv-avail-dot.green { background: var(--green); box-shadow: 0 0 0 2px rgba(46,139,87,0.2); }
.sv-avail-dot.orange { background: var(--orange); }
.sv-avail-dot.gray { background: var(--muted); }

.sv-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.sv-btn-book {
  padding: 9px 20px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  transition: background 0.15s, transform 0.1s;
}
.sv-btn-book:hover { background: var(--primary-deep); transform: translateY(-1px); }
.sv-btn-locate {
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid #7c3aed;
  font-size: 0.82rem;
  font-weight: 700;
  color: #7c3aed;
  transition: background .15s, color .15s;
}
.sv-btn-locate:hover { background: #7c3aed; color: #fff; }
.sv-btn-locate:disabled { opacity: .5; cursor: wait; }

/* 諮詢按鈕（觸發站內訊息）*/
.sv-btn-consult {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: rgba(13, 148, 136, .08);
  color: #0d9488;
  border: 1.5px solid rgba(13, 148, 136, .35);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.sv-btn-consult:hover { background: #0d9488; color: #fff; border-color: #0d9488; }

.sv-btn-detail {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
}
.sv-btn-detail:hover { border-color: var(--primary); color: var(--primary); }

/* ════════════════════════════════════════════════
   EMPTY STATE
════════════════════════════════════════════════ */
.sv-empty {
  padding: 72px 24px;
  text-align: center;
  color: var(--muted);
}
.sv-empty-icon { font-size: 3rem; margin-bottom: 14px; opacity: 0.5; }
.sv-empty h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--ink); }
.sv-empty p  { margin: 0; font-size: 0.88rem; }

/* ════════════════════════════════════════════════
   SECTION DIVIDER (area group header)
════════════════════════════════════════════════ */
.sv-area-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 14px;
}
.sv-area-header-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
}
.sv-area-header-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.sv-area-header-count {
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ════════════════════════════════════════════════
   SUBSIDY INFO CALLOUT (頁頂說明)
════════════════════════════════════════════════ */
.sv-subsidy-callout {
  background: linear-gradient(135deg, #e8f3fd, #ddeeff);
  border-bottom: 1px solid rgba(26,111,186,0.15);
  padding: 10px 24px;
}
.sv-subsidy-callout-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.sv-subsidy-callout-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.sv-subsidy-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sv-subsidy-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(26,111,186,0.2);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.sv-subsidy-pill .icon { font-size: 1rem; }

/* ════════════════════════════════════════════════
   COMPARE BAR (fixed bottom)
════════════════════════════════════════════════ */
.sv-compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--primary-deep);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 -4px 24px rgba(10,30,60,0.2);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.sv-compare-bar.visible { transform: translateY(0); }
.sv-compare-label { font-size: 0.84rem; font-weight: 700; opacity: 0.8; white-space: nowrap; }
.sv-compare-items { display: flex; gap: 10px; flex: 1; flex-wrap: wrap; }
.sv-compare-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
}
.sv-compare-item-del {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.sv-compare-item-del:hover { color: #fff; }
.sv-compare-actions { display: flex; gap: 8px; flex-shrink: 0; }
.sv-btn-compare {
  padding: 10px 22px;
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--primary-deep);
  font-weight: 800;
  font-size: 0.88rem;
}
.sv-btn-compare-clear {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8);
  font-weight: 700;
  font-size: 0.82rem;
}

/* ════════════════════════════════════════════════
   COMPARE MODAL
════════════════════════════════════════════════ */
.sv-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,25,50,0.55);
  z-index: 500;
  display: none;
  place-items: center;
  padding: 20px;
}
.sv-modal-overlay.open { display: grid; }
.sv-compare-modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  width: min(960px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.sv-compare-modal-head {
  position: sticky;
  top: 0;
  background: var(--surface);
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.sv-compare-modal-head h2 { margin: 0; font-size: 1.1rem; }
.sv-modal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--muted);
  cursor: pointer;
}
.sv-modal-close:hover { background: #fce4ec; color: #c62828; }
.sv-compare-grid {
  padding: 20px 24px;
  display: grid;
  gap: 1px;
  background: var(--line);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  overflow: hidden;
}
.sv-compare-row {
  display: grid;
  grid-template-columns: 140px repeat(var(--cols, 2), 1fr);
  background: var(--surface);
}
.sv-compare-row:nth-child(even) { background: var(--surface-soft); }
.sv-compare-cell {
  padding: 12px 16px;
  font-size: 0.86rem;
  border-right: 1px solid var(--line);
}
.sv-compare-cell:last-child { border-right: none; }
.sv-compare-cell.is-label {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-soft);
}
.sv-compare-cell.is-header {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border-bottom: 2px solid var(--primary);
}
.sv-compare-cell .win {
  font-weight: 800;
  color: var(--green);
}
.sv-compare-cell .book-link {
  display: inline-block;
  padding: 7px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 800;
}

/* ════════════════════════════════════════════════
   PAGINATION
════════════════════════════════════════════════ */
.sv-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 24px 0;
}
.sv-page-ellipsis {
  width: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  user-select: none;
}
.sv-page-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.sv-page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.sv-page-btn:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* ════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .sv-body { grid-template-columns: 1fr; }
  .sv-map-col { display: none; }
}

@media (max-width: 760px) {
  .sv-card { grid-template-columns: 1fr; }
  .sv-card-img { min-height: 120px; }
  .sv-quick-search { flex-direction: column; border-radius: var(--radius-lg); }
  .sv-qs-field { border-right: none; border-bottom: 1px solid var(--line); }
  .sv-qs-btn { min-height: 50px; width: 100%; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
  .sv-hero-band { padding: 24px 16px 0; }
  .sv-body { padding: 0 16px 100px; }
  .sv-listing { padding: 16px 0 0; }
  .sv-compare-modal { width: 100%; border-radius: var(--radius-lg); }
}

@media (max-width: 480px) {
  .sv-card-footer { flex-direction: column; align-items: flex-start; }
  .sv-card-actions { width: 100%; }
  .sv-btn-book { flex: 1; text-align: center; }
}

/* ── 公司社群連結（卡片 action row 內的 icon-only 樣式）──── */
.sv-card-social-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 4px;
}
.sv-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease;
  flex-shrink: 0;
}
.sv-social-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,.22);
}
.sv-social-icon svg {
  display: block;
  pointer-events: none;
}
@media (max-width: 480px) {
  .sv-social-icon { width: 28px; height: 28px; border-radius: 7px; }
  .sv-social-icon svg { width: 12px !important; height: 12px !important; }
}

/* ━━━ 行動版篩選 FAB + 抽屜 ━━━ */
.sv-filter-fab,
.sv-filter-sheet-backdrop,
.sv-filter-sheet-handle,
.sv-filter-sheet-apply { display: none; }

@media (max-width: 760px) {
  /* 隱藏原本黏在頂部的篩選列 */
  .sv-filter-bar {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    top: auto !important;
    z-index: 100002;
    background: #fff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,.18);
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    max-height: 85vh;
    overflow: hidden;
    padding: 0;
  }
  .sv-filter-bar.sheet-open { transform: translateY(0); }

  .sv-filter-sheet-handle {
    display: block;
    width: 44px; height: 4px;
    background: #CBD5E1; border-radius: 99px;
    margin: 10px auto 0;
    flex-shrink: 0;
  }

  .sv-filter-inner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px;
    padding: 16px !important;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
  }

  .sv-area-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .sv-area-tab { font-size: .8rem; padding: 8px 4px; }
  .sv-filter-divider { display: none; }
  .sv-filter-select { width: 100%; min-height: 44px; }
  .sv-filter-toggle { width: 100%; min-height: 44px; justify-content: center; }
  .sv-result-count { text-align: center; padding: 8px 0; font-size: .9rem; }

  .sv-filter-sheet-apply {
    display: block;
    position: sticky; bottom: 0;
    width: 100%;
    padding: 14px 16px;
    background: #2563EB; color: #fff;
    border: none;
    font-size: 1rem; font-weight: 800;
    cursor: pointer;
    box-shadow: 0 -4px 16px rgba(0,0,0,.1);
  }

  /* FAB 按鈕（右下浮動） */
  .sv-filter-fab {
    display: flex;
    position: fixed;
    bottom: 84px; right: 20px;  /* 避開 LINE float btn */
    z-index: 100001;
    align-items: center; gap: 6px;
    padding: 12px 18px;
    background: #2563EB; color: #fff;
    border: none; border-radius: 999px;
    font-size: .9rem; font-weight: 800;
    box-shadow: 0 6px 20px rgba(37,99,235,.4);
    cursor: pointer;
    transition: transform .18s, box-shadow .18s;
  }
  .sv-filter-fab:active { transform: scale(.95); }
  .sv-filter-fab .fab-badge {
    display: none;
    background: #EF4444; color: #fff;
    font-size: .68rem; font-weight: 800;
    padding: 1px 6px; border-radius: 999px;
    min-width: 18px;
  }
  .sv-filter-fab.has-active .fab-badge { display: inline-block; }

  /* 半透明遮罩 */
  .sv-filter-sheet-backdrop {
    display: block;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
  }
  .sv-filter-sheet-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  body.sheet-open-lock { overflow: hidden; }
}
