/* Property Detail Styles */
.property-detail {
    padding-top: 120px;
    background: var(--light-gray);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--gray-color);
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--main-color);
}

.breadcrumb i {
    color: var(--gray-color);
    font-size: 1.2rem;
}

.breadcrumb span {
    color: var(--second-color);
    font-weight: 500;
}

/* Property Content */
.property-content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Gallery */
.property-gallery {
    background: var(--white-color);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

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

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

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.thumbnail {
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.thumbnail:hover {
    transform: translateY(-3px);
    border-color: var(--main-color);
}

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

/* Property Info */
.property-info {
    background: var(--white-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: -100px;
}

.property-info h1 {
    font-size: 2rem;
    color: var(--second-color);
    margin-bottom: 1rem;
}

.property-price {
    margin-bottom: 2rem;
    flex: 1;
}

.price {
    font-size: 1.5rem;
    color: var(--main-color);
    font-weight: 600;
}

/* Features */
.property-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.feature i {
    font-size: 1.5rem;
    color: var(--main-color);
}

.feature span {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Description */
.property-description {
    margin-bottom: 2rem;
}

.property-description h2,
.property-amenities h2,
.property-location h2 {
    font-size: 1.3rem;
    color: var(--second-color);
    margin-bottom: 1rem;
}

.property-description p {
    color: var(--gray-color);
    line-height: 1.6;
}

/* Amenities */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.amenity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.amenity i {
    color: var(--main-color);
}

.amenity span {
    color: var(--gray-color);
}

/* Location */
.property-location {
    margin-bottom: 2rem;
}

.property-location p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-color);
    margin-bottom: 1rem;
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
}

/* Actions */
.property-actions {
    display: flex;
    gap: 1rem;
}

.schedule-btn,
.contact-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.schedule-btn {
    background: var(--main-color);
    color: var(--white-color);
}

.contact-btn {
    background: var(--light-gray);
    color: var(--second-color);
}

.schedule-btn:hover,
.contact-btn:hover {
    transform: translateY(-3px);
}

.schedule-btn:hover {
    background: var(--second-color);
}

.contact-btn:hover {
    background: #e0e0e0;
}

/* Similar Properties */
.similar-properties {
    margin-top: 4rem;
}

.similar-properties h2 {
    font-size: 1.8rem;
    color: var(--second-color);
    margin-bottom: 2rem;
    text-align: center;
}
/* Improved Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(128, 128, 128, 0.9);
    overflow: auto;
    animation: fadeIn 0.3s;
    /* New centering technique */
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.image-modal-content {
    display: block;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 3px solid white;
    animation: zoom 0.3s ease-in-out;
    background-color: white;
    border-radius: 5px;
    /* Ensures perfect centering */
    margin: auto;
}

.image-modal-close {
    position: fixed; /* Changed from absolute to fixed */
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoom {
    from { transform: scale(0.7); }
    to { transform: scale(1); }
}


/* Responsive Design */
@media(max-width: 1024px) {
    .property-features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .amenities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 768px) {
    .thumbnail-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .main-image {
        height: 300px;
    }
    
    .property-info h1 {
        font-size: 1.8rem;
    }

    .image-modal {
        padding: 15px;
    }
    
    .image-modal-content {
        max-width: 95%;
        max-height: 85vh;
    }
    
    .image-modal-close {
        top: 15px;
        right: 25px;
        font-size: 35px;
    }
}

@media(max-width: 480px) {
    .thumbnail-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .property-features {
        grid-template-columns: 1fr;
    }
    
    .amenities-grid {
        grid-template-columns: 1fr;
    }
    
    .property-actions {
        flex-direction: column;
    }
    
    .main-image {
        height: 250px;
    }

    .image-modal {
        padding: 10px;
    }
    
    .image-modal-content {
        max-width: 98%;
        max-height: 80vh;
    }
    
    .image-modal-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}