/* Estilos específicos para detalle.php */

/* Detalle de propiedad */
.property-detail {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin: 2rem auto;
    max-width: 1200px;
}

.property-gallery {
    margin-bottom: 2rem;
    position: relative;
}

.gallery-main {
    width: 100%;
    height: 500px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    background: var(--light-gray);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.gallery-main img:hover {
    transform: scale(1.02);
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.gallery-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
}

.gallery-thumb:hover {
    transform: scale(1.05);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.gallery-thumb.active {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2001;
}

.lightbox-close:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
    z-index: 2001;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 2001;
}

/* Botón de favoritos */
.favorite-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--light);
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: var(--dark);
}

.favorite-btn:hover {
    background: var(--light-gray);
    border-color: var(--primary);
}

.favorite-btn.active {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border-color: #ff6b6b;
}

.favorite-btn.active:hover {
    background: linear-gradient(135deg, #ff5252, #e53935);
}

.favorite-btn i {
    font-size: 1.2rem;
}

/* Meta información de propiedad */
.property-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.property-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.property-type {
    background: var(--secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* No images */
.no-image {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray);
    background: var(--light);
    border-radius: var(--border-radius);
    border: 2px dashed var(--light-gray);
}

.no-image i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--gray);
}

.property-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--light-gray);
}

.property-section h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.property-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.feature:hover {
    background: var(--light-gray);
    transform: translateY(-2px);
}

.feature i {
    font-size: 1.5rem;
    color: var(--primary);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 91, 248, 0.1);
    border-radius: 50%;
}

.feature span {
    font-weight: 600;
    color: var(--dark);
}

.feature p {
    margin: 0;
    color: var(--gray);
    font-size: 0.9rem;
}

.property-description {
    line-height: 1.8;
    color: var(--gray);
    font-size: 1.1rem;
}

.property-description p {
    margin-bottom: 1rem;
}

/* Sección de contacto */
.contact-section {
    background: linear-gradient(135deg, rgba(56, 91, 248, 0.05) 0%, rgba(0, 166, 153, 0.05) 100%);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.contact-section h3 {
    color: var(--dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

.contact-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366, #128C7E);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.email-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.email-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Tour 360 Section */
.tour-360-section {
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--border-radius);
    color: white;
    text-align: center;
}

.tour-360-section h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.tour-360-section p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Pannellum viewer */
#pannellum-viewer {
    width: 100%;
    height: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-main {
        height: 300px;
    }
    
    .property-features {
        grid-template-columns: 1fr;
    }
    
    .feature {
        padding: 0.8rem;
    }
    
    .contact-buttons {
        grid-template-columns: 1fr;
    }
    
    #pannellum-viewer {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .property-detail {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .property-section h2 {
        font-size: 1.5rem;
    }
    
    .gallery-thumbnails {
        gap: 0.5rem;
    }
    
    .gallery-thumb {
        width: 80px;
        height: 60px;
    }
    
    .feature i {
        font-size: 1.2rem;
        width: 35px;
        height: 35px;
    }
}
