/* Design System & Root Variables */
:root {
  /* Colors - Light Theme (Default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-overlay: rgba(15, 23, 42, 0.4);
  --border-color: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-light: #64748b;
  
  --primary: #dc2626; /* Rojo principal vibrante y premium */
  --primary-hover: #b91c1c;
  --primary-light: #fef2f2;
  --accent: #e11d48; /* Coral/Rose de realce */
  --accent-hover: #be123c;
  --whatsapp-green: #25d366;
  --whatsapp-green-hover: #128c7e;
  --star-gold: #f59e0b;
  --danger: #ef4444;
  --success: #22c55e;
  
  /* Layout & Spacing */
  --header-height: 80px;
  --categories-height: 70px;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
  
  /* Fonts */
  --font-title: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
body.dark-theme {
  --bg-primary: #0f172a;
  --bg-secondary: #0b0f19;
  --bg-card: #1e293b;
  --bg-overlay: rgba(2, 6, 23, 0.7);
  --border-color: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-light: #94a3b8;
  
  --primary-light: rgba(220, 38, 38, 0.15);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

/* Basic Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--text-primary);
  font-weight: 600;
}

a {
  text-decoration: none;
  color: inherit;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

ul {
  list-style: none;
}

/* Utilities */
.hidden {
  display: none !important;
}

.text-center { text-align: center; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--text-light); }
.font-semibold { font-weight: 600; }
.margin-top-sm { margin-top: 8px; }
.margin-top-md { margin-top: 16px; }
.margin-top-lg { margin-top: 24px; }
.margin-bottom-sm { margin-bottom: 8px; }
.margin-bottom-md { margin-bottom: 16px; }
.btn-block { width: 100%; display: flex; justify-content: center; }

/* Buttons */
.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--border-color);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color var(--transition-fast);
}

.btn-secondary:hover {
  background-color: rgba(100, 116, 139, 0.15);
}

.btn-secondary-outline {
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-secondary-outline:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

/* App Header Styling */
.main-header {
  height: var(--header-height);
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-container {
  max-width: 1600px;
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo-area {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.logo-area:hover {
  transform: scale(1.04);
}

.logo-area:active {
  transform: scale(0.97);
}

.logo-img {
  height: 48px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.07));
  transition: filter var(--transition-normal), transform var(--transition-fast);
}

/* Dark mode: logo turns pure white with subtle elegant drop shadow */
body.dark-theme .logo-img {
  filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(255, 255, 255, 0.12));
}

.modal-brand-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  margin: 0 auto 12px auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
  transition: filter var(--transition-normal);
}

body.dark-theme .modal-brand-logo {
  filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(255, 255, 255, 0.12));
}

.logo-text {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: center;
}

.logo-text span {
  color: var(--text-primary);
  transition: color var(--transition-normal);
  display: inline-flex;
  align-items: center;
}

/* Publication Type Switcher (Alquileres / Ventas) */
.type-switcher {
  display: flex;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: 30px;
  gap: 2px;
  align-items: center;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.type-btn {
  padding: 8px 16px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  border-radius: 24px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.type-btn:hover {
  color: var(--text-primary);
}

.type-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 576px) {
  .type-switcher {
    padding: 2px;
  }
  .type-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Search Bar */
.search-bar-wrapper {
  position: relative;
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 40px;
  padding: 8px 8px 8px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
}

.search-bar:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(220, 38, 38, 0.4);
}

.search-input-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 16px;
  text-align: left;
}

.search-input-btn:first-of-type {
  padding-left: 0;
}

.search-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

.search-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 2px;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-divider {
  width: 1px;
  height: 24px;
  background-color: var(--border-color);
}

.search-button {
  background-color: var(--primary);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast);
}

.search-button i {
  width: 18px;
  height: 18px;
}

.search-bar:hover .search-button {
  background-color: var(--primary-hover);
}

/* Search Dropdown Panel */
.search-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-xl);
  padding: 24px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: slideDownFade var(--transition-normal);
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.search-dropdown-section h3 {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.search-input-container {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  background-color: var(--bg-secondary);
  gap: 10px;
  color: var(--text-light);
}

.search-input-container input {
  width: 100%;
  color: var(--text-primary);
}

.price-slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.price-slider-container span {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
}

.price-slider-container input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
  accent-color: var(--primary);
  cursor: pointer;
}

.price-slider-value {
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  color: var(--text-secondary);
}

.price-slider-value strong {
  color: var(--primary);
}

.search-dropdown-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: 8px;
}

.btn-clear-filters {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  transition: background-color var(--transition-fast);
}

.btn-clear-filters:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-apply-filters {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--border-radius-sm);
  transition: opacity var(--transition-fast);
}

.btn-apply-filters:hover {
  opacity: 0.9;
}

/* Header Right Options */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
  transform: scale(1.05);
}

/* User Menu & Dropdown */
.user-menu-wrapper {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 6px 6px 6px 14px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}

.user-menu-btn:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(220, 38, 38, 0.4);
}

.user-avatar {
  background-color: var(--text-light);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar i {
  width: 16px;
  height: 16px;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 110;
  display: flex;
  flex-direction: column;
  animation: slideUpFade var(--transition-normal);
}

.user-dropdown-group {
  padding: 6px 0;
  display: flex;
  flex-direction: column;
}

.user-dropdown-group + .user-dropdown-group {
  border-top: 1px solid var(--border-color);
}

.dropdown-item {
  text-align: left;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.dropdown-item:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 6px 0;
}

.admin-badge {
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  margin: 4px 16px 8px;
  border-radius: 20px;
  display: inline-block;
  align-self: flex-start;
  text-transform: uppercase;
}

/* Categories Bar */
.categories-bar {
  height: var(--categories-height);
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  transition: all var(--transition-normal);
}

.categories-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}

.categories-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 0 10px;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.category-item i {
  width: 22px;
  height: 22px;
  transition: transform var(--transition-fast);
}

.category-item span {
  font-size: 12px;
  font-weight: 600;
}

.category-item:hover {
  color: var(--text-primary);
  border-bottom-color: var(--border-color);
}

.category-item:hover i {
  transform: translateY(-2px);
}

.category-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Main Full-Width Layout */
.main-layout {
  flex: 1;
  position: relative;
  height: calc(100vh - var(--header-height) - var(--categories-height));
  overflow: hidden;
}

/* Listings Column */
.listings-section {
  padding: 24px 40px;
  overflow-y: auto;
  height: 100%;
  width: 100%;
  background-color: var(--bg-secondary);
  position: relative;
  z-index: 2;
}

.listings-header {
  margin-bottom: 24px;
}

.listings-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.listings-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.filter-tag {
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-tag button {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  border-radius: 50%;
  transition: background-color var(--transition-fast);
}

.filter-tag button:hover {
  background-color: rgba(220, 38, 38, 0.2);
}

.filter-tag button i {
  width: 12px;
  height: 12px;
}

/* Listings Container (holds section blocks and flat grids) */
.listings-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

/* Listing Property Card */
.property-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  cursor: pointer;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Card Image Slider */
.card-img-wrapper {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  background-color: #e2e8f0;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.property-card:hover .card-img {
  transform: scale(1.03);
}

.card-favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  z-index: 10;
}

.card-favorite-btn:hover {
  transform: scale(1.1);
  color: var(--accent);
}

.card-favorite-btn.active {
  color: var(--accent);
  background-color: #ffffff;
}

.card-favorite-btn.active i {
  fill: var(--accent);
}

.card-location-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background-color: var(--bg-secondary);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.card-location-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.card-category-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background-color: rgba(15, 23, 42, 0.7);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  z-index: 10;
  text-transform: uppercase;
}

/* Card Info */
.card-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.card-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-rating i {
  color: var(--star-gold);
  fill: var(--star-gold);
  width: 14px;
  height: 14px;
}

.card-location {
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.card-location i {
  width: 13px;
  height: 13px;
}

.card-price-row {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-price {
  font-size: 15px;
  color: var(--text-secondary);
}

.card-price strong {
  color: var(--text-primary);
  font-size: 18px;
  font-family: var(--font-title);
}

.card-price-unit {
  font-size: 12px;
  color: var(--text-light);
}

/* Map Section (Hidden by default, shown via toggle class) */
.map-section {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity var(--transition-fast), visibility var(--transition-fast);
}

#map {
  width: 100%;
  height: 100%;
}

/* Customizing Leaflet Popups to match modern design */
.leaflet-popup-content-wrapper {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-radius: var(--border-radius-md) !important;
  box-shadow: var(--shadow-xl) !important;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 220px !important;
}

.leaflet-popup-tip {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color);
}

.map-popup-card {
  cursor: pointer;
}

.map-popup-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.map-popup-info {
  padding: 12px;
}

.map-popup-title {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.2;
}

.map-popup-price {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.map-popup-price strong {
  color: var(--primary);
}

/* Leaflet Custom Marker Price tags */
.custom-price-marker {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 20px;
  padding: 4px 10px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 12px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.custom-price-marker:hover, .custom-price-marker.active {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  transform: scale(1.08);
  border-color: var(--text-primary);
  z-index: 1000 !important;
}

.custom-price-marker.favorite-marker {
  border: 1.5px solid var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 10px rgba(244, 63, 94, 0.25);
  font-weight: 800;
}

.custom-price-marker.favorite-marker:hover, .custom-price-marker.favorite-marker.active {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* Modal Styling Base */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-overlay);
  backdrop-filter: blur(4px);
  z-index: 2000; /* Higher than Leaflet's controls (1000) to prevent overlap */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn var(--transition-fast);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  position: relative;
  display: flex;
  flex-direction: column;
  animation: scaleUp var(--transition-normal);
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
}

.modal-close-btn:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
  transform: scale(1.05);
}

/* Detail Modal Container */
.detail-modal-container {
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.detail-modal-content {
  overflow-y: auto;
  max-height: calc(90vh - 2px);
  display: flex;
  flex-direction: column;
}

/* Photo Gallery Slider */
.detail-gallery-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #0b0f19;
  overflow: hidden;
  flex-shrink: 0; /* Prevents container from collapsing, avoiding text overlap */
}

.detail-slides-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform var(--transition-slow);
}

.detail-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.85);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  z-index: 10;
}

.slider-arrow:hover {
  background-color: #ffffff;
  transform: translateY(-50%) scale(1.05);
}

.arrow-left { left: 16px; }
.arrow-right { right: 16px; }

.slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slider-dot.active {
  background-color: #ffffff;
  transform: scale(1.2);
  width: 18px;
  border-radius: 4px;
}

/* Detail Info Layout */
.detail-layout {
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .detail-layout {
    grid-template-columns: 60% 40%;
  }
}

.detail-header-block {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.detail-category-badge {
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.detail-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
}

.detail-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.detail-location i {
  color: var(--primary);
}

.detail-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
}

.detail-rating i {
  color: var(--star-gold);
  fill: var(--star-gold);
  width: 16px;
  height: 16px;
}

.detail-reviews {
  color: var(--text-light);
  font-weight: 400;
}

.detail-section {
  margin-bottom: 24px;
}

.detail-section h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.detail-section p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 15px;
}

.detail-amenities-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.detail-amenity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.detail-amenity-item i {
  color: var(--primary);
  width: 16px;
  height: 16px;
}

/* Booking Card (Right sidebar in Modal) */
.booking-card {
  position: sticky;
  top: 24px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
  background-color: var(--bg-card);
}

.booking-price-row {
  margin-bottom: 16px;
}

.booking-price {
  font-size: 15px;
  color: var(--text-secondary);
}

.booking-price strong {
  font-size: 24px;
  color: var(--text-primary);
  font-family: var(--font-title);
}

.booking-form-box {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border-color);
}

.booking-direct-hint {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  font-weight: 500;
}

.booking-info-row {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.4;
}

.booking-info-row i {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.btn-booking-whatsapp {
  background-color: var(--whatsapp-green);
  color: #ffffff;
  padding: 14px 20px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
}

.btn-booking-whatsapp:hover {
  background-color: var(--whatsapp-green-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(37, 211, 102, 0.3);
}

.booking-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-booking-gmaps {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  font-size: 14px;
  text-decoration: none;
}

.btn-booking-gmaps:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-detail-location-action {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  font-size: 14px;
}

.btn-detail-location-action:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.detail-location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.detail-location-row .detail-location {
  margin-bottom: 0;
}

.btn-detail-location-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--primary-light);
  color: var(--primary);
  border: none;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-detail-location-inline:hover {
  background-color: var(--primary);
  color: #ffffff;
}

/* Login Modal */
.login-modal-container {
  width: 100%;
  max-width: 440px;
  border-radius: var(--border-radius-md);
  padding: 32px;
}

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-icon {
  background-color: var(--primary-light);
  color: var(--primary);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.login-logo-icon i {
  width: 28px;
  height: 28px;
}

.login-header h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.login-header p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.4;
}

.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control, .admin-form input, .admin-form select, .admin-form textarea {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  width: 100%;
  transition: all var(--transition-fast);
}

.form-control:focus, .admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.error-message {
  font-size: 12px;
  color: var(--danger);
  background-color: rgba(239, 68, 68, 0.1);
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 18px;
  font-weight: 500;
}

/* Admin Dashboard Section styling */
.admin-section {
  width: 100%;
  height: 100%;
  background-color: var(--bg-secondary);
}

.admin-dashboard {
  display: grid;
  grid-template-columns: 1fr;
  height: 100%;
}

@media (min-width: 768px) {
  .admin-dashboard {
    grid-template-columns: 240px 1fr;
  }
}

.admin-sidebar {
  background-color: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.admin-avatar {
  background-color: var(--primary-light);
  color: var(--primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-avatar i {
  width: 20px;
  height: 20px;
}

.admin-info h3 {
  font-size: 14px;
  font-weight: 700;
}

.admin-info p {
  font-size: 11px;
  color: var(--text-light);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  transition: all var(--transition-fast);
}

.admin-nav-item:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.admin-nav-item.active {
  background-color: var(--primary);
  color: #ffffff;
}

.admin-content {
  padding: 32px;
  overflow-y: auto;
  height: 100%;
}

.admin-content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-content-header h2 {
  font-size: 22px;
}

/* Admin Table styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.admin-table th {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table-img {
  width: 50px;
  height: 38px;
  object-fit: cover;
  border-radius: 4px;
  background-color: #cbd5e1;
}

.admin-table-actions {
  display: flex;
  gap: 8px;
}

.btn-action {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.btn-action-edit {
  color: var(--primary);
}

.btn-action-edit:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
}

.btn-action-delete {
  color: var(--danger);
}

.btn-action-delete:hover {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}

/* Admin Form design */
.admin-form {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 992px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.form-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-image-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-help-text {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}

.amenities-checkboxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  max-height: 140px;
  overflow-y: auto;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input {
  width: auto;
  accent-color: var(--primary);
}

/* Admin map picker coordinates selector */
#form-map-picker {
  height: 200px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  z-index: 1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 18px;
}

/* Toggle View State */
.main-layout.show-map-view .listings-section {
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0;
  z-index: 0 !important;
}

.main-layout.show-map-view .map-section {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 10 !important;
}

/* Floating View Toggle Button */
.floating-view-toggle {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--text-primary);
  color: var(--bg-primary);
  padding: 12px 22px;
  border-radius: 30px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
  z-index: 150;
  transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.floating-view-toggle:hover {
  transform: translateX(-50%) scale(1.05);
  background-color: #1e293b;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
}

.floating-view-toggle:active {
  transform: translateX(-50%) scale(0.96);
}

.floating-view-toggle i {
  width: 16px;
  height: 16px;
}

/* Mobile and Responsive Adjustments */
@media (max-width: 991px) {
  :root {
    --header-height: 70px;
    --categories-height: 60px;
  }

  .header-container {
    padding: 0 16px;
  }

  .listings-section {
    padding: 20px 16px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 110px;
    --categories-height: 54px;
  }

  .main-header {
    height: var(--header-height);
  }

  .header-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    gap: 6px 0;
    height: 100%;
  }

  /* Row 1 Layout */
  .logo-area {
    order: 1;
    display: flex;
    align-items: center;
  }

  .logo-img {
    height: 38px;
    max-width: 135px;
  }

  .logo-text {
    font-size: 18px;
  }

  .logo-house-letter,
  .logo-text span > svg.logo-house-letter {
    width: 17px;
    height: 17px;
  }

  /* Type Switcher in Row 1 */
  .type-switcher {
    order: 2;
    padding: 2px;
    gap: 2px;
  }

  .type-btn {
    padding: 4px 10px;
    font-size: 11px;
  }

  /* Header right actions in Row 1 */
  .header-right {
    order: 3;
    gap: 6px;
  }

  .theme-toggle-btn {
    width: 34px;
    height: 34px;
  }

  .user-menu-btn {
    padding: 3px 3px 3px 8px;
    gap: 4px;
  }

  .user-avatar {
    width: 26px;
    height: 26px;
  }

  /* Row 2 Layout: Full Width Search Bar */
  .search-bar-wrapper {
    order: 4;
    width: 100%;
    margin-top: 2px;
  }

  .search-bar {
    padding: 5px 6px 5px 14px;
    border-radius: 30px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
  }

  .search-input-btn {
    padding: 0 4px;
    flex: 1;
  }

  .search-title {
    font-size: 11px;
    font-weight: 700;
  }

  .search-desc {
    display: inline-block;
    font-size: 11px;
    color: var(--text-light);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .search-divider {
    display: block;
    width: 1px;
    height: 18px;
    background-color: var(--border-color);
  }

  .search-button {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
  }

  .search-button i {
    width: 14px;
    height: 14px;
  }

  /* Search Dropdown overlay on mobile */
  .search-dropdown {
    position: fixed;
    top: calc(var(--header-height) + 4px);
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    transform: none;
    padding: 16px;
    z-index: 1000;
  }

  /* Categories Bar */
  .categories-bar {
    height: var(--categories-height);
    top: var(--header-height);
  }

  .categories-container {
    padding: 0 12px;
    gap: 14px;
  }

  .category-item {
    padding: 2px 0 6px;
    gap: 4px;
  }

  .category-item i {
    width: 18px;
    height: 18px;
  }

  .category-item span {
    font-size: 11px;
  }

  /* Main Layout */
  .main-layout {
    height: calc(100vh - var(--header-height) - var(--categories-height));
    height: calc(100dvh - var(--header-height) - var(--categories-height));
  }

  .listings-section {
    padding: 12px 10px 80px 10px;
  }

  .section-block {
    margin-bottom: 24px;
    gap: 10px;
  }

  .section-block-title {
    font-size: 15px;
  }

  .section-block-title i {
    width: 16px;
    height: 16px;
  }

  .card-img-wrapper {
    aspect-ratio: 4 / 3;
  }

  .card-info {
    padding: 8px 10px;
  }

  .card-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
  }

  .card-location {
    font-size: 10px;
    gap: 3px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .card-location i {
    width: 11px;
    height: 11px;
  }

  .card-price {
    font-size: 11px;
  }

  .card-price strong {
    font-size: 13px;
  }

  .card-category-badge {
    font-size: 9px;
    padding: 2px 6px;
    bottom: 6px;
    left: 6px;
  }

  .card-tag-badge {
    font-size: 9px;
    padding: 2px 6px;
    top: 6px;
    left: 6px;
    gap: 2px;
  }

  .card-favorite-btn {
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
  }

  .card-favorite-btn i {
    width: 14px;
    height: 14px;
  }

  /* Floating View Toggle Button */
  .floating-view-toggle {
    bottom: 16px;
    padding: 10px 18px;
    font-size: 13px;
  }

  /* Modals */
  .modal-overlay {
    padding: 10px;
  }

  .detail-modal-container {
    max-height: 94dvh;
    border-radius: var(--border-radius-md);
  }

  .detail-modal-content {
    max-height: calc(94dvh - 2px);
  }

  .detail-gallery-slider {
    aspect-ratio: 16 / 10;
  }

  .detail-layout {
    padding: 16px;
    gap: 20px;
    grid-template-columns: 1fr;
  }

  .booking-card {
    position: relative;
    top: 0;
    padding: 16px;
  }

  .login-modal-container {
    padding: 24px 16px;
  }

  /* Admin section */
  .admin-container {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
  }

  .admin-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
  }

  .admin-nav-item {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 13px;
  }

  .admin-content {
    padding: 16px 12px;
  }
}

@media (max-width: 400px) {
  .logo-img {
    height: 32px;
    max-width: 110px;
  }

  .logo-text {
    font-size: 16px;
  }

  .type-btn {
    padding: 3px 8px;
    font-size: 10px;
  }

  .search-desc {
    display: none;
  }

  .header-container {
    padding: 6px 8px;
  }
}

/* Image Upload & Preview Styles */
.form-image-upload-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 16px;
  background-color: var(--bg-card);
  border: 1px dashed var(--primary);
  color: var(--primary);
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-upload:hover {
  background-color: var(--primary-light);
  border-style: solid;
}

.upload-feedback {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.preview-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-color: var(--bg-body);
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-item .btn-remove-img {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(244, 63, 94, 0.9);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

.preview-item .btn-remove-img:hover {
  background-color: rgba(244, 63, 94, 1);
}

/* Section Blocks for Explore Feed (Destacados, Nuevos, Todos) */
.section-block {
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-block:last-child {
  margin-bottom: 12px;
}

.section-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.section-block-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.section-block-title i {
  width: 20px;
  height: 20px;
}

.section-block-title.title-destacados {
  color: #f59e0b;
}

.section-block-title.title-nuevos {
  color: #3b82f6;
}

.section-block-count {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

@media (min-width: 600px) {
  .section-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1100px) {
  .section-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

@media (min-width: 1600px) {
  .section-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

/* Card Special Badges */
.card-tag-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.card-tag-badge.badge-destacado {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
}

.card-tag-badge.badge-nuevo {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
}

/* Admin Quick Toggles in Table */
.admin-section-badges {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-toggle-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  background-color: var(--bg-secondary);
  color: var(--text-light);
  transition: all var(--transition-fast);
}

.btn-toggle-badge:hover {
  transform: scale(1.03);
}

.btn-toggle-badge.active-destacado {
  background-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}

.btn-toggle-badge.active-nuevo {
  background-color: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}

/* Empty State Component */
.no-properties {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  margin: 24px auto;
  box-shadow: var(--shadow-sm);
  max-width: 480px;
  width: 100%;
}

.no-prop-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.no-prop-icon-wrapper i,
.no-prop-icon-wrapper svg {
  width: 28px;
  height: 28px;
}

.no-properties h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.no-properties p {
  font-size: 14px;
  color: var(--text-light);
  max-width: 320px;
  line-height: 1.5;
  margin-bottom: 20px;
}

