/**
 * Room Detail Page Styles
 */

.room-detail-container {
    padding-bottom: 80px;
}

/* Gallery Grid */
.room-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    height: 480px;
    margin-top: 20px;
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
}

.gallery-main a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: filter 0.3s ease;
}


.gallery-main img:hover {
    filter: brightness(0.95);
}

.gallery-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: filter 0.3s ease;
}


.gallery-item img:hover {
    filter: brightness(0.95);
}

.view-all-photos {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #fff;
    color: #1a1a1a;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.view-all-photos:hover {
    transform: scale(1.05);
}

/* Layout Wrapper */
.room-content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main Content Info */
.room-main-info {
    display: contents;
    /* Hoist children to parent grid */
}

/* Ensure other children stay in column 1 */
.room-header,
.separator,
.room-stats,
.room-description,
.room-amenities,
.room-rules,
.room-reviews-section {
    grid-column: 1;
}

.room-sidebar {
    grid-column: 2;
    grid-row: 1 / 20;
    /* Spans multiple rows to stay on right */
}

.room-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.badge {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.badge.popular {
    background: #FF5B00;
    color: #fff;
}

.badge.rating {
    background: #fff;
    border: 1px solid #1a1a1a;
}

.room-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.room-location {
    color: #666;
    margin-bottom: 24px;
    font-size: 1rem;
}

.separator {
    height: 1px;
    background: #eee;
}

/* Stats */
.room-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a1a1a;
    font-weight: 500;
}

.stat-item i {
    font-size: 1.25rem;
    color: #666;
}

/* Description */
.room-description h2,
.room-amenities h2,
.room-rules h2,
.similar-rooms-section h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.room-description p {
    line-height: 1.8;
    color: #444;
}

/* Amenities */
.amenities-grid-room {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #444;
}

.amenity-item i {
    font-size: 1.25rem;
    color: #1a1a1a;
}

.btn-text {
    background: none;
    border: 1px solid #1a1a1a;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-text:hover {
    background: #f7f7f7;
}

/* Rules */
.rules-list {
    list-style: none;
    padding: 0;
}

.rules-list li {
    padding: 8px 0;
    color: #444;
    border-bottom: 1px solid #f2f2f2;
}

.rules-list li:last-child {
    border-bottom: none;
}

/* Sticky Sidebar */
.room-sidebar {
    height: 100%;
}

.booking-card {
    position: sticky;
    top: 100px;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

.price-box .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

.price-box .period {
    color: #666;
    font-size: 0.9rem;
}

.rating-mini {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.booking-form-mock {
    margin-bottom: 20px;
}

.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #ccc;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.input-box {
    padding: 10px;
    border-right: 1px solid #ccc;
    background: #fff;
}

.input-box:last-child {
    border-right: none;
}

.input-box label,
.guest-input label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #1a1a1a;
    display: block;
    margin-bottom: 2px;
}

.input-box input {
    border: none;
    width: 100%;
    font-size: 0.9rem;
    color: #666;
    outline: none;
}

.guest-input {
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 10px;
}

.guest-input select {
    width: 100%;
    border: none;
    outline: none;
    font-size: 0.9rem;
    background: #fff;
}

.btn-book-now {
    width: 100%;
    background: #FF5B00;
    color: #fff;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-book-now:hover {
    background: #e04f00;
}

.charge-note {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: 12px;
    margin-bottom: 24px;
}

.price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.95rem;
    color: #444;
}

.price-breakdown .row {
    display: flex;
    justify-content: space-between;
}

.price-breakdown .total {
    font-weight: 700;
    color: #1a1a1a;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.sidebar-help {
    margin-top: 24px;
    text-align: center;
}

.sidebar-help a {
    color: #888;
    text-decoration: underline;
    font-size: 0.85rem;
}

/* Similar Rooms */
.similar-rooms-section {
    margin-top: 80px;
    margin-bottom: 30px;
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 30px;
}

/* Mobile Book Bar */
.mobile-book-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 16px 24px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
    align-items: center;
    justify-content: space-between;
}

.mobile-book-bar .bar-info {
    display: flex;
    flex-direction: column;
}

.mobile-book-bar .price {
    font-weight: 700;
    font-size: 1.1rem;
}

.mobile-book-bar .mini-rating {
    font-size: 0.8rem;
    color: #666;
}

.btn-book-now-mobile {
    background: #FF5B00;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-close-mobile-modal {
    display: none !important;
}

/* ============================================
   RESPONSIVE - Mobile (max 900px)
   ✅ Desktop is NOT affected
   ============================================ */
@media (max-width: 900px) {

    /* --- Gallery --- */
    .room-gallery-grid {
        grid-template-columns: 1fr;
        height: auto;
        gap: 4px;
        border-radius: 0;
        margin-top: 0;
        margin-bottom: 0;
    }

    .gallery-main {
        height: 240px;
    }

    .gallery-main a {
        display: block;
        height: 100%;
    }

    .gallery-main img {
        height: 100%;
        object-fit: cover;
    }

    /* 2 thumbnails below main image */
    .gallery-side {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        height: 120px;
    }

    /* Hide thumbnail 3 & 4, show only 1 & 2 */
    .gallery-side .gallery-item:nth-child(n+3) {
        display: none;
    }

    .view-all-photos {
        bottom: 8px;
        right: 8px;
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    /* --- Layout: switch from grid to simple block --- */
    .room-content-wrapper {
        display: block;
        padding: 16px;
        max-width: 100%;
    }

    /* Reset grid-column from desktop */
    .room-header, .separator, .room-stats,
    .room-description, .room-amenities,
    .room-rules, .room-reviews-section {
        grid-column: auto;
    }

    .room-main-info {
        display: block;
    }

    /* Sidebar (booking card) - show inline, not sticky */
    .room-sidebar {
        display: block !important;
        grid-column: auto;
        grid-row: auto;
        margin: 20px 0;
    }

    .booking-card {
        position: static;
        box-shadow: 0 2px 16px rgba(0,0,0,0.10);
        padding: 16px;
        border-radius: 12px;
    }

    .card-header {
        margin-bottom: 14px;
    }

    .price-box .price {
        font-size: 1.25rem;
    }

    /* --- Separators --- */
    .separator {
        margin: 20px 0;
    }

    /* --- Typography --- */
    .room-title {
        font-size: 1.4rem;
        margin-bottom: 6px;
    }

    .room-location {
        font-size: 0.9rem;
        margin-bottom: 0;
    }

    .room-description h2,
    .room-amenities h2,
    .room-rules h2,
    .similar-rooms-section h2 {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    /* --- Room Badges --- */
    .room-badges {
        margin-bottom: 8px;
    }

    /* --- Stats --- */
    .room-stats {
        gap: 12px 20px;
        flex-wrap: wrap;
    }

    .stat-item {
        font-size: 0.9rem;
    }

    /* --- Amenities: 2 cols on mobile --- */
    .amenities-grid-room {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    /* --- Similar Rooms --- */
    .similar-rooms-section {
        margin-top: 40px;
        padding: 0 16px;
    }

    .similar-grid {
        grid-template-columns: 1fr;
    }

    /* --- Mobile book bar --- */
    .btn-close-mobile-modal,
    .mobile-book-bar {
        display: none !important;
    }
}



/* Similar Rooms Custom Cards */
.similar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.similar-room-card {
    position: relative;
    height: 300px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.similar-room-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    backdrop-filter: blur(0px);
    background: rgba(0, 0, 0, 0);
    transition: all 0.4s ease;
    color: #fff;
    text-align: center;
    padding: 20px;
}

.similar-room-card:hover .similar-room-overlay {
    opacity: 1;
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.6);
}

.similar-room-title {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #fff;
    font-weight: 700;
}

.similar-room-price {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.similar-room-meta {
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    color: #ddd;
}

.btn-view-room {
    background-color: #FF5B00;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-view-room:hover {
    background-color: #e04f00;
    color: #fff;
}

@media (max-width: 991px) {
    .similar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .similar-grid {
        grid-template-columns: 1fr;
    }
}


/* Flatpickr Theme Customization */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
    background: #FF5B00 !important;
    border-color: #FF5B00 !important;
}

.flatpickr-day:hover,
.flatpickr-day.prevMonthDay:hover,
.flatpickr-day.nextMonthDay:hover,
.flatpickr-day:focus,
.flatpickr-day.prevMonthDay:focus,
.flatpickr-day.nextMonthDay:focus {
    background: #ffecd9 !important;
    border-color: #ffecd9 !important;
    color: #FF5B00 !important;
}

.flatpickr-months .flatpickr-month {
    background: transparent !important;
    color: #333 !important;
    fill: #333 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month .numInputWrapper {
    background: transparent !important;
}

/* Reviews Section */
.room-reviews-section {
    margin-top: 40px;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.overall-rating {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rating-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a1a1a;
}

.rating-stars {
    display: flex;
    gap: 4px;
    font-size: 1.25rem;
    color: #FFB800;
}

.star {
    font-style: normal;
    font-size: 1.1rem;
    line-height: 1;
}

.star-full  { color: #FFB800; }
.star-half  { color: #FFB800; opacity: 0.7; }
.star-empty { color: #ddd; }

.review-stars .star {
    font-size: 0.95rem;
}

.rating-count {
    color: #666;
    font-size: 0.95rem;
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.review-item {
    display: flex;
    gap: 20px;
}

.review-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.review-content {
    flex: 1;
}

.review-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.review-author {
    font-weight: 700;
    color: #1a1a1a;
}

.review-date {
    font-size: 0.85rem;
    color: #888;
}

.review-stars {
    color: #FFB800;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.review-text {
    line-height: 1.6;
    color: #444;
}

.no-reviews {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 12px;
    color: #666;
    font-style: italic;
}

/* Add Review Form */
.review-form-wrapper h3 {
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.rating-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    gap: 4px;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    color: #ddd;
    transition: color 0.15s ease;
    user-select: none;
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label {
    color: #FFB800;
}

.form-group textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
    resize: vertical;
    margin-bottom: 20px;
}

.form-group textarea:focus {
    border-color: #FF5B00;
}

.btn-submit-review {
    background: #FF5B00;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit-review:hover {
    background: #e04f00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 91, 0, 0.2);
}

/* Review Login CTA */
.review-login-cta {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border: 2px dashed #eee;
    border-radius: 16px;
    transition: border-color 0.3s ease;
}

.review-login-cta:hover {
    border-color: #FF5B00;
}

.review-login-cta i {
    font-size: 3rem;
    color: #FF5B00;
    margin-bottom: 15px;
}

.review-login-cta h3 {
    margin-bottom: 10px;
}

.review-login-cta p {
    color: #666;
    margin-bottom: 25px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.btn-login-to-review {
    display: inline-block;
    background: #1a1a1a;
    color: #fff;
    padding: 12px 32px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-login-to-review:hover {
    background: #000;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 600px) {
    .reviews-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

.add-review-container {
    margin-top: 1rem;
}

/* Booking Locked / Maintenance Notice */
.booking-locked-notice {
    text-align: center;
    padding: 24px 20px;
    background: #fff8f0;
    border: 2px solid #FF5B00;
    border-radius: 12px;
    margin-top: 4px;
}

.booking-locked-notice .locked-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    line-height: 1;
}

.booking-locked-notice .locked-message {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}