/* Mobile homepage redesign: compact white hero, listings first */
@media (max-width: 768px) {
  .hero, .hero-inner {
    background: #ffffff !important;
    padding-top: 10px !important;
    padding-bottom: 6px !important;
    min-height: 0 !important;
  }
  .hero-content { padding: 0 14px !important; }
  .hero h1 {
    font-size: 18px !important;
    line-height: 1.3 !important;
    color: #101828 !important;
    margin: 0 0 4px !important;
  }
  .hero h1 span { color: #0b5fff !important; }
  .hero-subtitle {
    font-size: 12px !important;
    color: #475467 !important;
    margin: 0 0 10px !important;
  }
  .popular-searches { display: none !important; }
  .search-box {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .search-field {
    background: #f2f4f7 !important;
    border: 1px solid #d0d5dd !important;
    border-radius: 12px !important;
    min-height: 46px !important;
  }
  .search-button {
    min-height: 46px !important;
    border-radius: 12px !important;
  }
}
@media (max-width: 768px) {
  .hero, .hero-inner, .hero-content, .search-box, .search-field {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .hero-inner, .hero-content {
    padding-left: 8px !important;
    padding-right: 8px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .search-box { margin: 0 !important; }
  .search-field input { width: 100% !important; font-size: 16px !important; }
}
@media (max-width: 640px) {
  .hero {
    padding: 8px 0 6px !important;
    border-radius: 0 !important;
    background: #ffffff !important;
  }
  .hero h1 { color: #101828 !important; }
  .hero-subtitle { color: #475467 !important; }
  .hero-inner { padding: 0 10px !important; }
  .hero-content { padding: 0 !important; }
}
@media (max-width: 640px) {
  main { display: flex !important; flex-direction: column !important; }
  main > .hero { order: 0; }
  main > .category-nav { order: 1; }
  main > .home-ad { order: 2; margin-top: 8px !important; }
  main > .container:not(.home-ad) { order: 3; }
  .home-ad > a > div { padding: 10px 12px !important; gap: 10px !important; }
  .home-ad img { width: 36px !important; height: 36px !important; }
  .home-ad p:first-of-type { font-size: 13px !important; padding-right: 26px; }
  .home-ad p:last-of-type { display: none !important; }
  .home-ad a > div > div:last-child { padding: 6px 10px !important; font-size: 12px !important; }
}
@media (max-width: 640px) {
  .category-nav { background: #ffffff !important; border-bottom: 1px solid #e4e7ec !important; }
  .category-nav .container { padding: 0 !important; }
  .category-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding: 10px 10px !important;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .category-list::-webkit-scrollbar { display: none; }
  .category-item {
    flex: 0 0 auto !important;
    width: 68px !important;
    padding: 6px 2px !important;
    background: transparent !important;
    border: 0 !important;
    scroll-snap-align: start;
  }
  .category-icon {
    width: 48px !important;
    height: 48px !important;
    margin: 0 auto 4px !important;
    border-radius: 14px !important;
    background: #f2f4f7 !important;
    border: 1px solid #e4e7ec !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 22px !important;
  }
  .category-name {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #101828 !important;
    text-align: center;
    white-space: nowrap;
  }
}
@media (max-width: 640px) {
  .category-item[href="/category/vehicles"] .category-icon,
  .category-item[href="/category/real-estate"] .category-icon,
  .category-item[href="/category/jobs"] .category-icon,
  .category-item[href="/category/pets"] .category-icon,
  .category-item[href="/category/for-sale"] .category-icon,
  .category-item[href="/category/services"] .category-icon {
    font-size: 0 !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 26px 26px !important;
  }
  .category-item[href="/category/vehicles"] .category-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b3fb3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 16v-4l2-5h12l2 5v4M4 16h16M4 16v2h3v-2M17 16v2h3v-2'/%3E%3C/svg%3E") !important;
  }
  .category-item[href="/category/real-estate"] .category-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b3fb3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-7 9 7M5 10v10h14V10M10 20v-6h4v6'/%3E%3C/svg%3E") !important;
  }
  .category-item[href="/category/jobs"] .category-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b3fb3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M9 7V5h6v2M3 13h18'/%3E%3C/svg%3E") !important;
  }
  .category-item[href="/category/pets"] .category-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b3fb3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='10' r='1.8'/%3E%3Ccircle cx='10' cy='6' r='1.8'/%3E%3Ccircle cx='14' cy='6' r='1.8'/%3E%3Ccircle cx='18' cy='10' r='1.8'/%3E%3Cpath d='M12 11c-3 0-5 3-5 5 0 2 2 3 5 3s5-1 5-3c0-2-2-5-5-5z'/%3E%3C/svg%3E") !important;
  }
  .category-item[href="/category/for-sale"] .category-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b3fb3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11V8a3 3 0 013-3h8a3 3 0 013 3v3M3 13a2 2 0 014 0v2h10v-2a2 2 0 014 0v5H3zM6 18v2M18 18v2'/%3E%3C/svg%3E") !important;
  }
  .category-item[href="/category/services"] .category-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b3fb3' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 00-5.4 5.4L3 18l3 3 6.3-6.3a4 4 0 005.4-5.4l-2.6 2.6-2.4-.6-.6-2.4z'/%3E%3C/svg%3E") !important;
  }
}
@media (max-width: 640px) {
  .home-ad span {
    top: -9px !important;
    right: auto !important;
    left: 14px !important;
    background: #ffffff !important;
    border: 1px solid #e0ddf5 !important;
    color: #475467 !important;
  }
  .search-box {
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  .search-button { height: 44px !important; }
}
@media (max-width: 640px) {
  .search-field {
    background: #ffffff !important;
    border: 1px solid #101828 !important;
    border-radius: 12px !important;
  }
  .search-field:focus-within {
    border-color: #0b5fff !important;
    box-shadow: 0 0 0 2px rgba(11, 95, 255, 0.15) !important;
  }
}
@media (max-width: 640px) {
  .home-ad span { left: auto !important; right: 14px !important; }

  .fresh-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .fresh-grid .card {
    display: block !important;
    background: #ffffff !important;
    border: 1px solid #e4e7ec !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }
  .fresh-grid .card .card-image {
    height: 120px !important;
    aspect-ratio: auto !important;
    position: relative !important;
    background: #f2f4f7 !important;
  }
  .fresh-grid .card .card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  .fresh-grid .card .favorite {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 30px !important;
    height: 30px !important;
    font-size: 16px !important;
    top: 6px !important;
    right: 6px !important;
  }
  .fresh-grid .card .card-body { padding: 8px 10px 10px !important; }
  .fresh-grid .card .price { font-size: 15px !important; font-weight: 700 !important; margin: 0 0 2px !important; }
  .fresh-grid .card .card-title {
    font-size: 13px !important;
    line-height: 1.3 !important;
    margin: 0 0 4px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .fresh-grid .card .meta { font-size: 11px !important; color: #475467 !important; }
}
@media (max-width: 640px) {
  .site-header {
    background: #ffffff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    border-bottom: 1px solid #e4e7ec !important;
  }
}
@media (max-width: 640px) {
  .fresh-grid .card,
  .cat-grid > *,
  .jobs-list > * {
    border: 1px solid #101828 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }
}

/* Listing page: map next to the title */
.ld-head .ld-map-top { margin: 0; width: 100%; }
@media (min-width: 641px) {
  .ld-head .ld-map-top { float: right; width: 170px; margin: 0 0 10px 16px; }
  .ld-head .listing-map-square {
    width: 170px !important; height: 170px !important;
    aspect-ratio: 1/1 !important; border-radius: 14px; border: 1px solid #101828;
  }
  .ld-head .map-open { display: block; text-align: center; font-size: 12px; margin-top: 6px; }
  .ld-head::after { content: ""; display: block; clear: both; }
}
@media (max-width: 640px) {
  .ld-head { display: flex; flex-direction: column; }
  .ld-head .ld-map-top { order: 10; margin: 12px 0 0; }
  .ld-head .listing-map-square {
    width: 100% !important; height: 150px !important;
    aspect-ratio: auto !important; border-radius: 12px; border: 1px solid #101828;
  }
  .ld-head .map-open { display: block; text-align: center; font-size: 13px; margin-top: 6px; }
}

/* Listing page: no-price pill, map button, full-screen map */
.ld-noprice {
  display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: 999px;
  background: #f2f4f7; color: #344054;
  border: 1px solid #d0d5dd;
  font-size: 14px; font-weight: 600;
}
.ld-head .map-open {
  display: flex !important; align-items: center; justify-content: center; gap: 6px;
  margin-top: 8px; padding: 7px 10px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  color: #101828 !important; background: #ffffff !important;
  border: 1px solid #101828 !important; border-radius: 999px;
  text-decoration: none; box-shadow: none !important;
}
.ld-head .map-open svg { width: 15px; height: 15px; flex-shrink: 0; }
.listing-map-wrap { position: relative; }
.map-expand {
  position: absolute; top: 0; left: 0; right: 0; height: 150px;
  border: 0; background: transparent; cursor: pointer; z-index: 2; border-radius: 12px;
}
.map-expand span {
  position: absolute; right: 8px; bottom: 8px;
  background: #ffffff; border: 1px solid #101828; border-radius: 8px;
  padding: 4px 8px; font-size: 12px; font-weight: 600; color: #101828;
}
@media (min-width: 641px) { .map-expand { height: 170px; } }

.mapfs {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(16, 24, 40, 0.6);
  display: none; align-items: center; justify-content: center;
}
.mapfs.open { display: flex; }
.mapfs-panel { background: #ffffff; display: flex; flex-direction: column; width: 100%; height: 100%; }
@media (min-width: 641px) {
  .mapfs-panel {
    width: min(92vw, 640px); height: min(90vh, 853px);
    border-radius: 16px; overflow: hidden; border: 1px solid #101828;
  }
}
.mapfs-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  border-bottom: 1px solid #e4e7ec; font-weight: 700; font-size: 16px; color: #101828;
}
.mapfs-close {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid #101828; background: #ffffff;
  font-size: 24px; line-height: 1; cursor: pointer; color: #101828;
}
.mapfs-map { flex: 1; min-height: 0; }
.mapfs-foot {
  display: flex; gap: 8px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e4e7ec; background: #ffffff;
}
.mapfs-btn {
  flex: 1; text-align: center; padding: 12px 8px; border-radius: 12px;
  border: 1px solid #101828; background: #ffffff; color: #101828;
  font-weight: 600; font-size: 14px; text-decoration: none;
}
.mapfs-btn.primary { background: #0b5fff; border-color: #0b5fff; color: #ffffff; }

/* Listing page: no-price is plain text (not clickable look), rows aligned */
.ld-price-row { display: flex !important; align-items: center !important; flex-wrap: wrap; gap: 10px; }
.ld-price-row .detail-price { line-height: 1.2; }
.ld-price-row .ld-pill { margin: 0 !important; }
.ld-noprice {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: #475467 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  pointer-events: none;
  cursor: default;
}

/* No-price label uses the same pill as the category label, grey tone */
.ld-price-row .ld-pill.ld-pill-grey {
  background: #f2f4f7 !important;
  color: #344054 !important;
  pointer-events: none;
  cursor: default;
}

/* Make both pills identical: same box, font, alignment */
.detail-price:has(.ld-pill-grey) { display: contents !important; font-size: 14px !important; }
.ld-price-row { align-items: center !important; }
.ld-price-row .ld-pill,
.ld-price-row .ld-pill.ld-pill-grey {
  display: inline-flex !important;
  align-items: center !important;
  align-self: center !important;
  box-sizing: border-box !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  vertical-align: middle !important;
  position: static !important;
  transform: none !important;
}
.ld-price-row .ld-pill.ld-pill-grey { background: #f2f4f7 !important; color: #344054 !important; }

/* Tablet and desktop: slim dark borders (same as phone) */
@media (min-width: 641px) {
  .search-field {
    background: #ffffff !important;
    border: 1px solid #101828 !important;
    border-radius: 10px !important;
  }
  .search-field:focus-within {
    border-color: #0b5fff !important;
    box-shadow: 0 0 0 2px rgba(11, 95, 255, 0.15) !important;
  }
  .site-header .search-input {
    background: #ffffff !important;
    border: 1px solid #101828 !important;
  }
  .site-header .search-input:focus {
    border-color: #0b5fff !important;
    outline: none;
  }
  .fresh-grid .card,
  .cat-grid > *,
  .jobs-list > * {
    border: 1px solid #101828 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }
}

/* Category icon tiles: slim dark border on all screens */
.category-nav .category-icon {
  border: 1px solid #101828 !important;
  border-radius: 14px !important;
  background-color: #ffffff !important;
  box-sizing: border-box;
}
.category-nav .category-item:hover .category-icon,
.category-nav .category-item:focus-visible .category-icon {
  border-color: #0b5fff !important;
}
@media (min-width: 641px) {
  .category-nav .category-icon {
    width: 56px !important;
    height: 56px !important;
    margin: 0 auto 6px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
}

/* Readable card details: miles, transmission, beds, location, time */
.vehicle-details, .vehicle-details span,
.vehicle-location,
.property-specs, .property-specs span,
.property-location,
.pet-breed,
.pet-details, .pet-details span,
.market-location,
.card .meta {
  font-size: 14px !important;
  line-height: 1.4 !important;
  color: #475467 !important;
}
.vehicle-details, .property-specs, .pet-details { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0; }
@media (max-width: 640px) {
  .vehicle-details, .vehicle-details span,
  .vehicle-location,
  .property-specs, .property-specs span,
  .property-location,
  .pet-breed,
  .pet-details, .pet-details span,
  .market-location,
  .card .meta { font-size: 13px !important; }
}

/* Quick view */
.card-image, .vehicle-image, .property-image, .pet-image, .market-image { position: relative; }
.qv-btn {
  position: absolute; right: 8px; bottom: 8px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #ffffff; color: #101828;
  border: 1px solid #101828; cursor: pointer; padding: 0;
}
.qv-btn:hover, .qv-btn:focus-visible { border-color: #0b5fff; color: #0b5fff; }
.qv {
  position: fixed; inset: 0; z-index: 10001;
  background: rgba(16, 24, 40, 0.6);
  display: none; align-items: flex-end; justify-content: center;
}
.qv.open { display: flex; }
.qv-panel {
  position: relative; background: #ffffff; width: 100%;
  max-height: 88vh; max-height: 88dvh; overflow-y: auto;
  border-radius: 20px 20px 0 0; border: 1px solid #101828; border-bottom: 0;
  display: flex; flex-direction: column;
}
.qv-photo { background: #f2f4f7; height: 240px; flex-shrink: 0; }
.qv-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qv-body { padding: 14px 16px 6px; }
.qv-price { margin: 0 0 4px; font-size: 22px; font-weight: 700; color: #0b5fff; }
.qv-title { margin: 0 0 10px; font-size: 17px; line-height: 1.35; color: #101828; }
.qv-lines { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.qv-lines li { font-size: 15px; color: #475467; }
.qv-foot {
  position: sticky; bottom: 0; background: #ffffff;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e4e7ec; margin-top: 10px;
}
.qv-go {
  display: block; text-align: center; padding: 13px;
  background: #0b5fff; color: #ffffff; font-weight: 700; font-size: 15px;
  border-radius: 12px; text-decoration: none;
}
.qv-close {
  position: absolute; top: 10px; right: 10px; z-index: 4;
  width: 40px; height: 40px; border-radius: 50%;
  background: #ffffff; border: 1px solid #101828;
  font-size: 24px; line-height: 1; cursor: pointer; color: #101828;
}
@media (min-width: 641px) {
  .qv { align-items: center; }
  .qv-panel { width: min(92vw, 520px); max-height: 90vh; border-radius: 16px; border-bottom: 1px solid #101828; }
  .qv-photo { height: 300px; }
}

/* Listing page: hide now-empty Location card, calmer title size */
.ld-side .ld-card:has(.loc-grid):not(:has(.listing-map-wrap)) { display: none !important; }
@media (min-width: 641px) {
  .ld-head .detail-title { font-size: 28px !important; line-height: 1.25 !important; }
}

/* Desktop: map lives in the right column under Stay Safe */
.ld-side .ld-map-top { float: none; width: 100%; margin: 12px 0 0; position: relative; }
.ld-side .listing-map-square {
  width: 100% !important; height: 240px !important;
  aspect-ratio: auto !important; border-radius: 12px; border: 1px solid #101828;
}
.ld-side .map-expand { height: 240px; }
.ld-side .map-open {
  display: flex !important; align-items: center; justify-content: center; gap: 6px;
  margin-top: 8px; padding: 9px 12px; font-size: 13px; font-weight: 600; white-space: nowrap;
  color: #101828 !important; background: #ffffff !important;
  border: 1px solid #101828 !important; border-radius: 999px;
  text-decoration: none; box-shadow: none !important;
}
.ld-side .map-open svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Desktop and tablet home: compact white hero, one search bar, no duplicate links */
@media (min-width: 641px) {
  .hero {
    background: #ffffff !important;
    background-image: none !important;
    min-height: 0 !important;
    padding: 22px 0 16px !important;
    border-radius: 0 !important;
  }
  .hero-inner { padding: 0 16px !important; }
  .hero .hero-content { max-width: 720px !important; margin: 0 auto !important; text-align: center; }
  .hero h1 {
    font-size: 30px !important; line-height: 1.2 !important;
    letter-spacing: -0.5px !important; color: #101828 !important; margin: 0 0 6px !important;
  }
  .hero h1 span { color: #0b5fff !important; }
  .hero .hero-content .hero-subtitle {
    font-size: 14px !important; color: #475467 !important; margin: 0 0 16px !important;
  }
  .hero .popular-searches { display: none !important; }

  .hero .search-box {
    display: flex !important; align-items: stretch !important;
    max-width: 640px; margin: 0 auto !important; padding: 0 !important; gap: 0 !important;
    background: #ffffff !important; border: 1px solid #101828 !important;
    border-radius: 999px !important; box-shadow: none !important; overflow: hidden;
  }
  .hero .search-box .search-field {
    flex: 1 1 0; min-width: 0; height: 50px !important;
    border: 0 !important; border-radius: 0 !important; background: transparent !important;
    box-shadow: none !important; padding: 0 16px !important;
  }
  .hero .search-box .search-field:first-child { flex: 1.4 1 0; }
  .hero .search-box .search-field + .search-field { border-left: 1px solid #d0d5dd !important; }
  .hero .search-box .search-field:focus-within { background: #f9fafb !important; box-shadow: none !important; }
  .hero .search-box .search-field input { height: 48px !important; font-size: 15px !important; }
  .hero .search-box .search-button {
    width: auto !important; height: auto !important; padding: 0 28px !important;
    border-radius: 0 !important; font-size: 15px !important;
  }

  main:has(> .hero) { display: flex !important; flex-direction: column !important; }
  main:has(> .hero) > .hero { order: 0; width: 100%; }
  main:has(> .hero) > .category-nav { order: 1; width: 100%; box-sizing: border-box; }
  main:has(> .hero) > .home-ad { order: 2; width: 100%; box-sizing: border-box; margin-top: 12px !important; }
  main:has(> .hero) > .container:not(.home-ad) { order: 3; width: 100%; box-sizing: border-box; }

  .home-ad > a > div { padding: 10px 16px !important; gap: 12px !important; }
  .home-ad img { width: 36px !important; height: 36px !important; }
  .home-ad p:last-of-type { display: none !important; }
  .home-ad span {
    top: -9px !important; right: 16px !important; background: #ffffff !important;
    border: 1px solid #e0ddf5 !important; color: #475467 !important;
  }
}

/* Phone home: one combined search box (two rows + button), same look as desktop */
@media (max-width: 640px) {
  .hero .search-box {
    display: flex !important; flex-direction: column !important; gap: 0 !important;
    padding: 0 !important; margin: 0 !important;
    background: #ffffff !important;
    border: 1px solid #101828 !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    overflow: hidden;
  }
  .hero .search-box .search-field {
    height: 48px !important; min-height: 48px !important;
    border: 0 !important; border-radius: 0 !important;
    background: transparent !important; box-shadow: none !important;
    padding: 0 14px !important;
  }
  .hero .search-box .search-field + .search-field { border-top: 1px solid #d0d5dd !important; }
  .hero .search-box .search-field:focus-within { background: #f9fafb !important; box-shadow: none !important; }
  .hero .search-box .search-field input { height: 46px !important; font-size: 16px !important; }
  .hero .search-box .search-button {
    width: calc(100% - 16px) !important; margin: 4px 8px 8px !important;
    height: 44px !important; min-height: 44px !important;
    border-radius: 12px !important; font-size: 15px !important;
  }
}

/* Search suggestions dropdown */
.sg-box {
  position: absolute; z-index: 9000;
  background: #ffffff; border: 1px solid #101828; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.18);
  overflow: hidden; max-height: 60vh; overflow-y: auto;
  text-align: left;
}
.sg-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; font-size: 15px; color: #101828; cursor: pointer;
  border-top: 1px solid #f2f4f7;
}
.sg-item:first-child { border-top: 0; }
.sg-item.on, .sg-item:hover { background: #f2f4f7; }
.sg-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-kind { flex-shrink: 0; font-size: 11px; font-weight: 600; color: #667085; }

/* Listing photo viewer: tap the main photo for full screen, swipe between photos */
#galleryTrack img { cursor: zoom-in; }
.pv { position: fixed; inset: 0; z-index: 10004; display: none; background: rgba(0, 0, 0, 0.96); }
.pv.open { display: block; }
.pv-track {
  position: absolute; inset: 0; display: flex;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pv-track::-webkit-scrollbar { display: none; }
.pv-slide {
  flex: 0 0 100%; width: 100%; height: 100%;
  scroll-snap-align: center; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pv-slide img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.pv-slide.z { display: block; overflow: auto; }
.pv-slide.z img { max-width: none; max-height: none; width: 200%; height: auto; }
.pv-close, .pv-nav {
  position: absolute; z-index: 3; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
  color: #ffffff; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.6);
  font-family: inherit; line-height: 1;
}
.pv-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 14px; font-size: 30px; }
.pv-nav { top: 50%; margin-top: -22px; font-size: 32px; padding-bottom: 4px; }
.pv-prev { left: 12px; }
.pv-next { right: 12px; }
.pv-nav[hidden], .pv.single .pv-nav { display: none; }
.pv-count {
  position: absolute; z-index: 3; top: calc(18px + env(safe-area-inset-top, 0px)); left: 50%;
  transform: translateX(-50%); padding: 5px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: #ffffff; background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
@media (max-width: 640px) { .pv-nav { display: none; } }

/* Quick-view button: bottom-left of the photo so it doesn't crowd the heart (top-right) */
.qv-btn { right: auto !important; left: 8px !important; bottom: 8px !important; }
@media (max-width: 640px) {
  .qv-btn { width: 32px !important; height: 32px !important; left: 6px !important; bottom: 6px !important; }
  .qv-btn svg { width: 16px !important; height: 16px !important; }
  .fresh-grid .card .favorite,
  .cat-grid .favorite {
    width: 32px !important; height: 32px !important; font-size: 16px !important;
    top: 6px !important; right: 6px !important;
  }
}

/* Phone: real estate cards = one big photo on top, details underneath */
@media (max-width: 640px) {
  *:has(> a.property-card) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }
  a.property-card {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    border: 1px solid #101828 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
  }
  a.property-card .property-image {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    aspect-ratio: 16 / 10 !important;
    position: relative !important;
    background: #f2f4f7 !important;
  }
  a.property-card .property-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
  }
  a.property-card .property-image .no-photo {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  }
  a.property-card .property-body {
    padding: 12px 14px 14px !important;
    display: block !important;
  }
  a.property-card .property-price {
    font-size: 21px !important;
    font-weight: 700 !important;
    margin: 0 0 4px !important;
    line-height: 1.2 !important;
  }
  a.property-card .property-title { display: none !important; }
  a.property-card .property-specs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px 14px !important;
    margin: 0 0 6px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #101828 !important;
  }
  a.property-card .property-specs span { font-size: 15px !important; color: #101828 !important; }
  a.property-card .property-location {
    margin: 0 !important;
    font-size: 14px !important;
    color: #475467 !important;
  }
}

/* Phone: real estate card shows the title in a slim bordered box (max 2 lines) */
@media (max-width: 640px) {
  a.property-card .property-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 8px !important;
    padding: 8px 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: #101828 !important;
    background: #ffffff !important;
    border: 1px solid #101828 !important;
    border-radius: 10px !important;
  }
  a.property-card .property-specs:not(:has(span)) { display: none !important; }
}

/* Real estate title box: stronger selector so nothing can hide it on phones */
@media (max-width: 640px) {
  body .real-estate-grid a.property-card .property-body .property-title,
  body a.property-card .property-body p.property-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    white-space: normal !important;
    text-overflow: clip !important;
    margin: 0 0 8px !important;
    padding: 8px 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: #101828 !important;
    background: #ffffff !important;
    border: 1px solid #101828 !important;
    border-radius: 10px !important;
  }
}

/* Tablet and desktop: real estate cards show the title in a slim bordered box (max 2 lines) */
@media (min-width: 641px) {
  body a.property-card .property-body .property-title,
  body .real-estate-grid a.property-card .property-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    white-space: normal !important;
    text-overflow: clip !important;
    margin: 0 0 8px !important;
    padding: 8px 10px !important;
    min-height: 2.9em;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: #101828 !important;
    background: #ffffff !important;
    border: 1px solid #101828 !important;
    border-radius: 10px !important;
  }
  a.property-card .property-body { padding: 12px 14px 14px !important; }
  a.property-card .property-price { font-size: 20px !important; font-weight: 700 !important; margin: 0 0 6px !important; }
  a.property-card .property-specs span,
  a.property-card .property-location { font-size: 14px !important; color: #475467 !important; }
}

/* Real estate title: clean plain text, no border or box (all screen sizes) */
body a.property-card .property-body .property-title,
body .real-estate-grid a.property-card .property-title,
body a.property-card .property-body p.property-title {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
  white-space: normal !important;
  text-overflow: clip !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  color: #101828 !important;
}
@media (min-width: 641px) {
  body a.property-card .property-body .property-title { min-height: 2.7em; }
}
