/* FILE: /rentals/assets/rentals_enhance.css
   Enhancements that are UI-only: do not touch any backend logic.
   Focus: (1) active filter chips + results count (2) favourites button (localStorage)
          (3) photo count badge + placeholder hint
*/

/* -------- Filter summary (results count + active chips) -------- */
.filters-summary{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin:-6px 0 14px;
}

.results-count{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(0,0,0,.10);
  box-shadow:0 8px 18px rgba(17,24,39,.06);
  font-weight:800;
  color:rgba(15,23,42,.88);
  white-space:nowrap;
}

.active-filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  flex:1 1 auto;
  min-width:220px;
}

.filter-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  max-width:100%;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  padding:6px 10px;
  border-radius:999px;
  font-weight:800;
  font-size:13px;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(17,24,39,.06);
  transition:background .12s ease, transform .12s ease, border-color .12s ease;
}
.filter-chip:hover{
  background:#f9fafb;
  transform:translateY(-1px);
  border-color:rgba(0,0,0,.16);
}
.filter-chip:active{ transform:translateY(0); }
.filter-chip:focus{ outline:none; box-shadow:0 0 0 4px rgba(29,78,216,.16), 0 10px 20px rgba(17,24,39,.10); }

.filter-chip .chip-text{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:240px;
}
.filter-chip .chip-x{
  font-weight:1000;
  opacity:.55;
}

.filters-clear{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px dashed rgba(0,0,0,.22);
  background:transparent;
  font-weight:900;
  font-size:13px;
  text-decoration:none;
  color:rgba(15,23,42,.82);
  white-space:nowrap;
}
.filters-clear:hover{ background:rgba(255,255,255,.65); }

/* -------- Favourites toggle (local only) -------- */
.fav-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:rgba(255,255,255,.92);
  font-weight:900;
  font-size:13px;
  text-decoration:none;
  color:rgba(15,23,42,.82);
  white-space:nowrap;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(17,24,39,.06);
  transition:background .12s ease, transform .12s ease, border-color .12s ease;
}
.fav-toggle:hover{
  background:#f9fafb;
  transform:translateY(-1px);
  border-color:rgba(0,0,0,.16);
}
.fav-toggle:active{ transform:translateY(0); }
.fav-toggle:focus{ outline:none; box-shadow:0 0 0 4px rgba(29,78,216,.16), 0 10px 20px rgba(17,24,39,.10); }

.fav-toggle .fav-ico{ font-size:14px; line-height:1; opacity:.8; }
.fav-toggle .fav-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:20px;
  min-width:28px;
  padding:0 8px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(0,0,0,.12);
  font-weight:1000;
  font-size:12px;
}

.fav-toggle.is-active{
  background:rgba(236,253,245,.96);
  border-color:rgba(16,185,129,.35);
  color:rgba(6,95,70,.95);
}
.fav-toggle.is-active .fav-count{
  border-color:rgba(16,185,129,.35);
  background:rgba(240,253,250,.96);
}

.filters-summary.no-active .active-filters,
.filters-summary.no-active .filters-clear{
  display:none;
}

@media (max-width:560px){
  .filters-summary{ margin:-2px 0 12px; }
  .results-count{ width:100%; justify-content:center; }
  .active-filters{ min-width:0; width:100%; }
  .filter-chip .chip-text{ max-width:62vw; }
  .fav-toggle{ width:100%; }
  .filters-clear{ width:100%; }
}

/* -------- Empty state for favourites view -------- */
.favs-empty{
  grid-column:1 / -1;
  padding:18px 16px;
  border-radius:18px;
  border:1px dashed rgba(0,0,0,.18);
  background:rgba(255,255,255,.92);
  box-shadow:0 10px 22px rgba(17,24,39,.06);
  text-align:center;
}
.favs-empty .title{ font-weight:1000; margin-bottom:4px; color:rgba(15,23,42,.90); }
.favs-empty .sub{ font-weight:800; font-size:13px; color:rgba(15,23,42,.68); }

/* -------- Card wrapper + favourites button -------- */
.card-shell{ position:relative; }

.fav-btn{
  position:absolute;
  top:10px;
  right:10px;
  z-index:4;
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 10px 22px rgba(17,24,39,.10);
  transition:transform .12s ease, background .12s ease, box-shadow .12s ease, border-color .12s ease;
  color:rgba(15,23,42,.70);
}
.fav-btn:hover{ transform:translateY(-1px); box-shadow:0 12px 26px rgba(17,24,39,.14); }
.fav-btn:active{ transform:translateY(0); }
.fav-btn:focus{ outline:none; box-shadow:0 0 0 4px rgba(29,78,216,.16), 0 12px 26px rgba(17,24,39,.14); }

.fav-btn svg{ width:20px; height:20px; }

.fav-btn.is-saved{
  background:rgba(236,253,245,.96);
  border-color:rgba(16,185,129,.35);
  color:rgba(6,95,70,.95);
}

@media (max-width:560px){
  /*
    Mobile hotfix:
    In list view on phones, the favourite button anchored to the card-shell top-right
    can overlap the property-type pill (e.g. "Room").
    On phones, place it over the thumbnail side instead.
  */
  .fav-btn{
    width:38px;
    height:38px;
    left:10px;
    right:auto;
  }
  .fav-btn svg{ width:18px; height:18px; }
}

@media (max-width:420px){
  .fav-btn{ left:8px; }
}

/* -------- Thumb overlays (photo count + placeholder note) -------- */
.card .thumb{ position:relative; }

.photo-count{
  position:absolute;
  left:10px;
  bottom:10px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(17,24,39,.72);
  color:#fff;
  font-weight:900;
  font-size:12px;
  line-height:1;
  box-shadow:0 10px 20px rgba(0,0,0,.18);
}
.photo-count.is-empty{ background:rgba(17,24,39,.55); }

.placeholder-note{
  position:absolute;
  left:10px;
  top:10px;
  display:inline-flex;
  align-items:center;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.90);
  border:1px solid rgba(0,0,0,.12);
  font-weight:900;
  font-size:12px;
  color:rgba(15,23,42,.84);
}

@media (max-width:560px){
  .photo-count{ left:8px; bottom:8px; }
  .placeholder-note{ left:8px; top:8px; }
}

/* ------------------------------------------------------------------
   Mobile/Tablet performance + UI simplification (requested)
   Hide favourites UI (hearts + favourites toggle) and results count
   ONLY on smaller screens, keep full UI on desktop.
------------------------------------------------------------------- */

@media (max-width:1024px){
  /* Hide "Showing X listings" */
  .filters-summary .results-count{ display:none !important; }

  /* Hide favourites UI */
  .filters-summary .fav-toggle,
  .fav-btn,
  #mmbFavs,
  .mmb-favs{ display:none !important; }
}

/* -------- Mobile: filters accordion (non-breaking) -------- */
.filters-accordion{ position:relative; }
.filters-acc-head{
  display:none;
  width:100%;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid rgba(0,0,0,.10);
  background:rgba(255,255,255,.96);
  box-shadow:0 10px 22px rgba(17,24,39,.08);
  cursor:pointer;
  user-select:none;
}
.filters-acc-title{
  font-weight:1000;
  letter-spacing:.01em;
  color:rgba(15,23,42,.90);
  white-space:nowrap;
}
.filters-acc-summary{
  flex:1 1 auto;
  min-width:0;
  font-weight:900;
  font-size:12px;
  color:rgba(15,23,42,.60);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.filters-acc-chevron{
  font-weight:1000;
  opacity:.65;
  transition:transform .15s ease;
}
.filters-accordion.is-open .filters-acc-chevron{ transform:rotate(180deg); }

@media (max-width:560px){
  .filters-acc-head{ display:flex; }
  .filters-accordion.is-collapsed .filters-acc-body{ display:none; }
}


/* -------- Location chip (city + postcode -> map) -------- */
.meta-loc-chip{
  position:relative;
  cursor:pointer;
  user-select:none;
  display:inline-flex;
  align-items:center;
  gap:6px;

  /* subtle premium teal */
  border:1px solid rgba(15,118,110,.28) !important;
  background:rgba(15,118,110,.07) !important;

  padding:5px 10px;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.meta-loc-chip .loc-city{
  color:rgba(15,23,42,.92);
  font-weight:950;
}
.meta-loc-chip .loc-sep{
  color:rgba(15,118,110,.75);
  font-weight:1000;
}
.meta-loc-chip .loc-postcode{
  color:var(--rent-700);
  font-weight:1000;
  letter-spacing:.02em;
}
.meta-loc-chip:hover{
  border-color:rgba(15,118,110,.45) !important;
  background:rgba(15,118,110,.12) !important;
  transform:translateY(-1px);
  box-shadow:0 10px 20px rgba(17,24,39,.10);
}
.meta-loc-chip:active{ transform:translateY(0); }
.meta-loc-chip:focus{
  outline:none;
  box-shadow:0 0 0 4px rgba(15,118,110,.18), 0 10px 22px rgba(17,24,39,.10);
}
.meta-loc-chip:hover::after{
  content:"Open map";
  position:absolute;
  left:10px;
  top:-34px;
  padding:6px 9px;
  border-radius:10px;
  background:rgba(15,118,110,.94);
  color:#fff;
  font-weight:950;
  font-size:12px;
  letter-spacing:.01em;
  white-space:nowrap;
  box-shadow:0 10px 18px rgba(17,24,39,.18);
  pointer-events:none;
}
.meta-loc-chip:hover::before{
  content:"";
  position:absolute;
  left:18px;
  top:-10px;
  border:6px solid transparent;
  border-top-color:rgba(15,118,110,.94);
  pointer-events:none;
}
@media (max-width:900px){
  /* no hover tooltip on touch devices */
  .meta-loc-chip:hover::after,
  .meta-loc-chip:hover::before{ display:none; }
}

/* -------- Share icon (small, near "Added") -------- */
.meta-row .meta-right{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
@media (max-width:600px){
  /* On narrow screens the meta-right row becomes a full-width line.
     Keep Share aligned to the right, but allow wrapping if space is tight. */
  .meta-row .meta-right{
    width:100%;
    justify-content:flex-start;
    flex-wrap:wrap;
    row-gap:6px;
  }
  .meta-row .meta-right .share-mini{ margin-left:auto; }
}

.share-mini{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:30px;
  padding:0 10px;
  gap:6px;
  width:auto;
  border-radius:999px;
  border:1px solid rgba(16,185,129,.35);
  background:rgba(236,253,245,.96);
  color:rgba(6,95,70,.92);
  box-shadow:0 8px 18px rgba(17,24,39,.06);
  cursor:pointer;
  flex:0 0 auto;
  transition:transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.share-mini-label{
  font-size:12px;
  font-weight:900;
  letter-spacing:.01em;
  line-height:1;
  white-space:nowrap;
}
.share-mini:hover{ transform:translateY(-1px); box-shadow:0 10px 20px rgba(17,24,39,.10); }
.share-mini:active{ transform:translateY(0); }
.share-mini:focus{ outline:none; box-shadow:0 0 0 4px rgba(16,185,129,.18), 0 10px 22px rgba(17,24,39,.10); }
.share-mini svg{ width:16px; height:16px; }

@media (max-width:560px){
  .share-mini{ height:28px; padding:0 8px; }
  .share-mini svg{ width:15px; height:15px; }
  .share-mini-label{ font-size:11px; }
}


/* -------- Card meta fit in 3/4-column desktop views -------- */
/* In tighter desktop grids, keep all meta pills/buttons inside the tile. */
.grid.view-3 .card .meta-row,
.grid.view-4 .card .meta-row{
  gap:6px;
}
.grid.view-3 .card .meta,
.grid.view-4 .card .meta{
  min-width:0;
}
.grid.view-3 .card .meta-left,
.grid.view-4 .card .meta-left{
  flex:1 1 auto;
  min-width:0;
}
.grid.view-3 .card .meta-left .meta-pill,
.grid.view-4 .card .meta-left .meta-pill{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.grid.view-3 .card .meta-right,
.grid.view-4 .card .meta-right{
  flex:0 1 auto;
  min-width:0;
  gap:6px;
}
.grid.view-3 .card .meta-right .meta-added,
.grid.view-4 .card .meta-right .meta-added{
  padding:3px 8px;
  font-size:10px;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.grid.view-3 .card .share-mini,
.grid.view-4 .card .share-mini{
  height:28px;
  padding:0 8px;
  gap:4px;
  flex:0 0 auto;
}
.grid.view-3 .card .share-mini svg,
.grid.view-4 .card .share-mini svg{
  width:14px;
  height:14px;
}
/* 4-column view is the tightest: icon-only Share button */
.grid.view-4 .card .share-mini-label{
  display:none;
}
/* 3-column view: hide label only when viewport is narrower desktop/tablet */
@media (max-width: 1180px){
  .grid.view-3 .card .share-mini-label{ display:none; }
  .grid.view-3 .card .share-mini{ padding:0 7px; }
}

/* -------- Recently viewed -------- */
.recently-viewed{
  margin:6px 0 14px;
  padding:12px 12px;
  border-radius:18px;
  border:1px solid rgba(0,0,0,.10);
  background:rgba(255,255,255,.92);
  box-shadow:0 10px 22px rgba(17,24,39,.06);
}
.rv-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.rv-title{ font-weight:1000; color:rgba(15,23,42,.88); }
.rv-clear{
  border:1px solid rgba(0,0,0,.12);
  background:rgba(255,255,255,.92);
  border-radius:999px;
  padding:6px 10px;
  font-weight:900;
  font-size:12px;
  cursor:pointer;
}
.rv-clear:hover{ background:#f9fafb; }
.rv-row{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding-bottom:2px;
  -webkit-overflow-scrolling:touch;
}
.rv-item{
  flex:0 0 auto;
  width:min(320px, 86vw);
  display:flex;
  gap:10px;
  align-items:stretch;
  border-radius:16px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  text-decoration:none;
  color:inherit;
  box-shadow:0 10px 18px rgba(17,24,39,.06);
  overflow:hidden;
}
.rv-item:hover{ border-color:rgba(0,0,0,.14); }
.rv-img{
  width:88px;
  height:88px;
  object-fit:cover;
  display:block;
  flex:0 0 auto;
  background:#f3f4f6;
}
.rv-img-empty{ background:linear-gradient(135deg, rgba(2,132,199,.10), rgba(16,185,129,.10)); }
.rv-meta{
  padding:10px 10px 10px 0;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.rv-t{
  font-weight:1000;
  font-size:13px;
  line-height:1.15;
  color:rgba(15,23,42,.90);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.rv-p{
  margin-top:6px;
  font-weight:1000;
  font-size:12px;
  color:rgba(2,132,199,.95);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.rv-l{
  margin-top:4px;
  font-weight:900;
  font-size:11px;
  color:rgba(15,23,42,.62);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* -------- Mobile: sticky mini action bar -------- */
.mobile-mini-bar{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:12px;
  width:min(420px, 94vw);
  display:none;
  gap:8px;
  padding:8px;
  border-radius:999px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(0,0,0,.12);
  box-shadow:0 18px 40px rgba(0,0,0,.16);
  z-index:9998;
}
.mobile-mini-bar.is-visible{ display:flex; }
.mobile-mini-bar.has-install{ bottom:74px; }

.mmb-btn{
  flex:1 1 0;
  border:0;
  background:transparent;
  border-radius:999px;
  padding:10px 10px;
  font-weight:1000;
  font-size:13px;
  color:rgba(15,23,42,.85);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.mmb-btn:hover{ background:rgba(15,23,42,.06); }
.mmb-btn.is-active{ background:rgba(236,253,245,.96); color:rgba(6,95,70,.95); }
.mmb-count{
  height:20px;
  min-width:28px;
  padding:0 8px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  font-weight:1000;
  font-size:12px;
}
.mmb-btn.is-active .mmb-count{
  border-color:rgba(16,185,129,.35);
  background:rgba(240,253,250,.96);
}

@media (max-width:560px){
  /* Prevent content being hidden under the mini-bar */
  .container{ padding-bottom:120px; }
}

/* -------- Toast -------- */
.ui-toast{
  position:fixed;
  left:50%;
  transform:translateX(-50%) translateY(8px);
  bottom:calc(86px + env(safe-area-inset-bottom));
  width:min(420px, 92vw);
  padding:10px 12px;
  border-radius:14px;
  background:rgba(17,24,39,.92);
  color:#fff;
  font-weight:900;
  font-size:13px;
  opacity:0;
  pointer-events:none;
  transition:opacity .14s ease, transform .14s ease;
  z-index:10000;
}
.ui-toast.is-show{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}


@media (max-width: 768px){
  /* Hide Recently Viewed on mobile (requested) */
  #recentlyViewed{
    display:none !important;
  }
}

/* -------- Listing tags (Rent/Sale/Swap + Property type) --------
   Goal: higher contrast + "premium" color coding without changing size.
------------------------------------------------------------------ */

.tag-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.listing-tag,
.ptype-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.12);
  font-size:12px;
  line-height:1;
  font-weight:950;
  letter-spacing:.03em;
  text-transform:uppercase;
  white-space:nowrap;
  user-select:none;
  box-shadow:0 10px 22px rgba(17,24,39,.06);
}

/* Listing kind (left pill): stronger, instantly scannable */
.listing-tag.tag-rent{
  background:linear-gradient(135deg, rgba(16,185,129,.26), rgba(16,185,129,.12));
  border-color:rgba(16,185,129,.55);
  color:rgba(6,95,70,.98);
}
.listing-tag.tag-sale{
  background:linear-gradient(135deg, rgba(244,63,94,.26), rgba(244,63,94,.12));
  border-color:rgba(244,63,94,.55);
  color:rgba(136,19,55,.98);
}
.listing-tag.tag-swap{
  background:linear-gradient(135deg, rgba(168,85,247,.24), rgba(168,85,247,.11));
  border-color:rgba(168,85,247,.55);
  color:rgba(88,28,135,.98);
}

/* Property type (right pill): "room" explicitly greener */
.ptype-pill{
  background:rgba(248,250,252,.92);
  border-color:rgba(0,0,0,.12);
  color:rgba(15,23,42,.72);
}

.ptype-pill.ptype-room{
  /* ROOM = yellow/orange (more "at first glance") */
  background:linear-gradient(135deg, rgba(245,158,11,.38), rgba(245,158,11,.16));
  border-color:rgba(245,158,11,.68);
  color:rgba(120,53,15,.98);
}
.ptype-pill.ptype-flat{
  /* FLAT = green/blue (teal) */
  background:linear-gradient(135deg, rgba(20,184,166,.34), rgba(20,184,166,.14));
  border-color:rgba(20,184,166,.68);
  color:rgba(15,118,110,.98);
}
.ptype-pill.ptype-house{
  /* HOUSE = indigo/purple */
  background:linear-gradient(135deg, rgba(99,102,241,.30), rgba(99,102,241,.14));
  border-color:rgba(99,102,241,.68);
  color:rgba(49,46,129,.98);
}
.ptype-pill.ptype-other{
  background:linear-gradient(135deg, rgba(148,163,184,.24), rgba(148,163,184,.10));
  border-color:rgba(148,163,184,.55);
  color:rgba(51,65,85,.95);
}

/* Subtle hover polish (desktop only) */
@media (hover:hover){
  .listing-tag:hover,
  .ptype-pill:hover{
    transform:translateY(-1px);
    box-shadow:0 14px 30px rgba(17,24,39,.10);
  }
}


/* -------- Tablet card polish (2026-03-08) -------- */
/* Keep phone + desktop unchanged. Improve only tablet tile readability. */
@media (min-width:701px) and (max-width:1100px){
  /* 4-up is too tight on portrait tablets: gracefully fall back to 3 tiles */
  .grid.view-4{ grid-template-columns:repeat(3,minmax(0,1fr)); }

  .grid.view-3 .card .body,
  .grid.view-4 .card .body{
    padding:12px 11px 13px;
  }

  .grid.view-3 .card .tag-row,
  .grid.view-4 .card .tag-row{
    gap:6px;
    flex-wrap:wrap;
    margin-bottom:8px;
  }

  .grid.view-3 .card .listing-tag,
  .grid.view-3 .card .ptype-pill,
  .grid.view-4 .card .listing-tag,
  .grid.view-4 .card .ptype-pill{
    font-size:11px;
    padding:6px 10px;
    line-height:1;
  }

  .grid.view-3 .card .listing-title,
  .grid.view-4 .card .listing-title{
    font-size:14px;
    line-height:1.2;
    min-height:2.4em;
    margin-bottom:6px;
  }

  .grid.view-3 .card .listing-reviews-mini,
  .grid.view-4 .card .listing-reviews-mini{
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    align-items:start;
    column-gap:8px;
    row-gap:2px;
    margin:6px 0 6px;
  }
  .grid.view-3 .card .listing-reviews-mini .stars,
  .grid.view-4 .card .listing-reviews-mini .stars{
    font-size:14px;
    letter-spacing:1px;
    line-height:1.1;
  }
  .grid.view-3 .card .listing-reviews-mini .count,
  .grid.view-4 .card .listing-reviews-mini .count{
    display:block;
    font-size:11px;
    line-height:1.15;
    white-space:normal;
  }
  .grid.view-3 .card .listing-reviews-mini .num,
  .grid.view-4 .card .listing-reviews-mini .num{
    font-size:12px;
    align-self:center;
  }

  .grid.view-3 .card .price,
  .grid.view-4 .card .price{
    font-size:14px;
    line-height:1.15;
    margin-top:2px;
  }

  /* Give postcode its own row, then Added + Share below it. */
  .grid.view-3 .card .meta-row,
  .grid.view-4 .card .meta-row{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:6px;
  }
  .grid.view-3 .card .meta-left,
  .grid.view-4 .card .meta-left,
  .grid.view-3 .card .meta-right,
  .grid.view-4 .card .meta-right{
    width:100%;
    min-width:0;
  }
  .grid.view-3 .card .meta-right,
  .grid.view-4 .card .meta-right{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:6px;
    flex-wrap:nowrap;
  }

  .grid.view-3 .card .meta-loc-chip,
  .grid.view-4 .card .meta-loc-chip{
    width:100%;
    justify-content:flex-start;
    padding:5px 9px;
  }
  .grid.view-3 .card .meta-loc-chip .loc-city,
  .grid.view-3 .card .meta-loc-chip .loc-postcode,
  .grid.view-4 .card .meta-loc-chip .loc-city,
  .grid.view-4 .card .meta-loc-chip .loc-postcode{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .grid.view-3 .card .meta-right .meta-added,
  .grid.view-4 .card .meta-right .meta-added{
    flex:0 1 auto;
    min-width:0;
    max-width:none;
    padding:4px 7px;
    font-size:10px;
    white-space:nowrap;
    overflow:visible;
    text-overflow:clip;
  }

  .grid.view-3 .card .share-mini,
  .grid.view-4 .card .share-mini{
    width:28px;
    min-width:28px;
    height:28px;
    padding:0;
  }
  .grid.view-3 .card .share-mini-label,
  .grid.view-4 .card .share-mini-label{ display:none; }
}

/* ===== Final mobile card polish (2026-03-26) ===== */
@media (max-width: 560px){
  /* Wider photo area + cleaner split layout */
  .grid.view-list .card{
    grid-template-columns: minmax(154px, 52%) 1fr !important;
    gap: 0 !important;
    border-radius: 22px;
    overflow: hidden;
  }
  .grid.view-list .card .thumb{
    width: 100% !important;
    min-width: 0 !important;
    min-height: 100% !important;
    height: auto !important;
    aspect-ratio: auto !important;
    border-radius: 22px 0 0 22px !important;
    overflow: hidden;
    background: #e9edf2;
  }
  .grid.view-list .card .thumb img{
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    max-width: none !important;
    max-height: none !important;
    display: block;
  }
  .grid.view-list .card .body{
    padding: 12px 14px 12px 18px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
  }

  /* Right-side copy hierarchy */
  .grid.view-list .card .tag-row{
    margin-bottom: 8px;
    gap: 8px;
    align-items: center;
  }
  .grid.view-list .card .listing-tag,
  .grid.view-list .card .ptype-pill{
    font-size: 11px;
    line-height: 1;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 900;
  }
  .grid.view-list .card .listing-title{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin: 0 0 6px 0;
    color: #0f172a;
    text-wrap: balance;
  }
  .grid.view-list .card .listing-reviews-mini{
    margin: 0 0 8px 0;
    gap: 4px;
    font-size: 11px;
  }
  .grid.view-list .card .listing-reviews-mini .stars{
    font-size: 13px;
    letter-spacing: 1px;
  }
  .grid.view-list .card .listing-reviews-mini.is-empty .count,
  .grid.view-list .card .listing-reviews-mini.is-empty .num{
    display: none !important;
  }
  .grid.view-list .card .price{
    margin: 0 0 8px 0;
    font-size: 17px !important;
    line-height: 1.02;
    font-weight: 900 !important;
    letter-spacing: -0.02em;
    color: #9b5c63 !important;
  }

  /* Remove heavy pill feel from location + added */
  .grid.view-list .card .meta-row{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-top: 0;
  }
  .grid.view-list .card .meta,
  .grid.view-list .card .meta-left,
  .grid.view-list .card .meta-right{
    width: 100%;
    min-width: 0;
  }
  .grid.view-list .card .meta-right{
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
  }
  .grid.view-list .card .meta-loc-chip,
  .grid.view-list .card .meta-added{
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
  .grid.view-list .card .meta-loc-chip{
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: #4b5563 !important;
    font-size: 13px;
    line-height: 1.2;
    white-space: normal;
    overflow: visible;
    max-width: 100%;
  }
  .grid.view-list .card .meta-loc-chip .loc-city{
    color: #334155;
    font-weight: 800;
  }
  .grid.view-list .card .meta-loc-chip .loc-sep{
    color: #c0c7d1;
    font-weight: 700;
  }
  .grid.view-list .card .meta-loc-chip .loc-postcode{
    color: #64748b;
    font-weight: 800;
    letter-spacing: .01em;
    overflow-wrap: anywhere;
  }
  .grid.view-list .card .meta-added{
    color: #94a3b8 !important;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
  }

  /* Share: lighter look and guaranteed fit */
  .grid.view-list .card .share-mini{
    height: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #2563eb;
    gap: 5px;
    margin-left: auto;
    flex: 0 0 auto;
  }
  .grid.view-list .card .share-mini svg{
    width: 14px;
    height: 14px;
  }
  .grid.view-list .card .share-mini-label{
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
  }

  /* Placeholder label on photo lighter */
  .grid.view-list .card .placeholder-note{
    display: none !important;
  }
  .grid.view-list .card .photo-count.is-empty{
    background: rgba(17,24,39,.50);
  }
}

@media (max-width: 400px){
  .grid.view-list .card{
    grid-template-columns: minmax(146px, 51%) 1fr !important;
  }
  .grid.view-list .card .body{
    padding: 11px 12px 11px 16px !important;
  }
  .grid.view-list .card .listing-title{
    font-size: 15px;
  }
  .grid.view-list .card .price{
    font-size: 16px !important;
  }
  .grid.view-list .card .meta-right{
    gap: 6px;
  }
  .grid.view-list .card .meta-added,
  .grid.view-list .card .share-mini{
    flex: 0 1 auto;
  }
}


/* ===== Mobile dual-view same premium style as single view (2026-03-29) ===== */
@media (max-width: 640px){
  .grid.view-2 .card{
    border-radius:22px;
    overflow:hidden;
  }
  .grid.view-2 .card .thumb{
    aspect-ratio:4 / 3 !important;
    background:#e9edf2;
    overflow:hidden;
    border-radius:22px 22px 0 0 !important;
  }
  .grid.view-2 .card .thumb img{
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
    display:block;
  }
  .grid.view-2 .card .body{
    display:flex;
    flex-direction:column;
    min-width:0;
    padding:12px 13px 14px !important;
  }
  .grid.view-2 .card .tag-row{
    gap:8px;
    margin-bottom:8px;
    align-items:center;
  }
  .grid.view-2 .card .listing-tag,
  .grid.view-2 .card .ptype-pill{
    font-size:11px;
    line-height:1;
    padding:6px 10px;
    border-radius:999px;
    font-weight:900;
  }
  .grid.view-2 .card .listing-title{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
    font-size:15px;
    line-height:1.08;
    font-weight:900;
    letter-spacing:-0.02em;
    margin:0 0 6px 0;
    color:#0f172a;
    min-height:2.15em;
  }
  .grid.view-2 .card .listing-reviews-mini{
    margin:0 0 8px 0;
    gap:4px;
    font-size:11px;
  }
  .grid.view-2 .card .listing-reviews-mini .stars{
    font-size:13px;
    letter-spacing:1px;
  }
  .grid.view-2 .card .listing-reviews-mini .count,
  .grid.view-2 .card .listing-reviews-mini .num,
  .grid.view-2 .card .listing-reviews-mini.is-empty .count,
  .grid.view-2 .card .listing-reviews-mini.is-empty .num{
    display:none !important;
  }
  .grid.view-2 .card .price{
    margin:0 0 8px 0;
    font-size:16px !important;
    line-height:1.02;
    font-weight:900 !important;
    letter-spacing:-0.02em;
    color:#9b5c63 !important;
  }
  .grid.view-2 .card .meta-row{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:5px;
    margin-top:0;
  }
  .grid.view-2 .card .meta,
  .grid.view-2 .card .meta-left,
  .grid.view-2 .card .meta-right{
    width:100%;
    min-width:0;
  }
  .grid.view-2 .card .meta-right{
    display:flex !important;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    flex-wrap:wrap;
  }
  .grid.view-2 .card .meta-loc-chip,
  .grid.view-2 .card .meta-added{
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
    padding:0 !important;
    border-radius:0 !important;
  }
  .grid.view-2 .card .meta-loc-chip{
    display:flex;
    align-items:baseline;
    gap:6px;
    color:#4b5563 !important;
    font-size:12px;
    line-height:1.2;
    white-space:normal;
    overflow:visible;
    max-width:100%;
  }
  .grid.view-2 .card .meta-loc-chip .loc-city{
    color:#334155;
    font-weight:800;
  }
  .grid.view-2 .card .meta-loc-chip .loc-sep{
    color:#c0c7d1;
    font-weight:700;
  }
  .grid.view-2 .card .meta-loc-chip .loc-postcode{
    color:#64748b;
    font-weight:800;
    letter-spacing:.01em;
    overflow-wrap:anywhere;
  }
  .grid.view-2 .card .meta-added{
    color:#94a3b8 !important;
    font-size:11px;
    font-weight:800;
    white-space:nowrap;
  }
  .grid.view-2 .card .share-mini{
    height:auto;
    min-height:0;
    padding:0;
    border:0;
    background:transparent;
    box-shadow:none;
    color:#2563eb;
    gap:5px;
    margin-left:auto;
    flex:0 0 auto;
  }
  .grid.view-2 .card .share-mini svg{
    width:14px;
    height:14px;
  }
  .grid.view-2 .card .share-mini-label{
    display:inline !important;
    font-size:12px;
    font-weight:900;
    white-space:nowrap;
  }
  .grid.view-2 .card .placeholder-note{
    display:none !important;
  }
  .grid.view-2 .card .photo-count.is-empty{
    background:rgba(17,24,39,.50);
  }
}

/* Desktop/tablet: only 4-column picker visible */
@media (min-width: 641px){
  .view-toggle .vt-btn[data-view="3"]{display:none !important;}
}



/* ===== Desktop-only tiny WhatsApp QR near Search/Reset (2026-03-29) ===== */
.wa-toolbar-qr{
  display:none;
}

@media (min-width: 1024px){
  .t-row3{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:nowrap;
  }

  .wa-toolbar-qr{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    margin-left:2px;
    border-radius:10px;
    border:1px solid #dbe3ef;
    background:#fff;
    box-shadow:0 4px 10px rgba(15,23,42,.06);
    flex:0 0 38px;
    overflow:hidden;
  }

  .wa-toolbar-qr img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
  }
}

@media (max-width: 1023px){
  .wa-toolbar-qr{
    display:none !important;
  }
}


/* ===== Mobile-only WhatsApp QR near logo (2026-03-29) ===== */
.wa-mobile-brand-qr{ display:none !important; }
.wa-toolbar-qr{ display:none !important; }

@media (max-width: 768px){
  .navbar .inner{
    position:relative !important;
    padding-right:10px !important;
    align-items:flex-start !important;
  }

  .wa-mobile-brand-qr{
    display:flex !important;
    position:absolute;
    right:10px;
    top:8px;
    width:68px;
    flex-direction:column;
    align-items:center;
    gap:4px;
    text-decoration:none;
    z-index:7;
  }

  .wa-mobile-brand-qr img{
    width:58px;
    height:58px;
    display:block;
    object-fit:cover;
    border-radius:10px;
    background:#fff;
    box-shadow:0 4px 12px rgba(15,23,42,.10);
    border:1px solid #dbe3ef;
  }

  .wa-mobile-brand-qr span{
    display:block;
    width:100%;
    padding:4px 6px;
    border-radius:999px;
    background:linear-gradient(135deg,#25D366,#128C7E);
    color:#fff;
    font-size:10px;
    line-height:1.05;
    font-weight:800;
    text-align:center;
    box-shadow:0 4px 12px rgba(18,140,126,.18);
  }
}

@media (min-width: 769px){
  .wa-mobile-brand-qr{ display:none !important; }
}


/* === Urbiax home gradient polish v1 — main index header / tabs === */
.navbar{
  border-color:rgba(255,255,255,.92) !important;
  background:
    linear-gradient(135deg,rgba(255,255,255,.96),rgba(248,251,255,.92)) padding-box,
    linear-gradient(135deg,rgba(37,99,235,.20),rgba(14,165,233,.16),rgba(34,197,94,.14)) border-box !important;
  box-shadow:0 18px 44px rgba(15,23,42,.08), inset 0 1px 0 rgba(255,255,255,.95) !important;
  backdrop-filter:blur(16px);
}

.brand .brand-link .brand-main,
.brand-main{
  background:linear-gradient(135deg,#111827 0%,#1d4ed8 42%,#0ea5e9 70%,#22c55e 100%) !important;
  -webkit-background-clip:text !important;
  background-clip:text !important;
  color:transparent !important;
  text-shadow:none !important;
  letter-spacing:-.055em !important;
  font-weight:1000 !important;
}

.brand .brand-link .dotcom,
.brand-main .dotcom{
  background:linear-gradient(135deg,#2563eb,#60a5fa) !important;
  -webkit-background-clip:text !important;
  background-clip:text !important;
  color:transparent !important;
  opacity:1 !important;
}

.brand .brand-link .brand-sub,
.brand-sub{
  width:max-content;
  max-width:100%;
  padding:4px 10px;
  border-radius:999px;
  background:linear-gradient(135deg,rgba(37,99,235,.10),rgba(14,165,233,.08),rgba(34,197,94,.08)) !important;
  color:#31506f !important;
  border:1px solid rgba(37,99,235,.10);
  box-shadow:0 8px 18px rgba(37,99,235,.06);
  opacity:1 !important;
  font-weight:850 !important;
  letter-spacing:.01em !important;
}

.mode-tabs.primary-mode-tabs,
.mode-tabs{
  background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(248,251,255,.96)) !important;
  border:1px solid rgba(37,99,235,.10) !important;
  box-shadow:0 14px 36px rgba(15,23,42,.07) !important;
}

.mode-tab{
  color:#344054 !important;
  font-weight:850 !important;
  letter-spacing:-.01em !important;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease !important;
}

.mode-tab:hover{
  transform:translateY(-1px);
  background:#eef5ff !important;
}

.mode-tab.rent.active,
.mode-tab.rent[aria-current="page"]{
  background:linear-gradient(135deg,#2563eb,#0ea5e9) !important;
  color:#fff !important;
  box-shadow:0 10px 24px rgba(37,99,235,.22) !important;
}

.mode-tab.sale.active,
.mode-tab.sale[aria-current="page"]{
  background:linear-gradient(135deg,#f59e0b,#f97316) !important;
  color:#fff !important;
  box-shadow:0 10px 24px rgba(249,115,22,.22) !important;
}

.mode-tab.swap.active,
.mode-tab.swap[aria-current="page"]{
  background:linear-gradient(135deg,#16a34a,#22c55e) !important;
  color:#fff !important;
  box-shadow:0 10px 24px rgba(34,197,94,.22) !important;
}

.mode-tab.all.active,
.mode-tab.all[aria-current="page"]{
  background:linear-gradient(135deg,#111827,#334155) !important;
  color:#fff !important;
  box-shadow:0 10px 24px rgba(17,24,39,.20) !important;
}

.nav-actions .btn{
  border-color:rgba(37,99,235,.10) !important;
  box-shadow:0 10px 22px rgba(15,23,42,.08) !important;
}

.nav-actions .btn:not(.rental-btn):not(.sale-btn):not(.swap-btn){
  background:linear-gradient(135deg,#ffffff,#f3f7ff) !important;
  color:#1f2a44 !important;
}

.nav-actions .rental-btn{
  background:linear-gradient(135deg,#2563eb,#0ea5e9) !important;
  color:#fff !important;
}

.nav-actions .sale-btn{
  background:linear-gradient(135deg,#f59e0b,#f97316) !important;
  color:#fff !important;
}

.nav-actions .swap-btn{
  background:linear-gradient(135deg,#16a34a,#22c55e) !important;
  color:#fff !important;
}

@media(max-width:768px){
  .navbar{
    margin-top:10px !important;
    border-radius:24px !important;
  }

  .brand .brand-link .brand-main,
  .brand-main{
    font-size:clamp(31px,9vw,44px) !important;
    line-height:.96 !important;
  }

  .brand .brand-link .brand-sub,
  .brand-sub{
    font-size:12px !important;
    padding:4px 9px !important;
    margin-top:5px !important;
  }

  .mode-tabs.primary-mode-tabs,
  .mode-tabs{
    border-radius:18px !important;
    padding:6px !important;
  }

  .mode-tab{
    border-radius:14px !important;
    min-height:38px !important;
    padding:9px 12px !important;
  }
}
