.property-images-horizontal {
    display: flex;
    gap: 10px;
    height: 300px;
    /* 🔥 Fixed Height */
}

.left-image {
    width: 50%;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.left-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 🔥 Crop แบบไม่บีบ */
    border-radius: 12px;
    cursor: pointer;
}

.right-grid {
    width: 50%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    height: 100%;
}

.grid-square {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.grid-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.grid-square .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
    border-radius: 8px;
}


@media (max-width: 768px) {
    .property-images-horizontal {
        display: block;
        padding-bottom: 0;
        height: auto;
    }

    .left-image,
    .right-grid {
        position: static;
        width: 100%;
    }

    .left-image {
        aspect-ratio: 16 / 9;
    }

    .right-grid {
        margin-top: 10px;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .grid-square {
        aspect-ratio: 1 / 1;
    }
}




/* Modal */
.modal {
    display: none;
    /* จะแสดงเมื่อ JS เปลี่ยนเป็น flex */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 32px;
    color: white;
    cursor: pointer;
    z-index: 10000;
}

.navigate-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 36px;
    color: white;
    cursor: pointer;
    padding: 10px;
    z-index: 10000;
}

.navigate-btn.prev {
    left: 20px;
}

.navigate-btn.next {
    right: 20px;
}

.caption-text {
    color: white;
    margin-top: 10px;
    text-align: center;
}



.property-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.property-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    font-size: 16px;
    background-color: #f8f8f8;
}

.property-table th,
.property-table td {
    padding: 4px 16px;
    border: 1px solid #ddd;
    text-align: left;
}

.property-table th {

    color: #333;
    width: 30%;
    font-weight: 600;
}


.btn-back {
    display: inline-block;
    margin-bottom: 1em;
    padding: 8px 16px;
    background-color: #eee;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-back:hover {
    background-color: #ddd;
}