/* recently-viewed.css - Estilos para sección de vistos recientemente */

.recently-viewed-section {
  margin: 2rem 0;
  padding: 0;
}

.recently-viewed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.recently-viewed-header h2 {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.recently-viewed-header h2 svg {
  color: #16a34a;
}

.btn-clear-history {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clear-history:hover {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

.recently-viewed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.recently-viewed-card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.recently-viewed-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: #16a34a;
}

.rv-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: #f1f5f9;
  overflow: hidden;
}

.rv-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.recently-viewed-card:hover .rv-image-wrapper img {
  transform: scale(1.05);
}

.rv-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.rv-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rv-badge--venta {
  background: #dcfce7;
  color: #15803d;
}

.rv-badge--alquiler {
  background: #dbeafe;
  color: #1d4ed8;
}

.rv-content {
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.rv-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rv-location {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.rv-location::before {
  content: '📍';
  font-size: 0.65rem;
}

.rv-price {
  font-size: 1rem;
  font-weight: 700;
  color: #16a34a;
  margin-top: 0.25rem;
}

.rv-meta {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
  .recently-viewed-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
  }
  
  .recently-viewed-header h2 {
    font-size: 1.1rem;
  }
  
  .rv-content {
    padding: 0.75rem;
  }
  
  .rv-title {
    font-size: 0.8rem;
  }
  
  .rv-price {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .recently-viewed-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .rv-content {
    padding: 0.625rem;
  }
  
  .rv-title {
    font-size: 0.75rem;
  }
  
  .rv-price {
    font-size: 0.85rem;
  }
}
