:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-alt: #f0f2f5;
  --text: #111827;
  --text-muted: #4b5563;
  --border: #e5e7eb;
  --primary: #0f766e;
  --primary-hover: #0d9488;
  --primary-soft: #ccfbf1;
  --featured-bg: #fffbeb;
  --featured-border: #f59e0b;
  --featured-text: #92400e;
  --pawlife-bg: #fff7ed;
  --pawlife-border: #fb923c;
  --pawlife-accent: #ea580c;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
}

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang HK", "Microsoft JhengHei", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* ─── HEADER ─── */
.site-header {
  background: linear-gradient(135deg, #0f4c46 0%, #0f766e 100%);
  color: #fff;
  padding: 32px 0 28px;
  margin-bottom: 24px;
}
.site-header .container { display: flex; flex-direction: column; gap: 8px; }
.header-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  width: fit-content;
}
.site-header h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; color: #fff; }
.tagline { margin: 0; color: rgba(255,255,255,0.88); font-size: 0.98rem; }
.header-notice {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.1);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  width: fit-content;
}

/* ─── FILTER PANEL ─── */
.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.filter-grid {
  display: grid;
  grid-template-columns: 2fr repeat(5, 1fr);
  gap: 12px;
}
.filter-field { display: flex; flex-direction: column; gap: 5px; }
.filter-field label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.filter-field input,
.filter-field select {
  width: 100%; min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
}
.filter-field input:focus,
.filter-field select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}
.tags-row {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.tags-label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.tag-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-btn {
  border: 1px solid var(--border); background: var(--surface-alt);
  color: var(--text); padding: 5px 11px; border-radius: 999px;
  font-size: 0.82rem; cursor: pointer;
  transition: all 0.14s ease;
}
.tag-btn:hover { border-color: var(--primary); }
.tag-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.filter-status-bar {
  margin-top: 12px; display: flex; justify-content: space-between; align-items: center;
  font-size: 0.86rem; color: var(--text-muted);
}
.btn-reset {
  background: none; border: 1px solid var(--border); color: var(--text);
  padding: 5px 11px; border-radius: 6px; font-size: 0.8rem; cursor: pointer;
}
.btn-reset:hover { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; }

/* ─── STATUS BANNER ─── */
.status-banner {
  background: #fef2f2; border: 1px solid #fecaca; color: #991b1b;
  padding: 14px 16px; border-radius: var(--radius); margin-bottom: 20px;
  font-size: 0.9rem;
}

/* ─── DIRECTORY GRID ─── */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card.featured {
  border: 2px solid var(--featured-border);
  background: linear-gradient(170deg, var(--featured-bg) 0%, var(--surface) 40%);
}

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-badges { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.badge {
  font-size: 0.72rem; font-weight: 600; padding: 2px 7px;
  border-radius: 5px; background: var(--surface-alt); color: var(--text-muted);
}
.badge-featured { background: #fef3c7; color: var(--featured-text); }
.badge-price { background: var(--primary-soft); color: var(--primary); }
.badge-category {
  background: #ede9fe; color: #5b21b6;
  font-size: 0.7rem;
}
.badge-verified { background: #d1fae5; color: #065f46; font-size: 0.7rem; }

.card-title { margin: 8px 0 3px; font-size: 1.05rem; line-height: 1.35; }
.card-meta { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 8px; }
.card-highlights { margin: 0; font-size: 0.88rem; color: var(--text); line-height: 1.55; }

.card-policy {
  margin: 6px 0 0; font-size: 0.8rem; color: #0369a1;
  background: #f0f9ff; border-left: 3px solid #38bdf8;
  padding: 6px 10px; border-radius: 0 6px 6px 0;
}
.card-policy-warn {
  color: #92400e; background: #fffbeb; border-left-color: #f59e0b;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.card-tag {
  font-size: 0.74rem; background: var(--surface-alt);
  color: var(--text-muted); padding: 2px 8px; border-radius: 999px;
}
.card-footer {
  padding-top: 10px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 0.78rem; color: var(--text-muted);
}
.card-hours { font-size: 0.75rem; color: var(--text-muted); font-style: italic; }
.card-link {
  display: inline-block; text-decoration: none;
  background: var(--primary); color: #fff;
  font-weight: 600; font-size: 0.82rem;
  padding: 7px 13px; border-radius: 8px;
  white-space: nowrap;
}
.card-link:hover { background: var(--primary-hover); }
.card-link-disabled {
  background: var(--surface-alt); color: var(--text-muted);
  pointer-events: none; cursor: default;
}

.empty-state {
  grid-column: 1 / -1; background: var(--surface);
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 36px 20px; text-align: center; color: var(--text-muted);
}

/* ─── PAWLIFE HK BLOCK ─── */
.pawlife-block {
  background: linear-gradient(135deg, var(--pawlife-bg) 0%, #fff 60%);
  border: 2px solid var(--pawlife-border);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(234,88,12,0.1);
}
.pawlife-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
}
.pawlife-left { flex: 1; }
.pawlife-label {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--pawlife-accent); background: rgba(234,88,12,0.1);
  padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
  text-transform: uppercase;
}
.pawlife-title { margin: 0 0 6px; font-size: 1.15rem; color: #1c1917; }
.pawlife-desc { margin: 0 0 10px; font-size: 0.9rem; color: #57534e; line-height: 1.55; }
.pawlife-list {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 6px 16px;
}
.pawlife-list li { font-size: 0.84rem; color: #78716c; }
.pawlife-right { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pawlife-cta {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; background: var(--pawlife-accent); color: #fff;
  font-weight: 700; font-size: 0.95rem;
  padding: 12px 22px; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(234,88,12,0.3);
  transition: background 0.15s ease, transform 0.15s ease;
}
.pawlife-cta:hover { background: #c2410c; transform: translateY(-1px); }
.pawlife-cta-arrow { font-size: 1rem; }
.pawlife-sub { margin: 0; font-size: 0.75rem; color: #a8a29e; }

/* ─── DYNAMIC CTA ─── */
.cta-banner {
  background: var(--surface); border: 1px solid var(--primary); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 28px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.cta-content h2 { margin: 0 0 4px; font-size: 1rem; }
.cta-content p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }
.cta-button {
  flex-shrink: 0; text-decoration: none;
  background: var(--primary); color: #fff; font-weight: 600;
  padding: 10px 18px; border-radius: 8px; font-size: 0.9rem;
}
.cta-button:hover { background: var(--primary-hover); }

/* ─── FOOTER ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0 32px; text-align: center;
  color: var(--text-muted); font-size: 0.82rem;
}
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--pawlife-accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .filter-grid { grid-template-columns: repeat(3, 1fr); }
  .filter-search { grid-column: 1 / -1; }
  .directory-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .filter-grid { grid-template-columns: repeat(2, 1fr); }
  .pawlife-inner { flex-direction: column; }
  .pawlife-right { align-self: stretch; }
  .pawlife-cta { width: 100%; justify-content: center; }
}
@media (max-width: 600px) {
  .filter-grid { grid-template-columns: 1fr; }
  .directory-grid { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; align-items: flex-start; }
}
