:root {
  --second: #1477e0;
  --third:  #5eb6ff;
  --primary-color: #f3f9fe;
  --text-dark: #333;
  --text-light: #666;
  --border-color: #e5e7eb;
}
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
body { font-family:"Baloo 2","Poppins",cursive,sans-serif; }

.room-list-page { width:100%; min-height:100vh; background:var(--primary-color); position:relative; }

/* Right half blue */
.room-list-background { position:absolute; top:0; right:0; width:50%; height:100%; background:var(--second); z-index:0; pointer-events:none; }
.room-list-background::before, .room-list-background::after { content:""; position:absolute; left:0; width:100%; height:50%; background-image:url("../images/pattern.png"); background-size:800px; background-repeat:no-repeat; background-position:center top; opacity:0.15; filter:invert(1) brightness(1.5); pointer-events:none; }
.room-list-background::before { top:0; }
.room-list-background::after { bottom:0; transform:scaleY(-1); }

/* Logo */
.room-list-logo { position:absolute; top:28px; left:60px; z-index:102; }
.room-list-logo img { height:40px; width:auto; }
.room-list-logo a { text-decoration:none; }

/* Nav bar */
.room-list-header { position:absolute; top:22px; right:145px; display:inline-flex; align-items:center; gap:6px; background:rgba(255,255,255,0.18); backdrop-filter:blur(14px); border-radius:50px; padding:6px 16px; z-index:101; }
.room-list-header .nav-menu { list-style:none; display:flex; gap:2px; }
.room-list-header .nav-menu li { position:relative; }
.room-list-header .nav-menu a { color:white !important; text-decoration:none; font-size:13.5px; font-weight:600; padding:5px 13px; border-radius:30px; display:inline-block; transition:background .2s; cursor:pointer; }
.room-list-header .nav-menu a:hover { background:rgba(255,255,255,0.18); }
.room-list-header .nav-menu a.active { background:rgba(255,255,255,0.88) !important; color:var(--second) !important; }
.room-list-header .nav-menu .submenu { display:none; position:absolute; top:calc(100% + 8px); left:0; background:white; border-radius:10px; padding:8px; list-style:none; min-width:170px; box-shadow:0 4px 20px rgba(0,0,0,.12); z-index:30; }
.room-list-header .nav-menu li:hover .submenu { display:block; }
.room-list-header .nav-menu .submenu a { color:var(--text-dark) !important; display:block; padding:8px 14px; border-radius:6px; }
.room-list-header .nav-menu .submenu a:hover { background:#f3f4f6; }
.room-list-header .btn-blog { padding:8px 22px; background:var(--second); color:white; border:none; border-radius:50px; font-size:14px; font-weight:700; cursor:pointer; font-family:"Baloo 2",cursive; box-shadow:0 2px 10px rgba(0,0,0,.18); transition:opacity .2s,transform .2s; }
.room-list-header .btn-blog:hover { opacity:.88; transform:translateY(-1px); }

/* Container */
.room-list-container { display:flex; height:100vh; overflow:hidden; position:relative; z-index:1; }

/* Sidebar */
.room-list-sidebar { padding-top:80px; width:50%; background:white; border-right:1px solid var(--border-color); display:flex; flex-direction:column; box-shadow:2px 0 10px rgba(0,0,0,.05); }
.room-list-title { padding:20px 24px 14px; border-bottom:1px solid var(--border-color); }
.room-list-title h2 { font-size:22px; font-weight:700; color:var(--text-dark); margin:0 0 4px; }
.room-list-subtitle { font-size:12px; color:var(--text-light); margin:0; }
.room-items { flex:1; overflow-y:auto; padding:14px; scrollbar-width:thin; scrollbar-color:var(--second) #f1f5f9; }
.room-item { background:white; border:2px solid var(--border-color); border-radius:12px; padding:14px; margin-bottom:10px; cursor:pointer; transition:all .3s; }
.room-item:hover { border-color:var(--second); box-shadow:0 4px 12px rgba(20,119,224,.1); }
.room-item.active { border-color:var(--second); background:rgba(20,119,224,.04); }
.room-item-header { display:flex; align-items:flex-start; gap:12px; margin-bottom:10px; }
.room-item-image { width:76px; height:76px; border-radius:8px; overflow:hidden; flex-shrink:0; background:#f3f4f6; }
.room-item-image img { width:100%; height:100%; object-fit:cover; }
.room-item-info { flex:1; }
.room-item-category { font-size:10px; color:var(--second); font-weight:600; text-transform:uppercase; margin:0 0 3px; }
.room-item-name { font-size:15px; font-weight:700; color:var(--text-dark); margin:0 0 5px; }
.room-item-meta { display:flex; gap:10px; font-size:10px; color:var(--text-light); margin-bottom:6px; }
.room-item-meta span { display:flex; align-items:center; gap:3px; }
.room-item-meta i { color:#7fd957; font-size:9px; }
.room-item-price { font-size:16px; font-weight:700; color:var(--second); }
.room-item-price small { font-size:10px; font-weight:500; color:var(--text-light); }
.room-item-features { display:flex; flex-wrap:wrap; gap:5px; }
.room-item-feature { font-size:9px; color:var(--text-light); padding:2px 7px; background:#f3f4f6; border-radius:6px; display:flex; align-items:center; gap:3px; }
.room-item-feature i { color:#7fd957; font-size:8px; }

/* Gallery right */
.room-list-gallery { width:50%; background:transparent; display:flex; flex-direction:column; overflow:hidden; padding-top:110px; }
.gallery-container { flex:1; padding:16px 24px 24px; overflow-y:auto; display:flex; flex-direction:column; gap:14px; }
#galleryImages { background:white; border-radius:12px; overflow:hidden; box-shadow:0 4px 16px rgba(0,0,0,.1); }
.gallery-main-image { width:100%; height:380px; overflow:hidden; background:#000; }
.gallery-main-image img { width:100%; height:100%; object-fit:contain; }
.gallery-thumbnails { display:flex; gap:8px; padding:12px; overflow-x:auto; background:white; }
.gallery-thumb { width:80px; height:80px; border-radius:8px; overflow:hidden; cursor:pointer; flex-shrink:0; border:2px solid transparent; transition:all .3s; }
.gallery-thumb:hover { border-color:var(--second); }
.gallery-thumb.active { border-color:var(--second); box-shadow:0 0 0 3px rgba(20,119,224,.2); }
.gallery-thumb img { width:100%; height:100%; object-fit:cover; }
.gallery-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:60px 20px; color:rgba(255,255,255,.7); }
.gallery-empty i { font-size:48px; margin-bottom:12px; opacity:.3; }
.gallery-empty p { font-size:14px; margin:0; }
.room-item-inline-gallery { display: none !important; }
.room-list-mobile-btn {
  display: none;
}
.room-list-mobile-overlay {
  display: none;
}
.room-list-mobile-drawer {
  display: none;
}

@media(max-width:1024px) and (min-width:769px) {
  .room-list-logo { left: 24px; top: 18px; }
  .room-list-logo img { height: 32px; }

  .room-list-header {
    position: absolute;
    top: 14px;
    left: 50%;
    right: auto;
    transform: translateX(15%);
    padding: 5px 12px;
    gap: 2px;
    max-width: calc(100% - 180px);
  }
  .room-list-header .nav-menu a { font-size: 11px; padding: 4px 7px; }
  .room-list-header .btn-blog { font-size: 11px; padding: 5px 12px; }

  .room-list-container { height: 100vh; }
  .room-list-sidebar { padding-top: 68px; width: 50%; }
  .room-list-title { padding: 14px 16px 10px; }
  .room-list-title h2 { font-size: 18px; }
  .room-items { padding: 10px; }
  .room-item { padding: 10px; }
  .room-item-image { width: 60px; height: 60px; }
  .room-item-name { font-size: 13px; }
  .room-item-price { font-size: 14px; }

  .room-list-gallery { padding-top: 80px; }
  .gallery-main-image { height: 300px; }
}
  
@media(max-width:768px) {
  .room-list-background { display: none; }

  /* Logo */
  .room-list-logo { 
    position: fixed;
    left: 14px;
    top: 14px;
    z-index: 999;
    background: white;
    border-radius: 8px;
    padding: 4px 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
    }
  .room-list-logo img { height: 30px; }

  /* Sembunyikan nav bar desktop */
  .room-list-header { display: none; }

  /* ── Hamburger ── */
  .room-list-mobile-btn {
    display: flex;
    position: fixed;
    top: 14px; right: 14px;
    z-index: 1000;
    background: var(--second);
    border: none;
    border-radius: 10px;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 17px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  }

  .room-list-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9998;
    backdrop-filter: blur(2px);
  }
  .room-list-mobile-overlay.open { display: block; }

  .room-list-mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; right: -100%;
    width: 78%; max-width: 280px;
    height: 100vh; height: 100dvh;
    background: white;
    z-index: 9999;
    transition: right 0.3s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,0.18);
    overflow-y: auto;
  }
  .room-list-mobile-drawer.open { right: 0; }
  .room-list-mobile-drawer::before {
    content: "";
    display: block;
    background: linear-gradient(135deg, var(--second), var(--third));
    height: 80px;
    flex-shrink: 0;
  }
  .room-list-mobile-drawer .nav-close {
    position: absolute;
    top: 20px; right: 16px;
    background: rgba(255,255,255,0.2);
    border: none; border-radius: 8px;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; cursor: pointer; color: white;
  }
  .room-list-mobile-drawer ul {
    list-style: none;
    display: flex; flex-direction: column;
    padding: 16px 12px 12px; gap: 2px; flex: 1;
  }
  .room-list-mobile-drawer ul li a {
    display: flex; align-items: center;
    padding: 12px 16px;
    font-size: 15px; font-weight: 600;
    color: #1f2937 !important;
    text-decoration: none;
    border-radius: 10px; cursor: pointer;
    transition: all 0.2s;
  }
  .room-list-mobile-drawer ul li a:hover,
  .room-list-mobile-drawer ul li a.active {
    background: rgba(20,119,224,0.08);
    color: var(--second) !important;
  }
  .room-list-mobile-drawer .drawer-blog-btn {
    display: block;
    margin: 0 12px calc(24px + env(safe-area-inset-bottom));
    padding: 13px 16px;
    background: var(--second);
    color: white !important;
    border: none; border-radius: 10px;
    font-size: 15px; font-weight: 700;
    width: calc(100% - 24px);
    cursor: pointer;
    font-family: "Baloo 2", cursive;
    text-align: center;
  }

  /* Layout mobile 1 kolom */
  .room-list-container {
    flex-direction: column;
    height: auto; min-height: 100vh;
  }

  /* Sidebar full width */
  .room-list-sidebar {
    width: 100%; padding-top: 0;
    border-right: none; border-bottom: 1px solid var(--border-color);
    height: auto; max-height: none;
  }
  .room-list-title {
    padding: 16px 16px 10px;
    position: sticky; top: 0;
    background: white; z-index: 10;
    border-bottom: 1px solid var(--border-color);
    margin-top: 60px;
  }
  .room-list-title h2 { font-size: 18px; }

  .room-items { padding: 10px; overflow-y: visible; }

  /* Room item mobile */
  .room-item {
    border-radius: 12px; padding: 12px;
    margin-bottom: 8px;
    border: 1.5px solid var(--border-color);
  }
  .room-item.active { border-color: var(--second); }
  .room-item-header { gap: 10px; margin-bottom: 6px; }
  .room-item-image { width: 64px; height: 64px; border-radius: 8px; }
  .room-item-name { font-size: 14px; margin-bottom: 3px; }
  .room-item-category { font-size: 9px; }
  .room-item-meta { gap: 8px; font-size: 9px; margin-bottom: 3px; }
  .room-item-price { font-size: 14px; }

  .room-item-inline-gallery {
  display: none !important;  /* default hidden */
  margin-top: 10px;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}
.room-item.active .room-item-inline-gallery {
  display: block !important;  /* tampil hanya saat active di mobile */
}

  .room-item-inline-gallery .gallery-main-image {
    width: 100%; height: 320px;  /* naikan dari 200px */
    border-radius: 10px; overflow: hidden;
    background: #000; margin-bottom: 8px;
  }
  .room-item-inline-gallery .gallery-main-image img {
    width: 100%; height: 100%; object-fit: cover;
  }
  .room-item-inline-gallery .gallery-thumbnails {
    display: flex; gap: 8px;
    overflow-x: auto; padding-bottom: 4px;
  }
  .room-item-inline-gallery .gallery-thumb {
    width: 60px; height: 60px; /* kotak! */
    border-radius: 8px; overflow: hidden;
    flex-shrink: 0;
    border: 2px solid transparent; cursor: pointer;
    transition: border-color .2s;
  }
  .room-item-inline-gallery .gallery-thumb.active { border-color: var(--second); }
  .room-item-inline-gallery .gallery-thumb img {
    width: 100%; height: 100%; object-fit: cover;
  }

  /* Sembunyikan gallery panel kanan di mobile */
  .room-list-gallery { display: none; }
}
  