/* Restores the compact image-led sections from the original homepage. */
@media (min-width: 900px) {
  #services .tp-container,
  #commercial-properties .tp-container,
  #residential-properties .tp-container,
  #residential-properties + .tp-section .tp-container {
    max-width: 980px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

#services .tp-services-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  gap: 12px !important;
  padding: 4px 2px 12px !important;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
#services .tp-services-grid::-webkit-scrollbar { display: none; }
#services .tp-service-card.tp-service-photo {
  position: relative !important;
  isolation: isolate;
  overflow: hidden !important;
  flex: 0 0 208px !important;
  width: 208px !important;
  height: 222px !important;
  min-height: 222px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: #0f172a !important;
  scroll-snap-align: start;
}
#services .tp-service-photo-bg {
  position: absolute !important;
  inset: 0;
  z-index: -1;
  background-size: cover !important;
  background-position: center !important;
}
#services .tp-service-content {
  position: absolute !important;
  inset: 0;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-end !important;
  padding: 14px !important;
  color: #fff !important;
}
#services .tp-service-card .tp-tag { color: #fed7aa !important; font-size: 8px !important; }
#services .tp-service-icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  margin-bottom: 7px !important;
  background: rgba(255,255,255,.18) !important;
  border: 1px solid rgba(255,255,255,.25) !important;
  color: #fff !important;
}
#services .tp-service-card h3 { color: #fff !important; font-size: 14px !important; margin-bottom: 4px !important; }
#services .tp-service-card p { color: rgba(255,255,255,.88) !important; font-size: 10px !important; line-height: 1.35 !important; }
#services .tp-services-controls { display: flex !important; justify-content: center !important; }
#services .tp-services-dots { display: flex !important; gap: 5px !important; }
#services .tp-service-dot { width: 6px !important; height: 6px !important; padding: 0 !important; border: 0 !important; border-radius: 99px !important; background: #cbd5e1 !important; }
#services .tp-service-dot.is-active { width: 18px !important; background: #ea580c !important; }

#commercial-properties,
#residential-properties { padding-top: 42px !important; padding-bottom: 42px !important; }
#commercial-properties .tp-listing-grid,
#residential-properties .tp-listing-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  gap: 16px !important;
}
#commercial-properties .tp-listing-head-row,
#residential-properties .tp-listing-head-row { margin-bottom: 16px !important; }
#commercial-properties .tp-h2,
#residential-properties .tp-h2 { font-size: clamp(22px, 3vw, 29px) !important; }
#commercial-properties .tp-listing-head-row .tp-btn,
#residential-properties .tp-listing-head-row .tp-btn {
  border: 1px solid #dbe3ec !important;
  background: #fff !important;
  color: #0f172a !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  padding: 10px 16px !important;
}
.tp-feature-card {
  min-width: 0 !important;
  border-radius: 14px !important;
  border: 1px solid #dfe7ef !important;
  box-shadow: 0 8px 22px rgba(15,23,42,.07) !important;
  overflow: hidden !important;
}
.tp-feature-card .tp-listing-img { height: 132px !important; background: #0f172a !important; }
.tp-feature-card .tp-listing-img img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.tp-feature-image-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #cbd5e1; font-size: 12px; }
.tp-feature-image-fallback[hidden] { display: none; }
.tp-feature-card .tp-listing-price-badge { font-size: 11px !important; bottom: 8px !important; left: 8px !important; }
.tp-feature-card .tp-listing-body { padding: 10px !important; }
.tp-feature-card .tp-listing-body,
.tp-feature-card .tp-listing-body * { line-height: 1.3 !important; }
.tp-feature-card .tp-tag-pill { color: #9a4208 !important; background: #fff7ed !important; border-color: #ffedd5 !important; }
.tp-feature-card .tp-listing-body h3 { font-size: 13px !important; line-height: 1.25 !important; margin-bottom: 3px !important; }
.tp-feature-card .tp-listing-loc { font-size: 10px !important; margin-bottom: 7px !important; }
.tp-feature-card .tp-listing-specs-grid { margin-bottom: 8px !important; padding: 7px 0 !important; }
.tp-feature-card .tp-spec-val { font-size: 11px !important; }
.tp-feature-card .tp-spec-lbl { font-size: 9px !important; }
.tp-feature-card .tp-listing-actions-row { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 5px !important; }
.tp-feature-card .tp-action-btn { min-height: 32px !important; padding: 7px !important; font-size: 10px !important; border-radius: 999px !important; }
.tp-feature-card .tp-brochure-btn { background: #f05a08 !important; color: #fff !important; }

#residential-properties + .tp-section { padding-top: 42px !important; padding-bottom: 42px !important; }
#residential-properties + .tp-section .tp-section-head { margin-bottom: 16px !important; }
#residential-properties + .tp-section .tp-why-item { padding: 15px 14px !important; }
#residential-properties + .tp-section .tp-why-item i { font-size: 14px !important; margin-bottom: 5px !important; }
#residential-properties + .tp-section .tp-why-item h3 { font-size: 12px !important; }
#residential-properties + .tp-section .tp-why-item p { font-size: 10px !important; }
.tp-why-grid { max-width: 980px !important; margin-left: auto !important; margin-right: auto !important; }

@media (max-width: 899px) {
  #commercial-properties .tp-listing-grid,
  #residential-properties .tp-listing-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}
@media (max-width: 599px) {
  #services .tp-service-card.tp-service-photo { flex-basis: 190px !important; width: 190px !important; height: 204px !important; min-height: 204px !important; }
  #commercial-properties,
  #residential-properties { padding-top: 28px !important; padding-bottom: 28px !important; }
  #commercial-properties .tp-listing-grid,
  #residential-properties .tp-listing-grid { display: flex !important; gap: 11px !important; overflow-x: auto !important; scroll-snap-type: x mandatory; padding-bottom: 8px !important; }
  .tp-feature-card { flex: 0 0 min(78vw, 270px) !important; scroll-snap-align: start; }
  #commercial-properties .tp-listing-head-row .tp-btn,
  #residential-properties .tp-listing-head-row .tp-btn { padding: 7px 10px !important; }
}

/* Property details opened from search results and featured cards. */
#tp-property-modal .tp-property-modal{width:min(840px,calc(100vw - 24px))!important;max-height:calc(100dvh - 24px)!important;border-radius:18px!important;overflow:auto}
#tp-property-modal .tp-detail-grid{display:grid!important;grid-template-columns:minmax(0,42%) minmax(0,58%)!important}
#tp-property-modal .tp-detail-gallery{min-height:0!important;height:100%!important;background:#e9eef4!important}
#tp-property-modal .tp-detail-gallery-main{display:block;width:100%;height:100%!important;min-height:350px!important;max-height:550px;object-fit:cover}
#tp-property-modal .tp-modal-no-photo{width:min(570px,calc(100vw - 24px))!important}
#tp-property-modal .tp-modal-no-photo .tp-detail-grid{grid-template-columns:1fr!important}
#tp-property-modal .tp-modal-no-photo .tp-detail-gallery{display:none!important}
#tp-property-modal .tp-modal-close{position:absolute!important;float:none!important;top:12px!important;right:12px!important;margin:0!important;width:34px!important;height:34px!important;background:#f1f5f9!important;border:1px solid #dce4ee!important;color:#334155!important}
#tp-property-modal .tp-modal-close::after{content:'×';font:500 23px/1 Arial,sans-serif}
#tp-property-modal .tp-modal-close i{display:none!important}
#tp-property-modal .tp-detail-info{padding:24px!important;min-width:0;display:flex;flex-direction:column;gap:7px}
#tp-property-modal .tp-detail-info h2{font:800 clamp(20px,2.4vw,25px)/1.2 Archivo,Arial,sans-serif!important;letter-spacing:normal!important;word-spacing:normal!important;overflow-wrap:anywhere;margin:0!important;padding-right:25px}
#tp-property-modal .tp-detail-price{font:800 23px/1.15 Archivo,Arial,sans-serif!important;margin:2px 0!important}
#tp-property-modal .tp-result-location,#tp-property-modal .tp-result-code{line-height:1.3!important}
#tp-property-modal .tp-detail-specs{display:flex!important;flex-wrap:wrap;gap:7px!important;margin:2px 0!important}
#tp-property-modal .tp-detail-specs div{min-width:100px;padding:7px 10px!important;border-radius:9px}
#tp-property-modal .tp-detail-description{font-size:13px!important;line-height:1.5!important;color:#475569!important;margin:2px 0!important;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
#tp-property-modal .tp-detail-description.is-expanded{display:block}
#tp-property-modal .tp-detail-more{align-self:flex-start;background:none!important;color:#1d4ed8!important;padding:0!important;font-size:12px!important;line-height:1.3!important;border:0!important}
#tp-property-modal .tp-detail-more[hidden]{display:none!important}
#tp-property-modal .tp-detail-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px!important;margin-top:8px!important}
#tp-property-modal .tp-detail-actions>*{min-width:0;min-height:40px!important;padding:8px 5px!important;border-radius:9px!important;font-size:10px!important;line-height:1.2!important;display:flex!important;align-items:center;justify-content:center;gap:4px;text-align:center}
#tp-property-modal .tp-detail-wa{background:#e9fbf1!important;color:#087b45!important}
#tp-property-modal .tp-detail-tour{background:#1d4ed8!important;color:#fff!important}
#tp-property-modal .tp-detail-call{background:#0f172a!important;color:#fff!important}
@media(max-width:700px){
  #tp-property-modal .tp-property-modal{width:min(440px,calc(100vw - 16px))!important;max-height:calc(100dvh - 16px)!important;border-radius:16px!important}
  #tp-property-modal .tp-detail-grid{grid-template-columns:1fr!important}
  #tp-property-modal .tp-detail-gallery{height:205px!important}
  #tp-property-modal .tp-detail-gallery-main{height:205px!important;min-height:205px!important;max-height:205px!important}
  #tp-property-modal .tp-detail-info{padding:16px!important;gap:5px}
  #tp-property-modal .tp-detail-info h2{font-size:20px!important}
  #tp-property-modal .tp-detail-price{font-size:21px!important}
  #tp-property-modal .tp-detail-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  #tp-property-modal .tp-detail-tour{grid-column:1/-1}
}

/* Property comparison controls and side-by-side view. */
.tp-compare-toggle{display:block;width:100%;margin-top:7px;padding:7px 10px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;color:#334155;font:700 11px/1.3 Arial,sans-serif;cursor:pointer}
.tp-compare-toggle:hover,.tp-compare-toggle.is-selected{border-color:#1d4ed8;background:#eef3ff;color:#1d4ed8}
.tp-feature-card .tp-compare-toggle{border-radius:999px;margin-top:6px;font-size:10px}
#search-overlay .tp-result-card .tp-compare-toggle{margin-top:8px}
#tp-compare-drawer[hidden],#tp-compare-overlay[hidden],#tp-compare-notice[hidden]{display:none!important}
#tp-compare-drawer{position:fixed;z-index:12000;bottom:16px;left:50%;transform:translateX(-50%);width:min(620px,calc(100vw - 24px));display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 15px;background:#0f172a;color:#fff;border-radius:15px;box-shadow:0 14px 35px #0f172a55;font:12px Arial,sans-serif}
#tp-compare-drawer strong{display:block;font-size:13px}
#tp-compare-drawer span{display:block;color:#cbd5e1;margin-top:2px}
.tp-compare-drawer-actions{display:flex;gap:7px;align-items:center}
.tp-compare-drawer-actions button{border:0;border-radius:9px;cursor:pointer;font:700 11px Arial,sans-serif;padding:10px 12px;white-space:nowrap}
#tp-compare-clear{background:#334155;color:#fff}
#tp-compare-open{background:#f05a08;color:#fff}
#tp-compare-overlay{position:fixed;z-index:12500;inset:0;display:grid;place-items:center;padding:15px;background:#0f172ac7}
.tp-compare-panel{width:min(1080px,100%);max-height:calc(100dvh - 30px);display:flex;flex-direction:column;overflow:hidden;border-radius:18px;background:#fff;color:#0f172a;box-shadow:0 30px 80px #0005;font-family:Arial,sans-serif}
.tp-compare-panel header{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:18px 21px;border-bottom:1px solid #e2e8f0}
.tp-compare-panel header span{font-size:10px;letter-spacing:.11em;font-weight:800;color:#e05b00}
.tp-compare-panel h2{font-size:22px;line-height:1.2;margin:4px 0}
.tp-compare-panel #tp-compare-heading{letter-spacing:normal!important;word-spacing:.18em!important}
.tp-compare-panel header p{font-size:12px;color:#64748b;margin:0}
#tp-compare-close{flex:0 0 32px;height:32px;border:0;border-radius:50%;background:#f1f5f9;font-size:22px;cursor:pointer}
#tp-compare-close{color:#334155!important}
.tp-compare-scroll{overflow:auto;overscroll-behavior:contain}
.tp-compare-panel table{border-collapse:collapse;width:100%;min-width:620px;table-layout:fixed}
.tp-compare-panel th,.tp-compare-panel td{padding:12px 14px;text-align:left;vertical-align:top;border-bottom:1px solid #e2e8f0;overflow-wrap:anywhere;font-size:12px;line-height:1.45}
.tp-compare-panel th:first-child{width:120px;background:#f8fafc;color:#475569;font-size:11px}
.tp-compare-panel thead th{background:#f8fafc;font-weight:700}
.tp-compare-panel thead th strong{display:block;font-size:14px;color:#0f172a}
.tp-compare-panel thead th small{display:block;color:#64748b;margin-top:3px}
.tp-compare-remove{margin-top:9px;padding:4px 7px;border:0;border-radius:6px;background:#e2e8f0;color:#334155;font-size:10px;cursor:pointer}
.tp-compare-enquire{display:inline-block;padding:8px 10px;border-radius:8px;background:#f05a08;color:#fff!important;text-decoration:none;font-weight:700;white-space:nowrap}
.tp-compare-notice{position:fixed;z-index:13000;bottom:90px;left:50%;transform:translateX(-50%);max-width:min(420px,calc(100vw - 30px));padding:10px 14px;border-radius:9px;background:#fff;color:#0f172a;box-shadow:0 8px 28px #0004;font:12px/1.4 Arial,sans-serif}
@media(max-width:600px){#tp-compare-drawer{bottom:9px;padding:10px 11px}.tp-compare-drawer-actions button{padding:8px 9px;font-size:10px}.tp-compare-panel header{padding:13px 14px}.tp-compare-panel h2{font-size:18px}.tp-compare-panel table{min-width:570px}.tp-compare-panel th,.tp-compare-panel td{padding:10px;font-size:11px}}
/* Consistent search cards: natural photo dimensions must not size the gallery. */
#search-overlay .tp-results-grid{align-items:stretch!important}
#search-overlay .tp-result-card{height:100%;min-width:0}
#search-overlay .tp-result-image{position:relative!important;height:240px!important;min-height:240px!important;max-height:240px!important;flex:0 0 240px!important;aspect-ratio:auto!important;overflow:hidden!important}
#search-overlay .tp-result-image img{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;max-height:none!important;object-fit:cover!important;object-position:center!important}
#search-overlay .tp-result-body h4{line-height:1.3!important;min-height:2.6em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#search-overlay .tp-result-location{min-height:1.5em}
#search-overlay .tp-specs{min-height:34px}
#search-overlay .tp-result-desc{min-height:2.9em;-webkit-line-clamp:2}
#search-overlay .tp-result-actions{margin-top:auto!important}
@media(max-width:767px){#search-overlay .tp-result-image{height:190px!important;min-height:190px!important;max-height:190px!important;flex-basis:190px!important}}
.tp-feature-card .tp-listing-body h3 a,
#search-overlay .tp-result-body h4 a { color:inherit; text-decoration:none; }
.tp-feature-card .tp-listing-body h3 a:hover,
#search-overlay .tp-result-body h4 a:hover { color:#1d4ed8; text-decoration:underline; text-underline-offset:3px; }
