:root {
  --primary: #193f69;
  --primary-light: #2c5990;
  --primary-dark: #0f2c4d;
  --primary-tint: #eaf0f6;
  --accent: #26bebe;
  --accent-dark: #1c9a9a;
  --accent-contrast: var(--primary);
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --surface: #ffffff;
  --footer-bg: #0b1220;
  --text: #10151f;
  --text-muted: #667085;
  --border: #e4e7ec;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-hover: 0 12px 28px rgba(16, 24, 40, 0.14);
  --font-sans: "Manrope", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

/* The browser's own [hidden] rule only lives in the lowest-priority
   user-agent stylesheet layer, so any of our own rules that set `display`
   on a hidden element (.advanced-filters, .map-filter-panel, ...) silently
   win the cascade and show it anyway, regardless of the `hidden` attribute
   still being present. Restoring that as a hard, explicit rule here — once,
   globally — is simpler and safer than remembering to scope every single
   future panel's display rule with :not([hidden]) itself. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: inherit;
}

h1, h2, h3 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 800;
}

/* Header */
.site-header {
  background: var(--surface);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.logo-mark-img {
  height: 34px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  gap: 24px;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.main-nav a:hover {
  color: var(--text);
}

/* Demo banner */
.banner-demo {
  background: #fff7e6;
  color: #92400e;
  font-size: 0.9rem;
  border-bottom: 1px solid #fde7b0;
}

.banner-demo .container {
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Hero */
.hero {
  position: relative;
  background: var(--primary-tint);
  color: var(--text);
  padding: 64px 0 92px;
  overflow: hidden;
}

/* Purely decorative transition into the white section below — an SVG
   wave rather than a flat colour cut, so the hero doesn't just stop dead
   into empty space. `preserveAspectRatio="none"` lets it stretch to fill
   any container width without distorting the curve's readability. */
.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 90px;
  display: block;
}

.hero-wave path {
  fill: var(--bg);
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

.hero-inner h1 {
  font-size: 2.6rem;
  max-width: 640px;
  color: var(--text);
}

.hero-sub {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

.search-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  box-shadow: var(--shadow-hover);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 160px;
}

.field-grow {
  flex: 2;
  min-width: 220px;
}

.field label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.field input,
.field select,
.sort-control select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-alt);
}

/* Listings section */
.listings-section {
  padding: 40px 0 64px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.toolbar-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.sources-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text);
}

.chip[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Each chip's active colour matches its source's badge colour (see
   .source-badge below) so the two stay visually tied together. */
.chip[data-source="Imovirtual"][aria-pressed="true"] { background: #6425c4; border-color: #6425c4; }
.chip[data-source="Idealista"][aria-pressed="true"] { background: #16793d; border-color: #16793d; }
.chip[data-source="SUPERCASA"][aria-pressed="true"] { background: #0b6fb0; border-color: #0b6fb0; }
.chip[data-source="RE/MAX"][aria-pressed="true"] { background: #dc1c2e; border-color: #dc1c2e; }
.chip[data-source="CASA SAPO"][aria-pressed="true"] { background: #2f6b3a; border-color: #2f6b3a; }
.chip[data-source="Century 21"][aria-pressed="true"] { background: #8a6d1a; border-color: #8a6d1a; }
.chip[data-source="KW Portugal"][aria-pressed="true"] { background: #0f7d72; border-color: #0f7d72; }
.chip[data-source="ERA"][aria-pressed="true"] { background: #2c4a8c; border-color: #2c4a8c; }
.chip[data-source="Idealista"][aria-pressed="true"] { background: #ff5619; border-color: #ff5619; }

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.link-btn {
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
}

/* Given its own button treatment (rather than a plain text link like "Mais
   filtros") since it's the one action in this toolbar that opens an
   entirely different way to search, not just another filter — worth
   standing out at a glance rather than blending in as another link. */
.map-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  background: var(--primary-tint);
  color: var(--primary);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.map-toggle-btn:hover {
  background: var(--primary);
  color: #fff;
}

.map-toggle-btn[aria-expanded="true"] {
  background: var(--primary);
  color: #fff;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sort-control select {
  padding: 8px 10px;
}

.map-filter-panel {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.map-filter-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.map-filter-search {
  display: flex;
  gap: 8px;
}

.map-filter-search input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}

.map-filter-search input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.map-filter-map {
  height: 340px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.map-filter-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.map-filter-radius-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.map-filter-controls select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}

.map-filter-controls input[type="range"] {
  flex: 1;
  min-width: 160px;
  accent-color: var(--accent);
}

.advanced-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.advanced-filters .field input,
.advanced-filters .field select {
  width: 100%;
}

.advanced-filters .field-wide {
  grid-column: span 2;
}

.results-count {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 16px 0;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-media {
  height: 150px;
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary-tint), var(--bg-alt));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-media svg {
  opacity: 0.4;
}

.card-media.has-photo {
  background: var(--bg-alt);
}

.card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
}

.card-link-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}

.card-price .per-month {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.card-location {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card-specs {
  display: flex;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

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

.source-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.source-badge[data-source="Imovirtual"] { background: #f2eafb; color: #6425c4; }
.source-badge[data-source="Idealista"] { background: #e9f8ee; color: #16793d; }
.source-badge[data-source="SUPERCASA"] { background: #e5f1fa; color: #0b6fb0; }
.source-badge[data-source="RE/MAX"] { background: #fcebea; color: #dc1c2e; }
.source-badge[data-source="CASA SAPO"] { background: #eaf3e9; color: #2f6b3a; }
.source-badge[data-source="Century 21"] { background: #fbf3e0; color: #8a6d1a; }
.source-badge[data-source="KW Portugal"] { background: #e3f2f0; color: #0f7d72; }
.source-badge[data-source="ERA"] { background: #e8ecf7; color: #2c4a8c; }
.source-badge[data-source="Idealista"] { background: #ffe9dd; color: #ff5619; }

.card-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.card-link:hover {
  text-decoration: underline;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 28px 0 8px;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 0;
}

/* How it works */
.how-it-works {
  background: var(--bg-alt);
  padding: 56px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.how-it-works h2 {
  text-align: center;
  margin-bottom: 32px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.step {
  text-align: center;
  padding: 0 12px;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.step h3 {
  font-weight: 700;
}

.step p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* About page */
.about-page {
  padding: 56px 0 72px;
}

.about-page-inner {
  max-width: 720px;
}

.about-page h2 {
  margin-top: 1.5em;
  font-size: 1.4rem;
}

.about-page p {
  color: var(--text-muted);
}

.about-page a {
  color: var(--primary);
  font-weight: 600;
}

.sources-list {
  margin: 0 0 1.5em;
  padding-left: 20px;
  color: var(--text-muted);
}

/* Listing detail page */
.listing-page {
  padding: 32px 0 64px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.listing-status {
  text-align: center;
  color: var(--text-muted);
  padding: 64px 0;
}

.listing-status-btn {
  display: inline-block;
  margin-top: 16px;
  text-decoration: none;
}

.listing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 32px;
  align-items: start;
}

.listing-body {
  margin-top: 32px;
}

.listing-photo {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  max-height: 520px;
  background: var(--bg-alt);
}

.listing-photo-placeholder {
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.listing-gallery-main {
  position: relative;
}

.listing-gallery-main .listing-photo {
  max-height: 440px;
}

.listing-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(16, 21, 31, 0.55);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.listing-gallery-nav.prev {
  left: 12px;
}

.listing-gallery-nav.next {
  right: 12px;
}

.listing-gallery-nav:hover {
  background: rgba(16, 21, 31, 0.8);
}

.listing-gallery-count {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(16, 21, 31, 0.65);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
}

.listing-gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.listing-gallery-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: none;
  opacity: 0.7;
}

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

.listing-gallery-thumb.active {
  border-color: var(--primary);
  opacity: 1;
}

.listing-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.listing-type-badge {
  position: static;
  box-shadow: none;
  background: var(--bg-alt);
}

.listing-title {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.listing-location {
  color: var(--text-muted);
  margin: 0 0 12px;
}

.listing-spec-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-bottom: 16px;
}

.spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.spec-chip svg {
  color: var(--primary);
  flex-shrink: 0;
}

.listing-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.listing-price {
  display: inline-block;
  background: var(--primary-tint);
  color: var(--primary);
  font-size: 1.6rem;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 10px;
}

.listing-price .per-month {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
  opacity: 0.75;
}

.listing-actions-row {
  display: flex;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.icon-btn:hover {
  background: var(--bg-alt);
}

.listing-description {
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 720px;
}

.listing-description p {
  margin: 0 0 1em;
}

.listing-section {
  margin-bottom: 24px;
}

.listing-section-title {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.listing-technical-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.listing-technical-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.listing-technical-value {
  font-weight: 700;
}

.listing-features-group {
  margin-bottom: 12px;
}

.listing-features-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.listing-features-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-pill {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.82rem;
}

.listing-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.tab-btn {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 2px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.divisions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.division-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 10px;
  background: var(--bg-alt);
}

.division-card-icon {
  color: var(--primary);
}

.division-card-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.epc-badge {
  display: inline-block;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 2px 10px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}

.epc-badge[data-tier="aplus"] { background: #1a9850; }
.epc-badge[data-tier="a"] { background: #66bd63; }
.epc-badge[data-tier="b"] { background: #a6d96a; color: #10151f; }
.epc-badge[data-tier="bminus"] { background: #d9ef8b; color: #10151f; }
.epc-badge[data-tier="c"] { background: #fee08b; color: #10151f; }
.epc-badge[data-tier="d"] { background: #fdae61; color: #10151f; }
.epc-badge[data-tier="e"] { background: #f46d43; }
.epc-badge[data-tier="f"] { background: #d73027; }
.epc-badge[data-tier="g"] { background: #a50026; }
.epc-badge[data-tier="info"] { background: var(--text-muted); }

.pn-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 8px);
  background: var(--footer-bg);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-hover);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}

.pn-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.listing-map {
  margin-bottom: 24px;
}

.listing-map iframe {
  width: 100%;
  height: 320px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.listing-map-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--primary);
  text-decoration: none;
}

.listing-map-link:hover {
  text-decoration: underline;
}

.listing-cta {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

@media (max-width: 800px) {
  .listing-hero {
    grid-template-columns: 1fr;
  }
}

/* Easter egg credit, revealed only by typing the creator's handle */
.easter-egg-credit {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--footer-bg);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-hover);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 100;
}

.easter-egg-credit.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.7);
  padding: 24px 0;
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  text-decoration: none;
  color: #fff;
}

.footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .header-inner {
    height: auto;
    padding: 12px 0;
    flex-direction: column;
    gap: 10px;
  }

  .hero-inner h1 {
    font-size: 1.9rem;
  }

  .search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .map-filter-search {
    flex-direction: column;
  }

  .map-filter-map {
    height: 260px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .back-link,
  .listing-actions-row,
  .listing-cta,
  .listing-gallery-nav,
  .listing-gallery-thumbs,
  .listing-gallery-count,
  .listing-map-link,
  .pn-toast {
    display: none !important;
  }

  .listing-map iframe {
    height: 240px;
  }
}
