/* ==========================================================
   ROOM DETAIL - BAGIAN 4/5: RESPONSIVE & LIGHTBOX
   Dipecah dari css/room-detail.css. Urutan load = urutan angka (kaskade)
   ========================================================== */

/* =========================================================
   RESPONSIVE — BASIC SAFETY
========================================================= */

@media (max-width: 1100px) {
    .room-detail-main {
        width: 90%;
    }

    .room-detail-layout {
        grid-template-columns: minmax(0, 1fr) 270px;
        gap: 22px;
    }

    .room-detail-hero {
        height: 360px;
    }
}

@media (max-width: 680px) {
    .room-detail-hero {
        height: 300px;
    }

    .room-detail-main {
        width: 90%;
        padding-top: 32px;
        padding-bottom: 56px;
    }

    .room-detail-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .room-booking-panel {
        position: static;
        grid-row: 1;
    }

    .room-gallery-main {
        height: 250px;
    }

    .room-gallery-thumbnails img {
        height: 105px;
    }

    .room-detail-meta {
        gap: 14px;
    }

    .room-facilities-grid {
        gap: 16px 12px;
    }

    .other-rooms-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .room-detail-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================================================
   ROOM PHOTO LIGHTBOX
========================================================= */

.room-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 60px 80px;
    background: rgba(17, 21, 18, 0.96);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.room-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.room-lightbox > img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.room-lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;

    border: 0;
    background: transparent;
    color: #fff;

    font-size: 38px;
    font-weight: 300;
    cursor: pointer;
}

.room-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;

    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    background: transparent;
    color: #fff;

    font-size: 22px;
    cursor: pointer;

    transition:
        background 0.25s ease,
        color 0.25s ease;
}

.room-lightbox-nav:hover {
    background: #fff;
    color: #262720;
}

.room-lightbox-prev {
    left: 24px;
}

.room-lightbox-next {
    right: 24px;
}

.room-lightbox-counter {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);

    color: #fff;
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.12em;
}

body.room-lightbox-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .room-lightbox {
        padding: 50px 18px;
    }

    .room-lightbox-prev {
        left: 8px;
    }

    .room-lightbox-next {
        right: 8px;
    }

    .room-lightbox-nav {
        width: 36px;
        height: 36px;
    }

    .room-lightbox-close {
        top: 12px;
        right: 16px;
    }
}


/* RESPONSIVE ROOM DETAIL PATCH */
@media (max-width: 1100px) {
    .room-detail-page .navbar-inner {
        display: grid;
        grid-template-columns: 1fr auto auto;
        gap: 16px;
        padding-inline: clamp(20px, 4vw, 34px);
    }
    .room-detail-page .navbar-menu {
        display: none;
        position: fixed;
        top: 66px;
        left: 0;
        right: 0;
        padding: 16px 24px 24px;
        background: rgba(25, 32, 26, .98);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: calc(100dvh - 66px);
        overflow-y: auto;
    }
    .room-detail-page .navbar-menu.is-open { display: flex; }
    .room-detail-page .navbar-menu a {
        min-height: 44px;
        justify-content: flex-start;
        border-bottom: 1px solid rgba(255,255,255,.12);
    }
    .room-detail-page .mobile-menu-toggle { display: flex; }
    .room-detail-main { width: min(100% - 48px, 760px); }
    .room-detail-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
    .room-booking-panel { position: static; width: 100%; }
}
@media (max-width: 600px) {
    .room-detail-page .navbar-inner { min-height: 66px; padding-inline: 16px; gap: 10px; }
    .room-detail-page .navbar-booking { padding: 9px 11px; font-size: 9px; }
    .room-detail-page .mobile-menu-toggle {
        display: flex; width: 38px; height: 38px; padding: 9px;
        flex-direction: column; align-items: center; justify-content: center; gap: 6px;
        border: 1px solid rgba(255,255,255,.55); border-radius: 50%;
        background: transparent; color: #fff;
    }
    .room-detail-page .mobile-menu-toggle span { display: block; width: 18px; height: 1px; background: currentColor; }
    .room-detail-hero { height: clamp(300px, 82vw, 390px); }
    .room-detail-hero-caption { left: 22px; right: 22px; bottom: 26px; }
    .room-detail-hero-caption h1 { font-size: clamp(34px, 10vw, 46px); }
    .room-detail-main { width: calc(100% - 40px); padding: 34px 0 58px; }
    .room-detail-intro { gap: 18px; }
    .room-detail-heading h2 { font-size: clamp(30px, 8vw, 39px); }
    .room-detail-meta { gap: 12px 16px; }
    .room-detail-meta span { white-space: normal; font-size: 10px; }
    .room-gallery-main { height: auto; aspect-ratio: 4 / 3; }
    .room-gallery-thumbnails { gap: 7px; }
    .room-gallery-thumb { height: auto; aspect-ratio: 1 / 1; }
    .room-detail-description h3, .room-detail-facilities h3 { font-size: 23px; }
    .room-facilities-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .room-booking-panel { padding: 24px 20px; }
    .room-booking-panel h3 { font-size: 25px; }
    .other-rooms { margin-top: 48px; padding-top: 28px; }
    .other-rooms-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: none; }
    .other-room-card { height: auto; aspect-ratio: 16 / 9; }
}


