/* In-card photo slider (shared/photo-slider.js), used by the homepage
   Featured Properties cards and the /properties/ listing cards.
   The slider fills its positioned parent (.fp-photo / .card-image-wrap), so
   the card keeps its own fixed aspect ratio or height. */
.ps {
  position: absolute;
  inset: 0;
  isolation: isolate;          /* badges/labels placed after it stay on top */
}
.ps-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;   /* a photo swipe never drags the outer carousel */
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ps-track::-webkit-scrollbar { display: none; }
.ps-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;            /* a hover zoom on the photo stays inside its slide */
  display: block;
  color: inherit;
  text-decoration: none;
  -webkit-user-drag: none;
}
.ps-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}
.ps-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 34px;
  height: 34px;
  margin-top: -17px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: #003DA5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
}
.ps-btn:hover { background: #fff; }
.ps-prev { left: 8px; }
.ps-next { right: 8px; }
.ps-btn:focus-visible {
  outline: 3px solid #C5A55A;
  outline-offset: 2px;
  opacity: 1;
}
/* Desktop (mouse): arrows appear on hover / keyboard focus.
   Touch screens: always visible. */
@media (hover: hover) and (pointer: fine) {
  .ps-btn { opacity: 0; }
  .ps:hover .ps-btn, .ps:focus-within .ps-btn { opacity: 1; }
}
.ps-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  z-index: 2;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.ps-dot {
  pointer-events: auto;
  width: 14px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ps-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  box-shadow: 0 0 3px rgba(0,0,0,0.45);
  transition: background 0.2s, transform 0.2s;
}
.ps-dot.on::before { background: #fff; transform: scale(1.35); }
@media (prefers-reduced-motion: reduce) {
  .ps-btn, .ps-dot::before { transition: none; }
}
