/* OrchardSmart design changes D1–D8 (2026-11-10). Loaded after custom.css. */

/* D1 — card titles: two lines with "…" (plugin forced one line, cut mid-word) */
.ere-property .property-title,
.ere-property .property-title a {
  display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  white-space: normal !important; overflow: hidden; text-overflow: ellipsis; height: auto !important;
}
.ere-property .property-title { min-height: calc(2 * 1.35em); }

/* D6 — photo placeholder (missing photo, failed photo, or while a lazy photo loads) */
:root { --os-noimg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%239a8f6f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M32 56V34'/%3E%3Cpath d='M32 40l-7-6M32 37l6-5'/%3E%3Cpath d='M32 34c-12 0-18-7-18-14 0-6 5-10 9-10 2-4 6-6 9-6s7 2 9 6c4 0 9 4 9 10 0 7-6 14-18 14z'/%3E%3Cpath d='M10 56h44'/%3E%3C/svg%3E"); }
.ere-property .property-image { background: var(--os-cream, #f6f1e4) var(--os-noimg) center / 56px no-repeat; aspect-ratio: 3 / 2; }
.ere-property .property-image .os-noimg { display: block; width: 100%; aspect-ratio: 3 / 2; }
.ere-property .property-image img.os-img-failed { opacity: 0 !important; }

/* D3 — "More filters" toggle on phones */
.os-more-filters-btn { display: none; }
@media (max-width: 767px) {
  .os-filters-collapsed .os-extra-filter { display: none !important; }
  .os-more-filters-btn {
    display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; padding: 8px 2px;
    background: none; border: 0; color: var(--os-green, #5a8a3a); font-weight: 700; font-size: 15px; cursor: pointer;
  }
  .os-more-filters-btn::after { content: "▾"; font-size: 12px; transition: transform .2s; }
  .os-filters-open .os-more-filters-btn::after { transform: rotate(180deg); }
}

/* D4 — homepage search: For Sale / Pending only (Sold lives on the Properties page) */
.home .ere-search-status-tab button[data-value="sold"],
.home .ere-search-status-tab button[data-value="off-market"] { display: none !important; }

/* D5 — listing header on phones: full address, facts line under the price */
.single-property .ere__single-property-location { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; max-width: 100%; }
.single-property .ere__single-property-location * { white-space: normal !important; }
.os-header-facts { margin: 6px 0 0; color: var(--os-muted, #5e5a52); font-size: 15px; font-weight: 600; }

/* D7 — crop tiles */
.os-crop-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin: 8px 0 0; }
.os-crop-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 120px; padding: 12px 14px; border-radius: var(--os-radius, 12px); overflow: hidden; color: #fff !important; text-decoration: none !important; background: var(--os-ink, #1f1d19); }
.os-crop-img { position: absolute; inset: 0; background: var(--os-cream, #f6f1e4) var(--os-noimg) center / 48px no-repeat; background-size: cover; transition: transform .4s ease; }
.os-crop-tile::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.65) 100%); }
.os-crop-name, .os-crop-count { position: relative; z-index: 2; line-height: 1.2; }
.os-crop-name { font-family: var(--os-font-heading); font-weight: 700; font-size: 18px; }
.os-crop-count { font-size: 13px; opacity: .9; }
.os-crop-tile:hover .os-crop-img, .os-crop-tile:focus-visible .os-crop-img { transform: scale(1.05); }
@media (max-width: 480px) { .os-crop-tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; } .os-crop-tile { min-height: 100px; } }

/* D8 — no directions box under the listing map; one clear Google Maps link instead */
.single-property .ere__single-property-map-directions { display: none !important; }
.single-property .os-maps-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-weight: 700; color: var(--os-green, #5a8a3a); }
.os-more-filters-wrap { display: none; }
@media (max-width: 767px) { .os-more-filters-wrap { display: block; } }
.os-crops-wrap .os-crop-tiles { padding: 0 16px; box-sizing: border-box; max-width: 1200px; margin-left: auto; margin-right: auto; }
.os-more-filters-btn, .os-more-filters-btn:hover, .os-more-filters-btn:focus, .os-more-filters-btn:active { background: none !important; color: var(--os-green, #5a8a3a) !important; box-shadow: none !important; text-transform: none; letter-spacing: 0; }
.os-more-filters-btn:focus-visible { outline: 2px solid var(--os-green, #5a8a3a); outline-offset: 2px; }
