/* ====================================
   🏪 MARKETPLACE - ESTILOS PRINCIPALES
   ==================================== */

/* Variables */
:root {
  --mkt-bg: #0a0e1a;
  --mkt-card-bg: #131720;
  --mkt-card-hover: #1a1f2e;
  --mkt-border: #232937;
  --mkt-primary: #3b82f6;
  --mkt-accent: #10b981;
  --mkt-text: #e5e7eb;
  --mkt-text-muted: #9ca3af;
  --mkt-shadow: rgba(0, 0, 0, 0.3);
}

/* Container principal del Marketplace */
#marketplaceSection {
  min-height: 100vh;
  background: var(--mkt-bg);
  padding: 80px 0 40px;
  display: none; /* Oculto por defecto, se muestra con hash #marketplace */
}

#marketplaceSection.active {
  display: block;
}

.marketplace {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header del Marketplace */
.marketplace__header {
  margin-bottom: 40px;
}

.marketplace__title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--mkt-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.marketplace__subtitle {
  font-size: 1.1rem;
  color: var(--mkt-text-muted);
  font-weight: 300;
}

/* Tabs de navegación (Venta, Renta, Tokenizadas) */
.marketplace__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--mkt-border);
  padding-bottom: 0;
}

.marketplace__tab {
  padding: 14px 28px;
  background: transparent;
  border: none;
  color: var(--mkt-text-muted);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  position: relative;
  bottom: -2px;
}

.marketplace__tab:hover {
  color: var(--mkt-text);
  background: rgba(59, 130, 246, 0.05);
}

.marketplace__tab.active {
  color: var(--mkt-primary);
  border-bottom-color: var(--mkt-primary);
  background: rgba(59, 130, 246, 0.08);
}

.marketplace__tab-icon {
  margin-right: 8px;
}

/* Content de cada tab */
.marketplace__content {
  display: none;
}

.marketplace__content.active {
  display: block;
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Layout: Filtros + Grid */
.marketplace__layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

/* Sidebar de filtros */
.marketplace__filters {
  background: var(--mkt-card-bg);
  border: 1px solid var(--mkt-border);
  border-radius: 12px;
  padding: 24px;
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.marketplace__filters-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--mkt-text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group {
  margin-bottom: 24px;
}

.filter-group__label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--mkt-text);
  margin-bottom: 10px;
  display: block;
}

.filter-group__input {
  width: 100%;
  padding: 10px 12px;
  background: var(--mkt-bg);
  border: 1px solid var(--mkt-border);
  border-radius: 8px;
  color: var(--mkt-text);
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
}

.filter-group__input:focus {
  outline: none;
  border-color: var(--mkt-primary);
}

.filter-group__range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.filter-group__checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}

.filter-group__checkbox input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.filter-group__checkbox label {
  font-size: 0.9rem;
  color: var(--mkt-text-muted);
  cursor: pointer;
}

.filter-group__select {
  width: 100%;
  padding: 10px 12px;
  background: var(--mkt-bg);
  border: 1px solid var(--mkt-border);
  border-radius: 8px;
  color: var(--mkt-text);
  font-size: 0.95rem;
  cursor: pointer;
}

.filter-btn {
  width: 100%;
  padding: 12px;
  background: var(--mkt-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
}

.filter-btn:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.filter-btn--secondary {
  background: transparent;
  border: 1px solid var(--mkt-border);
  color: var(--mkt-text-muted);
}

.filter-btn--secondary:hover {
  background: var(--mkt-card-hover);
  transform: none;
  box-shadow: none;
}

/* Grid de propiedades */
.marketplace__grid-container {
  min-height: 400px;
}

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

.marketplace__grid-info {
  font-size: 1.1rem;
  color: var(--mkt-text);
}

.marketplace__grid-info strong {
  color: var(--mkt-primary);
  font-weight: 700;
}

.marketplace__grid-sort {
  display: flex;
  align-items: center;
  gap: 12px;
}

.marketplace__grid-sort label {
  font-size: 0.95rem;
  color: var(--mkt-text-muted);
}

.marketplace__grid-sort select {
  padding: 8px 12px;
  background: var(--mkt-card-bg);
  border: 1px solid var(--mkt-border);
  border-radius: 8px;
  color: var(--mkt-text);
  cursor: pointer;
}

/* Grid de cards */
.marketplace__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}


.marketplace__grid.is-loading {
  opacity: 0.92;
}

.marketplace__grid.is-rendering {
  animation: marketplaceGridFadeIn 0.18s ease-out;
}

@keyframes marketplaceGridFadeIn {
  from {
    opacity: 0.35;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.property-card--skeleton {
  pointer-events: none;
  border-color: rgba(255, 255, 255, 0.06);
}

.property-card__image--skeleton,
.skeleton-line,
.skeleton-pill {
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.14) 50%, rgba(255,255,255,0.06) 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.1s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-line {
  height: 12px;
  margin-bottom: 10px;
}

.skeleton-line--title {
  width: 72%;
  height: 16px;
}

.skeleton-line--text {
  width: 56%;
}

.skeleton-line--price {
  width: 42%;
  height: 18px;
  margin-bottom: 14px;
}

.skeleton-row {
  display: flex;
  gap: 10px;
}

.skeleton-pill {
  width: 64px;
  height: 20px;
  border-radius: 999px;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Property Card */
.property-card {
  background: var(--mkt-card-bg);
  border: 1px solid var(--mkt-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

/* Botones de acción en cards */
.underwriting-btn,
.cockpit-btn {
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 8px;
  color: #6366f1;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.underwriting-btn:hover,
.cockpit-btn:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.25));
  border-color: rgba(99, 102, 241, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.cockpit-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.15));
  border-color: rgba(245, 158, 11, 0.4);
  color: #f59e0b;
}

.cockpit-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(251, 191, 36, 0.25));
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}
}

.property-card:hover {
  border-color: var(--mkt-primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--mkt-shadow);
}

.property-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.property-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.9);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  backdrop-filter: blur(8px);
}

.property-card__badge--featured {
  background: rgba(245, 158, 11, 0.9);
}

/* ✅ NUEVO: Badge de calidad de datos */
.property-card__quality {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
}

.property-card__quality .data-quality-badge {
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.property-card__body {
  padding: 16px;
}

.property-card__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--mkt-text);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.property-card__location {
  font-size: 0.9rem;
  color: var(--mkt-text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.property-card__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--mkt-accent);
  margin-bottom: 12px;
}

.property-card__details {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--mkt-text-muted);
}

.property-card__detail {
  display: flex;
  align-items: center;
  gap: 6px;
}

.property-card__metrics {
  display: flex;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--mkt-border);
}

.property-card__metric {
  flex: 1;
  text-align: center;
}

.property-card__metric-label {
  font-size: 0.75rem;
  color: var(--mkt-text-muted);
  display: block;
  margin-bottom: 4px;
}

.property-card__metric-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--mkt-text);
}

.property-card__metric-value--green {
  color: var(--mkt-accent);
}

/* Loading State */
.marketplace__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--mkt-text-muted);
}

.marketplace__loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--mkt-border);
  border-top-color: var(--mkt-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

/* Empty State */
.marketplace__empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--mkt-text-muted);
}

.marketplace__empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.marketplace__empty-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--mkt-text);
  margin-bottom: 8px;
}

.marketplace__empty-text {
  font-size: 1rem;
  color: var(--mkt-text-muted);
}

/* ====================================
   MODAL DE DETALLES
   ==================================== */

.property-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.property-modal.active {
  opacity: 1;
  pointer-events: all;
}

.property-modal__content {
  background: var(--mkt-card-bg);
  border: 1px solid var(--mkt-border);
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.property-modal.active .property-modal__content {
  transform: scale(1);
}

.property-modal__header {
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.property-modal__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Galería de imágenes (carrusel) */
.property-modal__gallery {
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.property-modal__gallery-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.property-modal__gallery-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.property-modal__gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-modal__gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.property-modal__gallery-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.property-modal__gallery-nav--prev {
  left: 16px;
}

.property-modal__gallery-nav--next {
  right: 16px;
}

.property-modal__gallery-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border-radius: 20px;
}

.property-modal__gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.property-modal__gallery-dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

.property-modal__gallery-counter {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 10;
}

.property-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.property-modal__close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.property-modal__body {
  padding: 32px;
}

.property-modal__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--mkt-text);
  margin-bottom: 12px;
}

.property-modal__location {
  font-size: 1.1rem;
  color: var(--mkt-text-muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.property-modal__price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--mkt-accent);
  margin-bottom: 32px;
}

.property-modal__section {
  margin-bottom: 32px;
}

.property-modal__section-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--mkt-text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.property-modal__details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.property-modal__detail-item {
  background: var(--mkt-bg);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--mkt-border);
}

.property-modal__detail-label {
  font-size: 0.85rem;
  color: var(--mkt-text-muted);
  margin-bottom: 6px;
  display: block;
}

.property-modal__detail-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--mkt-text);
}

.property-modal__detail-value--accent {
  color: var(--mkt-accent);
}

.property-modal__description {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--mkt-text-muted);
  margin-bottom: 0;
}

.property-modal__actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--mkt-border);
}

.property-modal__btn {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.property-modal__btn--primary {
  background: var(--mkt-primary);
  color: white;
}

.property-modal__btn--primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.property-modal__btn--secondary {
  background: transparent;
  border: 1px solid var(--mkt-border);
  color: var(--mkt-text);
}

.property-modal__btn--secondary:hover {
  background: var(--mkt-card-hover);
  border-color: var(--mkt-primary);
}

/* Botones de compartir */
.property-modal__share {
  display: flex;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--mkt-border);
  margin-top: 20px;
}

.property-modal__share-title {
  font-size: 0.9rem;
  color: var(--mkt-text-muted);
  margin-bottom: 12px;
  display: block;
}

.property-modal__share-btn {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--mkt-border);
  background: var(--mkt-bg);
  border-radius: 8px;
  color: var(--mkt-text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.property-modal__share-btn:hover {
  background: var(--mkt-card-hover);
  border-color: var(--mkt-primary);
  transform: translateY(-2px);
}

/* Checkbox de comparar en cards */
.property-card__compare {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  z-index: 10;
  accent-color: var(--mkt-primary);
}

/* Barra de comparación flotante */
.marketplace__compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--mkt-card-bg);
  border-top: 2px solid var(--mkt-primary);
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.marketplace__compare-bar.active {
  transform: translateY(0);
}

.marketplace__compare-bar-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.marketplace__compare-bar-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.marketplace__compare-bar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--mkt-text);
}

.marketplace__compare-bar-count {
  color: var(--mkt-primary);
  font-weight: 700;
}

.marketplace__compare-bar-actions {
  display: flex;
  gap: 12px;
}

.marketplace__compare-bar-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.marketplace__compare-bar-btn--primary {
  background: var(--mkt-primary);
  color: white;
}

.marketplace__compare-bar-btn--primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
}

.marketplace__compare-bar-btn--secondary {
  background: transparent;
  border: 1px solid var(--mkt-border);
  color: var(--mkt-text);
}

.marketplace__compare-bar-btn--secondary:hover {
  background: var(--mkt-card-hover);
}

/* Modal de comparación */
.compare-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.compare-modal.active {
  opacity: 1;
  pointer-events: all;
}

.compare-modal__content {
  background: var(--mkt-card-bg);
  border: 1px solid var(--mkt-border);
  border-radius: 16px;
  max-width: 95vw;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.compare-modal.active .compare-modal__content {
  transform: scale(1);
}

.compare-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.compare-modal__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--mkt-text);
}

.compare-modal__close {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--mkt-border);
  border-radius: 50%;
  color: var(--mkt-text);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.compare-modal__close:hover {
  background: var(--mkt-card-hover);
  transform: rotate(90deg);
}

.compare-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.compare-modal__property {
  background: var(--mkt-bg);
  border: 1px solid var(--mkt-border);
  border-radius: 12px;
  overflow: hidden;
}

.compare-modal__property-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.compare-modal__property-body {
  padding: 20px;
}

.compare-modal__property-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--mkt-text);
  margin-bottom: 12px;
}

.compare-modal__property-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--mkt-accent);
  margin-bottom: 16px;
}

.compare-modal__property-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compare-modal__property-detail {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--mkt-border);
  font-size: 0.9rem;
}

.compare-modal__property-detail-label {
  color: var(--mkt-text-muted);
}

.compare-modal__property-detail-value {
  color: var(--mkt-text);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
  .marketplace__layout {
    grid-template-columns: 1fr;
  }
  
  .marketplace__filters {
    position: static;
    max-height: none;
  }
  
  .marketplace__grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  
  .property-modal__content {
    max-width: 100%;
  }
  
  .property-modal__header {
    height: 300px;
  }
  
  .property-modal__body {
    padding: 24px;
  }
  
  .property-modal__actions {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .marketplace__title {
    font-size: 2rem;
  }
  
  .marketplace__tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .marketplace__tab {
    white-space: nowrap;
    padding: 12px 20px;
  }
  
  .marketplace__grid {
    grid-template-columns: 1fr;
  }
  
  .property-modal__title {
    font-size: 1.5rem;
  }
  
  .property-modal__price {
    font-size: 2rem;
  }
  
  .property-modal__details-grid {
    grid-template-columns: 1fr;
  }
}

/* ====================================
   📞 CONTACT MODAL
   ==================================== */

.contact-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.contact-modal.active {
  opacity: 1;
  pointer-events: all;
}

.contact-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.contact-modal__content {
  position: relative;
  background: var(--mkt-card-bg);
  border: 1px solid var(--mkt-border);
  border-radius: 20px;
  max-width: 500px;
  width: 90%;
  padding: 40px;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.contact-modal.active .contact-modal__content {
  transform: scale(1);
}

.contact-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--mkt-border);
  border-radius: 50%;
  color: var(--mkt-text);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.contact-modal__close:hover {
  background: var(--mkt-card-hover);
  transform: rotate(90deg);
}

.contact-modal__header {
  text-align: center;
  margin-bottom: 32px;
}

.contact-modal__icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.contact-modal__title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--mkt-text);
  margin-bottom: 8px;
}

.contact-modal__subtitle {
  font-size: 1rem;
  color: var(--mkt-text-muted);
  font-weight: 400;
}

.contact-modal__body {
  margin-bottom: 24px;
}

.contact-modal__description {
  font-size: 1rem;
  color: var(--mkt-text-muted);
  text-align: center;
  margin-bottom: 24px;
}

.contact-modal__options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--mkt-bg);
  border: 2px solid var(--mkt-border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  width: 100%;
}

.contact-option:hover {
  background: var(--mkt-card-hover);
  border-color: var(--mkt-accent);
  transform: translateX(8px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.contact-option__icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.contact-option__content {
  flex: 1;
}

.contact-option__title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--mkt-text);
  margin-bottom: 4px;
}

.contact-option__description {
  font-size: 0.9rem;
  color: var(--mkt-text-muted);
  margin: 0;
}

.contact-option__arrow {
  font-size: 1.5rem;
  color: var(--mkt-accent);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.contact-option:hover .contact-option__arrow {
  transform: translateX(4px);
}

/* Responsive */
@media (max-width: 768px) {
  .contact-modal__content {
    padding: 32px 24px;
  }
  
  .contact-modal__icon {
    font-size: 3rem;
  }
  
  .contact-modal__title {
    font-size: 1.5rem;
  }
  
  .contact-option {
    padding: 16px;
  }
  
  .contact-option__icon {
    font-size: 2rem;
  }
  
  .contact-option__title {
    font-size: 1.1rem;
  }
}

/* ====================================
   ❤️ FAVORITOS
   ==================================== */

.property-modal__btn--saved {
  background: #ef4444 !important;
  color: white !important;
  border-color: #ef4444 !important;
}

.property-modal__btn--saved:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
}

.favorites-counter {
  display: inline-block;
  background: #ef4444;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 6px;
  min-width: 20px;
  text-align: center;
  animation: pulse-counter 2s ease-in-out infinite;
}

@keyframes pulse-counter {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ====================================
   ❤️ PÁGINA DE FAVORITOS
   ==================================== */

#favoritesSection {
  min-height: 100vh;
  background: var(--mkt-bg);
  padding: 80px 0 40px;
  display: none;
}

.favorites {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.favorites__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
}

.favorites__title-section {
  flex: 1;
}

.favorites__title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--mkt-text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.favorites__subtitle {
  font-size: 1.1rem;
  color: var(--mkt-text-muted);
  font-weight: 300;
}

.favorites__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.favorites__btn {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.favorites__btn--primary {
  background: var(--mkt-accent);
  color: white;
}

.favorites__btn--primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.favorites__btn--secondary {
  background: transparent;
  border: 1px solid var(--mkt-border);
  color: var(--mkt-text);
}

.favorites__btn--secondary:hover {
  background: var(--mkt-card-hover);
  border-color: var(--mkt-accent);
}

/* Grid */
.favorites__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* Favorite Card */
.favorite-card {
  background: var(--mkt-card-bg);
  border: 1px solid var(--mkt-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.favorite-card:hover {
  border-color: var(--mkt-accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.favorite-card__image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.favorite-card__remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(239, 68, 68, 0.9);
  backdrop-filter: blur(8px);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.favorite-card__remove:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.favorite-card__body {
  padding: 20px;
}

.favorite-card__title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--mkt-text);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.favorite-card__location {
  font-size: 0.9rem;
  color: var(--mkt-text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.favorite-card__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--mkt-success);
  margin-bottom: 12px;
}

.favorite-card__meta {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--mkt-text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--mkt-border);
}

.favorite-card__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.favorite-card__saved-date {
  font-size: 0.8rem;
  color: var(--mkt-text-muted);
  margin-top: 8px;
}

/* Empty state */
.favorites__empty {
  text-align: center;
  padding: 80px 20px;
  max-width: 500px;
  margin: 0 auto;
}

.favorites__empty-icon {
  font-size: 5rem;
  margin-bottom: 24px;
  opacity: 0.5;
}

.favorites__empty-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--mkt-text);
  margin-bottom: 16px;
}

.favorites__empty-text {
  font-size: 1.1rem;
  color: var(--mkt-text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .favorites__title {
    font-size: 2rem;
  }
  
  .favorites__grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
  }
  
  .favorites__header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .favorites__actions {
    width: 100%;
    flex-direction: column;
  }
  
  .favorites__btn {
    width: 100%;
    justify-content: center;
  }
}
