/* v2.9.38 — property detail features: gallery strip, floor plans,
   amenities, lightbox navigation. Loaded only on property.php, and
   only when at least one feature has content. Light theme, golden
   #CCA814 accents. No animation: the gallery is user-controlled only,
   so there is nothing for reduced-motion settings to suppress. */

/* Gallery strip docked inside the hero overlay, under the title/price. */
.property-gallery { margin-top: 18px; }
/* The existing .image-expand-button rules set BOTH top (line 581 block)
   and bottom (base rule), which stretches an absolutely positioned
   button to full frame height. This button was never rendered before
   v2.9.38, so the conflict was invisible. Pin it top-right, header
   height + 21px down (v2.9.39: 130 + 21 = 151px; was 100px for the
   79px header) so it clears the sticky translucent header that
   overlays the hero top (bottom-right collides with the fixed chatbot
   launcher). The !important flags are needed because the ≤800px
   override uses them, and the [data-gallery-expand] attribute keeps
   this scoped to the gallery button only. */
.property-detail-stacked .property-detail-image .image-expand-button[data-gallery-expand] {
  top: 151px !important;
  bottom: auto !important;
  right: 20px !important;
}
/* v2.9.39 — mobile header is 151px tall, so the button sits 172px down
   on the stacked (≤800px) hero.
   v2.9.45: the slim mobile header is 89px, so at ≤760px the button
   sits 89px + 21px = 110px down. The 761–800px band keeps 172px: there
   the header is still the 130px desktop header, and 172px over-clears
   it exactly as it did in v2.9.44.
   v2.9.46: the mobile header is 97px (bigger logo), so at ≤760px the
   button sits 97px + 21px = 118px down. */
@media (max-width: 800px) {
  .property-detail-stacked .property-detail-image .image-expand-button[data-gallery-expand] {
    top: 172px !important;
  }
}
@media (max-width: 760px) {
  .property-detail-stacked .property-detail-image .image-expand-button[data-gallery-expand] {
    top: 118px !important;
  }
}
.property-gallery-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.property-gallery-thumb {
  padding: 0; line-height: 0; cursor: pointer; overflow: hidden;
  width: 72px; height: 52px; border-radius: 9px;
  border: 2px solid rgba(255, 255, 255, .78); background: #22231f;
}
.property-gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.property-gallery-thumb.is-active { border-color: #CCA814; }
.property-gallery-thumb:focus-visible { outline: 2px solid #CCA814; outline-offset: 2px; }
#gallery-main { cursor: zoom-in; }

/* Floor plans. */
.property-floorplans-section h2 { margin: 8px 0 10px; }
.property-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.property-plan-card {
  appearance: none; display: block; width: 100%; padding: 0; text-align: left;
  cursor: pointer; background: #fff; border: 1px solid #e5e8eb; border-radius: 14px; overflow: hidden;
}
.property-plan-card:focus-visible { outline: 2px solid #CCA814; outline-offset: 2px; }
.property-plan-drawing { display: block; background: #f6f3ec; border-bottom: 1px solid #ece9e0; aspect-ratio: 4 / 3; }
.property-plan-drawing img { display: block; width: 100%; height: 100%; object-fit: contain; }
.property-plan-meta { display: block; padding: 16px 18px; }
.property-plan-meta strong { display: block; font-size: 15px; color: #20211f; }
.property-plan-meta span { display: block; font-size: 12px; color: #72746b; margin-top: 4px; }
.property-plan-meta .property-plan-view { color: #7A5F00; font-weight: 700; }

/* Amenities. */
.property-amenities-section h2 { margin: 8px 0 10px; }
.property-amenity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.property-amenity {
  display: flex; align-items: center; gap: 13px; background: #fff;
  border: 1px solid #e5e8eb; border-radius: 12px; padding: 16px 18px;
  font-weight: 700; font-size: 15px; color: #20211f;
}
.property-amenity-icon {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  background: #FBF3D0; border: 1px solid #E7D48A; color: #7A5F00;
  display: flex; align-items: center; justify-content: center;
}
.property-amenity-icon svg { width: 22px; height: 22px; }

/* Lightbox previous/next + counter. Buttons start hidden; the script
   reveals them only when the open set has more than one image. */
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .35); background: rgba(20, 21, 18, .72);
  color: #fff; font-size: 26px; line-height: 1; display: grid; place-items: center;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-nav[hidden] { display: none; }
.lightbox-counter {
  position: absolute; left: 16px; bottom: 12px; z-index: 3;
  color: #fff; font-size: 12px; padding: 5px 10px; border-radius: 999px;
  background: rgba(20, 21, 18, .72);
}
.lightbox-counter[hidden] { display: none; }

@media (max-width: 980px) {
  .property-amenity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .property-gallery { margin-top: 14px; }
  .property-gallery-thumb { width: 60px; height: 44px; }
  .property-plan-grid { grid-template-columns: 1fr; }
  .property-amenity-grid { grid-template-columns: 1fr; }
}
