/* Modern Property Details Modal - Clean & Beautiful Design */

.property-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.property-modal.active,
.property-modal[style*="display: flex"] {
    display: flex !important;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 1600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.property-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: white;
    transform: scale(1.1);
}

.modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.property-modal .modal-body {
    flex-direction: column;
    padding: 0;
    max-height: calc(98vh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}

.property-modal .overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 30px;
    padding: 30px;
}

.property-modal .main-content-section,
.property-modal .sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 0;
}

.property-modal .sidebar-section {
    position: relative;
}

.property-modal .property-image-section {
    margin-bottom: 40px;
}

.property-modal .description-section {
    margin-top: 10px;
}

.property-modal .property-description {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    line-height: 1.6;
    color: #495057;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.property-modal .sidebar-section .quick-stats,
.property-modal .sidebar-section .location-section,
.property-modal .sidebar-section .contact-section {
    background: #fff;
}

.property-modal .sidebar-section .location-section {
    margin-top: 0;
}

/* Image Section */
.image-section {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
}

.main-image {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    background: #f8f9fa;
}

.main-image:hover img {
    transform: scale(1.05);
}

.image-thumbs {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
    background: white;
    border-top: 1px solid #eee;
}

.thumb {
    width: 80px;
    height: 60px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    background: #f8f9fa;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.thumb:hover,
.thumb.active {
    opacity: 1;
    border-color: #007bff;
    transform: scale(1.05);
}

/* Info Section */
.info-section {
    flex: 0 0 40%;
    padding: 30px;
    overflow-y: auto;
    background: white;
}

.property-header {
    margin-bottom: 30px;
}

.badges {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.type-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.forSale {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-badge.forRent {
    background: #fff3e0;
    color: #f57c00;
}

.property-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 35px 0 15px 0 !important;
    line-height: 1.3;
    padding-top: 0;
}

.property-image-section {
    margin-bottom: 50px !important;
}

.property-image-container {
    margin-bottom: 50px !important;
    padding-bottom: 30px !important;
    overflow: hidden !important;
    background: transparent !important;
    border: none !important;
    position: relative !important;
    display: block !important;
}

.property-modal .property-image-container {
    overflow: hidden !important;
    position: relative !important;
}

.property-image-section .property-title {
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative !important;
    z-index: 1 !important;
    clear: both !important;
}

.property-modal .property-image-container .gallery-thumbnails {
    position: static !important;
    display: grid !important;
    width: 100% !important;
    margin: 20px 0 0 0 !important;
    padding: 15px 10px !important;
    background: transparent !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

/* Override atlas-mobile-modals.css positioning */
.property-modal .gallery-thumbnails {
    position: static !important;
    left: auto !important;
    bottom: auto !important;
}

.location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: #666;
    font-size: 16px;
}

.location-icon {
    font-size: 18px;
}

.price {
    font-size: 32px;
    font-weight: 800;
    color: #007bff;
    margin-bottom: 20px;
}

/* Property Details */
.property-details {
    margin-top: 30px;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.detail-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.detail-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.detail-label {
    font-weight: 500;
    color: #666;
    flex: 1;
}

.detail-value {
    font-weight: 700;
    color: #333;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f0f8ff;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.feature-icon {
    font-size: 16px;
}

.feature-text {
    color: #333;
    font-weight: 500;
}

.description {
    color: #666;
    line-height: 1.6;
}

.description p {
    margin: 0;
}

.no-desc {
    font-style: italic;
    color: #999;
}

/* Contact Bar */
.contact-bar {
    display: flex;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    padding: 0;
}

@media (max-width: 1100px) {
    .property-modal .overview-grid {
        grid-template-columns: 1fr;
    }
}

.contact-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.contact-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.call-btn {
    color: #28a745;
}

.call-btn:hover {
    background: #d4edda;
}

.whatsapp-btn {
    color: #25d366;
}

.whatsapp-btn:hover {
    background: #d1f2eb;
}

.email-btn {
    color: #007bff;
}

.email-btn:hover {
    background: #e3f2fd;
}

.btn-icon {
    font-size: 24px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .property-modal {
        padding: 0;
    }
    
    .modal-content {
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
        max-width: 100%;
    }
    
    .modal-body {
        flex-direction: column;
    }

    .property-modal .modal-body {
        max-height: calc(100vh - 70px);
    }

    .property-modal .overview-grid {
        padding: 20px;
        gap: 20px;
    }

    .property-modal .main-content-section,
    .property-modal .sidebar-section {
        gap: 20px;
    }
    
    .image-section {
        flex: 0 0 40%;
    }
    
    .info-section {
        flex: 1;
        padding: 20px;
    }
    
    .property-title {
        font-size: 24px;
    }
    
    .price {
        font-size: 28px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .property-modal .property-description {
        padding: 16px;
    }
    
    .contact-bar {
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 1px solid #ddd;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }
    
    .contact-btn {
        padding: 15px;
        font-size: 12px;
    }
    
    .btn-icon {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .info-section {
        padding: 15px;
    }

    .property-modal .overview-grid {
        padding: 15px;
    }
    
    .property-title {
        font-size: 20px;
    }
    
    .price {
        font-size: 24px;
    }
    
    .contact-btn {
        padding: 12px;
        font-size: 11px;
    }
    
    .btn-icon {
        font-size: 18px;
    }
}

/* Print Styles */
@media print {
    .property-modal {
        position: static;
        display: block;
    }
    
    .modal-overlay {
        display: none;
    }
    
    .modal-content {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .close-btn,
    .contact-bar {
        display: none;
    }
}