/* ═══════════════════════════════════════════════════
   rent.css — Properties For Lease listing page
   Mobile-first. Green theme for rent/lease.
   Mirrors buy.css structure — swaps sale blue for
   lease green throughout.
   ═══════════════════════════════════════════════════ */

:root {
  --primary: #1a3c4e;
  --primary-lt: #2d5a73;
  --secondary: #c19b76;
  --accent: #8b7355;
  --lease: #16a34a;
  /* green — lease type colour */
  --lease-dk: #15803d;
  --lease-lt: rgba(22, 163, 74, .10);
  --text-dark: #1e293b;
  --text-mid: #4a5568;
  --text-light: #6b7280;
  --bg: #f4f6f8;
  --white: #ffffff;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 4px rgba(26, 60, 78, .07), 0 2px 8px rgba(26, 60, 78, .05);
  --shadow-md: 0 4px 16px rgba(26, 60, 78, .10);
  --shadow-lg: 0 8px 32px rgba(26, 60, 78, .14);
  --radius: 14px;
  --radius-sm: 8px;
  --ease: all 0.25s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
}


/* ═══════════════════════════════════════════════════
   HERO — green gradient
   ═══════════════════════════════════════════════════ */
.rent-hero {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 60%, #14532d 100%);
  padding: 2rem 1.25rem 3rem;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.rent-hero::before {
  content: '';
  position: absolute;
  top: -70px;
  right: -70px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  pointer-events: none;
}

.rent-hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  pointer-events: none;
}

.rent-hero-inner {
  position: relative;
  z-index: 1;
}

.rent-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, .15);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 0.65rem;
  color: rgba(255, 255, 255, .95);
}

.rent-hero h1 {
  font-size: clamp(1.4rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.4rem;
}

.rent-hero p {
  font-size: clamp(0.82rem, 2vw, 1.1rem);
  opacity: 0.88;
  max-width: 520px;
  margin: 0 auto;
}

.rent-hero p strong {
  color: #bbf7d0;
}

.rent-hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  line-height: 0;
}

.rent-hero-wave svg {
  display: block;
  width: 100%;
  height: 32px;
}


/* ═══════════════════════════════════════════════════
   PAGE WRAPPER
   ═══════════════════════════════════════════════════ */
.rent-page {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1rem 0.85rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


/* ═══════════════════════════════════════════════════
   FILTER BAR
   ═══════════════════════════════════════════════════ */
.rent-filters {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.rent-filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.rent-filters-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.rent-filters-title i {
  color: var(--lease);
}

.rent-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: var(--ease);
  font-family: inherit;
}

.rent-filter-toggle:hover {
  background: var(--lease);
  color: var(--white);
  border-color: var(--lease);
}

.rent-filter-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.rent-filter-body.open {
  max-height: 900px;
}

/* 2-col filter grid on mobile */
.rent-filter-form {
  padding: 0.9rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  align-items: end;
}

.rent-filter-form select,
.rent-filter-form input[type="text"],
.rent-filter-form input[type="number"] {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--ease);
}

.rent-filter-form select:focus,
.rent-filter-form input:focus {
  background: var(--white);
  border-color: var(--lease);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .10);
}

.rent-filter-form label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-mid);
  margin-bottom: 3px;
  display: block;
}

.rent-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.btn-apply {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  background: var(--lease);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--ease);
  font-family: inherit;
  text-decoration: none;
}

.btn-apply:hover {
  background: var(--lease-dk);
  color: var(--white);
}

.btn-reset {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 13px;
  background: var(--bg);
  color: var(--text-mid);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--ease);
  font-family: inherit;
}

.btn-reset:hover {
  background: var(--border);
}


/* ═══════════════════════════════════════════════════
   RESULTS BAR
   ═══════════════════════════════════════════════════ */
.rent-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.rent-results-left {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-mid);
}

.rent-results-left i {
  color: var(--lease);
}

.rent-results-left strong {
  color: var(--primary);
}

.rent-results-page {
  font-size: 0.72rem;
  color: var(--text-light);
}


/* ═══════════════════════════════════════════════════
   PROPERTY GRID
   ═══════════════════════════════════════════════════ */
.rent-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* ═══════════════════════════════════════════════════
   PROPERTY CARD — HORIZONTAL on mobile
   Same pattern as buy page but green accent.
   ═══════════════════════════════════════════════════ */
.rent-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  transition: var(--ease);
  display: flex;
  flex-direction: row;
  min-height: 120px;
}

.rent-card:active {
  transform: scale(0.98);
}


/* IMAGE — narrow left strip */
.rent-card-image {
  position: relative;
  width: 125px;
  min-width: 125px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--border);
}

.rent-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.rent-card:hover .rent-img {
  transform: scale(1.07);
}

.rent-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--lease) 0%, var(--lease-dk) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, .45);
}

.rent-for-lease-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  padding: 3px 7px;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(5px);
  color: var(--white);
  border-radius: 20px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.rent-wishlist-btn {
  position: absolute;
  bottom: 7px;
  right: 7px;
  z-index: 2;
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, .92);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--ease);
}

.rent-wishlist-btn:hover {
  transform: scale(1.15);
}

.rent-wishlist-btn .bi-heart {
  color: var(--text-light);
}

.rent-wishlist-btn .bi-heart-fill {
  color: #ef4444;
}


/* CARD BODY — right side */
.rent-card-body {
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  flex: 1;
  min-width: 0;
}

/* Price — green for lease */
.rent-price {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--lease);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.rent-price-period {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-light);
}

.rent-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rent-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-light);
}

.rent-location i {
  color: var(--secondary);
  font-size: 0.72rem;
  flex-shrink: 0;
}

/* Hidden on mobile */
.rent-desc {
  display: none;
}

.rent-meta {
  display: none;
}

.rent-btn-view {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  background: linear-gradient(135deg, var(--lease), var(--lease-dk));
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--ease);
  margin-top: auto;
  align-self: flex-start;
}

.rent-btn-view:hover {
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.rent-btn-view i {
  font-size: 0.95rem;
}


/* ═══════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════ */
.rent-empty {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 3rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.rent-empty-icon {
  width: 70px;
  height: 70px;
  background: var(--lease-lt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  color: var(--lease);
}

.rent-empty h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
}

.rent-empty p {
  font-size: 0.84rem;
  color: var(--text-light);
  line-height: 1.65;
}


/* ═══════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════ */
.rent-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 0.5rem;
}

.rent-pag-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.pag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-mid);
  text-decoration: none;
  transition: var(--ease);
}

.pag-btn:hover {
  background: var(--lease);
  border-color: var(--lease);
  color: var(--white);
}

.pag-btn.pag-active {
  background: var(--lease);
  border-color: var(--lease);
  color: var(--white);
  pointer-events: none;
}

.pag-summary {
  font-size: 0.76rem;
  color: var(--text-light);
}

.pag-summary strong {
  color: var(--primary);
}


/* ═══════════════════════════════════════════════════
   580px — 2-col vertical card grid
   ═══════════════════════════════════════════════════ */
@media (min-width: 580px) {

  .rent-page {
    padding: 1.25rem 1.25rem 3.5rem;
    gap: 1.25rem;
  }

  .rent-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  /* Flip to vertical */
  .rent-card {
    flex-direction: column;
    min-height: unset;
  }

  .rent-card-image {
    width: 100%;
    min-width: unset;
    height: 200px;
  }

  .rent-for-lease-badge {
    top: 10px;
    left: 10px;
    font-size: 0.68rem;
    padding: 4px 9px;
  }

  .rent-wishlist-btn {
    bottom: unset;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .rent-card-body {
    padding: 1rem;
    gap: 0.5rem;
  }

  .rent-price {
    font-size: 1.2rem;
  }

  .rent-card-title {
    font-size: 0.88rem;
  }

  .rent-desc {
    display: -webkit-box;
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
  }

  .rent-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .rent-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-light);
    background: var(--bg);
    border-radius: 6px;
    padding: 3px 7px;
  }

  .rent-meta-item i {
    color: var(--secondary);
    font-size: 0.72rem;
  }

  .rent-btn-view {
    align-self: unset;
    width: 100%;
    padding: 9px 12px;
    font-size: 0.82rem;
    gap: 4px;
  }
}


/* ═══════════════════════════════════════════════════
   900px — desktop
   ═══════════════════════════════════════════════════ */
@media (min-width: 900px) {

  .rent-hero {
    padding: 5rem 2rem 5.5rem;
  }

  .rent-hero-wave svg {
    height: 60px;
  }

  .rent-page {
    padding: 2rem 2rem 5rem;
    gap: 1.75rem;
  }

  /* Filters always visible */
  .rent-filter-body {
    max-height: none !important;
    overflow: visible;
  }

  .rent-filter-toggle {
    display: none;
  }

  .rent-filter-form {
    grid-template-columns: repeat(4, 1fr) auto;
    padding: 1.25rem 1.5rem;
    gap: 14px;
  }

  .rent-filter-actions {
    grid-column: auto;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .btn-apply {
    flex: unset;
  }

  /* 3-col grid */
  .rent-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }

  .rent-card-image {
    height: 215px;
  }

  .rent-card-body {
    padding: 1.25rem;
    gap: 0.6rem;
  }

  .rent-card-title {
    font-size: 0.96rem;
  }

  .rent-price {
    font-size: 1.4rem;
  }

  .rent-desc {
    font-size: 0.83rem;
  }

  .rent-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(22, 163, 74, .2);
  }

  .pag-btn {
    min-width: 42px;
    height: 42px;
  }
}


/* ═══════════════════════════════════════════════════
   1280px — 4-col grid
   ═══════════════════════════════════════════════════ */
@media (min-width: 1280px) {
  .rent-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .rent-page {
    padding: 2rem 3rem 5rem;
  }
}


/* ═══════════════════════════════════════════════════
   Reduced motion
   ═══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Compare button — sits left of the wishlist heart ── */
.cmp-toggle-btn {
  position: absolute;
  top: 0.6rem;
  right: 2.8rem;
  /* push it left of the heart button */
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #6b7280;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  transition: all 0.22s ease;
  z-index: 2;
}

.cmp-toggle-btn:hover {
  background: #1a3c4e;
  color: #ffffff;
}

.cmp-toggle-btn.active {
  background: #1a3c4e;
  color: #c19b76;
}

@media (min-width: 900px) {
  .rent-filter-form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: .75rem;
  }

  .rent-filter-form > * {
    flex: 1 1 160px;
  }

  .rent-filter-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
  }

  .btn-apply,
  .btn-reset {
    white-space: nowrap;
    height: 42px;
  }
}

/* ══ CARD FEATURE PREVIEW (buy.css & rent.css) ══════════════ */
.card-feat-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0.75rem;
}

.card-feat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #15803d;
  white-space: nowrap;
}

/* For buy pages — blue tone instead of green */
.buy-card .card-feat-pill {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.card-feat-pill i {
  font-size: 0.65rem;
}

/* ══ AMENITIES GRID (view_prop_s.css & view_prop_r.css) ══════ */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.65rem;
}

.amenity-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.82rem;
  color: #334155;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}

.amenity-chip:hover {
  border-color: #6366f1;
  background: #eef2ff;
  color: #4338ca;
}

.amenity-chip i {
  color: #22c55e;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ── Mobile ──────────────────────── */
@media (max-width: 480px) {
  .amenities-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .amenity-chip {
    font-size: 0.78rem;
    padding: 0.45rem 0.65rem;
  }

  .card-feat-pill {
    font-size: 0.68rem;
  }
}

/* ── Make card body a flex column so content stacks properly ── */
.buy-card-body,
.rent-card-body {
  display: flex;
  flex-direction: column;
}

/* ── Push meta (phone/date) to the bottom of every card ── */
.buy-meta,
.rent-meta {
  margin-top: auto;   /* this is the key — eats up all leftover space above it */
  padding-top: 0.75rem;
}

/* ── Feature preview sits naturally above meta, no forced height ── */
.card-feat-preview {
  margin-top: 0.5rem;
  margin-bottom: 0;   /* let margin-top: auto on .meta handle the spacing */
}