/* ── Properties: filters ──
   box-sizing:border-box on every element in this module is the real fix
   for the mobile overflow seen in Featured/List/Grid — without it, an
   element's declared width doesn't include its own padding, so a card
   set to fill its container plus 20px of padding renders ~40px WIDER
   than that container on narrow screens, clipping the image and title
   at the viewport edge exactly as reported. */
.tethbe-prop-wrap, .tethbe-prop-wrap * { box-sizing: border-box; }
.tethbe-prop-wrap { max-width: 100%; }
.tethbe-prop-wrap img { max-width: 100%; }

.tethbe-prop-wrap { margin: 20px 0; }
.tethbe-prop-filters {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.tethbe-prop-filter {
  padding: 8px 16px; border-radius: 20px; border: 1px solid var(--te-border, #e2e8f0);
  background: #fff; color: var(--te-gray, #64748b); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.tethbe-prop-filter.active, .tethbe-prop-filter:hover {
  background: var(--te-primary, #1a3c6e); color: #fff; border-color: var(--te-primary, #1a3c6e);
}

/* ── Grid ──
   auto-fit + minmax instead of a fixed column count: with 1–2 listings
   the card(s) grow to fill the available width instead of sitting in a
   narrow column with empty grid tracks beside them; with many listings
   it wraps into as many columns as fit. This also makes the grid adapt
   correctly to whatever width Elementor gives its container (a full
   section vs a narrow column) without a viewport-based media query. */
.tethbe-prop-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px;
}

.tethbe-prop-card {
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08); transition: transform .2s, box-shadow .2s;
}
.tethbe-prop-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }

/* Consistent aspect-ratio box for every hero image, everywhere it's used
   (grid, featured, list) — regardless of the raw dimensions of the photo
   an operator uploaded. Fixes photos looking inconsistently "zoomed" or
   differently proportioned from one listing to the next. */
.tethbe-prop-img, .tethbe-prop-featured-hero, .tethbe-prop-list-img {
  position: relative; aspect-ratio: 4 / 3; background: #f1f5f9; overflow: hidden;
}
.tethbe-prop-img img, .tethbe-prop-featured-hero img, .tethbe-prop-list-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.tethbe-prop-img-placeholder {
  display: flex; align-items: center; justify-content: center; height: 100%; font-size: 48px;
}
.tethbe-prop-badge {
  position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.95);
  color: var(--te-primary, #1a3c6e); padding: 4px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
}
.tethbe-prop-status {
  position: absolute; top: 12px; right: 12px; color: #fff;
  padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.tethbe-prop-photo-count {
  position: absolute; bottom: 10px; right: 10px; background: rgba(15,23,42,.75); color: #fff;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}

/* ── Gallery thumbnail strip (grid view) ──
   Same aspect ratio as the hero image (4:3) instead of a squat fixed
   46×36px box, so thumbnails and hero image read as one consistent set
   of photos rather than two differently-shaped image styles. */
.tethbe-prop-thumbstrip {
  display: flex; gap: 5px; padding: 8px 12px 0; overflow-x: auto;
}
.tethbe-prop-thumb {
  width: 52px; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 5px; cursor: pointer;
  border: 2px solid transparent; opacity: .65; transition: all .15s; flex-shrink: 0;
}
.tethbe-prop-thumb:hover { opacity: .9; }
.tethbe-prop-thumb.active { border-color: var(--te-primary, #1a3c6e); opacity: 1; }

.tethbe-prop-body { padding: 16px; }
.tethbe-prop-name { font-size: 16px; font-weight: 800; color: var(--te-dark, #0f172a); margin: 0 0 4px; }
.tethbe-prop-loc { font-size: 13px; color: var(--te-gray, #64748b); margin: 0 0 10px; }

.tethbe-prop-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.tethbe-prop-spec-pill {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 3px 9px; font-size: 11px; color: #475569;
}

/* ── Featured view ──
   One full-width block per listing: hero image + gallery grid side by
   side, using flex-wrap rather than a fixed two-column grid so it
   naturally stacks to one column when the CONTAINER is narrow (an
   Elementor column, a sidebar) — not just when the browser viewport is
   narrow, which a fixed grid-template-columns split can't do. Best for
   sites with only a few listings, where a card-grid slot feels cramped. */
.tethbe-prop-featured { display: flex; flex-direction: column; gap: 28px; }
.tethbe-prop-card-featured {
  display: flex; flex-wrap: wrap; gap: 20px; background: #fff; border-radius: 16px;
  overflow: hidden; box-shadow: 0 2px 16px rgba(0,0,0,.08); padding: 20px;
}
.tethbe-prop-featured-media { flex: 1 1 340px; min-width: 280px; display: flex; flex-direction: column; gap: 8px; }
.tethbe-prop-featured-hero { border-radius: 12px; aspect-ratio: 16 / 10; }
.tethbe-prop-featured-gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px;
}
.tethbe-prop-featured-gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; cursor: pointer;
}
.tethbe-prop-featured-more {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3;
  background: #f1f5f9; border-radius: 8px; font-size: 11px; font-weight: 600; color: #64748b; text-align: center; padding: 4px;
}
.tethbe-prop-featured-body { flex: 1 1 300px; min-width: 260px; padding: 4px 4px 4px 0; }
.tethbe-prop-featured-body .tethbe-prop-name { font-size: 20px; }

/* ── List view ──
   Compact horizontal row — fixed-width image, flexible body — for
   scanning many listings quickly. Flex-wrap lets each row collapse to
   a stacked card automatically inside a narrow container. */
.tethbe-prop-list { display: flex; flex-direction: column; gap: 14px; }
.tethbe-prop-card-list {
  display: flex; flex-wrap: wrap; gap: 16px; background: #fff; border-radius: 14px;
  overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.08); transition: box-shadow .2s;
}
.tethbe-prop-card-list:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.tethbe-prop-list-img { flex: 0 1 220px; min-width: 160px; aspect-ratio: 4 / 3; }
.tethbe-prop-list-body { flex: 1 1 260px; padding: 14px 16px 14px 0; }

@media (max-width: 480px) {
  .tethbe-prop-list-img { flex-basis: 100%; }
  .tethbe-prop-list-body { padding: 0 16px 16px; }

  /* Featured view on small phones: tighter padding so the card doesn't
     eat into already-limited width, hero forced full-width instead of
     sharing a row with the gallery, and a slightly smaller title so
     longer listing names wrap cleanly instead of crowding the image. */
  .tethbe-prop-card-featured { padding: 12px; gap: 14px; }
  .tethbe-prop-featured-media { flex-basis: 100%; min-width: 0; }
  .tethbe-prop-featured-body { flex-basis: 100%; min-width: 0; padding: 0; }
  .tethbe-prop-featured-body .tethbe-prop-name { font-size: 17px; }
  .tethbe-prop-featured-gallery { grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)); }
}

/* ── Amenities ── */
.tethbe-prop-amenities { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tethbe-prop-amenity-pill {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 6px;
  padding: 3px 9px; font-size: 11px; color: #15803d; font-weight: 500;
}
.tethbe-prop-amenity-more {
  background: #f8fafc; border-color: #e2e8f0; color: #64748b; font-weight: 600;
}

.tethbe-prop-price-row { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 8px; flex-wrap: wrap; gap: 8px; }
.tethbe-prop-price-block { display: flex; flex-direction: column; gap: 4px; }
.tethbe-prop-price { font-size: 18px; font-weight: 800; color: var(--te-primary, #1a3c6e); }
.tethbe-prop-price span { font-size: 12px; font-weight: 500; color: var(--te-gray, #64748b); }
.tethbe-prop-currency-toggle {
  background: none; border: 1px solid #e2e8f0; border-radius: 6px; padding: 2px 8px;
  font-size: 10px; color: #64748b; cursor: pointer; align-self: flex-start;
}
.tethbe-prop-currency-toggle:hover { background: #f8fafc; }

.tethbe-btn-prop-learnmore {
  padding: 9px 12px; background: #fff; color: var(--te-primary, #1a3c6e);
  border: 1.5px solid var(--te-primary, #1a3c6e); border-radius: 9px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all .2s;
}
.tethbe-btn-prop-learnmore:hover { background: #eff6ff; }

.tethbe-btn-prop-cta {
  padding: 9px 16px; background: var(--te-accent, #f59e0b); color: #1a1a1a;
  border: none; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all .2s;
}
.tethbe-btn-prop-cta:hover { transform: translateY(-1px); }
.tethbe-btn-prop-disabled, .tethbe-btn-prop-disabled:hover {
  background: #cbd5e1; color: #64748b; cursor: not-allowed; transform: none;
}

/* ── Learn More detail modal ── */
.tethbe-prop-detail-box { max-width: 640px; max-height: 90vh; overflow-y: auto; }
.tethbe-prop-detail-gallery { margin: -28px -28px 16px; }
.tethbe-prop-detail-main { width: 100%; height: 300px; object-fit: cover; display: block; }
.tethbe-prop-detail-thumbs { display: flex; gap: 6px; padding: 10px 28px 0; overflow-x: auto; }
.tethbe-prop-detail-thumbs img {
  width: 60px; height: 48px; object-fit: cover; border-radius: 6px; cursor: pointer;
  opacity: .7; transition: opacity .15s; flex-shrink: 0;
}
.tethbe-prop-detail-thumbs img:hover { opacity: 1; }
.tethbe-prop-detail-badge { font-size: 12px; font-weight: 700; color: var(--te-primary, #1a3c6e); margin-bottom: 4px; }
.tethbe-prop-detail-box h2 { margin: 0 0 4px; font-size: 22px; color: #0f172a; }
.tethbe-prop-detail-price { font-size: 22px; font-weight: 800; color: var(--te-primary, #1a3c6e); margin: 12px 0; }
.tethbe-prop-detail-box h4 { font-size: 13px; color: #475569; margin: 16px 0 8px; text-transform: uppercase; letter-spacing: .4px; }

@media (max-width: 480px) {
  .tethbe-prop-detail-gallery { margin: -20px -20px 16px; }
  .tethbe-prop-detail-main { height: 220px; }
}

/* ── Enquiry modal ── */
.tethbe-prop-modal-overlay, .tethbe-prop-success-overlay {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,.6);
  z-index: 99998; align-items: center; justify-content: center; padding: 20px; overflow-y: auto;
}
.tethbe-prop-modal-overlay.open, .tethbe-prop-success-overlay.open { display: flex; }
.tethbe-prop-modal-box, .tethbe-prop-success-box {
  background: #fff; border-radius: 18px; padding: 28px; max-width: 460px; width: 100%;
  position: relative; box-shadow: 0 25px 60px rgba(0,0,0,.3);
}
.tethbe-prop-success-box { text-align: center; }
.tethbe-prop-modal-close {
  position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border: none;
  border-radius: 50%; background: #f1f5f9; color: #475569; font-size: 20px; cursor: pointer;
}
.tethbe-prop-modal-box .tethbe-field-group { margin-bottom: 12px; display: flex; flex-direction: column; gap: 5px; }
.tethbe-prop-modal-box label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .4px; }
.tethbe-prop-modal-box input, .tethbe-prop-modal-box textarea {
  padding: 10px 12px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 15px;
  font-family: inherit; width: 100%; box-sizing: border-box;
}
.tethbe-btn-prop-submit {
  width: 100%; padding: 13px; background: var(--te-primary, #1a3c6e); color: #fff;
  border: none; border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer; margin-top: 4px;
}

@media (max-width: 480px) {
  .tethbe-prop-modal-box input, .tethbe-prop-modal-box textarea { font-size: 16px; }
}
