/* ============================================================
   eforms Listings — frontend styles
   ------------------------------------------------------------
   Bold-modern refresh: Inter type, mist-and-emerald palette,
   rounded cards with soft shadows, pill tags. Scoped under
   #eforms-listings-page with `all: initial` so a theme's global
   styles can't bleed into the listing pages.
   ============================================================ */

body.el-page {
  background: #f8fafc;
}

#eforms-listings-page {
  --el-ink: #111827;
  --el-muted: #4b5563;
  --el-line: #e5e7eb;
  --el-emerald: #059669;
  --el-emerald-600: #047857;
  --el-emerald-soft: #ecfdf5;
  --el-hero: #0f172a;
  --el-hero-muted: #94a3b8;
  --el-bg: #f8fafc;
  --el-card: #ffffff;
  --el-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  all: initial;
  display: block;
  font-family: var(--el-font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--el-ink);
  background: var(--el-bg);
  -webkit-font-smoothing: antialiased;
}

#eforms-listings-page *,
#eforms-listings-page *::before,
#eforms-listings-page *::after {
  box-sizing: border-box;
  font-family: var(--el-font);
}

#eforms-listings-page a { color: inherit; text-decoration: none; }
#eforms-listings-page img { max-width: 100%; display: block; }
#eforms-listings-page h1,
#eforms-listings-page h2,
#eforms-listings-page h3,
#eforms-listings-page h4 { font-weight: 800; letter-spacing: -0.02em; }

#eforms-listings-page :focus-visible {
  outline: 3px solid var(--el-emerald);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  #eforms-listings-page * { transition: none !important; }
}

/* ── Header ────────────────────────────────────────────────────────── */

.el-site-header {
  border-bottom: 1px solid var(--el-line);
  background: var(--el-card);
}

.el-site-header__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  max-width: 1250px;
  margin: 0 auto;
}

.el-site-header__mark {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  justify-self: start;
}

.el-site-header__mark span { color: var(--el-emerald); }

.el-site-header__nav {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-self: center;
}

.el-site-header__nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--el-muted);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.1s, border-color 0.1s;
}

.el-site-header__nav-link:hover { color: var(--el-ink); }

.el-site-header__nav-link.el-is-active {
  color: var(--el-ink);
  border-bottom-color: var(--el-emerald);
}

.el-site-header__cta {
  justify-self: end;
  background: var(--el-emerald);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.1s;
}

.el-site-header__cta:hover { background: var(--el-emerald-600); }

.el-site-header__tag {
  font-size: 12px;
  color: var(--el-muted);
  justify-self: end;
}

@media (max-width: 767px) {
  .el-site-header__row {
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: center;
  }
  .el-site-header__mark,
  .el-site-header__cta { justify-self: center; }
  .el-site-header__cta { width: 100%; }
  .el-site-header__nav { flex-wrap: wrap; justify-content: center; gap: 14px; }
}

/* ── Hero (split panel) ───────────────────────────────────────────── */

.el-hero {
  max-width: 1250px;
  margin: 0 auto;
  padding: 32px 24px 0;
}

.el-hero-split {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  border-radius: 20px;
  overflow: hidden;
  background: var(--el-hero);
  color: #fff;
  min-height: 400px;
}

.el-hero__panel {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.el-hero__kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #34d399;
  font-weight: 700;
  margin: 0 0 14px;
}

.el-hero__title {
  font-size: clamp(30px, 4.4vw, 42px);
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: -0.03em;
  max-width: 20ch;
}

.el-hero__sub {
  margin: 0 0 26px;
  color: var(--el-hero-muted);
  font-size: 15px;
  max-width: 48ch;
}

.el-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--el-emerald);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 22px;
  border-radius: 12px;
  align-self: flex-start;
}

.el-hero__cta:hover { background: var(--el-emerald-600); }

.el-hero__stats {
  display: flex;
  gap: 36px;
  margin-top: 36px;
}

.el-hero__stat b {
  display: block;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.el-hero__stat span { font-size: 12px; color: var(--el-hero-muted); }

.el-hero__photo {
  position: relative;
  min-height: 240px;
}

.el-hero__photo--fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1f2937, #334155);
}

.el-hero-carousel {
  position: absolute;
  inset: 0;
}

.el-hero-carousel__slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.el-hero-carousel__slide.el-is-active { opacity: 1; }

.el-hero-carousel__slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.el-hero-carousel__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(2, 6, 23, 0.82));
  pointer-events: none;
}

.el-hero-carousel__price {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.el-hero-carousel__title {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.el-hero-carousel__arrow {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.el-hero-carousel__arrow--prev { right: 62px; }

.el-js .el-hero-carousel__arrow { display: flex; }
.el-js .el-hero-carousel__arrow:hover { background: rgba(15, 23, 42, 0.85); }

.el-hero-carousel__dots {
  position: absolute;
  bottom: 22px;
  left: 20px;
  display: none;
  gap: 8px;
  z-index: 2;
}

.el-js .el-hero-carousel__dots { display: flex; }

.el-hero-carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.el-hero-carousel__dot.el-is-active {
  width: 26px;
  background: var(--el-emerald);
}

@media (max-width: 860px) {
  .el-hero-split { grid-template-columns: 1fr; }
  .el-hero__panel { padding: 32px 26px; }
  .el-hero__photo { min-height: 260px; }
}

/* ── Hero search (integrated) ───────────────────────────────────────── */

.el-hero__search {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.el-hero__search-field {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.el-hero__search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY( -50% );
  width: 22px;
  height: 22px;
  color: rgba(255,255,255,0.55);
  pointer-events: none;
  transition: color 0.15s;
}

.el-hero__search input[type="search"] {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 16px 20px 16px 56px;
  font-size: 16px;
  font-family: var(--el-font);
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.el-hero__search input[type="search"]::placeholder {
  color: rgba(255,255,255,0.45);
}

.el-hero__search input[type="search"]:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(15, 23, 42, 0.75);
}

.el-hero__search input[type="search"]:focus {
  outline: none;
  border-color: var(--el-emerald);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.25), 0 4px 20px rgba(5, 150, 105, 0.15);
  background: rgba(15, 23, 42, 0.9);
}

.el-hero__search input[type="search"]:focus + .el-hero__search-icon {
  color: var(--el-emerald);
}

.el-hero__search-btn {
  background: var(--el-emerald);
  color: #fff;
  border: 0;
  border-radius: 14px;
  padding: 16px 28px;
  font-family: var(--el-font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s, transform 0.05s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.el-hero__search-btn:hover { background: var(--el-emerald-600); box-shadow: 0 4px 16px rgba(5, 150, 105, 0.4); }
.el-hero__search-btn:active { transform: scale( 0.98 ); }

/* ── Smooth reveal animations ───────────────────────────────────────── */

@keyframes el-fade-up {
  from { opacity: 0; transform: translateY( 16px ); }
  to   { opacity: 1; transform: translateY( 0 ); }
}

.el-hero__panel > * { animation: el-fade-up 0.6s ease-out backwards; }
.el-hero__panel > *:nth-child(1) { animation-delay: 0.05s; }
.el-hero__panel > *:nth-child(2) { animation-delay: 0.12s; }
.el-hero__panel > *:nth-child(3) { animation-delay: 0.19s; }
.el-hero__panel > *:nth-child(4) { animation-delay: 0.26s; }
.el-hero__panel > *:nth-child(5) { animation-delay: 0.33s; }
.el-hero__panel > *:nth-child(6) { animation-delay: 0.4s; }

.el-section-heading { animation: el-fade-up 0.5s ease-out 0.45s backwards; }
.el-grid > * { animation: el-fade-up 0.4s ease-out backwards; }
.el-grid > *:nth-child(1) { animation-delay: 0.05s; }
.el-grid > *:nth-child(2) { animation-delay: 0.1s; }
.el-grid > *:nth-child(3) { animation-delay: 0.15s; }
.el-grid > *:nth-child(4) { animation-delay: 0.2s; }
.el-grid > *:nth-child(5) { animation-delay: 0.25s; }
.el-grid > *:nth-child(6) { animation-delay: 0.3s; }
.el-grid > *:nth-child(7) { animation-delay: 0.35s; }
.el-grid > *:nth-child(8) { animation-delay: 0.4s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .el-hero__panel > *,
  .el-section-heading,
  .el-grid > * { animation: none !important; }
}

/* ── Listings grid ─────────────────────────────────────────────────── */

.el-wrap {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 24px;
}

.el-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 44px 0 18px;
}

.el-section-heading h2 { font-size: 22px; margin: 0; }

.el-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding-bottom: 72px;
}

.el-card {
  display: block;
  background: var(--el-card);
  border: 1px solid var(--el-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.el-card:hover {
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.10);
  transform: translateY(-2px);
}

.el-card__media { position: relative; }

.el-card__photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eef1f5;
}

.el-card__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--el-emerald-soft);
  color: var(--el-emerald-600);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.12);
}

.el-card__body { padding: 16px; }

.el-card__price {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.el-card__title {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.35;
}

.el-card__location {
  font-size: 13px;
  color: var(--el-muted);
  margin: 0;
}

.el-empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--el-line);
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  color: var(--el-muted);
  background: var(--el-card);
}

.el-empty-state a {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--el-emerald);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.el-empty-state a:hover { color: var(--el-emerald-600); }

/* ── Featured (Latest listings) ─────────────────────────────────────── */

.el-featured { padding-bottom: 8px; }

.el-featured__all {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--el-emerald);
  text-decoration: none;
}

.el-featured__all:hover { color: var(--el-emerald-600); }

.el-featured__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.el-featured__card {
  display: block;
  background: var(--el-card);
  border: 1px solid var(--el-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.el-featured__card:hover {
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.10);
  transform: translateY(-2px);
}

.el-featured__media { position: relative; }

.el-featured__photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #eef1f5;
  display: block;
}

.el-featured__new {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--el-emerald);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
}

.el-featured__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--el-emerald-soft);
  color: var(--el-emerald-600);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.12);
}

.el-featured__body { padding: 16px; }

.el-featured__price {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.el-featured__title {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.35;
}

.el-featured__location {
  font-size: 13px;
  color: var(--el-muted);
  margin: 0;
}

@media (max-width: 860px) {
  .el-featured__grid { grid-template-columns: 1fr; }
}

/* ── Similar properties (single page) ───────────────────────────── */

.el-similar {
  background: var(--el-bg);
  padding: 8px 24px 0;
}

.el-similar__wrap {
  max-width: 1250px;
  margin: 0 auto;
}

.el-similar .el-section-heading {
  margin: 44px 0 18px;
}

.el-similar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: 60px;
}

@media (max-width: 1024px) {
  .el-similar__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .el-similar { padding: 8px 16px 0; }
  .el-similar__grid { grid-template-columns: 1fr; }
  .el-similar__grid .el-featured__card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 16px;
  }
  .el-similar__grid .el-featured__media { flex: 0 0 84px; }
  .el-similar__grid .el-featured__photo {
    width: 84px;
    height: 84px;
    border-radius: 12px;
    object-fit: cover;
  }
  .el-similar__grid .el-featured__body { padding: 0; }
  .el-similar__grid .el-featured__price { font-size: 15px; }
  .el-similar__grid .el-featured__title { font-size: 13.5px; margin-bottom: 2px; }
  .el-similar__grid .el-featured__location { font-size: 12px; }
  .el-similar__grid .el-featured__tag,
  .el-similar__grid .el-featured__new { display: none; }
}

/* ── Filter bar (chips + collapsible panel) ──────────────────────── */

.el-filters {
  background: var(--el-card);
  border: 1px solid var(--el-line);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.04);
}

.el-filters__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.el-filters__chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.el-filters__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--el-emerald-soft);
  border: 1px solid #a7f3d0;
  color: var(--el-emerald-600);
  border-radius: 999px;
  padding: 5px 8px 5px 12px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--el-font);
  white-space: nowrap;
  text-decoration: none;
  transition: border-color 0.1s;
}

.el-filters__chip:hover { border-color: var(--el-emerald); }

.el-filters__chip-x {
  font-weight: 800;
  color: var(--el-emerald);
  padding: 0 2px;
  font-size: 13px;
  line-height: 1;
}

.el-filters__btn-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--el-ink);
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 8px 16px;
  font-family: var(--el-font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s;
}

.el-filters__btn-toggle:hover { background: #1f2937; }

.el-filters__chev {
  display: inline-block;
  transition: transform 0.15s;
}

.el-filters__panel {
  margin-top: 12px;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

.el-js .el-filters__panel { display: none; }
.el-js .el-filters__panel.is-open { display: block; }

.no-js .el-filters__panel,
html:not(.el-js) .el-filters__panel { display: block; }

.el-filters__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.el-filters__field { min-width: 0; }

.el-filters__label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--el-muted);
  display: block;
  margin-bottom: 4px;
}

.el-filters__sel,
.el-filters__num {
  border: 1px solid var(--el-line);
  border-radius: 9px;
  height: 40px;
  padding: 0 10px;
  font-size: 13.5px;
  font-weight: 500;
  background: var(--el-card);
  color: var(--el-ink);
  font-family: var(--el-font);
  width: 100%;
}

.el-filters__sel:focus-visible,
.el-filters__num:focus-visible {
  outline: 2px solid var(--el-emerald);
  outline-offset: 1px;
}

.el-filters__price-row {
  display: flex;
  gap: 6px;
}

.el-filters__price-row input { min-width: 0; flex: 1; }

.el-filters__dash {
  align-self: center;
  color: var(--el-muted);
  font-weight: 600;
}

.el-filters__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-end;
}

.el-filters__apply {
  background: var(--el-emerald);
  color: #fff;
  border: 0;
  border-radius: 9px;
  height: 40px;
  padding: 0 24px;
  font-family: var(--el-font);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s;
}

.el-filters__apply:hover { background: var(--el-emerald-600); }
.el-filters__apply:focus-visible { outline: 2px solid var(--el-emerald); outline-offset: 2px; }

.el-filters__clear {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--el-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.el-filters__clear:hover { color: var(--el-ink); }

/* ── Archive header ──────────────────────────────────────────── */
.el-archive-header {
  padding: 24px 0 18px;
}

.el-archive-header__title {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--el-ink);
}

.el-archive-header__sub {
  margin: 0;
  font-size: 15px;
  color: var(--el-muted);
}

/* ── Results toolbar (outside filter card) ───────────────────── */
.el-results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 10px;
}

.el-results-toolbar__count {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--el-muted);
}

.el-results-toolbar__vt {
  display: inline-flex;
  border: 1px solid var(--el-line);
  border-radius: 9px;
  overflow: hidden;
}

.el-results-toolbar__vt-link {
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--el-font);
  color: var(--el-muted);
  background: var(--el-card);
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}

.el-results-toolbar__vt-link.el-is-active {
  background: var(--el-ink);
  color: #fff;
}

.el-results-toolbar__vt-link:hover:not(.el-is-active) {
  background: #f3f4f6;
  color: var(--el-ink);
}

/* ── Visually-hidden (screen readers) — scoped to the listing page ── */
#eforms-listings-page .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Pagination ────────────────────────────────────────────────────── */

.el-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 24px 0 48px;
}

.el-pagination a,
.el-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--el-font);
  color: var(--el-ink);
  background: var(--el-card);
  border: 1px solid var(--el-line);
  text-decoration: none;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}

.el-pagination a:hover {
  border-color: var(--el-emerald);
  color: var(--el-emerald);
}

.el-pagination .page-numbers.current,
.el-pagination span.page-numbers {
  background: var(--el-ink);
  color: #fff;
  border-color: var(--el-ink);
  cursor: default;
}

.el-pagination .prev,
.el-pagination .next {
  font-size: 18px;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .el-view-toggle__link,
  .el-pagination a,
  .el-pagination .page-numbers {
    transition: none !important;
  }
}

/* ── Table view ────────────────────────────────────────────────────── */

.el-table-wrap {
  background: var(--el-card);
  border: 1px solid var(--el-line);
  border-radius: 16px;
  overflow-x: auto;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05);
  margin-bottom: 72px;
}

.el-table-wrap .el-empty-state { border: 0; border-top: 1px solid var(--el-line); border-radius: 0; }

.el-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.el-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--el-muted);
  font-weight: 700;
  padding: 14px 16px;
  border-bottom: 1px solid var(--el-line);
  background: var(--el-bg);
}

.el-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--el-line);
  vertical-align: middle;
}

.el-table tr:last-child td { border-bottom: 0; }
.el-table__row:hover td { background: var(--el-bg); }

.el-table__thumb {
  width: 52px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef1f5;
  display: block;
}

.el-table__name { font-weight: 600; }
.el-table__sub { color: var(--el-muted); font-size: 12px; }
.el-table__price { font-weight: 700; }
.el-table__chat { color: var(--el-emerald); font-weight: 700; font-size: 12.5px; }

/* The price inside the mobile details cell is hidden on desktop
   (the table's own price column covers it) and shown on mobile. */
#eforms-listings-page .el-table__details .el-table__price {
  display: none;
}

.el-table__feat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--el-muted);
}
.el-table__feat svg { width: 15px; height: 15px; }
.el-table__feat b { font-weight: 700; color: var(--el-ink); }

.el-table__empty {
  text-align: center;
  padding: 40px 24px !important;
  color: var(--el-muted);
}

.el-table__empty a {
  display: inline-block;
  margin-top: 10px;
  color: var(--el-emerald);
  font-weight: 700;
  text-decoration: underline;
}

.el-table__th-thumb { width: 60px; }
.el-table__th-action { text-align: right; }

/* ── Property detail ───────────────────────────────────────────────── */

.el-detail {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  padding: 36px 24px 72px;
  max-width: 1250px;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .el-detail { grid-template-columns: 1fr; gap: 28px; }
}

.el-detail__photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eef1f5;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.06);
}

.el-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  background: var(--el-emerald-soft);
  color: var(--el-emerald-600);
  padding: 5px 12px;
  border-radius: 999px;
}

.el-detail__price {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 14px 0 6px;
}

.el-detail__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.el-detail__location {
  color: var(--el-muted);
  font-size: 14.5px;
  margin: 0 0 22px;
}

.el-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.el-stats__chip {
  border: 1px solid var(--el-line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--el-card);
}

.el-detail__description {
  color: var(--el-ink);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 26px;
  white-space: pre-line;
}

.el-utilities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: -8px 0 22px;
  font-size: 13px;
  color: var(--el-emerald-600);
  font-weight: 600;
}

.el-utilities span:not(:first-child) {
  padding-left: 14px;
  margin-left: 14px;
  border-left: 1.5px solid var(--el-line);
}

.el-agent-card {
  border: 1px solid var(--el-line);
  border-radius: 16px;
  padding: 22px;
  background: var(--el-card);
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05);
}

.el-agent-card__label {
  font-size: 12px;
  color: var(--el-muted);
  margin: 0 0 4px;
  font-weight: 600;
}

.el-agent-card__name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 2px;
}

.el-agent-card__agency {
  color: var(--el-muted);
  font-size: 14px;
  margin: 0 0 18px;
}

.el-whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--el-emerald);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  font-family: var(--el-font);
  font-weight: 700;
  font-size: 15px;
  transition: background 0.1s ease;
}

.el-whatsapp-btn:hover { background: var(--el-emerald-600); color: #fff; }

/* ── Footer ────────────────────────────────────────────────────────── */

.el-site-footer {
  border-top: 1px solid var(--el-line);
  padding: 24px;
  color: var(--el-muted);
  font-size: 13px;
  text-align: center;
  font-weight: 500;
  background: var(--el-card);
}

/* ── Gallery island ────────────────────────────────────────────────── */

.el-gallery__main { cursor: zoom-in; border-radius: 20px; overflow: hidden; }

.el-gallery__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

.el-gallery__thumb {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.65;
}

.el-gallery__thumb--active { border-color: var(--el-emerald); opacity: 1; }

.el-gallery__lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
}

.el-gallery__lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
}

@media (max-width: 767px) {
  .el-filters__grid { grid-template-columns: repeat(2, 1fr); }
  .el-filters__sel,
  .el-filters__num { min-width: 0; }
}

@media (max-width: 479px) {
  .el-filters__grid { grid-template-columns: 1fr; }
  .el-filters__apply { width: 100%; }
  .el-results-toolbar { flex-direction: column; gap: 10px; align-items: flex-start; }
}

/* ============================================================
   Mobile app-like experience
   ------------------------------------------------------------
   Tuned for touch: bottom tab bar, sticky WhatsApp action bar,
   edge-to-edge gallery photo, single-column tap-friendly cards,
   and smooth native-feeling transitions. Everything below only
   applies on phones so desktop stays unchanged.
   ============================================================ */

html {
  scroll-behavior: smooth;
}

/* ── Bottom tab bar (archive / browse) ──────────────────────── */

.el-bottombar {
  display: none;
}

@media (max-width: 767px) {
  #eforms-listings-page .el-bottombar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #ffffff;
    border-top: 1px solid var(--el-line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 20px rgba(17, 24, 39, 0.07);
  }
}

.el-bottombar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 0 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--el-muted);
  text-decoration: none;
  min-height: 48px;
  transition: color 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.el-bottombar__item svg {
  width: 23px;
  height: 23px;
}

.el-bottombar__item:active { transform: scale(0.94); }

.el-bottombar__item.el-is-active {
  color: var(--el-emerald-600);
}

/* bottom padding so the fixed bar never covers content */
@media (max-width: 767px) {
  #eforms-listings-page .el-wrap,
  #eforms-listings-page .el-site-footer {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

/* ── Sticky WhatsApp action bar (property detail) ───────────── */

.el-detail-actions {
  display: none;
}

@media (max-width: 767px) {
  #eforms-listings-page .el-detail-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    display: flex;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
    border-top: 1px solid var(--el-line);
    box-shadow: 0 -4px 20px rgba(17, 24, 39, 0.08);
  }
}

.el-detail-actions__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--el-emerald);
  color: #fff;
  border-radius: 12px;
  padding: 14px 18px;
  font-family: var(--el-font);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.12s ease, transform 0.05s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.32);
}

.el-detail-actions__btn:hover { background: var(--el-emerald-600); }
.el-detail-actions__btn:active { transform: scale(0.97); }

.el-detail-actions__icon { width: 22px; height: 22px; }

/* ── Mobile-only rules ──────────────────────────────────────── */

@media (max-width: 767px) {

  /* edge-to-edge photo gallery feel */
  #eforms-listings-page .el-detail {
    padding: 0 0 130px;
  }

  #eforms-listings-page .el-detail > div:first-child {
    margin: 0 -24px; /* pull out of the padded container */
  }

  #eforms-listings-page .el-detail__photo,
  #eforms-listings-page .el-gallery__main {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 0;
    box-shadow: none;
    object-fit: cover;
  }

  #eforms-listings-page .el-detail > div:last-child {
    padding: 0 20px;
  }

  #eforms-listings-page .el-detail__price {
    font-size: 26px;
    margin-top: 20px;
  }

  #eforms-listings-page .el-detail__title {
    font-size: 19px;
  }

  #eforms-listings-page .el-gallery__thumbs {
    margin: 0 -24px;
    padding: 10px 20px;
  }

  #eforms-listings-page .el-gallery__thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
  }

  /* hide the in-card WhatsApp button; the sticky bar covers it */
  #eforms-listings-page .el-agent-card .el-whatsapp-btn { display: none; }

  /* bigger, tappable cards — single column */
  #eforms-listings-page .el-wrap {
    padding: 0 16px;
  }

  #eforms-listings-page .el-grid,
  #eforms-listings-page .el-featured__grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  #eforms-listings-page .el-card {
    border-radius: 20px;
    box-shadow: 0 3px 16px rgba(17, 24, 39, 0.09);
  }

  #eforms-listings-page .el-card__photo {
    aspect-ratio: 4 / 3;
    min-height: 200px;
  }

  #eforms-listings-page .el-card__body { padding: 16px 18px 18px; }
  #eforms-listings-page .el-card__price { font-size: 20px; }
  #eforms-listings-page .el-card__title { font-size: 15.5px; }
  #eforms-listings-page .el-card__tag {
    font-size: 12.5px;
    padding: 6px 13px;
  }

  /* bigger tap targets on filter toggle + pagination */
  #eforms-listings-page .el-filters__btn-toggle,
  #eforms-listings-page .el-filters__apply {
    min-height: 46px;
    padding: 12px 16px;
  }

  #eforms-listings-page .el-pagination a,
  #eforms-listings-page .el-pagination .page-numbers {
    min-width: 46px;
    height: 46px;
  }

  /* smooth push-up cards on load */
  #eforms-listings-page .el-grid > * { animation: el-fade-up 0.4s ease-out backwards; }
  #eforms-listings-page .el-grid > *:nth-child(2) { animation-delay: 0.06s; }
  #eforms-listings-page .el-grid > *:nth-child(3) { animation-delay: 0.12s; }

  /* dropdowns open natively on mobile */
  #eforms-listings-page .el-filters__sel {
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  #eforms-listings-page .el-hero__search input,
  #eforms-listings-page .el-filters__num {
    font-size: 16px;
  }
}

/* very small phones — tighten spacing further */
@media (max-width: 479px) {
  #eforms-listings-page .el-detail > div:first-child {
    margin: 0 -16px;
  }
  #eforms-listings-page .el-detail > div:last-child,
  #eforms-listings-page .el-gallery__thumbs { padding-left: 16px; padding-right: 16px; }
}

/* ── Grid / Table view toggle ─────────────────────────────────
   Segmented control: inactive option shows black text, active
   option shows white-on-dark. */
#eforms-listings-page .el-results-toolbar__vt {
  border-radius: 10px;
}
#eforms-listings-page .el-results-toolbar__vt-link {
  color: var(--el-ink);
  background: transparent;
  transition: background 0.12s ease, color 0.12s ease;
}
#eforms-listings-page .el-results-toolbar__vt-link:hover:not(.el-is-active) {
  background: #f3f4f6;
}
#eforms-listings-page .el-results-toolbar__vt-link.el-is-active {
  background: var(--el-ink);
  color: #fff;
}

/* ── Table → mobile list ──────────────────────────────────────
   On phones the table becomes a modern app-style list. Each row
   is a plain block with the thumbnail absolutely positioned on
   the right — no display:contents, so rows always stay visible
   and scroll smoothly. The whole row is one tap target.
   Title, price and bed/bath icons sit compactly on the left,
   vertically aligned with the image. */
@media (max-width: 767px) {

  #eforms-listings-page .el-table-wrap {
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
    margin-bottom: 72px;
  }

  #eforms-listings-page .el-table-wrap .el-empty-state { border: 1px dashed var(--el-line); border-radius: 16px; }

  #eforms-listings-page .el-table {
    display: block;
    width: 100% !important;
    border-collapse: collapse;
    font-size: 14px;
  }

  #eforms-listings-page .el-table thead,
  #eforms-listings-page .el-table__th-thumb,
  #eforms-listings-page .el-table__th-action {
    display: none;
  }

  #eforms-listings-page .el-table tbody { display: block; }

  #eforms-listings-page .el-table tr {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--el-card);
    border: 1px solid var(--el-line);
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 12px;
    box-shadow: 0 2px 12px rgba(17, 24, 39, 0.07);
    -webkit-tap-highlight-color: transparent;
  }

  #eforms-listings-page .el-table tr:last-child { margin-bottom: 0; }
  #eforms-listings-page .el-table__row:active { background: #f3f4f6; }

  /* image on the left, like the similar-properties cards */
  #eforms-listings-page .el-table tr > td:first-child {
    flex: 0 0 84px;
    width: 84px;
    height: 84px;
    padding: 0;
    border: 0;
  }
  #eforms-listings-page .el-table__thumb {
    display: block;
    width: 84px;
    height: 84px;
    border-radius: 12px;
    object-fit: cover;
  }

  /* text column on the right — title | price | bed/bath icons */
  #eforms-listings-page .el-table tr > td:nth-child(2) {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    padding: 0;
    border: 0;
  }

  #eforms-listings-page .el-table__name {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--el-ink);
  }

  #eforms-listings-page .el-table__details .el-table__price {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: var(--el-emerald-600);
    letter-spacing: -0.01em;
    margin: 1px 0 0;
    line-height: 1.15;
  }

  #eforms-listings-page .el-table__sub {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 2px;
  }

  #eforms-listings-page .el-table__feat svg { width: 15px; height: 15px; }
  #eforms-listings-page .el-table__feat { font-size: 12px; }

  /* drop the standalone type + location + price columns on mobile */
  #eforms-listings-page .el-table tr > td:nth-child(3),
  #eforms-listings-page .el-table tr > td:nth-child(4),
  #eforms-listings-page .el-table tr > td:nth-child(5) {
    display: none;
  }

  /* the whole row is one tap target that opens the listing */
  #eforms-listings-page .el-table tr > td:last-child {
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 0;
    border: 0;
  }
  #eforms-listings-page .el-table__chat {
    display: block;
    width: 100%;
    height: 100%;
    color: transparent;
  }
  #eforms-listings-page .el-table__chat a {
    display: block;
    width: 100%;
    height: 100%;
    font-size: 0;
    text-decoration: none;
    color: transparent;
  }

  #eforms-listings-page .el-table__empty {
    background: var(--el-card);
    border-radius: 16px;
    text-align: center;
    padding: 40px 24px !important;
  }
}
