/* public/assets/css/headquater.css */
.entity_index {
    display: flex;
    padding-top: 8px;
    padding-left: 0px;
}

.entity_index li {
    list-style: none;
    margin-right: 10px;
}

/* Force the map container to take full width and override inline styles */
.show-frame > div {
    width: 100% !important;
    height: 80vh !important; /* You can change this to match your preferred map height */
    max-width: 100% !important;
}

/* Ensure the iframe itself also takes full space */
.show-frame iframe {
    width: 100% !important;
    height: 100% !important;
}

/* Style the map container to look good on the screen */
.show-map {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    position: relative;
    /* Center the map popup vertically if needed */
    margin: 20px auto; 
}

.show-rooms {
    position: relative;
    padding: 0px 0;
    color: #333;
}

.show-rooms.product-hotel {
    padding: 0px;
}

.show-rooms a.more {
    font-size: 14px;
    font-weight: 600;
    padding: 3px 5px;
    color: rgb(0, 182, 243) !important;
}

.show-rooms p,
.show-rooms h2 {
    color: #333 !important;
    font-weight: 300;
}

.show-rooms h2 {
    font-size: 24px;
}

.show-rooms .bed {
    text-align: center;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    padding: 5px 15px;
}

.show-rooms .bed ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bed.info ul {
    display: flex;
    flex-wrap: wrap;   /* Wrap to next line if too long */
    gap: 16px;
    padding: 0;
    list-style: none;
}

.bed.info ul li {
    display: flex;
    align-items: center;
}

.bed.info ul li img.icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.show-rooms .offers p {
    color: #333;
    margin-bottom: 3px;
}

.show-rooms .bed ul li {
    padding: 10px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.show-rooms .bed span {
    color: #333;
}

.show-rooms .bed p {
    margin: auto 0px;
}

.show-rooms .amenity .list ul {
    list-style: none;
    margin: 0px;
    padding: 0px;
}

.show-rooms .amenity .list ul li {
    display: inline;
    margin: 3px;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 400;
    line-height: 14px;
    border-radius: 100px;
    background-color: #EDF2F7;
    float: left;
}

.show-rooms .amenity .list ul li span {
    color: #333 !important;
}

.show-rooms .bed .icon {
    max-width: 25px;
    text-align: middle;
    margin-left: auto;
    margin-right: auto;
}

.show-rooms ul.list-policy {
    list-style: none;
    padding: 0;
    margin: 0;
}

.show-rooms ul.list-policy li {
    padding: 3px 3px;
    color: #333;
}

.show-rooms .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
}

.show-rooms .item .item-right ul.capacity {
    list-style: none;
    padding: 0;
    margin: 0;
}

.show-rooms .item .item-right ul.capacity li {
    float: left;
    position: relative;
    padding: 3px;
    color: #555;
    margin-right: 15px;
}

.show-rooms .list-policy .cancellation {
    color: #6F7977;
}

.show-rooms .list-policy .breakfast {
    color: #65BB78;
}

.show-rooms .list-policy .confirmation {
    color: #EE8936;
}

.show-rooms .list-policy .invoice {
    color: #FF3383;
}

.show-rooms .item .item-right .info-room {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 5px 0;
}

.show-rooms .item .item-right .include {
    background-color: #f0f8f0; /* Light green background */
    padding: 10px;
    border-left: 4px solid #4CAF50; /* Green left border */
    border-radius: 5px; /* Rounded corners */
    margin-bottom: 10px;
    color: #333;
}

.show-rooms .item .item-right .include h6 {
    font-weight: bold; /* Bold text */
    color: #333; /* Black text color */
}

.show-rooms .amenity.hide-amenity-mobile {
    display: block;
}

.show-rooms .amenity.show-amenity-mobile {
    display: none;
}

.amenity.show-amenity-mobile {
    border-top: 1px solid #ddd;
    margin-top: 5px;
    padding: 10px 0px;
}

.amenity.show-amenity-mobile .list ul {
    display: grid;
    grid-template-columns: repeat(5, 1fr) 50px; /* 5 equal amenities + 1 view more box */
    gap: 1px;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.amenity.show-amenity-mobile .list ul li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: auto;
    min-height: 75px;
    padding: 1px;
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
}

/* Image icon or fallback */
.amenity.show-amenity-mobile .list ul li .amenity-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-bottom: 6px;
}

.amenity.show-amenity-mobile .list ul li i {
    font-size: 24px;
    color: #444;
    margin-bottom: 6px;
}

/* Amenity name, max 2 lines with ellipsis */
.amenity.show-amenity-mobile .list ul li span.ellipsis-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    line-height: 1.2;
    max-height: 2.4em;
    word-break: break-word;
    padding: 0 4px;
}

/* View more button: rounded, compact, centered */
.amenity.show-amenity-mobile .list ul li:last-child {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amenity.show-amenity-mobile .list ul li:last-child a.popup-amenities {
    width: 36px;
    height: 36px;
    font-size: 12px;
    background-color: #ffdfe3;
    color: #e81c4f;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin: auto;
}

@media(max-width: 768px) {
    .show-rooms .amenity.hide-amenity-mobile {
        display: none;
    }
    .show-rooms .amenity.show-amenity-mobile {
        display: block;
    }
}

/* ========================================================================= */
/* --- AMENITY POPUP (SLIDE FROM BOTTOM TO CENTER) --- */
/* ========================================================================= */

.popup-amenity {
    position: fixed;
    top: 50%;
    left: 50%;
    /* ⚡ Bắt đầu ở ngoài màn hình (đẩy xuống 100vh so với trục Y) */
    transform: translate(-50%, 100vh);
    width: 90%; 
    max-width: 600px; /* Độ rộng tối đa của popup */
    height: auto;
    max-height: 85vh; /* Chống tràn màn hình */
    opacity: 0;
    visibility: hidden; /* Ẩn hoàn toàn khi không active */
    background: #fff;
    overflow: hidden;
    z-index: 1050;
    border-radius: 12px; /* Bo tròn đều 4 góc */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    
    /* Hiệu ứng trượt mượt mà (cùng thông số cubic-bezier với các modal khác) */
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease, visibility 0.4s;
    padding: 0 20px;
    pointer-events: none; 
}

/* ⚡ Trạng thái khi hiển thị */
.popup-amenity.active {
    /* Trượt lên và neo chính giữa màn hình (-50% X, -50% Y) */
    transform: translate(-50%, -50%);
    opacity: 1;
    visibility: visible;
    padding-top: 20px;
    padding-bottom: 20px;
    pointer-events: auto;
    overflow-y: auto; 
    scroll-behavior: smooth; 
}

/* Sửa lại phần tối ưu cho Mobile */
@media (max-width: 576px) {
    .popup-amenity.active {
        height: auto;
        max-height: 90vh; /* Ép thanh cuộn dọc nếu nội dung dài quá 90% màn hình */
    }
}

/* Close button styling */
.close-popup {
    position: sticky; /* Keep the button fixed relative to the scroll container */
    top: 0px; 
    float: right; /* Push to the right edge */
    background: #f44336;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    margin-bottom: 15px; /* Add some space below the button so it doesn't overlap title */
}

/* Optional: Custom styling for the scrollbar to make it look modern */
.popup-amenity::-webkit-scrollbar {
    width: 6px;
}
.popup-amenity::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.popup-amenity::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.popup-amenity::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Mobile - additional optimization */
@media (max-width: 576px) {
    .popup-amenity.active {
        height: 90vh;
        overflow-y: auto;
    }
}

/* Grid container for amenities */
.popup-amenity .jss319 {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6 columns on desktop */
    gap: 16px 12px; /* Row gap: 16px, Column gap: 12px */
    margin-top: 12px;
    margin-bottom: 24px; /* Space below each category */
}
.list.desktop .jss319 {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
    gap: 16px 12px; /* Row gap: 16px, Column gap: 12px */
    margin-top: 12px;
    margin-bottom: 24px; /* Space below each category */
}

/* Individual amenity item wrapper */
.jss356 {
    display: flex;
    align-items: flex-start; /* Align icon and text to the top */
}

/* Amenity Icon */
.jss357 {
    width: 20px; /* Slightly smaller icon to fit 6 columns */
    height: 20px;
    margin-right: 8px; /* Space between icon and text */
    flex-shrink: 0; /* Prevent icon from shrinking */
}

/* Amenity Text */
.jss360 {
    width: 100%;
    font-size: 13px; /* Slightly smaller text */
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
}

/* Responsive adjustments for tablet */
@media (max-width: 992px) {
    .list.desktop {
        display: grid !important;
    }
    .list.desktop .jss319 {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
        gap: 16px 12px; /* Row gap: 16px, Column gap: 12px */
        margin-top: 12px;
        margin-bottom: 24px; /* Space below each category */
    }

    .jss319 {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
    }
    .popup-amenity .jss319 {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px 12px;
        margin-top: 12px;
        margin-bottom: 24px;
    }
}

/* Responsive adjustments for mobile */
@media (max-width: 576px) {
    .jss319 {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile devices */
    }
}

/* ========================================================================= */
/* --- SLIDE FROM BOTTOM TO CENTER ANIMATION & LAYOUT --- */
/* ========================================================================= */

/* 1. Canh giữa màn hình tuyệt đối và tạo hiệu ứng trượt từ dưới lên */
#addToCart.bottom-sheet-modal .modal-dialog {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    min-height: 100%; 
    display: flex;
    align-items: center; /* Canh giữa theo chiều dọc */
    justify-content: center; /* Canh giữa theo chiều ngang */
    max-width: 1000px; /* Giới hạn độ rộng tối đa trên PC */
    
    /* Bắt đầu ở vị trí vô hình, bị đẩy hẳn xuống dưới đáy màn hình */
    transform: translateY(100vh) !important; 
    opacity: 0;
    
    /* Hiệu ứng trượt lên mượt mà (cubic-bezier tạo độ nảy nhẹ) */
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease !important;
    padding: 15px; /* Giữ khoảng cách an toàn với mép màn hình */
}

/* Trạng thái khi hiển thị: Trượt lên điểm 0 (chính giữa màn hình do flexbox quản lý) */
#addToCart.bottom-sheet-modal.show .modal-dialog {
    transform: translateY(0) !important;
    opacity: 1;
}

/* 2. Khung modal: Bo góc 4 cạnh bằng nhau, tự động co giãn chiều cao */
#addToCart.bottom-sheet-modal .modal-content {
    height: auto !important; 
    max-height: 90vh !important; /* Tối đa 90% màn hình, triệt tiêu scroll ngoài */
    width: 100%;
    margin: 0; 
    border-radius: 20px !important; /* Bo góc tròn đều 4 cạnh */
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden !important; 
    display: flex;
    flex-direction: column;
}

/* Nút tắt popup: Đặt gọn góc phải trên */
#addToCart.bottom-sheet-modal .close.absolute-top-right {
    top: 10px;
    right: 10px;
    background: #f44336;
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    z-index: 1055;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#addToCart.bottom-sheet-modal .close.absolute-top-right span {
    line-height: 1;
    margin-top: -2px;
}

/* 3. Nội dung bên trong (Body): Ép padding 5px và chống tràn scroll ngang */
.modal-body.compact-modal,
.modal-body.c-scrollbar-light {
    padding: 5px !important; /* Override cứng class p-4 của Bootstrap trong HTML */
    flex-grow: 1; 
    overflow-y: auto !important; /* Chỉ hiện thanh cuộn dọc khi nội dung cao hơn 90vh */
    overflow-x: hidden !important; /* Tắt hẳn thanh cuộn ngang gây ức chế */
    display: flex;
    flex-direction: column;
}

/* Triệt tiêu lỗi tràn ngang kinh điển của Bootstrap Row */
#addToCart.bottom-sheet-modal .modal-body > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Limit image height to prevent pushing content down */
.modal-product-gallery .img-zoom img {
    max-height: 250px;
    object-fit: contain;
    width: 100%;
}

/* 4. Sticky Action Bar (Thanh chốt đơn dưới cùng) */
.sticky-action-bar {
    position: sticky;
    bottom: -5px !important; /* Kéo âm 5px để bù trừ cho padding 5px của Body */
    background-color: #fff;
    padding-top: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom)); 
    margin-top: auto; 
    margin-left: -5px; /* Tràn viền khớp với body */
    margin-right: -5px; 
    padding-left: 15px; /* Giữ khoảng cách text bên trong nút */
    padding-right: 15px;
    border-top: 1px solid #f1f1f1;
    border-radius: 0 0 20px 20px; /* Bo góc đáy trùng với modal-content */
    z-index: 100;
    flex-shrink: 0; 
}

/* Giấu scrollbar ngang ở mobile, thu gọn scrollbar dọc */
.c-scrollbar-light::-webkit-scrollbar {
    width: 4px;
    height: 0px !important; 
}
.c-scrollbar-light::-webkit-scrollbar-track {
    background: transparent;
}
.c-scrollbar-light::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

/* Mobile optimization */
@media (max-width: 576px) {
    #addToCart.bottom-sheet-modal .modal-dialog {
        padding: 10px; /* Thu hẹp lề một chút trên điện thoại */
    }
    #addToCart.bottom-sheet-modal .modal-content {
        max-height: 95vh !important; /* Cho phép cao hơn trên màn hình nhỏ */
    }
}

/* ================== HOTEL ROOM DETAILS & AMENITIES STYLES ================= */
.total-child-price > div {
    padding: 6px 0;
    border-bottom: 1px dashed #f1d69a;
    font-size: 15px;
    color: #333;
}

.total-child-price > div span {
    text-align: right;
    font-size: 16px;
    color: #c47a08;
}
/* ========================================================================= */
/* ================== NEW COMPACT MODAL STYLES ADDED HERE ================== */
/* ========================================================================= */

/* 2. Sửa modal-body: Xóa padding ở đáy để thanh action bar ép sát 100% */
.modal-body.compact-modal,
.modal-body.c-scrollbar-light {
    padding: 1rem 1rem 0 1rem !important; /* Chỉ giữ padding trên, trái, phải. Đáy = 0 */
    flex-grow: 1; 
    overflow-y: auto !important; /* Chỉ cuộn dọc khi thực sự vượt quá max-height 92vh */
    overflow-x: hidden !important; 
    display: flex;
    flex-direction: column;
}
/* Triệt tiêu lỗi tràn ngang kinh điển của Bootstrap Row */
#addToCart.bottom-sheet-modal .modal-body > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
/* Limit image height to prevent pushing content down on mobile */
.modal-product-gallery .img-zoom img {
    max-height: 250px;
    object-fit: contain;
    width: 100%;
}

/* Reduce spacing on dividers */
.compact-hr {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* 3. Sửa action bar: Bám chính xác vào đáy, không bị hụt pixel */
.sticky-action-bar {
    position: sticky;
    bottom: 0px !important; /* Bám sát đáy, không dùng số âm nữa */
    background-color: #fff;
    padding-top: 15px;
    padding-bottom: max(15px, env(safe-area-inset-bottom)); /* Tối ưu cho viền đen/tai thỏ của iPhone */
    margin-top: 1rem; /* Tạo khoảng cách với phần form ở trên */
    margin-left: -1rem; 
    margin-right: -1rem;
    padding-left: 1rem; 
    padding-right: 1rem;
    border-top: 1px solid #f1f1f1;
    z-index: 100;
    flex-shrink: 0; /* Đảm bảo nút không bao giờ bị bóp méo khi nội dung quá dài */
}

/* Giấu scrollbar ngang ở mobile, thu gọn scrollbar dọc */
.c-scrollbar-light::-webkit-scrollbar {
    width: 4px;
    height: 0px !important; /* Tắt hẳn scrollbar ngang của webkit */
}
.c-scrollbar-light::-webkit-scrollbar-track {
    background: transparent;
}
.c-scrollbar-light::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
/* ========================================================================= */
/* ================= HOTEL COMPACT LAYOUT OPTIMIZATIONS ==================== */
/* ========================================================================= */

/* Transform standard list into a dense wrap flexbox */
.room-list ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Standardize gap between room options */
    padding: 0;
    margin-bottom: 0.5rem;
}

.room-list li.room-item {
    list-style: none;
    margin: 0;
}

/* Override default label margins for density */
.room-checkbox-label {
    margin-bottom: 0 !important;
    cursor: pointer;
}

/* Compact visual style for the room checkbox buttons */
.room-checkbox-label .custom-checkbox-icon {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    background-color: #f8f9fa;
    border-color: #e2e5ec !important;
    transition: all 0.2s ease-in-out;
}

.room-checkbox-label input[type="checkbox"] {
    display: none; /* Hide default browser checkbox */
}

/* Highlight style when room is selected */
.room-checkbox-label input:checked + .custom-checkbox-icon {
    background-color: #e6f7ff;
    border-color: #1890ff !important;
    color: #1890ff;
}

/* Disabled/Locked style */
.room-checkbox-label.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Maintain internal flex structure of modal */
.compact-modal .row.flex-grow-1 {
    min-height: 0; /* Ensures inner scroll works properly in flex child */
}

/* Smaller alert boxes for hotel warnings */
.compact-modal .alert {
    line-height: 1.3;
}

/* ========================================================================= */
/* --- GALLERY MODAL STYLES (REUSING BOTTOM-SHEET ANIMATION) --- */
/* ========================================================================= */

/* Inherit the slide-up animation logic from the existing bottom-sheet-modal */
#imageGalleryModal.bottom-sheet-modal .modal-dialog {
    position: fixed;
    top: 0; bottom: 0; left: 0; right: 0;
    margin: auto;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 900px; /* Optimal size for image gallery */
    transform: translateY(100vh) !important;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease !important;
    padding: 15px;
}

#imageGalleryModal.bottom-sheet-modal.show .modal-dialog {
    transform: translateY(0) !important;
    opacity: 1;
}

.gallery-modal-content {
    background-color: transparent !important;
    border-radius: 20px !important;
    overflow: hidden;
    height: 85vh !important; /* Fixed height for consistent layout */
}

/* Close button positioned perfectly over the black area */
.gallery-close-btn {
    background: #f44336 !important;
    color: #fff !important;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1 !important;
    top: 15px !important;
    right: 15px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.gallery-close-btn span {
    line-height: 1;
    margin-top: -2px;
}

/* Image container settings */
.gallery-main-container {
    background-color:transparent;
    border-radius: 20px 20px 0 0;
    padding: 20px;
}

#gallery-main-img {
    max-height: 60vh;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

/* Left / Right Navigation Buttons */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 8px;
    z-index: 10;
    backdrop-filter: blur(5px);
    transition: background 0.2s ease;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.4);
}

.gallery-nav.prev { left: -15px; }
.gallery-nav.next { right: -15px; }

/* Thumbnail Strip below main image */
.gallery-thumbnails-container {
    border-radius: 0 0 20px 20px;
    border-top: 1px solid #eee;
}

.gallery-thumb-item {
    height: 70px;
    width: 100px;
    object-fit: cover;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 8px;
    flex-shrink: 0;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.gallery-thumb-item.active, 
.gallery-thumb-item:hover {
    opacity: 1;
    border-color: #00b6f3; /* Matching your theme's active color */
}

/* Scrollbar styling for the thumbnail container */
.custom-scrollbar::-webkit-scrollbar {
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* ========================================================================= */
/* --- TWO-COLUMN GALLERY MODAL STYLES (UPDATED) --- */
/* ========================================================================= */

#imageGalleryModal.bottom-sheet-modal .modal-dialog {
    position: fixed;
    top: 0; bottom: 0; left: 0; right: 0;
    margin: auto;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1000px; /* Reduced from 1140px to match the compact requested UI */
    transform: translateY(100vh) !important;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease !important;
    padding: 5px;
}

#imageGalleryModal.bottom-sheet-modal.show .modal-dialog {
    transform: translateY(0) !important;
    opacity: 1;
}

/* 1. Fix Modal Container Background & Border */
.gallery-modal-content {
    background-color: #fff !important; /* Changed from transparent to white */
    border-radius: 16px !important; /* Softer border radius */
    overflow: hidden;
    height: 85vh !important;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Close Button Override */
.gallery-close-btn {
    background: #fff !important;
    color: #333 !important;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1 !important;
    top: 15px !important;
    right: 15px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1060;
    border: none;
    transition: background 0.2s;
}
.gallery-close-btn:hover {
    background: #f1f1f1 !important;
}

#imageGalleryModal-body .row {
    height: 100%;
    margin: 0;
}

/* ================== LEFT COLUMN: IMAGES ================== */

.gallery-main-container {
    height: calc(100% - 90px); /* Reserve exactly 90px for thumbnails */
    padding: 0 !important; /* Bỏ toàn bộ khoảng trắng xung quanh ảnh */
    display: block; /* Bỏ flexbox vì ảnh sẽ chiếm 100% diện tích */
    position: relative;
}

#gallery-main-img {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important; /* Ghi đè inline style max-height: 70vh trong file HTML */
    max-width: 100% !important;
    object-fit: cover !important; /* Cắt cúp ảnh tự động để lấp đầy toàn bộ khung */
    border-radius: 16px 0 0 0; /* Bo tròn góc trên cùng bên trái khớp với viền Modal */
}

/* Thumbnails Strip */
.gallery-thumbnails-container {
    height: 90px;
    background: transparent;
    padding: 10px 15px;
    border-top: 1px solid #eee;
}

.gallery-thumb-item {
    height: 65px;
    width: 90px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    flex-shrink: 0;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.gallery-thumb-item.active, 
.gallery-thumb-item:hover {
    opacity: 1;
    border-color: #f44336; /* Brand primary color */
}

/* Navigation Overlays (Nút mũi tên qua lại) */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85); /* Tăng độ đục để dễ nhìn hơn trên nền ảnh cover */
    color: #333;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}
.gallery-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.05);
}
.gallery-nav.prev { left: -15px; }
.gallery-nav.next { right: -15px; }

/* ================== MOBILE RESPONSIVE CHO ẢNH ================== */
@media (max-width: 991.98px) {
    #gallery-main-img {
        border-radius: 16px 16px 0 0; /* Trên Mobile, 2 cột xếp dọc nên cần bo cả góc phải trên */
    }
}

/* ================== RIGHT COLUMN: ROOM INFO ================== */
#gallery-room-info {
    height: 100%;
    /* Chừa 100px ở đáy để khi cuộn xuống tận cùng, chữ không bị nút che khuất */
    padding: 24px 24px 100px 24px !important; 
    
    /* QUAN TRỌNG NHẤT: Dùng static để nút bấm bên trong có thể lọt ra ngoài và không bị cuộn theo */
    position: static !important; 
    
    background: #fff;
    display: block !important;
}

/* ... (giữ nguyên các CSS của thẻ h4, ul.list-unstyled, scrollbar như cũ) ... */

/* 2. Fix Action Button: Neo tuyệt đối vào khung Modal chính */
#gallery-room-info .sticky-bottom {
    position: absolute !important; 
    
    /* Ghim chết vào góc dưới cùng bên phải của toàn bộ Popup */
    bottom: 0 !important; 
    right: 0 !important; 
    left: auto !important;
    
    /* Ép chiều rộng bằng đúng cột col-lg-5 (5/12 = 41.666667%) trên máy tính */
    width: 41.666667% !important; 
    
    background: #fff !important;
    padding: 16px 24px !important;
    margin: 0 !important; /* Xóa mọi margin gây lỗi */
    border-top: 1px solid #eaeaea !important;
    z-index: 1050 !important;
    
    /* Bo góc dưới cùng bên phải cho khớp với viền của Popup */
    border-radius: 0 0 16px 0 !important; 
    
    /* Hiệu ứng mờ che text cuộn dưới */
    box-shadow: 0 -15px 25px rgba(255, 255, 255, 0.95);
}

#gallery-room-info .sticky-bottom button {
    height: 48px;
    font-size: 16px;
    border-radius: 8px;
    width: 100%;
    margin: 0 !important;
}


/* ================== MOBILE RESPONSIVE HOÀN THIỆN ================== */
@media (max-width: 991.98px) {
    .gallery-close-btn {
       
        width: 36px;
        height: 36px;
        top: 5px !important;
        right: 5px !important;
    }


    .modal-body.compact-modal, .modal-body.c-scrollbar-light
    {
        padding: 0.1rem 0.1rem 0 0.1rem !important;
        flex-grow: 1;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        display: flex;
        flex-direction: column;
    }
   
    /* 1. Ép Popup bung rộng tối đa */
    #imageGalleryModal.bottom-sheet-modal .modal-dialog {
        padding: 3px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 100vh !important;
    }
    
    .gallery-modal-content {
        height: calc(100vh - 6px) !important; 
        display: flex;
        flex-direction: column;
        border-radius: 12px !important; 
    }

    /* ⚡ KHẮC PHỤC LỖI TÀNG HÌNH NỘI DUNG */
    #imageGalleryModal-body .row {
        height: 100%;
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important; /* Chống bị văng sang cột ẩn bên phải */
        margin: 0;
    }

    /* 2. Cột trái (Hình ảnh) */
    #gallery-left-col {
        height: 40vh !important;
        flex: 0 0 40vh !important;
        width: 100% !important;
        background: rgb(237, 242, 247) !important; /* Màu nền bạn yêu cầu */
        border-radius: 12px 12px 0 0 !important;
    }

    #gallery-main-img {
        object-fit: contain !important; 
        border-radius: 12px 12px 0 0 !important;
        margin: auto; 
    }
    
    .gallery-main-container {
        height: calc(100% - 70px) !important; 
    }
    
    .gallery-thumbnails-container {
        height: 70px;
        padding: 5px 10px;
        background: #fff; 
    }
    
    .gallery-thumb-item {
        height: 50px;
        width: 70px;
    }

    /* 3. Cột phải (Thông tin phòng) */
    #gallery-room-info {
        height: auto !important;
        flex: 1 1 auto !important; 
        min-height: 0 !important; /* ⚡ QUAN TRỌNG: Ép Flexbox sinh ra thanh cuộn dọc thay vì tràn Layout */
        width: 100% !important;
        padding: 16px 16px 90px 16px !important; 
        overflow-y: auto !important;
    }

    /* 4. Nút chốt đơn neo chặt vào đáy */
    #gallery-room-info .sticky-bottom {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 12px 16px !important;
        border-radius: 0 0 12px 12px !important;
        margin: 0 !important;
        background: #fff !important;
        box-shadow: 0 -10px 20px rgba(255, 255, 255, 0.95);
    }
}