.resly-grid {
  display: grid;
  /* Start with 3 items max per row. 
     Using minmax(300px, 1fr) ensures that on screens < ~960px it drops to 2 or 1 column. 
     On very wide screens it might go to 4 if we don't clamp it. 
     We can use media queries to enforce 3 columns on desktop. */
  grid-template-columns: repeat(1, 1fr);
  gap: 24px; /* Increased gap for better spacing */
  align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .resly-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .resly-grid {
    grid-template-columns: repeat(3, 1fr); /* Enforce 3 columns */
  }
}

.resly-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* --- Slider Styles --- */
.resly-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10; /* Enforce consistent aspect ratio */
  background: #f3f4f6;
  overflow: hidden;
  /* Fix for border-radius clipping with transforms on some browsers */
  mask-image: -webkit-radial-gradient(white, black);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  z-index: 1; 
}

.resly-slider__track {
  display: flex;
  height: 100%;
  width: 100%; /* Explicitly set width to container width */
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform; /* Hint for performance */
}

.resly-slider__slide {
  flex: 0 0 100%; /* Rigidly set to 100% width, don't grow/shrink */
  width: 100%;
  height: 100%;
  overflow: hidden; /* Ensure content inside slide doesn't spill */
}

.resly-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-height: 100%;
}

.resly-card__img--placeholder {
  background: linear-gradient(135deg, #e5e7eb 0%, #f3f4f6 50%, #e5e7eb 100%);
  width: 100%;
  height: 100%;
}

/* Slider Arrows */
.resly-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #374151;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.resly-slider__arrow svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.resly-card__media:hover .resly-slider__arrow {
  opacity: 1;
}

.resly-slider__arrow:hover {
  background: #fff;
  color: #000;
}

.resly-slider__arrow--prev {
  left: 10px;
}

.resly-slider__arrow--next {
  right: 10px;
}

/* Slider Dots */
.resly-slider__dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
  pointer-events: none; /* Let clicks pass through if needed, though dots themselves capture clicks */
}

.resly-slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.2s;
  pointer-events: auto;
}

.resly-slider__dot.active {
  background: #fff;
  transform: scale(1.2);
}


/* --- Card Body --- */
.resly-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.resly-card__title {
  margin: 0;
  font-size: 1.125rem; /* 18px */
  font-weight: 600;
  line-height: 1.4;
  color: #111827;
  margin-bottom: 4px;
  text-transform:  uppercase;
}

/* Meta Information (Bed/Bath/Occ) */
.resly-card__meta-inline {
  display: flex;
  align-items: center;
  gap: 24px; /* Space between groups */
  margin-top: auto; /* Push to bottom if needed */
  color: #4b5563;
  font-size: 0.875rem; /* 14px */
}

.resly-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Hide the text labels visually but keep for screen readers if possible. 
   For now, we just display:none them to clean up the layout as requested by "icons to illustrate".
*/
.resly-meta-label {
  display: none; 
}

.resly-meta-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: #374151;
}

.resly-icon {
  width: 20px;
  height: 20px;
  stroke: #6b7280; /* Neutral gray */
}
