/* ═══════════════════════════════════════════════════════
   SURERENT — LISTINGS PAGE STYLES
   Advanced filtering and property display
══════════════════════════════════════════════════════ */

/* ── VIEW TOGGLE ─────────────────────────────────────── */
.sr-view-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.sr-view-btn {
  padding: 10px 20px;
  border: 1.5px solid var(--sr-border);
  border-radius: 8px;
  background: white;
  color: var(--sr-text-mid);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sr-view-btn.active,
.sr-view-btn:hover {
  border-color: var(--sr-green);
  background: var(--sr-green);
  color: white;
}

/* ── ADVANCED FILTER SIDEBAR ────────────────────────── */
.sr-filter-sidebar {
  position: sticky;
  top: 100px;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

.sr-filter-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--sr-border);
}

.sr-filter-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sr-filter-section h6 {
  font-size: 14px;
  font-weight: 700;
  color: var(--sr-navy);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── CHECKBOX/RADIO FILTERS ─────────────────────────── */
.sr-filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
}

.sr-filter-option input[type="checkbox"],
.sr-filter-option input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.sr-filter-option label {
  font-size: 14px;
  color: var(--sr-text);
  cursor: pointer;
  margin: 0;
}

/* ── PROPERTY CARD ENHANCEMENTS ─────────────────────── */
.sr-prop-card-enhanced {
  position: relative;
  overflow: hidden;
}

.sr-prop-save-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 10;
}

.sr-prop-save-btn i {
  font-size: 18px;
  color: #ccc;
  transition: all 0.3s;
}

.sr-prop-save-btn.saved i {
  color: #ef4444;
}

.sr-prop-save-btn:hover {
  transform: scale(1.1);
}

/* ── PROPERTY BADGES ─────────────────────────────────── */
.sr-prop-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
}

.sr-prop-badge.new {
  background: #3b82f6;
  color: white;
}

.sr-prop-badge.featured {
  background: var(--sr-gold, #c9a84c);
  color: white;
}

.sr-prop-badge.price-reduced {
  background: #ef4444;
  color: white;
}

/* ── IMAGE CAROUSEL WITHIN CARD ─────────────────────── */
.sr-prop-image-carousel {
  position: relative;
  height: 210px;
  overflow: hidden;
}

.sr-prop-image-carousel .carousel-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s;
}

.sr-prop-image-carousel .carousel-img.active {
  opacity: 1;
}

.sr-prop-carousel-nav {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.sr-prop-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.2s;
}

.sr-prop-carousel-dot.active {
  background: white;
  width: 20px;
  border-radius: 4px;
}

/* ── QUICK VIEW MODAL ON HOVER ──────────────────────── */
.sr-prop-quick-view {
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
  background: rgba(13,31,53,0.9);
  padding: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
  transition: bottom 0.3s;
}

.sr-prop-card:hover .sr-prop-quick-view {
  bottom: 0;
}

.sr-prop-quick-view-btn {
  padding: 8px 16px;
  border-radius: 6px;
  background: white;
  color: var(--sr-navy);
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.sr-prop-quick-view-btn:hover {
  background: var(--sr-green);
  color: white;
}

/* ── MAP VIEW TOGGLE ─────────────────────────────────── */
.sr-map-container {
  height: 600px;
  background: #f0f0f0;
  border-radius: var(--sr-radius-lg);
  position: relative;
}

.sr-map-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--sr-text-light);
}

/* ── INFINITE SCROLL / LOAD MORE ────────────────────── */
.sr-load-more-container {
  text-align: center;
  padding: 40px 0;
}

.sr-load-more-btn {
  padding: 12px 32px;
  border: 2px solid var(--sr-green);
  border-radius: 8px;
  background: white;
  color: var(--sr-green);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.sr-load-more-btn:hover {
  background: var(--sr-green);
  color: white;
}

.sr-loading-spinner {
  display: none;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 3px solid var(--sr-border);
  border-top-color: var(--sr-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── GRID VIEW LAYOUT ───────────────────────────────── */
.sr-properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.sr-properties-grid .sr-prop-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
}

@media (max-width: 1200px) {
  .sr-properties-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sr-properties-grid {
    grid-template-columns: 1fr;
  }
}

/* ── LIST VIEW LAYOUT ───────────────────────────────── */
.sr-properties-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sr-prop-card-list {
  display: flex;
  gap: 20px;
  background: white;
  border-radius: var(--sr-radius-lg);
  overflow: hidden;
  border: 1px solid var(--sr-border);
  box-shadow: var(--sr-shadow-sm);
}

.sr-prop-card-list .sr-prop-img {
  width: 300px;
  height: auto;
  flex-shrink: 0;
}

.sr-prop-card-list .sr-prop-body {
  flex: 1;
  padding: 20px;
}

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 991px) {
  .sr-filter-sidebar {
    position: static;
    margin-bottom: 24px;
  }
  
  .sr-prop-card-list {
    flex-direction: column;
  }
  
  .sr-prop-card-list .sr-prop-img {
    width: 100%;
    height: 200px;
  }
}
