/* Reset and Base Styles */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #FFFFFF;
    font-family: 'Arial', sans-serif;
    color: #001F3F;
}

/* Main Container */
.real-estate-container {
    background-color: #FFFFFF;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

/* Fix for modal content scrolling */
.modal-content {
    background: #FFFFFF;
    margin: auto;
    width: 100%;
    max-width: 900px;
    border-radius: 15px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    max-height: 90vh;
    overflow-y: auto; /* Make entire modal scrollable */
}

/* Keep media container fixed height */
.modal-media-container {
    position: relative;
    width: 100%;
    height: 400px; /* Fixed height for media */
    overflow: hidden;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 2px solid #E0E0E0;
    background: #F8F9FA;
    flex-shrink: 0; /* Prevent shrinking */
}

/* Make amenities list scrollable within a fixed container */
.modal-amenities-container {
    max-height: 200px; /* Fixed height for amenities */
    overflow-y: auto;
    margin: 10px 0;
    padding: 0 20px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    background: #F8F9FA;
}

.amenities-list {
    columns: 2;
    list-style-type: none;
    padding: 15px 0;
    margin: 0;
    color: #333333;
    font-size: 0.95rem;
}

.amenities-list li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 30px;
    break-inside: avoid;
    color: #333333;
    line-height: 1.4;
}

.amenities-list li:before {
    content: "✓";
    color: #0A2463;
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Location and Price Section */
.location-price {
    margin-top: 20px;
    font-size: 1.05rem;
    padding: 20px;
    background: #F8F9FA;
    border-radius: 10px;
    border: 2px solid #0A2463;
    color: #333333;
    line-height: 1.8;
    flex-shrink: 0; /* Prevent shrinking */
}

/* Add to Cart Button in Modal */
.add-to-cart-modal-btn {
    background: linear-gradient(135deg, #0A2463 0%, #1E3A8A 100%);
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(10, 36, 99, 0.3);
    flex-shrink: 0; /* Prevent shrinking */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        max-height: 95vh;
    }
    
    .modal-media-container {
        height: 250px;
    }
    
    .modal-amenities-container {
        max-height: 150px;
    }
    
    .amenities-list {
        columns: 1;
        font-size: 0.9rem;
    }
    
    .amenities-list li {
        margin-bottom: 10px;
        padding-left: 25px;
    }
}

/* Header Styles */
.real-estate-header {
    text-align: center;
    padding: 30px 20px;
    border-bottom: 3px solid #0A2463;
    margin-bottom: 30px;
    background: #FFFFFF;
}

.real-estate-title {
    color: #0A2463;
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.real-estate-subtitle {
    color: #000000;
    font-size: 1.1rem;
    margin: 0;
}

/* Fixed Cart Icon */
.cart-icon-fixed {
    position: fixed;
    top: 100px;
    right: 30px;
    background: linear-gradient(135deg, #0A2463 0%, #1E3A8A 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 8px 25px rgba(10, 36, 99, 0.4);
    transition: all 0.3s ease;
}

.cart-icon-fixed:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(10, 36, 99, 0.6);
}

.cart-icon-fixed i {
    font-size: 1.8rem;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #DC2626;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    border: 2px solid white;
}

/* Filter Section */
.filters {
    display: flex;
    justify-content: space-between;
    margin: 20px 0 30px;
    flex-wrap: wrap;
    gap: 20px;
    background: #F8F9FA;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #0A2463;
}

.filter-group {
    flex: 1;
    min-width: 250px;
}

.filter-title {
    margin-bottom: 12px;
    font-size: 1rem;
    color: #0A2463;
    font-weight: bold;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background: #FFFFFF;
    border: 2px solid #0A2463;
    color: #0A2463;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: bold;
}

.filter-btn:hover, 
.filter-btn.active {
    background: linear-gradient(135deg, #0A2463 0%, #1E3A8A 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 36, 99, 0.3);
}

/* Property Grid */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.property-card {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid #E0E0E0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(10, 36, 99, 0.2);
    border-color: #0A2463;
}

.property-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #F0F0F0;
}

.add-to-cart-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #0A2463 0%, #1E3A8A 100%);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.add-to-cart-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 18px rgba(10, 36, 99, 0.4);
}

.add-to-cart-btn i {
    font-size: 1.2rem;
}

.video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    background: rgba(10, 36, 99, 0.9);
    padding: 12px 18px;
    border-radius: 25px;
    border: 2px solid #0A2463;
    font-weight: bold;
}

.video-indicator .play-icon {
    font-size: 2rem;
    line-height: 1;
}

.property-info {
    padding: 18px;
    background: #FFFFFF;
}

.property-type {
    color: #0A2463;
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.property-title {
    font-size: 1.2rem;
    margin: 10px 0;
    line-height: 1.4;
    min-height: 50px;
    color: #0A2463;
    font-weight: bold;
}

.property-price {
    font-weight: bold;
    font-size: 1.2rem;
    color: #000000;
    margin: 10px 0;
}

.property-location {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #666666;
}

/* Shopping Cart Modal */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.cart-modal-content {
    background: #FFFFFF;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.cart-header {
    background: linear-gradient(135deg, #0A2463 0%, #1E3A8A 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #2563EB;
}

.cart-header h2 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-close-btn {
    font-size: 2rem;
    cursor: pointer;
    color: white;
    transition: color 0.3s;
}

.cart-close-btn:hover {
    color: #93C5FD;
}

.cart-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    max-height: 400px;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #999;
}

.cart-empty i {
    font-size: 4rem;
    margin-bottom: 15px;
    color: #DDD;
}

.cart-empty p {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 10px 0;
    color: #666;
}

.cart-empty small {
    color: #999;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.cart-item:hover {
    border-color: #0A2463;
    box-shadow: 0 4px 15px rgba(10, 36, 99, 0.1);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    flex-shrink: 0;
    background-color: #F0F0F0;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: bold;
    color: #0A2463;
    margin-bottom: 5px;
    font-size: 1rem;
}

.cart-item-price {
    color: #000000;
    font-weight: bold;
    margin-bottom: 3px;
}

.cart-item-location {
    color: #666;
    font-size: 0.85rem;
}

.cart-item-remove {
    background: #DC2626;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
}

.cart-item-remove:hover {
    background: #B91C1C;
    transform: scale(1.1);
}

.cart-footer {
    border-top: 2px solid #E0E0E0;
    padding: 20px 25px;
    background: #F8F9FA;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-total {
    color: #0A2463;
    font-size: 1.1rem;
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 2px solid #0A2463;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.btn-clear-cart,
.btn-checkout {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-clear-cart {
    background: #FFFFFF;
    color: #DC2626;
    border: 2px solid #DC2626;
}

.btn-clear-cart:hover {
    background: #DC2626;
    color: white;
}

.btn-checkout {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* Property Modal Styles - UPDATED */
.property-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 1500;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #FFFFFF;
    margin: auto;
    width: 100%;
    max-width: 900px;
    border-radius: 15px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    color: #0A2463;
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1600;
    background: #F0F0F0;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0A2463;
    transition: all 0.3s;
}

.close-btn:hover {
    background: #0A2463;
    color: white;
    transform: rotate(90deg);
}

/* Modal Media Container - UPDATED */
.modal-media-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 2px solid #E0E0E0;
    background: #F8F9FA;
}

.modal-media-scroller {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.modal-media-scroller::-webkit-scrollbar {
    display: none;
}

.modal-media {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #000000;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: pointer;
}

.modal-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.modal-video {
    max-width: 100%;
    max-height: 100%;
    background: #000;
}

.fullscreen-text {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: #FFFFFF;
    font-size: 0.9rem;
    text-align: center;
    background: rgba(10, 36, 99, 0.9);
    padding: 8px 15px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Navigation Arrows for Modal */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 36, 99, 0.9);
    color: white;
    border: 2px solid white;
    font-size: 2rem;
    padding: 15px 12px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 100;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow:hover {
    background: #0A2463;
    transform: translateY(-50%) scale(1.1);
}

.nav-arrow.hidden {
    display: none;
}

.prev-arrow {
    left: 15px;
}

.next-arrow {
    right: 15px;
}

/* Modal Title */
.modal-title {
    font-size: 1.8rem;
    margin: 0 0 20px 0;
    color: #0A2463;
    text-align: center;
    font-weight: bold;
    padding: 0 20px;
}

/* Amenities List - FIXED TEXT COLOR */
.amenities-list {
    columns: 2;
    list-style-type: none;
    padding: 0 20px;
    margin: 10px 0;
    color: #333333;
    font-size: 0.55rem;
}

.amenities-list li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 30px;
    break-inside: avoid;
    color: #333333;
}

.amenities-list li:before {
    content: "✓";
    color: #0A2463;
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Location and Price Section */
.location-price {
    margin-top: 20px;
    font-size: 1.05rem;
    padding: 20px;
    background: #F8F9FA;
    border-radius: 10px;
    border: 2px solid #0A2463;
    color: #333333;
    line-height: 1.8;
}

.location-price span {
    color: #0A2463;
    font-weight: 600;
}

.price {
    color: #DC2626;
    font-weight: bold;
    font-size: 1.4rem;
}

/* Add to Cart Button in Modal */
.add-to-cart-modal-btn {
    background: linear-gradient(135deg, #0A2463 0%, #1E3A8A 100%);
    color: white;
    border: none;
    padding: 16px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(10, 36, 99, 0.3);
}

.add-to-cart-modal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(10, 36, 99, 0.5);
}

/* Fullscreen Viewer - UPDATED */
.fullscreen-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.98);
    z-index: 2000;
    overflow: hidden;
    padding: 0;
}

.fullscreen-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.fullscreen-scroller {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.fullscreen-scroller::-webkit-scrollbar {
    display: none;
}

.fullscreen-item {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.fullscreen-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-video {
    max-width: 100%;
    max-height: 100%;
    background: #000;
}

.fullscreen-close-btn {
    color: white;
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2100;
    background: rgba(10, 36, 99, 0.9);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    transition: all 0.3s;
}

.fullscreen-close-btn:hover {
    background: #0A2463;
    transform: rotate(90deg);
}

.fullscreen-nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 36, 99, 0.9);
    color: white;
    border: 2px solid white;
    font-size: 2rem;
    padding: 15px 12px;
    cursor: pointer;
    z-index: 2100;
    transition: all 0.3s;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-nav-arrow:hover {
    background: #0A2463;
    transform: translateY(-50%) scale(1.1);
}

.fullscreen-prev-arrow {
    left: 20px;
}

.fullscreen-next-arrow {
    right: 20px;
}

.fullscreen-nav-arrow.hidden {
    display: none;
}

/* Notification Toast */
.notification {
    position: fixed;
    top: 100px;
    right: -350px;
    background: white;
    color: #0A2463;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: right 0.3s ease;
    border-left: 4px solid #0A2463;
    min-width: 300px;
}

.notification.show {
    right: 20px;
}

.notification i {
    font-size: 1.5rem;
}

.notification-success {
    border-left-color: #10B981;
}

.notification-success i {
    color: #10B981;
}

.notification-error {
    border-left-color: #DC2626;
}

.notification-error i {
    color: #DC2626;
}

/* Footer */
.footer {
    text-align: center;
    padding: 25px 0;
    margin-top: 50px;
    border-top: 2px solid #0A2463;
    color: #0A2463;
    font-weight: bold;
    background: #F8F9FA;
    border-radius: 10px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .cart-icon-fixed {
        top: 90px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .cart-icon-fixed i {
        font-size: 1.5rem;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .amenities-list {
        columns: 1;
        font-size: 0.9rem;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .real-estate-title {
        font-size: 2rem;
    }
    
    .property-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 20px;
        max-height: 95vh;
    }
    
    .modal-media-container {
        height: 250px;
    }
    
    .modal-title {
        font-size: 1.4rem;
    }
    
    .location-price {
        font-size: 0.95rem;
        padding: 15px;
    }
    
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        padding: 10px;
    }
    
    .fullscreen-nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .close-btn {
        width: 40px;
        height: 40px;
        font-size: 28px;
        top: 10px;
        right: 10px;
    }
    
    .add-to-cart-modal-btn {
        padding: 14px 25px;
        font-size: 1rem;
    }
}