/* Hiyaavahi MV — Home page styles (mobile-first) */

/* Put your Dhivehi/Thaana font file at: fonts/thaana.ttf */
@font-face {
  font-family: "Hiyaavahi Thaana";
  src: url("fonts/thaana.woff2") format("woff2"),
    url("fonts/thaana.ttf") format("truetype"),
    url("fonts/thaana.otf") format("opentype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0780-07B1;
}

:root {
  /* Deep teal brand */
  --color-teal-900: #022c2a;
  --color-teal-800: #0a3f3c;
  --color-teal-700: #0d524d;
  --color-teal-600: #11655e;
  --color-teal-500: #157a71;
  --color-teal-100: #d0e8e5;
  --color-teal-50: #eaf5f3;

  --color-blue-900: #0c2d48;
  --color-blue-700: #0369a1;
  --color-blue-600: #0284c7;

  --color-surface: #ffffff;
  --color-bg: #f3f6f6;
  --color-bg-hero: linear-gradient(145deg, #e2efec 0%, #e8f1f0 45%, #eaf5f3 100%);

  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(13, 82, 77, 0.14);
  --shadow-card-hover: 0 16px 48px rgba(13, 82, 77, 0.18);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", "DM Sans", system-ui, sans-serif;
  --font-thaana: "Hiyaavahi Thaana", var(--font-display);
  --header-height: 58px;
  --header-gap: 0.75rem;
  --header-space: calc(
    var(--header-height) + var(--header-gap) * 2 + env(safe-area-inset-top, 0px)
  );
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.nav-menu-open {
  overflow: hidden;
}

main {
  min-width: 0;
  flex: 1 0 auto;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-teal-700);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-teal-600);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 clamp(0.875rem, 4vw, 1.5rem);
}

/* ——— Header — floating glass pill ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  padding: var(--header-gap) clamp(0.75rem, 4vw, 1.5rem);
  padding-top: calc(var(--header-gap) + env(safe-area-inset-top, 0px));
  /* Page content flows beneath the floating bar. */
  margin-bottom: calc(-1 * var(--header-space));
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  min-height: var(--header-height);
  padding: 0 1rem 0 0.5rem;
  border-radius: 999px;
  overflow: visible;
  /* Glass lives on ::before so fixed drawer is not trapped by backdrop-filter */
  background: transparent;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 8px 28px rgba(15, 23, 42, 0.08),
    0 20px 48px rgba(13, 82, 77, 0.06);
  transition: box-shadow 0.25s ease;
}

.header-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.28) 48%,
    rgba(234, 245, 243, 0.4) 100%
  );
  backdrop-filter: blur(28px) saturate(1.85);
  -webkit-backdrop-filter: blur(28px) saturate(1.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  pointer-events: none;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.header-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0) 42%
  );
  pointer-events: none;
}

.header-inner > * {
  position: relative;
  z-index: 1;
}

.site-header--scrolled .header-inner {
  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.06),
    0 14px 40px rgba(15, 23, 42, 0.1),
    0 24px 56px rgba(13, 82, 77, 0.08);
}

.site-header--scrolled .header-inner::before {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(255, 255, 255, 0.48) 50%,
    rgba(234, 245, 243, 0.55) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

@media (max-width: 767px) {
  :root {
    --header-height: 52px;
  }

  .brand {
    font-size: 1.0625rem;
    min-width: 0;
  }
}

/* Mobile: unwrap so fixed drawer is not a flex child of the pill */
.header-nav-wrap {
  display: contents;
}

@media (min-width: 768px) {
  .header-inner {
    gap: 1.5rem;
    padding: 0 1.5rem;
  }

  /* Desktop links on the left; brand sits on the right */
  .header-nav-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: absolute;
    left: 50%;
    top: calc(var(--header-gap) + env(safe-area-inset-top, 0px));
    z-index: 2;
    width: 100%;
    max-width: 1120px;
    height: var(--header-height);
    margin: 0;
    padding: 0 1.5rem;
    transform: translateX(-50%);
    pointer-events: none;
  }

  .header-nav-wrap .main-nav {
    pointer-events: auto;
  }
}

/*
 * Guest default: Create listing only.
 * Auth class is on body too — mobile drawer is portaled outside .site-header.
 */
#nav-my-listings {
  display: none;
}

#nav-create-listing[hidden],
#nav-my-listings[hidden],
.site-header--signed-in #nav-create-listing,
body.nav-signed-in #nav-create-listing {
  display: none !important;
}

.site-header--signed-in #nav-my-listings,
body.nav-signed-in #nav-my-listings {
  display: list-item !important;
}

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--color-teal-700), var(--color-teal-800));
  color: #fff;
  font-weight: 700;
  line-height: 1;
}

.user-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-left: auto;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.03em;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.brand:hover {
  color: var(--color-teal-800);
}

.brand:focus,
.brand:active {
  color: var(--color-text);
  outline: none;
}

.brand:focus-visible {
  color: var(--color-teal-800);
}

.brand-dhivehi {
  font-family: var(--font-thaana);
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--color-teal-800);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  border: none;
  margin: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.site-header.nav-open .nav-backdrop,
body.nav-menu-open .nav-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.nav-backdrop[hidden] {
  display: block !important;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.05);
  cursor: pointer;
  transition: background var(--transition), transform 0.15s ease;
  flex-shrink: 0;
  font-family: inherit;
  color: var(--color-text);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.nav-toggle:hover {
  background: rgba(15, 23, 42, 0.09);
}

.nav-toggle:active {
  transform: scale(0.94);
}

.nav-toggle:focus {
  outline: none;
}

.nav-toggle:focus-visible {
  outline: 2px solid rgba(21, 122, 113, 0.45);
  outline-offset: 2px;
}

.nav-toggle-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 18px;
  height: 18px;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-teal-900);
  border-radius: 999px;
  transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  transform-origin: center;
}

.site-header.nav-open .nav-toggle-bar:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.site-header.nav-open .nav-toggle-bar:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Mobile: slide-in drawer from the left */
.main-nav {
  position: fixed;
  z-index: 1210;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(330px, 86vw);
  pointer-events: none;
  visibility: hidden;
  transform: translateX(-100%);
  transition: transform 0.36s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.36s;
  overflow: visible;
}

.site-header.nav-open .main-nav,
body.nav-menu-open .main-nav {
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.main-nav__sheet {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--color-surface);
  border-radius: 0 1.75rem 1.75rem 0;
  box-shadow: 20px 0 60px rgba(15, 23, 42, 0.18);
  padding: calc(1rem + env(safe-area-inset-top, 0px)) 0
    calc(0.85rem + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-hero {
  position: relative;
  margin: 0 0.875rem 1.5rem;
  padding: 1.5rem 1.25rem 1.35rem;
  border-radius: 1.5rem;
  color: #fff;
  text-align: right;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(155deg, #0d524d 0%, #0a3f3c 42%, #022c2a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 28px rgba(2, 44, 42, 0.22);
}

.nav-hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(21, 122, 113, 0.55) 0%,
    rgba(21, 122, 113, 0) 68%
  );
  z-index: -1;
  pointer-events: none;
}

.nav-hero::after {
  content: "";
  position: absolute;
  inset: auto auto -45% -25%;
  width: 11rem;
  height: 11rem;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  z-index: -1;
  pointer-events: none;
}

/* Soft accommodation mark filling the left side of the brand banner */
.nav-hero__art {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  z-index: 0;
  width: 4.5rem;
  height: 4.5rem;
  transform: translateY(-50%);
  color: rgba(234, 245, 243, 0.62);
  pointer-events: none;
}

.nav-hero__art::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120%;
  height: 120%;
  border-radius: 50%;
  transform: translate(-58%, -50%);
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.04) 42%,
    rgba(255, 255, 255, 0) 72%
  );
  pointer-events: none;
}

.nav-hero__art svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.nav-hero__brand,
.nav-hero__tag {
  position: relative;
  z-index: 1;
}

.nav-close {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.06);
  color: var(--color-teal-800);
  box-shadow: none;
  cursor: pointer;
  pointer-events: auto;
  transform: translateY(-50%);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.nav-close:focus {
  outline: none;
}

.nav-close:focus-visible {
  outline: 2px solid rgba(21, 122, 113, 0.4);
  outline-offset: 2px;
}

.nav-close:hover {
  background: rgba(13, 82, 77, 0.12);
  color: var(--color-teal-900);
  transform: translate(-1px, -50%);
}

.nav-close:active {
  transform: translate(-2px, -50%) scale(0.96);
}

.nav-close svg {
  width: 0.875rem;
  height: 0.875rem;
}

.nav-hero__brand {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0 auto;
  width: fit-content;
  max-width: 100%;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  text-align: right;
}

.nav-hero__name {
  font-family: var(--font-thaana);
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 0;
}

.nav-hero__tag {
  margin: 0.45rem 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
  text-align: right;
}

.nav-section {
  margin: 0 0 0.375rem;
  padding: 0 1.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.nav-list > li {
  margin: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.9375rem;
  min-height: 3.125rem;
  padding: 0.625rem 1.5rem;
  color: var(--color-text);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  transition: color 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.nav-link:focus {
  outline: none;
  color: var(--color-text);
}

.nav-link:focus-visible {
  outline: none;
  color: var(--color-teal-800);
  background: rgba(234, 245, 243, 0.7);
}

.nav-link__icon {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}

.nav-link__icon svg {
  width: 100%;
  height: 100%;
}

.nav-link:hover {
  color: var(--color-teal-800);
}

.nav-link:hover .nav-link__icon {
  color: var(--color-teal-600);
}

.nav-link--active {
  color: var(--color-teal-900);
  font-weight: 600;
  background: linear-gradient(90deg, rgba(208, 232, 229, 0.6), rgba(234, 245, 243, 0));
}

.nav-link--active .nav-link__icon {
  color: var(--color-teal-600);
}

.nav-link--cta {
  color: var(--color-teal-700);
  font-weight: 600;
}

.nav-link--cta .nav-link__icon {
  color: var(--color-teal-600);
}

/* Logout sits above the brand footer text, not inside it */
.nav-logout[hidden] {
  display: none !important;
}

.nav-logout {
  flex-shrink: 0;
  padding: 0.5rem 1rem 0.65rem;
  min-width: 0;
}

body.nav-signed-in .nav-logout {
  margin-top: auto;
}

.nav-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem 0.65rem;
  border: none;
  border-radius: 0.75rem;
  background: transparent;
  color: #7a908c;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-logout-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.nav-logout-btn:hover {
  color: var(--color-teal-900);
  background: rgba(15, 23, 42, 0.03);
}

.nav-logout-btn:focus {
  outline: none;
}

.nav-logout-btn:focus-visible {
  outline: 2px solid rgba(21, 122, 113, 0.35);
  outline-offset: 2px;
}

.nav-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.85rem 1.5rem 0.35rem;
  border-top: 1px solid rgba(13, 82, 77, 0.1);
  color: #6b7f7c;
  min-width: 0;
}

body.nav-signed-in .nav-footer {
  margin-top: 0;
}

.nav-footer__made {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: #5f736f;
}

.nav-footer__tag {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  color: #809490;
}

.nav-footer__copy {
  margin: 0.45rem 0 0;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: #93a5a1;
}

@media (min-width: 768px) {
  .nav-backdrop {
    display: none !important;
  }

  .main-nav {
    position: static;
    z-index: auto;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    width: auto;
    transform: none;
    visibility: visible;
    pointer-events: auto;
    transition: none;
  }

  .main-nav__sheet {
    display: block;
    height: auto;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    overflow: visible;
  }

  .nav-hero,
  .nav-section,
  .nav-footer,
  .nav-logout,
  .nav-link__icon,
  .nav-close {
    display: none;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 1.75rem;
  }

  .nav-link {
    position: relative;
    min-height: 0;
    gap: 0;
    padding: 0.375rem 0;
    font-size: 0.9375rem;
    background: none;
  }

  .nav-link--active {
    color: var(--color-teal-800);
  }

  .nav-link--active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--color-teal-500);
  }

  .nav-link--cta {
    font-weight: 600;
  }
}

@media (prefers-reduced-motion: reduce) {
  .main-nav,
  .nav-backdrop,
  .nav-toggle-bar,
  .nav-link {
    transition: none !important;
  }
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

a.btn:link,
a.btn:visited,
a.btn:hover,
a.btn:active,
a.btn:focus {
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-teal-600), var(--color-teal-700));
  color: #fff;
  box-shadow: 0 4px 14px rgba(17, 101, 94, 0.35);
}

a.btn-primary:link,
a.btn-primary:visited,
a.btn-primary:hover,
a.btn-primary:active,
a.btn-primary:focus {
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-teal-500), var(--color-teal-600));
  box-shadow: 0 6px 20px rgba(17, 101, 94, 0.4);
}

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

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

/* ——— Hero ——— */
.hero {
  background: var(--color-bg-hero);
  padding: calc(var(--header-space) + 1rem) 0 1.25rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  scroll-margin-top: calc(var(--header-height) + var(--header-gap) * 2);
}

.hero--market {
  position: relative;
  padding: calc(var(--header-space) + 0.15rem) 0 0.75rem;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(21, 122, 113, 0.12), transparent 55%),
    linear-gradient(180deg, #e2efec 0%, #f3f6f6 70%);
  border-bottom: 1px solid rgba(13, 82, 77, 0.08);
  overflow: hidden;
}

.hero--market .hero-inner {
  gap: 0.85rem;
}

.hero--market .hero-copy {
  max-width: 28rem;
  padding: 0.1rem 0 0;
}

.hero-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.45rem 0.65rem;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--color-teal-900);
  animation: hero-copy-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-title__brand {
  font-family: var(--font-thaana);
  font-size: clamp(2.35rem, 9vw, 3.75rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
  color: var(--color-teal-900);
}

.hero--market .hero-lead {
  margin: 1.15rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(0.9375rem, 2.8vw, 1.125rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--color-teal-800);
  opacity: 0.88;
  min-height: 1.45em;
}

.hero-lead--type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.hero-lead__typed {
  white-space: pre-wrap;
}

.hero-lead__caret {
  display: inline-block;
  width: 0.08em;
  height: 1.05em;
  margin-left: 0.08em;
  border-radius: 1px;
  background: var(--color-teal-600);
  box-shadow: 0 0 12px rgba(21, 122, 113, 0.45);
  transform-origin: center;
  animation: hero-caret-blink 0.85s steps(1, end) infinite;
}

.hero-lead--done .hero-lead__caret {
  animation: hero-caret-fade 0.45s ease forwards;
}

@keyframes hero-caret-blink {
  0%,
  45% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes hero-caret-fade {
  to {
    opacity: 0;
    transform: scaleY(0.4);
  }
}

@keyframes hero-copy-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .hero--market {
    padding: calc(var(--header-space) + 0.75rem) 0 1.5rem;
  }

  .hero--market .hero-inner {
    gap: 1.5rem;
  }

  .hero--market .hero-copy {
    padding: 0.5rem 0 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title {
    animation: none;
  }

  .hero-lead__caret {
    display: none;
    animation: none;
  }
}

/* Home hero search — submit to run */
.search-hero {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  min-width: 0;
}

.search-hero__tools {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
  margin-top: 0.45rem;
}

.home-category-pills {
  display: flex;
  align-items: center;
  justify-content: stretch;
  gap: 0.2rem;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0.18rem;
  border-radius: 999px;
  border: 1px solid rgba(13, 82, 77, 0.12);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  box-sizing: border-box;
}

.home-category-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  border: none;
  border-radius: 999px;
  min-height: 2.35rem;
  padding: 0.3rem 0.4rem;
  background: transparent;
  color: var(--color-teal-800);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.home-category-pill:hover {
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-teal-900);
}

.home-category-pill.is-active {
  background: #0f5c56;
  color: #fff;
  box-shadow: 0 2px 8px rgba(15, 92, 86, 0.2);
}

.home-category-pill:focus-visible {
  outline: 2px solid rgba(21, 122, 113, 0.4);
  outline-offset: 1px;
}

.home-category-pill:disabled {
  opacity: 0.55;
  cursor: default;
}

.search-hero > .search-hero__field {
  width: 100%;
}

.search-hero__filters {
  flex-shrink: 0;
  align-self: stretch;
  min-height: 2.7rem;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

@media (max-width: 420px) {
  .search-hero__filters .filters-open-btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .search-hero__filters {
    position: relative;
    width: 2.7rem;
    padding: 0;
    justify-content: center;
  }

  .search-hero__filters .filters-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    font-size: 0.625rem;
    margin: 0;
  }
}

.search-hero__field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-hero__field:focus-within {
  border-color: var(--color-teal-500);
  box-shadow: 0 0 0 3px rgba(21, 122, 113, 0.18), var(--shadow-md);
}

.search-hero__input,
.search-hero__field .search-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 48px;
  padding: 0 3rem 0 1.1rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  text-overflow: ellipsis;
}

.search-hero__field:has(.search-hero__clear:not([hidden])) .search-hero__input,
.search-hero__field:has(.search-hero__clear:not([hidden])) .search-input {
  padding-right: 5.1rem;
}

.search-hero__input:focus {
  outline: none;
}

.search-hero__input::placeholder {
  color: #94a3b8;
}

.search-hero__input::-webkit-search-cancel-button,
.search-hero__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-hero__clear {
  position: absolute;
  right: 2.55rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.search-hero__clear:hover {
  color: var(--color-text);
}

.search-hero__clear[hidden] {
  display: none !important;
}

.search-hero__submit {
  position: absolute;
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  color: #94a3b8;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.search-hero__submit:hover {
  color: var(--color-teal-700);
  background: var(--color-teal-50);
}

.search-hero__submit.is-glowing {
  color: var(--color-teal-600);
  background: rgba(234, 245, 243, 0.95);
  box-shadow:
    0 0 0 1px rgba(21, 122, 113, 0.18),
    0 0 14px rgba(21, 122, 113, 0.35);
  animation: search-icon-glow 1.6s ease-in-out infinite;
}

.search-hero__submit.is-glowing:hover {
  color: var(--color-teal-800);
}

.search-hero__submit:active {
  transform: translateY(-50%) scale(0.96);
}

.search-hero__submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(21, 122, 113, 0.22);
}

.search-hero__submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  animation: none;
  box-shadow: none;
}

@keyframes search-icon-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(21, 122, 113, 0.16),
      0 0 10px rgba(21, 122, 113, 0.28);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(21, 122, 113, 0.28),
      0 0 18px rgba(21, 122, 113, 0.48);
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-hero__submit.is-glowing {
    animation: none;
  }
}

@media (min-width: 768px) {
  .search-hero__input {
    font-size: 0.9375rem;
  }
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .hero-inner {
    gap: 1.75rem;
  }
}

.hero-copy {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--color-blue-900);
}

.hero-lead {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--color-text-muted);
}

.search-panel {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0.75rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

@media (min-width: 768px) {
  .search-panel {
    padding: 1rem;
    border-radius: var(--radius-xl);
  }
}

.search-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.5rem;
}

.search-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.search-field:focus-within {
  border-color: var(--color-teal-500);
  box-shadow: 0 0 0 3px rgba(21, 122, 113, 0.2);
  background: var(--color-surface);
}

.search-field__leading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0 2.5rem 0 0;
  font-family: inherit;
  font-size: 1rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
}

@media (min-width: 768px) {
  .search-input {
    font-size: 0.9375rem;
  }
}

.search-input:focus {
  outline: none;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-input:disabled,
.sort-select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Use our clear icon instead of the browser default */
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-field__clear {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  touch-action: manipulation;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.search-field__clear:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--color-text);
}

.search-field__clear[hidden] {
  display: none;
}

.search-row .btn-search {
  flex-shrink: 0;
  min-height: 44px;
  min-width: 44px;
  width: 44px;
  padding: 0;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(17, 101, 94, 0.25);
  touch-action: manipulation;
}

.search-row .btn-search:hover {
  box-shadow: 0 3px 10px rgba(17, 101, 94, 0.3);
}

@media (min-width: 768px) {
  .hero:not(.hero--market) {
    padding: calc(var(--header-space) + 1.5rem) 0 2.75rem;
  }
}

/* ——— Listings toolbar ——— */
.listings-section {
  padding: 0.85rem 0 2.75rem;
  scroll-margin-top: calc(var(--header-height) + var(--header-gap) * 2);
}

@media (min-width: 768px) {
  .listings-section {
    padding: 1.1rem 0 3.5rem;
  }
}

.listings-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .listings-toolbar {
    gap: 1.25rem;
    margin-bottom: 1.75rem;
  }
}

.listings-heading-block h2 {
  margin: 0 0 0.25rem;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-blue-900);
}

.result-count {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.sort-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.sort-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sort-select {
  min-height: 48px;
  width: 100%;
  max-width: 100%;
  padding: 0 2.5rem 0 1rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  transition: border-color var(--transition);
}

.sort-select:focus {
  outline: none;
  border-color: var(--color-teal-500);
  box-shadow: 0 0 0 3px rgba(21, 122, 113, 0.15);
}

@media (min-width: 768px) {
  .sort-select {
    font-size: 0.9375rem;
  }
}

.listings-toolbar__actions {
  width: 100%;
}

@media (min-width: 640px) {
  .listings-toolbar {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .listings-toolbar__actions {
    width: auto;
  }

  .sort-wrap {
    min-width: 220px;
  }
}

/* ——— Grid ——— */
.listings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  min-width: 0;
}

@media (min-width: 640px) {
  .listings-grid {
    gap: 1.35rem;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .listings-grid {
    gap: 1.65rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.listings-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 1rem 0 0.25rem;
}

.listings-load-more[hidden] {
  display: none !important;
}

.listings-load-more__spinner {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 2px solid rgba(13, 82, 77, 0.14);
  border-top-color: var(--color-teal-700);
  animation: listings-load-spin 0.7s linear infinite;
}

.listings-load-more:not(.is-loading) .listings-load-more__spinner {
  opacity: 0;
}

@keyframes listings-load-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ——— Listing card ——— */
.listing-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

@media (hover: hover) and (pointer: fine) {
  .listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(21, 122, 113, 0.25);
  }

  .listing-card:hover .listing-card__media img {
    transform: scale(1.04);
  }

  .listing-card--market:hover {
    transform: translateY(-3px);
    box-shadow:
      0 10px 28px rgba(15, 23, 42, 0.1),
      0 2px 8px rgba(13, 82, 77, 0.06);
    border-color: rgba(13, 82, 77, 0.16);
  }

  .listing-card--market:hover .listing-card__media img {
    transform: scale(1.045);
  }
}

.listing-card--market {
  cursor: pointer;
  min-width: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  color: var(--color-text);
  -webkit-user-select: none;
  user-select: none;
  border-radius: 1.125rem;
  border-color: rgba(15, 23, 42, 0.06);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 24px rgba(15, 23, 42, 0.06);
}

.listing-card--market:focus {
  outline: none;
}

.listing-card--market:focus-visible {
  outline: 3px solid rgba(21, 122, 113, 0.55);
  outline-offset: 2px;
}

.listing-card--market .listing-card__media,
.listing-card--market .listing-card__media img,
.listing-card--market .listing-card__content-wrap,
.listing-card--market .listing-card__title,
.listing-card--market .listing-card__location,
.listing-card--market .listing-card__location-text {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

@media (hover: none), (pointer: coarse) {
  .listing-card--market:active {
    border-color: rgba(21, 122, 113, 0.35);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    transform: translateY(1px);
    transition-duration: 0.12s;
  }
}

.listing-card__fav {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--color-text-muted);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--transition), color var(--transition), background var(--transition);
}

.listing-card--market .listing-card__fav {
  top: 0.5rem;
  right: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  color: #fff;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.listing-card--market .listing-card__fav svg {
  width: 1.35rem;
  height: 1.35rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.listing-card__fav:focus {
  outline: none;
}

.listing-card__fav:focus-visible {
  outline: 2px solid rgba(21, 122, 113, 0.55);
  outline-offset: 2px;
}

.listing-card__fav:hover {
  transform: scale(1.06);
  color: #e11d48;
}

.listing-card--market .listing-card__fav:hover {
  background: transparent;
  color: #fff;
}

.listing-card--market .listing-card__fav:hover svg {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
}

.listing-card__fav:active {
  transform: scale(0.96);
}

.listing-card__fav--active {
  color: #e11d48;
}

.listing-card--market .listing-card__fav--active {
  color: #e11d48;
  background: transparent;
}

.listing-card--market .listing-card__fav--active:hover {
  color: #e11d48;
}

.listing-card--own .listing-card__content-wrap {
  position: relative;
}

.listing-card__boost {
  position: absolute;
  right: 0.75rem;
  bottom: 0.95rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 2rem;
  padding: 0.32rem 0.65rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #0369a1, #0284c7);
  color: #fff;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(3, 105, 161, 0.35);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  white-space: nowrap;
}

.listing-card__boost-icon {
  width: 0.78rem;
  height: 0.78rem;
  flex-shrink: 0;
}

.listing-card__boost:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 4px 14px rgba(3, 105, 161, 0.42);
}

.listing-card__boost:active {
  transform: translateY(0);
}

.listing-card__boost:focus {
  outline: none;
}

.listing-card__boost:focus-visible {
  outline: 2px solid rgba(2, 132, 199, 0.55);
  outline-offset: 2px;
}

.listing-card__boost--live {
  cursor: default;
  background: linear-gradient(
    120deg,
    #0369a1 0%,
    #0ea5e9 28%,
    #22d3ee 50%,
    #0284c7 72%,
    #0369a1 100%
  );
  background-size: 220% 220%;
  animation: boost-magic-shift 2.4s ease-in-out infinite;
  box-shadow:
    0 2px 12px rgba(14, 165, 233, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  filter: none;
}

.listing-card__boost--live:hover,
.listing-card__boost--live:active {
  transform: none;
  filter: none;
  box-shadow:
    0 2px 12px rgba(14, 165, 233, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
}

@keyframes boost-magic-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .listing-card__boost--live {
    animation: none;
    background: linear-gradient(135deg, #0369a1, #0ea5e9);
  }
}

@media (min-width: 640px) {
  .listing-card__boost {
    right: 0.85rem;
    bottom: 1.05rem;
  }
}

@media (min-width: 1024px) {
  .listing-card__boost {
    right: 0.95rem;
    bottom: 1.1rem;
  }
}

.listing-card__price-line {
  margin: 0.15rem 0 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-blue-900);
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .listing-card__price-line {
    font-size: 1.0625rem;
    margin-top: 0;
  }
}

.listing-card__price-line span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.listing-card__meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
  margin-top: 0.1rem;
}

.listing-card__views {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  pointer-events: none;
}

.listing-card__views .listing-views {
  padding: 0.22rem 0.4rem;
  border-radius: 0.35rem;
  background: rgba(15, 23, 42, 0.52);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.listing-card__views .listing-views svg {
  width: 0.78rem;
  height: 0.78rem;
  color: #fff;
  opacity: 1;
}

.listing-views {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.listing-views svg {
  width: 0.8rem;
  height: 0.8rem;
  flex-shrink: 0;
  opacity: 0.9;
}

.listing-views__count {
  font-variant-numeric: tabular-nums;
}

.listing-views--detail {
  font-size: 0.925rem;
  color: inherit;
  opacity: 1;
  gap: 0.35rem;
}

.listing-views--detail svg {
  width: 1rem;
  height: 1rem;
}

@media (min-width: 1024px) {
  .listing-card--market .listing-card__meta-line {
    font-size: 0.875rem;
  }

  .listing-card--market .listing-card__time {
    font-size: 0.75rem;
    opacity: 0.72;
  }
}

.listing-card__meta-line {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listing-card__time {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--color-text-muted);
}

.listing-card--market .listing-card__time {
  flex: 0 0 auto;
  margin: 0;
  text-align: right;
  white-space: nowrap;
  color: #94a3b8;
  opacity: 0.68;
}

.listing-card__status {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-teal-700);
}

.listing-card--market .listing-card__body {
  gap: 0.3rem;
  padding: 0.8rem 0.875rem 0.7rem;
}

@media (min-width: 640px) {
  .listing-card--market .listing-card__body {
    gap: 0.32rem;
    padding: 0.9rem 1rem 0.8rem;
  }
}

@media (min-width: 1024px) {
  .listing-card--market .listing-card__body {
    gap: 0.3rem;
    padding: 0.95rem 1.05rem 0.85rem;
  }
}

.listing-card__content-wrap {
  position: relative;
}

.amenity-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.amenity-row {
  display: grid;
  grid-template-columns: 1.25rem 1fr auto;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.amenity-row--compact {
  font-size: 0.75rem;
  gap: 0.35rem;
}

.amenity-row__icon {
  display: inline-flex;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--color-teal-700);
}

.amenity-row__icon svg {
  width: 100%;
  height: 100%;
}

.amenity-row--no .amenity-row__label {
  color: var(--color-text-muted);
}

.amenity-status {
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1;
}

.amenity-status--yes {
  color: var(--color-teal-700);
}

.amenity-status--no {
  color: #94a3b8;
}

.amenity-status--declined {
  color: #dc2626;
}

.listing-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #cbd5e1;
}

.listing-media-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.35), transparent 42%),
    linear-gradient(155deg, #1a7a72 0%, #0f5c56 48%, #0a3f3b 100%);
  color: rgba(255, 255, 255, 0.92);
}

.listing-media-fallback--daily {
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.28), transparent 44%),
    linear-gradient(155deg, #d97706 0%, #b45309 48%, #92400e 100%);
}

.listing-media-fallback--apartment {
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.28), transparent 44%),
    linear-gradient(155deg, #2563eb 0%, #1d4ed8 48%, #1e3a8a 100%);
}

.listing-media-fallback__glow {
  position: absolute;
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  filter: blur(2px);
}

.listing-media-fallback__icon {
  position: relative;
  z-index: 1;
  display: flex;
  width: clamp(2.75rem, 28%, 3.75rem);
  height: clamp(2.75rem, 28%, 3.75rem);
  padding: 0.7rem;
  border-radius: 1.15rem;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 28px rgba(2, 44, 42, 0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.listing-media-fallback__icon svg {
  width: 100%;
  height: 100%;
}

@media (min-width: 640px) {
  .listing-card__media {
    aspect-ratio: 16 / 10;
  }
}

@media (min-width: 1024px) {
  .listing-card--market .listing-card__media {
    aspect-ratio: 3 / 2;
  }
}

.listing-card--market .listing-card__media {
  isolation: isolate;
  background:
    linear-gradient(145deg, #d7e5e2 0%, #c5d4d1 48%, #b7c7c4 100%);
}

.listing-card--market .listing-card__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(2, 44, 42, 0.08) 0%,
    rgba(2, 44, 42, 0) 28%,
    rgba(2, 44, 42, 0) 58%,
    rgba(2, 44, 42, 0.22) 100%
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.listing-card--market .listing-card__media::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0) 0%,
    rgba(15, 23, 42, 0.16) 100%
  );
}

.listing-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.listing-card--market .listing-card__media img {
  display: block;
  transform-origin: center center;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.listing-card__price {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.375rem 0.625rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.listing-card__price span {
  font-weight: 400;
  font-size: 0.75rem;
  opacity: 0.9;
}

.listing-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1rem 1.125rem;
  gap: 0.625rem;
}

.listing-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--color-blue-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 640px) {
  .listing-card__title {
    font-size: 1.0625rem;
  }
}

.listing-card__listing-no {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}

.listing-card__location {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  min-width: 0;
}

.listing-card__location svg {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.listing-card__location-text {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (min-width: 640px) {
  .listing-card__location {
    font-size: 0.875rem;
    align-items: center;
  }

  .listing-card__location svg {
    margin-top: 0;
  }

  .listing-card__location-text {
    -webkit-line-clamp: 1;
  }
}

.listing-card__location svg {
  flex-shrink: 0;
  color: var(--color-teal-600);
}

.listing-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 999px;
  line-height: 1.2;
}

.badge--category {
  position: absolute;
  left: 0.55rem;
  top: 0.55rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 3.5rem);
  padding: 0.28rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #fff;
  background: rgba(2, 44, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge--category-stay {
  background: rgba(13, 82, 77, 0.82);
}

.badge--category-daily {
  background: rgba(180, 83, 9, 0.88);
}

.badge--category-apartment {
  background: rgba(29, 78, 216, 0.88);
}

.badge--gender {
  background: #e0f2fe;
  color: var(--color-blue-700);
}

.badge--room {
  background: #f1f5f9;
  color: #475569;
}

.listing-card__amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-teal-700);
  font-weight: 500;
}

.amenity {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.listing-card__desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ——— Loading skeletons ——— */
.listings-grid--loading {
  pointer-events: none;
}

.listing-card--skeleton {
  pointer-events: none;
  border-color: rgba(13, 82, 77, 0.08);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 8px 20px rgba(15, 23, 42, 0.05);
  animation: sk-card-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--sk-i, 0) * 48ms);
}

.listing-card--skeleton:hover,
.listing-card--skeleton:active {
  transform: none;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 8px 20px rgba(15, 23, 42, 0.05);
}

.listing-card--skeleton .listing-card__content-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.listing-card__body--skeleton {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.55rem;
  min-height: 5.25rem;
}

.skeleton-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  width: 100%;
  background:
    linear-gradient(145deg, #dceae7 0%, #cfe0dc 46%, #bfd4cf 100%);
}

@media (min-width: 640px) {
  .skeleton-media {
    aspect-ratio: 4 / 3;
  }
}

@media (min-width: 1024px) {
  .skeleton-media {
    aspect-ratio: 3 / 2;
  }
}

.skeleton-media__shine {
  position: absolute;
  inset: 0;
  transform: translateX(-70%);
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 48%,
    rgba(255, 255, 255, 0.18) 56%,
    transparent 70%
  );
  animation: sk-shine 0.85s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(13, 82, 77, 0.08);
  border-radius: 0.45rem;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-70%);
  background: linear-gradient(
    105deg,
    transparent 28%,
    rgba(255, 255, 255, 0.7) 50%,
    transparent 72%
  );
  animation: sk-shine 0.85s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform;
}

.skeleton--line {
  height: 0.875rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

.skeleton--title {
  height: 1rem;
  width: 78%;
}

.skeleton--loc {
  height: 0.7rem;
  width: 58%;
  border-radius: 999px;
  opacity: 0.9;
}

.skeleton--price {
  height: 1.05rem;
  width: 42%;
  margin-top: auto;
  border-radius: 0.4rem;
}

.skeleton--short {
  width: 55%;
}

.skeleton--badges {
  height: 1.5rem;
  width: 70%;
  margin: 0.25rem 0 0.5rem;
  border-radius: 999px;
}

.skeleton--media {
  aspect-ratio: 16 / 10;
  width: 100%;
  border-radius: 0;
}

@keyframes sk-shine {
  0% {
    transform: translateX(-70%);
  }
  100% {
    transform: translateX(70%);
  }
}

@keyframes sk-card-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Real cards cascade in after skeleton clears */
.listings-grid--enter > .listing-card:not(.listing-card--skeleton) {
  animation: sk-card-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.listings-grid--enter > .listing-card:not(.listing-card--skeleton):nth-child(1) {
  animation-delay: 0ms;
}
.listings-grid--enter > .listing-card:not(.listing-card--skeleton):nth-child(2) {
  animation-delay: 35ms;
}
.listings-grid--enter > .listing-card:not(.listing-card--skeleton):nth-child(3) {
  animation-delay: 70ms;
}
.listings-grid--enter > .listing-card:not(.listing-card--skeleton):nth-child(4) {
  animation-delay: 105ms;
}
.listings-grid--enter > .listing-card:not(.listing-card--skeleton):nth-child(5) {
  animation-delay: 140ms;
}
.listings-grid--enter > .listing-card:not(.listing-card--skeleton):nth-child(6) {
  animation-delay: 175ms;
}
.listings-grid--enter > .listing-card:not(.listing-card--skeleton):nth-child(7) {
  animation-delay: 210ms;
}
.listings-grid--enter > .listing-card:not(.listing-card--skeleton):nth-child(8) {
  animation-delay: 245ms;
}
.listings-grid--enter > .listing-card:not(.listing-card--skeleton):nth-child(n + 9) {
  animation-delay: 280ms;
}

@media (prefers-reduced-motion: reduce) {
  .listing-card--skeleton,
  .listings-grid--enter > .listing-card:not(.listing-card--skeleton) {
    animation: none;
  }

  .skeleton-media__shine,
  .skeleton::after {
    animation: none;
    opacity: 0.35;
    transform: none;
  }
}

/* ——— Load error ——— */
.load-error {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.load-error-icon {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--color-teal-700);
  opacity: 0.85;
}

.load-error h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--color-blue-900);
}

.load-error p {
  margin: 0 0 1.25rem;
  color: var(--color-text-muted);
}

.load-error .btn {
  min-height: 44px;
}

.listing-unavailable {
  text-align: center;
  padding: 2.5rem 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.listing-unavailable h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--color-blue-900);
}

.listing-unavailable p {
  margin: 0 0 1.25rem;
  color: var(--color-text-muted);
}

/* ——— Empty state ——— */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--color-border);
}

.empty-state-icon {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--color-teal-600);
  opacity: 0.7;
}

.empty-state h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--color-blue-900);
}

.empty-state p {
  margin: 0;
  color: var(--color-text-muted);
}

/* ——— Footer ——— */
.site-footer {
  margin-top: auto;
  color: rgba(232, 245, 243, 0.88);
  background:
    radial-gradient(ellipse 80% 90% at 12% 0%, rgba(21, 122, 113, 0.28), transparent 55%),
    radial-gradient(ellipse 60% 70% at 92% 100%, rgba(15, 92, 86, 0.35), transparent 50%),
    linear-gradient(165deg, #0a2f2c 0%, #0d3d39 42%, #082826 100%);
  padding: 2.35rem 0 calc(1.35rem + env(safe-area-inset-bottom, 0));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 768px) {
  .site-footer {
    padding: 2.85rem 0 1.65rem;
  }
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.65rem;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.35rem;
  text-align: center;
}

.footer-brand {
  min-width: 0;
}

.footer-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  font-family: var(--font-thaana);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.footer-title__name {
  font-size: 1em;
  font-weight: 700;
}

.footer-tagline {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: rgba(210, 232, 228, 0.78);
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.footer-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 0.85rem;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.footer-social__link svg {
  width: 1.15rem;
  height: 1.15rem;
}

.footer-social__link:hover,
.footer-social__link:focus-visible {
  color: #fff;
  background: rgba(21, 122, 113, 0.45);
  border-color: rgba(125, 211, 198, 0.35);
  transform: translateY(-2px);
  outline: none;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.95rem;
}

.footer-legal a {
  color: rgba(210, 232, 228, 0.72);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-legal a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.footer-copy {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: rgba(210, 232, 228, 0.55);
}

.footer-credit {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(232, 245, 243, 0.72);
}

.footer-credit__heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ff6b7a;
  line-height: 0;
  transform: translateY(0.05em);
}

.footer-credit__heart svg {
  display: block;
  width: 0.92rem;
  height: 0.92rem;
}

.footer-credit__name {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: right;
    gap: 1.5rem;
  }

  .footer-brand {
    order: 2;
    margin-left: auto;
  }

  .footer-title {
    justify-content: flex-end;
  }

  .footer-social {
    order: 1;
    justify-content: flex-start;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding-top: 1.4rem;
  }
}

/* ——— Search filters (Home) ——— */
.active-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.active-filters-bar:not(:has(.active-filters:not([hidden]))) {
  margin-bottom: 0;
}

.active-filters-bar:not(:has(.active-filters:not([hidden]))) .filters-clear-all[hidden] {
  display: none;
}

.active-filters-bar .active-filters {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.filters-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  background: linear-gradient(180deg, #fff 0%, var(--color-bg) 100%);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.filters-open-btn:active {
  transform: scale(0.98);
}

.filters-open-btn--active,
.filters-open-btn:focus-visible {
  outline: none;
  border-color: var(--color-teal-500);
  box-shadow:
    0 0 0 3px rgba(21, 122, 113, 0.18),
    0 4px 14px rgba(17, 101, 94, 0.12);
}

.filters-open-btn__icon {
  flex-shrink: 0;
  color: var(--color-teal-700);
}

.filters-open-btn .filters-badge {
  margin-left: -0.15rem;
}

.listings-section .container {
  overflow: visible;
}

.filters-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--color-teal-700);
  border-radius: 999px;
}

.filters-badge[hidden] {
  display: none !important;
}

.filters-clear-all {
  min-height: 44px;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  touch-action: manipulation;
}

.filters-clear-all[hidden] {
  display: none !important;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.active-filters[hidden] {
  display: none !important;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  min-height: 34px;
  padding: 0.2rem 0.45rem 0.2rem 0.7rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-teal-800);
  background: rgba(234, 245, 243, 0.95);
  border: 1px solid rgba(13, 82, 77, 0.14);
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.filter-chip:hover {
  border-color: rgba(13, 82, 77, 0.28);
  background: var(--color-teal-50);
}

.filter-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip__remove {
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.65;
}

html.filter-modal-open,
html.filter-modal-open body {
  overflow: hidden;
  overscroll-behavior: none;
}

.filter-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  pointer-events: none;
}

.filter-modal[hidden] {
  display: none !important;
}

.filter-modal--open {
  pointer-events: auto;
}

.filter-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 44, 42, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.filter-modal--open .filter-modal__backdrop {
  opacity: 1;
}

.filter-modal__sheet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 28rem;
  max-height: min(92dvh, 100vh);
  margin: 0;
  background:
    linear-gradient(180deg, #f7fbfa 0%, #ffffff 28%);
  border: 1px solid rgba(13, 82, 77, 0.1);
  border-radius: 1.5rem 1.5rem 0 0;
  box-shadow: 0 -12px 48px rgba(2, 44, 42, 0.18);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}

@media (min-width: 640px) {
  .filter-modal {
    align-items: center;
    padding: 1.25rem;
  }

  .filter-modal__sheet {
    border-radius: 1.35rem;
    max-height: min(88dvh, 720px);
    transform: translateY(14px) scale(0.97);
    opacity: 0;
    transition:
      transform 0.28s cubic-bezier(0.32, 0.72, 0, 1),
      opacity 0.22s ease;
  }

  .filter-modal--open .filter-modal__sheet {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.filter-modal--open .filter-modal__sheet {
  transform: translateY(0);
}

.filter-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-shrink: 0;
  padding: 1.1rem 1.15rem 0.85rem;
}

.filter-modal__heading {
  min-width: 0;
}

.filter-modal__header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-teal-900);
}

.filter-modal__sub {
  margin: 0.2rem 0 0;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--color-text-muted);
}

.filter-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  color: var(--color-text-muted);
  background: rgba(243, 246, 246, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 50%;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.filter-modal__close:hover {
  color: var(--color-teal-800);
  background: var(--color-teal-50);
}

.filter-modal__close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(21, 122, 113, 0.2);
}

.filter-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.15rem 1.15rem 0.35rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.filter-modal__footer {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 0.65rem;
  flex-shrink: 0;
  padding: 0.85rem 1.15rem calc(0.95rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(13, 82, 77, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.filter-modal__footer .btn {
  min-height: 48px;
  border-radius: 0.9rem;
}

.filter-modal__footer .btn-primary {
  font-weight: 600;
}

.filter-modal .filter-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding-bottom: 0.35rem;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.filter-section__label {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-teal-900);
}

.filter-modal .filter-select,
.filter-modal .filter-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.25;
  color: var(--color-text);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.9rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-modal .filter-select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.35rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230d524d' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-color: #fff;
}

.filter-modal .filter-select:focus,
.filter-modal .filter-input:focus {
  outline: none;
  border-color: rgba(21, 122, 113, 0.55);
  box-shadow: 0 0 0 3px rgba(21, 122, 113, 0.12);
}

.filter-hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--color-text-muted);
}

.filter-modal .filter-rent-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.45rem;
}

.filter-modal .filter-rent-row .filter-input {
  min-width: 0;
}

.filter-modal .filter-rent-sep {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.filter-segment {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0.3rem;
  padding: 0.28rem;
  background: rgba(243, 246, 246, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 0.95rem;
}

.filter-seg {
  position: relative;
  display: flex;
  min-width: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.filter-seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 0.35rem 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  color: var(--color-text-muted);
  border-radius: 0.7rem;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.filter-seg input:checked + span {
  color: var(--color-teal-900);
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 4px 12px rgba(13, 82, 77, 0.08);
}

.filter-seg input:focus-visible + span {
  outline: 2px solid rgba(21, 122, 113, 0.35);
  outline-offset: 1px;
}

.filter-amenities__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-modal .filter-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.filter-modal .filter-check:has(input:checked) {
  color: var(--color-teal-900);
  background: var(--color-teal-50);
  border-color: rgba(21, 122, 113, 0.35);
}

.filter-modal .filter-check__text {
  min-width: 0;
}

.filter-modal .filter-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 360px) {
  .filter-segment {
    gap: 0.22rem;
    padding: 0.22rem;
  }

  .filter-seg span {
    min-height: 36px;
    padding: 0.3rem 0.2rem;
    font-size: 0.75rem;
  }
}

/* Location picker trigger + nested popup */
.filter-location-trigger {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 52px;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  text-align: left;
  color: var(--color-text);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.95rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.filter-location-trigger:hover {
  border-color: rgba(13, 82, 77, 0.22);
}

.filter-location-trigger:focus-visible {
  outline: none;
  border-color: rgba(21, 122, 113, 0.55);
  box-shadow: 0 0 0 3px rgba(21, 122, 113, 0.12);
}

.filter-location-trigger.has-value {
  border-color: rgba(21, 122, 113, 0.28);
  background: linear-gradient(180deg, #fff 0%, #f3faf8 100%);
}

.filter-location-trigger__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  color: var(--color-teal-700);
  background: var(--color-teal-50);
  border-radius: 0.7rem;
}

.filter-location-trigger__text {
  flex: 1;
  min-width: 0;
  font-size: 0.975rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-location-trigger__chevron {
  display: inline-flex;
  color: var(--color-text-muted);
  transform: rotate(90deg);
}

.filter-location-picker {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.filter-location-picker[hidden] {
  display: none !important;
}

.filter-location-picker--open {
  pointer-events: auto;
}

.filter-location-picker__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 44, 42, 0.28);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.filter-location-picker--open .filter-location-picker__backdrop {
  opacity: 1;
}

.filter-location-picker__sheet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: min(78%, 34rem);
  background:
    linear-gradient(180deg, #f7fbfa 0%, #ffffff 24%);
  border-radius: 1.35rem 1.35rem 0 0;
  box-shadow: 0 -10px 40px rgba(2, 44, 42, 0.16);
  transform: translateY(108%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}

.filter-location-picker--open .filter-location-picker__sheet {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .filter-location-picker {
    align-items: center;
    padding: 1rem;
  }

  .filter-location-picker__sheet {
    max-width: 24rem;
    max-height: min(72%, 32rem);
    border-radius: 1.25rem;
    transform: translateY(12px) scale(0.97);
    opacity: 0;
    transition:
      transform 0.24s cubic-bezier(0.32, 0.72, 0, 1),
      opacity 0.2s ease;
  }

  .filter-location-picker--open .filter-location-picker__sheet {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.filter-location-picker__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 1rem 1.05rem 0.75rem;
}

.filter-location-picker__header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-teal-900);
}

.filter-location-picker__sub {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.filter-location-picker__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.15rem 0.85rem calc(0.95rem + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.filter-location-group {
  margin-top: 0.85rem;
}

.filter-location-group__title {
  margin: 0 0 0.4rem 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.filter-location-group__items {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-location-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 52px;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  text-align: left;
  color: var(--color-text);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 0.95rem;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.filter-location-option:hover {
  border-color: rgba(13, 82, 77, 0.2);
}

.filter-location-option:focus-visible {
  outline: none;
  border-color: rgba(21, 122, 113, 0.5);
  box-shadow: 0 0 0 3px rgba(21, 122, 113, 0.12);
}

.filter-location-option.is-selected {
  color: var(--color-teal-900);
  background: var(--color-teal-50);
  border-color: rgba(21, 122, 113, 0.34);
  box-shadow: 0 4px 14px rgba(13, 82, 77, 0.08);
}

.filter-location-option--anywhere {
  margin-bottom: 0.15rem;
}

.filter-location-option__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  color: var(--color-teal-700);
  background: rgba(234, 245, 243, 0.9);
  border-radius: 0.65rem;
}

.filter-location-option.is-selected .filter-location-option__icon {
  background: #fff;
}

.filter-location-option__copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}

.filter-location-option__title {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.filter-location-option__meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.filter-location-option__check {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  border: 1.5px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  background: #fff;
}

.filter-location-option.is-selected .filter-location-option__check {
  border-color: var(--color-teal-600);
  background: var(--color-teal-600);
  box-shadow: inset 0 0 0 3px #fff;
}

/* Account removed notice (home) */
#account-gone-modal[hidden] {
  display: none !important;
}

#account-gone-modal.modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#account-gone-modal .modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

#account-gone-modal .account-gone-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 22rem;
  padding: 1.4rem 1.35rem 1.25rem;
  border-radius: 1.2rem;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  text-align: center;
}

#account-gone-modal .account-gone-panel h2 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-teal-900);
}

#account-gone-modal .account-gone-panel p {
  margin: 0 0 1.15rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
}

/* Homepage promotional sections */
.promo-section {
  margin: 0 0 1.35rem;
}

#featured-section.promo-section {
  margin-top: 0.1rem;
}

#featured-section .promo-section__head {
  margin-bottom: 0.55rem;
}

.promo-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.promo-section__head h2,
.home-feed-heading {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-teal-900);
}

.promo-section__head h2 {
  margin-bottom: 0;
}

.promo-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(15.5rem, 18rem);
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.promo-rail::-webkit-scrollbar {
  display: none;
}

.promo-rail .listing-card {
  scroll-snap-align: start;
}

/* Featured rail: edge-to-edge horizontal scroll on smaller screens */
@media (max-width: 899px) {
  #featured-rail.promo-rail {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-inline: clamp(0.875rem, 4vw, 1.5rem);
    scroll-padding-inline: clamp(0.875rem, 4vw, 1.5rem);
    box-sizing: border-box;
  }
}

@media (min-width: 900px) {
  .promo-rail {
    grid-auto-flow: dense;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-columns: unset;
    overflow: visible;
  }
}

.listing-card__promo {
  position: absolute;
  left: 0.55rem;
  top: 0.55rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #fff;
}

.listing-card__promo-icon {
  width: 0.78rem;
  height: 0.78rem;
  flex-shrink: 0;
}

.listing-card__promo--featured {
  background: linear-gradient(135deg, #0f766e, #0d9488);
}

.listing-card__promo--boost {
  background: linear-gradient(135deg, #0369a1, #0284c7);
}

.listing-card--featured {
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.28);
  height: 100%;
}

.listing-card--featured .listing-card__content-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.listing-card--featured .listing-card__body {
  flex: 1;
  min-height: 0;
}

.listing-card--featured .listing-card__price-line {
  margin-top: auto;
  text-align: left;
}

.listing-card--featured .listing-card__location {
  font-size: 0.6875rem;
  gap: 0.28rem;
}

.listing-card--featured .listing-card__location svg {
  width: 0.75rem;
  height: 0.75rem;
}

@media (min-width: 640px) {
  .listing-card--featured .listing-card__location {
    font-size: 0.75rem;
  }
}

.listing-card--boosted {
  box-shadow: 0 0 0 1px rgba(2, 132, 199, 0.22);
}

/* Featured rail skeleton */
.promo-section--loading .promo-section__head h2 {
  opacity: 0.72;
}

.promo-rail--loading {
  pointer-events: none;
}

.listing-card--skeleton-featured {
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.22);
}

.listing-card__body--skeleton-featured {
  min-height: 4.5rem;
  gap: 0.45rem;
}

.skeleton--promo-pill {
  position: absolute;
  left: 0.55rem;
  top: 0.55rem;
  z-index: 2;
  width: 4.6rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(15, 92, 86, 0.22);
}

.skeleton--promo-pill::after {
  background: linear-gradient(
    105deg,
    transparent 28%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 72%
  );
}
