/* Galería de propiedades */
.property-gallery {
    width: 100%;
    margin-bottom: 30px;
}

.main-image {
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 10px;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.main-image img:hover {
    transform: scale(1.02);
}

.thumbnails {
    width: 100%;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail:hover {
    border-color: #0042FF;
    transform: scale(1.1);
}

.thumbnail.active {
    border-color: #E97501;
}

.no-images {
    background: #f8f9fa;
    padding: 40px;
    text-align: center;
    border-radius: 8px;
    color: #666;
}

/* Modal para imagen completa (Lightbox) */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.modal-content {
    display: block;
    margin: auto;
    max-width: 95%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close-modal:hover {
    color: #ccc;
}

/* Navegación del Modal */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    padding: 10px;
    user-select: none;
    z-index: 1001;
    transition: color 0.3s ease;
}

.modal-nav:hover {
    color: #ccc;
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

/* Responsive para galería */
@media (max-width: 768px) {
    .h1-titulo-ficha {
        font-size: 1.5em;
        line-height: 35px !important;
    }

    .main-image {
        height: 300px;
    }

    .thumbnails {
        justify-content: center;
    }

    .modal-nav {
        font-size: 30px;
        padding: 5px;
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }

    .image-modal img {
        max-width: 90%;
        max-height: 80vh;
    }
}

/* Ficha de propiedad */
.property-title {
    margin: 10px 0;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
}

.features {
    margin: 20px 0;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 15px;
    margin: 1rem 0;
}

.feature {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.feature:last-child {
    border-bottom: none;
}

.h1-titulo-ficha {
    color: #0042FF;
    font-size: 2em;
    line-height: 38px !important;
}

.breadcrumb {
    display: inline-block;
    margin-bottom: 20px;
    padding: 10px 0;
    color: #666;
}

.breadcrumb a {
    color: #0042FF;
    text-decoration: none;
}

.price-tag strong {
    font-size: 1.8em !important;
    color: #272727;
}

.description, .ubicacion, .datos-inmob-agente {
    background: #fff;
    padding: 1.5rem;
    border: 1px solid #eee;
    border-radius: 8px;
    margin: 1rem 0;
    line-height: 1.6;
}

/* Agente */
.agent-profile {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 40px;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
}

.agent-profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .agent-profile {
        flex-direction: column;
        text-align: center;
    }
}

.agent-contact-card {
    background: white;
    color: #333;
    border-radius: 15px;
    padding: 30px;
    display: flex;
    gap: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    margin: 0 auto;
}

.agent-contact-photo img {
    width: 120px;
    height: 120px;
    border-radius: 100%;
    object-fit: cover;
    border: 1px solid #f0f2f5;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
}

.btn-secondary {
    background: #0042FF;
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: bold;
}

/* Estilos para el carrousel de miniaturas */
.thumbnails-carousel {
    position: relative;
    padding: 0 43px;
    margin-top: -130px;
    z-index: 1;
    background: linear-gradient(135deg, #ffffffad 0%, #ecececc9 100%);
}

.thumbnails-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 10px 0;
    gap: 8px;
}

.thumbnails-container::-webkit-scrollbar {
    display: none;
}

.thumbnail {
    flex: 0 0 auto;
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    display: block; /* Elimina espacio inferior de elementos inline */
    padding: 0;
}

.thumbnail.active {
    border-color: #0042FF;
    transform: scale(1.05);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #0042FF;
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.carousel-btn:hover {
    background-color: #032DA5;
    transform: translateY(-50%) scale(1.1);
}

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

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

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: #ccc;
    box-shadow: none;
}

@media (max-width: 576px) {
    .thumbnails-carousel {
        margin-top: -94px;
    }
}