/* RP-MOBILE-CARDS-20261117: compact listing cards on phones (owner: cards were full-screen).
   Photo left, details right, ~170px per card. Desktop/tablet untouched.
   Rollback: remove the <link> with this file name from inc/header.php. */
@media (max-width: 575.98px) {
  html:root body:is(#rpmc#rpmc#rpmc,body) .col-12:has(> .swiper .rp-lux-card) { margin-bottom: 0 !important; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .row:has(> .col-12 > .swiper .rp-lux-card) { row-gap: 12px !important; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card.property-item {
    display: grid !important;
    grid-template-columns: 41% 1fr;
    grid-template-rows: 1fr auto;
    column-gap: 12px;
    padding: 10px !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    border-radius: 14px !important;
    background: #fffdf8 !important;
    border: 1px solid rgba(45, 90, 61, .14) !important;
    box-shadow: 0 4px 14px rgba(20, 40, 28, .07) !important;
    overflow: hidden;
  }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card > .rp-property-photo-link { grid-column: 1; grid-row: 1 / 3; display: block !important; min-width: 0; width: 100% !important; position: relative; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .property-header,
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .property-header figure {
    position: relative !important; width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    height: 100% !important; min-height: 150px !important; margin: 0 !important; padding: 0 !important;
    aspect-ratio: auto !important; border-radius: 10px; overflow: hidden;
  }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .property-header img {
    position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important;
    max-width: 100% !important; aspect-ratio: auto !important; object-fit: cover; border-radius: 10px; display: block; transform: none !important;
  }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .property-label { font-size: 9px !important; padding: 2px 7px !important; top: 6px !important; left: 6px !important; line-height: 1.4 !important; border-radius: 6px; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .property-label1, html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .property-label2 { display: none !important; }

  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .property-body { grid-column: 2; grid-row: 1; padding: 0 !important; margin: 0 !important; min-width: 0; text-align: left !important; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .rp-lux-location {
    display: block !important; font-size: 9.5px !important; letter-spacing: .6px !important; line-height: 1.3 !important;
    margin: 0 0 3px !important; padding: 0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .rp-lux-location .fa { display: none; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .rp-lux-location .address { margin-left: 0 !important; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card h3.responsive-text { margin: 0 0 4px !important; padding: 0 !important; min-height: 0 !important; height: auto !important; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card h3 .rp-card-title {
    font-size: 14.5px !important; line-height: 1.25 !important; height: auto !important; max-height: none !important;
    display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal !important;
  }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .rp-lux-price {
    display: block !important; width: auto !important; margin: 0 0 1px !important; padding: 0 !important;
    font-size: 16.5px !important; line-height: 1.25 !important; min-height: 0 !important; height: auto !important;
    background: none !important; border: 0 !important; box-shadow: none !important; text-align: left !important;
  }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .rp-fx { font-size: 10.5px !important; line-height: 1.3 !important; margin: 0 0 4px !important; gap: 0 !important; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .rp-fx > span:not(:first-of-type) { display: none !important; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .property-meta {
    display: flex !important; flex-wrap: wrap; gap: 2px 10px !important; margin: 0 !important; padding: 0 !important; border: 0 !important;
    font-size: 11px !important; line-height: 1.35 !important;
  }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .property-amenity-item { margin: 0 !important; padding: 0 !important; width: auto !important; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .property-amenity-item span, html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .property-amenity-item b { font-size: 11px !important; font-weight: 500 !important; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .property-amenity-item .icon-box { display: none !important; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .rp-lux-old-price { display: none !important; }

  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .property-footer {
    grid-column: 2; grid-row: 2; margin: 6px 0 0 !important; padding: 0 !important; border: 0 !important;
    display: flex !important; justify-content: flex-start !important; align-items: center;
  }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .property-footer .agent-info { display: none !important; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .property-footer > div:has(> a.btn-default) { display: none !important; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .rp-lux-contacts { gap: 6px !important; margin: 0 !important; width: 100%; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .rp-lux-contacts a {
    flex: 1 1 0; min-width: 0 !important; width: auto !important; height: 34px !important; min-height: 34px !important;
    padding: 0 !important; margin: 0 !important; display: inline-flex !important; align-items: center; justify-content: center;
    font-size: 0 !important; border-radius: 9px !important; gap: 0 !important;
  }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .rp-lux-contacts a .fa { font-size: 14px !important; margin: 0 !important; }
  html:root body:is(#rpmc#rpmc#rpmc,body) .rp-lux-card .rp-lux-contacts a svg { width: 16px !important; height: 16px !important; margin: 0 !important; }

  /* Area/intent hub pages (inline-styled cards) */
  html:root body div[style*="minmax(250px,1fr)"]:has(> div > a[href*="property_single"] > img) { gap: 12px !important; margin: 18px 0 !important; }
  html:root body div[style*="minmax(250px,1fr)"] > div:has(> a[href*="property_single"] > img) {
    display: grid !important; grid-template-columns: 41% 1fr; align-items: stretch; border-radius: 14px !important;
  }
  html:root body div[style*="minmax(250px,1fr)"] > div > a[href*="property_single"]:first-child { display: block !important; position: relative; min-height: 132px; }
  html:root body div[style*="minmax(250px,1fr)"] > div > a[href*="property_single"]:first-child > img { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; }
  html:root body div[style*="minmax(250px,1fr)"] > div:has(> a[href*="property_single"] > img) > div { padding: 10px 12px !important; min-width: 0; }
  html:root body div[style*="minmax(250px,1fr)"] > div:has(> a[href*="property_single"] > img) > div p { margin: 0 0 4px !important; font-size: 11px !important; line-height: 1.35 !important; }
  html:root body div[style*="minmax(250px,1fr)"] > div:has(> a[href*="property_single"] > img) > div p:first-child { font-size: 9.5px !important; letter-spacing: .6px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html:root body div[style*="minmax(250px,1fr)"] > div:has(> a[href*="property_single"] > img) > div h3 { margin: 0 0 4px !important; font-size: 14px !important; line-height: 1.25 !important; }
  html:root body div[style*="minmax(250px,1fr)"] > div:has(> a[href*="property_single"] > img) > div h3 a { font-size: 14px !important; line-height: 1.25 !important; display: -webkit-box !important; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  html:root body div[style*="minmax(250px,1fr)"] > div:has(> a[href*="property_single"] > img) > div p:nth-of-type(2) { font-size: 15px !important; }
  html:root body div[style*="padding:44px 46px"]:has(div[style*="minmax(250px,1fr)"] > div > a[href*="property_single"]) { padding: 22px 16px !important; }
}
