body {
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
    color: var(--gray-700);
}

/* Mejora de tarjetas de propiedades */
.property-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 25%, #fafafa 100%);
    display: flex;
    flex-direction: column;
    height: 100%; /* Asegura altura completa */
}

/* Estilos para los enlaces de propiedades */
.property-link {
    display: block;
    position: relative;
    cursor: pointer;
}

.property-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Estilos para las imágenes de placeholder */
.carousel-slide img {
    transition: opacity 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide .placeholder-image {
    background-color: #f5f5f5;
    border: 1px dashed #cccccc;
    opacity: 0.8;
}

/* Eliminar la clase placeholder-image cuando la imagen real se carga */
.carousel-slide img:not(.placeholder-image) {
    opacity: 1;
}

/* Indicador de carga para imágenes */
.image-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 5;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Estilo para imágenes en carga */
.carousel-slide img.loading {
    opacity: 0.5;
}

.property-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 30px -5px rgba(0, 0, 0, 0.15), 0 10px 15px -5px rgba(0, 0, 0, 0.07);
}

.property-image {
    height: 100%;
    overflow: hidden;
    border-radius: 0.75rem 0.75rem 0 0;
    position: relative;
}

.property-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 50%);
    z-index: 1;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.property-card:hover .property-image::after {
    opacity: 0.4;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

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

.property-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary-600);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    backdrop-filter: blur(4px);
    display: none; /* Ocultar badge antiguo si existe */
}

/* Estilo para el botón de favoritos en las tarjetas de propiedades */
.favorito-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* position: absolute; eliminado para que funcione con Flexbox */
    /* top, right, left, z-index eliminados */
    transition: all 0.2s ease;
    border: none; /* Asegurar que no tenga borde */
    padding: 0; /* Eliminar padding que podría afectar la forma */
    cursor: pointer; /* Mejor experiencia de usuario */
}

.favorito-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.favorito-btn i {
    font-size: 16px; /* Tamaño adecuado para el icono */
    margin: 0; /* Eliminar márgenes que podrían descentrar */
}

/* Ajustar color del icono de corazón en estado normal */
.favorito-btn i.far.fa-heart {
    color: var(--gray-500); /* Gris más visible y consistente */
}

/* Mantener el color rojo para el estado activo */
.favorito-btn i.fas.fa-heart.text-red-500 {
    color: var(--red-500);
}

/* Sección hero mejorada */
.hero-section {
    background-image: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.4)), url('https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, rgba(243, 244, 246, 1) 0%, rgba(243, 244, 246, 0) 100%);
    z-index: 2;
}

.loading-icon {
    width: 40px;
    height: 40px;
    border: 5px solid rgba(79, 70, 229, 0.1);
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Iconos de características mejorados */
.feature-icon {
    background-color: var(--primary-50);
    color: var(--primary-700);
    width: 68px;
    height: 68px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-right: 1.25rem;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    top: -50%;
    left: -50%;
    opacity: 0;
    transition: all 0.5s ease;
}

.feature-icon:hover::after {
    top: -30%;
    left: -30%;
    opacity: 0.8;
}

/* Barra de búsqueda mejorada */
.search-bar {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    padding: 1.75rem;
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateY(0);
    transition: transform 0.3s ease;
    z-index: 3;
    position: relative;
}

.search-bar:hover {
    transform: translateY(-5px);
}

/* Títulos de secciones más elegantes */
.section-title {
    position: relative;
    display: inline-block;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-600) 0%, var(--primary-400) 100%);
    border-radius: 2px;
}

/* Botón de volver arriba mejorado */
.scroll-top-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: var(--primary-600);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.scroll-top-btn.visible {
    opacity: 1;
    transform: scale(1);
}

.scroll-top-btn:hover {
    background-color: var(--primary-700);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

/* Estilos para formularios */
input, select, textarea {
    transition: all 0.3s ease;
    border: 1px solid rgba(209, 213, 219, 0.8);
}

input:focus, select:focus, textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Estilos para botones principales */
.btn-primary {
    background: var(--primary-600);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(24, 144, 255, 0.3);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background-color: var(--primary-700);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(24, 144, 255, 0.4);
}

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

.btn-primary i {
    margin-right: 8px;
}

/* Mejorar el estilo del botón de llamado a la acción */
.property-cta-button {
    background: var(--primary-600);
    color: white !important;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    transform: translateY(0);
}

.property-cta-button:hover {
    background-color: var(--primary-700);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(79, 70, 229, 0.4);
}

.property-cta-button:active {
    transform: translateY(-1px);
}

.property-cta-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transform: scale(0.5);
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.property-cta-button:hover::after {
    opacity: 1;
    transform: scale(1);
}

/* Adaptar el layout del footer de las tarjetas para mejor distribución */
.property-card .flex.items-center.justify-between {
    padding-top: 1rem;
    border-top: 1px solid rgba(229, 231, 235, 0.7);
    /*margin-top: 1rem;*/
}

/* Destacar el precio - Eliminamos el ::before problemático */
.property-card .text-primary-600 {
    color: var(--primary-600);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
}

/* Eliminar la regla problemática con ::before */
/* Nota: Comentamos en lugar de eliminar para referencia */
/*
.property-card .text-primary-600::before {
    content: '\f3d1';
    font-family: 'Font Awesome 5 Free';
    margin-right: 0.25rem;
    font-size: 0.875rem;
    opacity: 0.8;
    position: relative;
    top: -1px;
}
*/

/* Mejorar el contraste y la accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .property-cta-button::after {
        display: none;
    }
}

/* Animación sutil para llamar la atención */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.property-card:hover .property-cta-button {
    animation: pulse 1.5s infinite ease-in-out;
}

/* Animación para el sitio */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Estilos para descripción con altura fija */
.property-card .text-gray-600 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limita a 2 líneas */
    line-clamp: 2; /* Propiedad estándar para compatibilidad */
    -webkit-box-orient: vertical;
    line-height: 1.5;
    height: 3em; /* Altura fija para 2 líneas */
    margin-bottom: 1rem;
}

/* Asegurar que todas las tarjetas tengan la misma altura */
#venta-container > div, #alquiler-container > div {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Aumentar la altura de las imágenes de propiedades */
.property-card img {
    height: 240px; /* Aumentamos la altura de las imágenes */
    width: 100%;
    object-fit: cover; /* Aseguramos que la imagen cubra bien el espacio */
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

/* Reducir el espacio en blanco antes del precio */
.property-card .property-content {
    padding: 1rem;
    padding-top: 0.75rem; /* Reducimos el padding superior */
}

.property-card .property-price {
    margin-top: 0.5rem; /* Reducimos el margen superior */
}

/* Asegurar que los elementos del interior de la tarjeta tengan un espaciado más compacto */
.property-card .property-details {
    margin-top: 0.5rem;
}

.property-card h3 {
    margin-bottom: 0.25rem;
}

/* Mejora de los botones "Ver todas las propiedades" */
.ver-todas-btn {
    background: var(--primary-600);
    color: white;
    font-weight: 600;
    padding: 0.8rem 1.8rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(24, 144, 255, 0.3);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    min-width: 250px;
}

.ver-todas-btn:hover {
    background-color: var(--primary-700);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(24, 144, 255, 0.4);
}

.ver-todas-btn:active {
    transform: translateY(-1px);
}

.ver-todas-btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Efecto de brillo al pasar el mouse */
.ver-todas-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transform: scale(0.5);
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.ver-todas-btn:hover::after {
    opacity: 1;
    transform: scale(1);
}

/* Estilos para modo oscuro o preferencias reducidas de movimiento */
@media (prefers-reduced-motion: reduce) {
    .ver-todas-btn::after {
        display: none;
    }
}

@media (prefers-color-scheme: dark) {
    .ver-todas-btn {
        background: linear-gradient(135deg, #1890ff 0%, #0050b3 100%);
        box-shadow: 0 4px 12px rgba(0, 80, 179, 0.5);
    }

    .ver-todas-btn:hover {
        box-shadow: 0 7px 15px rgba(0, 80, 179, 0.6);
    }
}

/* Variables de colores para mantener consistencia - SIMPLIFICADAS */
:root {
    /* Color primario (aqua/azul) y sus variantes */
    --primary-50: #ecfeff;
    --primary-100: #cffafe;
    --primary-200: #a5f3fc;
    --primary-300: #67e8f9;
    --primary-400: #22d3ee;
    --primary-500: #06b6d4;
    --primary-600: #0891b2; /* Color principal de acento - Aqua */
    --primary-700: #0e7490;
    --primary-800: #155e75;
    --primary-900: #164e63;

    /* Colores neutros */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Otros colores de acento */
    --red-500: #ef4444;
    --yellow-400: #facc15;
}

/* Clases de colores personalizados para Tailwind */
.bg-primary-50 { background-color: var(--primary-50); }
.bg-primary-100 { background-color: var(--primary-100); }
.bg-primary-500 { background-color: var(--primary-500); }
.bg-primary-600 { background-color: var(--primary-600); }
.bg-primary-700 { background-color: var(--primary-700); }

.text-primary-600 { color: var(--primary-600); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-red-500 { color: var(--red-500); }

/* Unificar todos los estilos de botones */
.btn-primary, .ver-todas-btn, .property-cta-button {
    background: var(--primary-600);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(24, 144, 255, 0.3);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover, .ver-todas-btn:hover, .property-cta-button:hover {
    background-color: var(--primary-700);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(24, 144, 255, 0.4);
}

.btn-primary:active, .ver-todas-btn:active, .property-cta-button:active {
    transform: translateY(-1px);
}

.btn-primary i, .ver-todas-btn i, .property-cta-button i {
    margin-right: 8px;
}

/* Personalización específica para "Ver todas las propiedades" */
.ver-todas-btn {
    font-size: 1.05rem;
    padding: 0.8rem 1.8rem;
    min-width: 250px;
}

/* Personalización específica para botones CTA en tarjetas */
.property-cta-button {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* Efecto de brillo unificado para todos los botones */
.btn-primary::after, .ver-todas-btn::after, .property-cta-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transform: scale(0.5);
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.btn-primary:hover::after, .ver-todas-btn:hover::after, .property-cta-button:hover::after {
    opacity: 1;
    transform: scale(1);
}

/* Unificar estilos de iconos de características */
.feature-icon {
    background-color: var(--primary-50);
    color: var(--primary-700);
    width: 68px;
    height: 68px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-right: 1.25rem;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Unificar colores en tarjetas de propiedades */
.property-badge {
    background-color: var(--primary-600);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    backdrop-filter: blur(4px);
    display: none; /* Ocultar badge antiguo si existe */
}

/* Ajustar color del botón de favoritos para mayor coherencia */
.favorito-btn i.far.fa-heart {
    color: var(--gray-500);
}

.favorito-btn i.fas.fa-heart.text-red-500 {
    color: var(--red-500);
}

/* Scroll-top botón con el mismo estilo */
.scroll-top-btn {
    background-color: var(--primary-600);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.scroll-top-btn.visible {
    opacity: 1;
    transform: scale(1);
}

.scroll-top-btn:hover {
    background-color: var(--primary-700);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

/* Unificar estilos de títulos de secciones */
.section-title::after {
    background: linear-gradient(90deg, var(--primary-600) 0%, var(--primary-400) 100%);
    border-radius: 2px;
}

/* Simplificar los colores de texto en testimonios */
.text-yellow-400 {
    color: var(--yellow-400);
}

/* Estilos para los botones de selección de tipo de búsqueda */
.property-option-btn {
    font-weight: 500;
    transition: all 0.3s ease;
}

.property-option-btn:hover {
    transform: translateY(-2px);
    background-color: var(--primary-600) !important;
    color: white !important;
    border-color: var(--primary-600) !important;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.property-option-btn:hover .fas {
    opacity: 1;
}

.property-option-btn.selected {
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.property-option-btn .fas {
    opacity: 0.8;
}

.property-option-btn.selected .fas {
    opacity: 1;
}

/* --- Estilos Mejorados para la Sección de Precios (Condicional 1/2 Columnas) --- */

.property-price-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-top: 1rem;
    margin-top: auto;
    border-top: 1px solid var(--gray-200);
}

/* Área que contiene la información de precios */
.price-info-area {
    margin-bottom: 0.75rem; /* Espacio antes del botón */
    min-height: 3em; /* Altura mínima para consistencia */
    display: flex; /* Usar flex para centrar contenido en price-single */
    justify-content: center; /* Centra el contenido de price-single */
    align-items: center; /* Centra verticalmente el contenido de price-single */
}

/* Estilo para cuando hay dos precios (Venta y Alquiler) */
.price-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
    gap: 0.5rem; /* Espacio entre columnas */
    width: 100%; /* Ocupa todo el ancho */
    align-items: start; /* Alinea el contenido de las columnas arriba */
}

/* Estilo para cada columna en el grid */
.price-column {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra el contenido de la columna */
    text-align: center;
}

/* Estilo para cuando solo hay un precio */
.price-single {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra el contenido */
    text-align: center;
    width: 100%;
}

/* Estilos comunes para valor, etiqueta y periodo */
.price-value {
    font-size: 1.2rem; /* Tamaño principal del precio */
    font-weight: 700;
    color: var(--primary-700);
    line-height: 1.2;
    display: block; /* Asegura que ocupe su línea */
}

.price-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
    display: block; /* Asegura que ocupe su línea */
}

.price-period {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-left: 0.1rem;
    display: inline; /* Para que se quede junto a 'Alquiler' */
}

/* Ajuste específico para el valor cuando es 'Consultar Precio' */
.price-value.text-gray-500 {
    font-size: 1rem; /* Un poco más pequeño */
    font-weight: 600;
}

/* Ajustes responsivos */
@media (min-width: 640px) {
    .price-value {
        font-size: 1.3rem;
    }
    .price-label {
        font-size: 0.75rem;
    }
    .price-period {
        font-size: 0.75rem;
    }
}

/* Botón "Ver Detalles" sigue siendo full-width */
.property-price-container .btn-details {
    width: 100%;
    text-align: center;
    margin-top: 0; /* El espacio lo da el margin-bottom de price-info-area */
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: 0.75rem;
}

/* Eliminar/Ocultar estilos obsoletos */
.price-line, .price-segment, .price-separator {
    display: none;
}

/* --- Fin Estilos Mejorados para la Sección de Precios --- */


/* Estilos para el carrusel de imágenes */
.carousel-container {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-counter {
    position: absolute;
    top: 10px;
    left: 10px; /* Cambiado a la izquierda */
    right: auto; /* Asegurar que no tenga posicionamiento a la derecha */
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    z-index: 10;
}

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

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

.carousel-indicator.active {
    background-color: white;
    transform: scale(1.3);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    color: #333;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.2s ease;
    z-index: 10;
}

.carousel-btn:hover {
    opacity: 1;
    background-color: white;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* Transiciones para los slides */
.slide-left-enter {
    animation: slideLeftEnter 0.3s forwards;
}

.slide-left-exit {
    animation: slideLeftExit 0.3s forwards;
}

.slide-right-enter {
    animation: slideRightEnter 0.3s forwards;
}

.slide-right-exit {
    animation: slideRightExit 0.3s forwards;
}

@keyframes slideLeftEnter {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideLeftExit {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideRightEnter {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideRightExit {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Estilo para el botón de detalles */
.btn-details {
    background-color: var(--primary-600);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-details:hover {
    background-color: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Actualización de las etiquetas de propiedad para su nueva posición encima del título */
.property-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 8px;
}

.property-tag-sale {
    background-color: #F78154;
    color: white;
}

.property-tag-rent {
    background-color: #F2C14E;
    color: #333;
}

.property-tag-vacation {
    background-color: #B4436C;
    color: white;
}

/* Optimización del diseño responsive de las tarjetas */
@media (max-width: 640px) {
    .property-tag {
        font-size: 0.6rem;
        padding: 3px 8px;
    }
}

/* Eliminamos los estilos anteriores del contenedor de etiquetas que ya no usamos */
.badge-container {
    display: none;
}

/* Estilos personalizados para elementos select */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

select:focus {
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

select:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
}

/* Estilos para los campos de precio */
#min-price-container-venta, #max-price-container-venta,
#min-price-container-alquiler, #max-price-container-alquiler {
    position: relative;
}

/* Estilo para el símbolo de moneda */
.currency-symbol {
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Asegurar que el placeholder se alinee a la derecha */
input[type="text"][placeholder]::placeholder {
    text-align: right;
    color: var(--gray-400);
}

/* Estilo para cuando el campo tiene valor */
input[type="text"].has-value {
    font-weight: 600;
    color: var(--gray-800);
}

/* --- Estilos para el Selector de País --- */
/* Estilos para el contenedor principal del selector */
#country-selector-wrapper, #mobile-country-selector {
    position: relative;
}

/* Estilos para el botón del selector */
#country-selector-button, #mobile-country-button {
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    padding: 0.5rem 0.75rem;
}

#country-selector-button:hover, #mobile-country-button:hover {
    background-color: var(--gray-50);
    border-color: var(--gray-300);
}

/* Emoji de la bandera en el botón */
#selected-country-flag, #mobile-country-flag,
#selected-currency-flag, #mobile-currency-flag {
    font-size: 1.1rem;
    margin-right: 0.5rem;
    line-height: 1;
}

/* Lista desplegable de países y monedas */
#country-selector-list, #mobile-country-list,
#currency-selector-list, #mobile-currency-list {
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 50;
    max-height: 240px;
    overflow-y: auto;
    width: 100%;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#country-selector-list, #currency-selector-list {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    min-width: 20rem;
}

/* Estilos para los elementos de la lista */
.country-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.country-item:hover {
    background-color: var(--gray-100);
}

.country-item.selected {
    background-color: var(--primary-50);
    color: var(--primary-700);
    font-weight: 500;
}

/* Emoji de bandera en elementos de la lista */
.country-flag {
    font-size: 1.1rem;
    margin-right: 0.5rem;
    line-height: 1;
}

/* Nombre del país en elementos de la lista */
.country-name {
    flex: 1;
    font-size: 0.875rem;
}

/* Personalización de la barra de scroll para navegadores WebKit */
#country-selector-list::-webkit-scrollbar, #mobile-country-list::-webkit-scrollbar {
    width: 6px;
}

#country-selector-list::-webkit-scrollbar-track, #mobile-country-list::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

#country-selector-list::-webkit-scrollbar-thumb, #mobile-country-list::-webkit-scrollbar-thumb {
    background-color: var(--gray-300);
    border-radius: 3px;
}

#country-selector-list::-webkit-scrollbar-thumb:hover, #mobile-country-list::-webkit-scrollbar-thumb:hover {
    background-color: var(--gray-400);
}

/* Versión móvil */
#mobile-country-list {
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
}

#mobile-country-selector {
    width: 100%;
}

/* Animación de aparición/desaparición */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.country-list-visible, .currency-list-visible {
    animation: fadeIn 0.2s ease forwards;
}

@media (max-width: 767px) {
    #mobile-country-button, #mobile-currency-button {
        flex: 1;
        justify-content: space-between;
    }
}

/* Estilo para las banderas en el selector de país y moneda */
.country-flag, .currency-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.flag-image {
    border: 1px solid #eee;
    object-fit: cover;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Asegurar que los emojis de banderas se muestren bien si las imágenes fallan */
.country-item, .currency-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.country-item:hover, .currency-item:hover {
    background-color: #f5f5f5;
}

.country-name, .currency-name {
    flex: 1;
}
/* --- Fin Estilos Selector de País --- */

/* --- MODAL DE SELECCIÓN PARA MOBILE (Vendelu) --- */
.vendelu-modal-overlay {
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.vendelu-modal-overlay.vendelu-modal-open {
  display: flex;
  opacity: 1;
}
.vendelu-modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.vendelu-modal-content {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  max-width: 95vw;
  width: 380px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 0;
  animation: fadeIn 0.2s;
}
.vendelu-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.5rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}
.vendelu-modal-header span {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-700);
}
.vendelu-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-500);
  cursor: pointer;
  transition: color 0.2s;
}
.vendelu-modal-close:hover {
  color: var(--primary-600);
}
.vendelu-modal-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 1rem 0;
}
.modal-country-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s;
}
.modal-country-item:last-child {
  border-bottom: none;
}
.modal-country-item:hover {
  background: var(--primary-50);
}
@media (max-width: 480px) {
  .vendelu-modal-content {
    width: 98vw;
    min-width: 0;
    border-radius: 0.5rem;
  }
  .vendelu-modal-header {
    padding: 0.75rem 0.75rem 0.5rem 0.75rem;
  }
  .modal-country-item {
    padding: 0.65rem 0.75rem;
  }
}
/* --- FIN MODAL DE SELECCIÓN PARA MOBILE --- */

/* --- Estilos para el Selector de Idiomas --- */
/* Contenedor principal del selector */
#language-selector-wrapper, #mobile-language-selector {
    position: relative;
    margin-left: 1rem;
}

/* Botón del selector de idioma */
#language-selector-button, #mobile-language-button {
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    padding: 0.5rem 0.75rem;
}

#language-selector-button:hover, #mobile-language-button:hover {
    background-color: var(--gray-50);
    border-color: var(--gray-300);
}

/* Emoji de la bandera del idioma en el botón */
#selected-language-flag, #mobile-language-flag {
    font-size: 1.1rem;
    margin-right: 0.5rem;
    line-height: 1;
}

/* Lista desplegable de idiomas */
#language-selector-list, #mobile-language-list {
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 50;
    overflow-y: auto;
    width: 100%;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#language-selector-list {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.25rem;
    min-width: 10rem;
}

/* Elementos de la lista de idiomas */
.language-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.language-item:hover {
    background-color: var(--gray-100);
}

.language-item.selected {
    background-color: var(--primary-50);
    color: var(--primary-700);
    font-weight: 500;
}

/* Emoji de bandera en elementos de la lista */
.language-flag {
    font-size: 1.1rem;
    margin-right: 0.5rem;
    line-height: 1;
}

/* Nombre del idioma en elementos de la lista */
.language-name {
    flex: 1;
    font-size: 0.875rem;
}

/* Versión móvil */
#mobile-language-list {
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
}

#mobile-language-selector {
    width: 100%;
    margin-top: 0.5rem;
}

/* Animación de aparición/desaparición */
.language-list-visible {
    animation: fadeIn 0.2s ease forwards;
}

/* Estilos para la sugerencia de cambio de idioma */
.language-suggestion {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0;
    z-index: 100;
    max-width: 300px;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.language-suggestion.visible {
    transform: translateY(0);
    opacity: 1;
}

.suggestion-content {
    padding: 16px;
}

.suggestion-content p {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
}

.suggestion-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.suggestion-actions button {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.accept-suggestion {
    background-color: var(--primary-600);
    color: white;
}

.accept-suggestion:hover {
    background-color: var(--primary-700);
}

.decline-suggestion {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

.decline-suggestion:hover {
    background-color: var(--gray-300);
}

/* Estilos adicionales para la organización en el header */
.header-controls {
    display: flex;
    align-items: center;
}

@media (max-width: 767px) {
    #language-selector-wrapper {
        display: none;
    }

    #mobile-language-button {
        flex: 1;
        justify-content: space-between;
    }
}
/* --- Fin Estilos Selector de Idiomas --- */

/* Estilos para el encabezado fijo */
#header-container {
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Estilos específicos para la página de detalle de propiedad */
.gallery-thumb {
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0.7;
    border: 3px solid transparent;
}

.gallery-thumb.active {
    opacity: 1;
    border-color: #3B82F6;
}

.property-features li {
    margin-bottom: 0.75rem;
}

.map-container {
    height: 400px;
    width: 100%;
}

.sticky-sidebar {
    position: sticky;
    top: 100px;
}

/* Estilos para los filtros de propiedades */
.filtros-container {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.filtros-panel {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.filtros-panel.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.filtro-grupo {
    position: relative;
}

.filtro-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background-color: #e6f0fb;
    color: #235789;
    border-radius: 9999px;
    margin-right: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid rgba(35, 87, 137, 0.2);
    transition: all 0.2s ease;
}

.filtro-tag button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    color: #235789;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.filtro-tag button:hover {
    opacity: 1;
}

/* Hacer que los selectores de filtro sean más amigables en dispositivos móviles */
@media (max-width: 768px) {
    .filtros-container {
        padding: 1rem;
    }

    .filtros-panel {
        gap: 1rem;
    }

    .filtro-grupo select,
    .filtro-grupo input {
        height: 2.5rem;
        font-size: 1rem;
    }
}

/* Animación para mostrar y ocultar los filtros */
@keyframes slideFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.filtros-activos {
    animation: slideFadeIn 0.3s ease forwards;
}

.filtros-activos.hidden {
    display: none;
}

/* Estilos para la sugerencia combinada de idioma y moneda */
.combined-suggestion {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 350px;
    max-width: 90vw;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.combined-suggestion.visible {
    transform: translateY(0);
    opacity: 1;
}

.suggestion-content {
    padding: 20px 20px 12px 20px;
    background: linear-gradient(90deg, #f8fafc 60%, #f1f5f9 100%);
}

.suggestion-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--primary-700, #3730a3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestion-title .suggestion-icon {
    font-size: 1.3em;
    color: var(--primary-500, #6366f1);
}

.suggestion-message {
    font-size: 1rem;
    margin: 0 0 18px 0;
    color: var(--gray-700, #374151);
    line-height: 1.5;
}

.suggestion-options {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.suggestion-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    padding: 10px 12px;
    border-radius: 6px;
    background-color: var(--gray-50, #f9fafb);
    border: 1px solid var(--gray-200, #e5e7eb);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: background 0.2s;
}
.suggestion-option:hover {
    background-color: var(--primary-50, #eef2ff);
}

.suggestion-option input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--primary-500, #6366f1);
}

.suggestion-option label {
    display: flex;
    align-items: center;
    font-size: 0.97rem;
    cursor: pointer;
    gap: 6px;
}

.suggestion-option .flag-image {
    margin-right: 4px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.07);
}

.suggestion-option .option-icon {
    font-size: 1.1em;
    margin-right: 2px;
    color: var(--primary-400, #818cf8);
}

.suggestion-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.accept-suggestion {
    background-color: var(--primary-600, #4f46e5);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(99,102,241,0.08);
    transition: background 0.2s;
}
.accept-suggestion:hover {
    background-color: var(--primary-700, #3730a3);
}

.decline-suggestion {
    background-color: var(--gray-200, #e5e7eb);
    color: var(--gray-700, #374151);
    font-weight: 500;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}
.decline-suggestion:hover {
    background-color: var(--gray-300, #d1d5db);
}

@media (max-width: 600px) {
    .combined-suggestion {
        width: 99vw;
        border-radius: 10px;
        padding: 0;
    }
}

/* --- Fix: Forzar visibilidad y posición absoluta de listas móviles --- */
#mobile-country-list,
#mobile-currency-list,
#mobile-language-list {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 999;
    min-width: 100%;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
#mobile-country-selector,
#mobile-currency-selector,
#mobile-language-selector {
    position: relative;
}
/* --- Fin fix --- */

.combined-suggestion-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.combined-suggestion-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
.combined-suggestion {
    position: relative;
    left: auto;
    top: auto;
    right: auto;
    bottom: auto;
    margin: 0;
    z-index: 9999;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    width: 370px;
    max-width: 95vw;
    overflow: hidden;
    opacity: 1;
    transform: scale(1);
    transition: box-shadow 0.3s, transform 0.3s;
    animation: fadeIn 0.3s;
}
@media (max-width: 600px) {
    .combined-suggestion {
        width: 99vw;
        border-radius: 10px;
        padding: 0;
    }
}