.modal-loading {
    display:    none;
    position:   fixed;
    z-index:    1000;
    top:        0;
    left:       0;
    height:     100%;
    width:      100%;
    background: rgba(255, 255, 255, 0.8) url('/img/ajax-loader.gif') 50% 50% no-repeat;
}

.center {
    position: absolute;
    width: 250px;
    height: 50px;
    top: 50%;
    left: 50%;
    margin-left: -60px; /* margin is -0.5 * dimension */
    margin-top: -25px;
}

/* When the body has the loading class, we turn
    the scrollbar off with overflow:hidden */
body.loading .modal-loading {
    overflow: hidden;
}

/* Anytime the body has the loading class, our
    modal element will be visible */
body.loading .modal-loading {
    display: block;
}

.modal-overlay {
    display:    none;
    position:   fixed;
    z-index:    1000;
    top:        0;
    left:       0;
    height:     100%;
    width:      100%;
    background: rgba( 0, 0, 0, .8 )
    50% 50%
    no-repeat;
}
.modal-overlay > h1 {
    color: #fff; margin: 0;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}
body.overlay .modal-overlay {
    display: block;
}
/* 1. RESET & VARIABLES */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-card: #ffffff;
    --accent-green: #10b981;
    --accent-red: #ef4444;
}

/* 2. CARD LAYOUT */
.room-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column; /* Mobile first */
    /* max-width: 850px; */
    width: 100%;
    overflow: hidden;
    margin-bottom: 20px;
}

/* 3. IMAGE SECTION */
.card-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    transition: transform 0.4s ease; 
}

.card-img-wrapper:hover img {
    transform: scale(1);
}

/* Badge Sisa Kamar (Dari data qty_tersedia) */
.stock-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    font-weight: 600;
}

/* 4. CONTENT SECTION */
.card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.room-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
}

/* --- MAGIC SECTION: Handling Raw HTML Description --- */
/* Kita menata ulang <ul> dan <li> bawaan data agar cantik */
.raw-desc-container {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Menghapus bullet point default browser */
.raw-desc-container ul {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: 1fr; /* Default 1 kolom */
    gap: 6px;
}

/* Menambahkan icon checklist custom */
.raw-desc-container li {
    position: relative;
    padding-left: 24px;
}

.raw-desc-container li::before {
    content: '✓'; 
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* Style khusus jika ada tag <strong> di dalam data */
.raw-desc-container strong {
    color: var(--text-main);
    font-weight: 600;
}

/* 5. FOOTER & PRICING */
.card-footer {
    border-top: 1px dashed #e5e7eb;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.price-tag small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 2px;
}

.price-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.cta-button {
    background-color: var(--primary);
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
}

.cta-button:hover { background-color: var(--primary-dark); }

/* Expand Button Styles */
.expand-btn {
    background-color: var(--primary);
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.expand-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.expand-btn:active {
    transform: translateY(0);
}

/* Icon rotasi pada button */
.expand-btn::after {
    content: '▼';
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.3s ease;
    font-size: 12px;
}

.expand-btn.active::after {
    transform: rotate(180deg);
}

/* Rate Plans Section (Hidden by default) */
.rate-plans {
    background: var(--bg-card);
    border-top: 1px dashed #e5e7eb;
    width: 100%; 
    display: none;
    padding: 20px;
}

.rate-plans.active {
    display: block;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animasi untuk closing/collapse */
.rate-plans.closing {
    display: block;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Slide down animation (untuk expand) */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide up animation (untuk collapse) */
@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* 6. RESPONSIVE (Desktop Layout) */
@media (min-width: 768px) {
    .room-card { flex-direction: row; height: auto; min-height: 240px; flex-wrap: wrap; }
    .card-img-wrapper { width: 35%; height: auto; }
    .card-body { width: 65%; }
    
    /* Di layar lebar, list amenities jadi 2 kolom agar tidak terlalu panjang ke bawah */
    .raw-desc-container ul { grid-template-columns: 1fr 1fr; gap: 8px 20px; }
}