/* ================================================
   HOSTRAST — Room Detail Popup (Booking.com Style)
   ================================================ */

/* ----- Overlay ----- */
.room-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.room-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ----- Modal Container ----- */
.room-popup {
    background: var(--color-bg, #ffffff);
    max-width: 960px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.room-popup-overlay.active .room-popup {
    transform: translateY(0) scale(1);
}

/* Scrollbar styling */
.room-popup::-webkit-scrollbar {
    width: 6px;
}

.room-popup::-webkit-scrollbar-track {
    background: transparent;
}

.room-popup::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

/* ----- Close Button ----- */
.room-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    border-radius: 50%;
}

.room-popup-close:hover {
    background: rgba(0, 0, 0, 0.85);
}

/* ----- Layout ----- */
.room-popup-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ----- Gallery (Left Side) ----- */
.room-popup-gallery {
    background: #f5f5f5;
    padding: 0;
    position: relative;
}

.room-popup-main-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.room-popup-thumbs {
    display: flex;
    gap: 4px;
    padding: 4px;
    overflow-x: auto;
    background: #f0f0f0;
}

.room-popup-thumb {
    width: 72px;
    height: 54px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease, outline 0.2s ease;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.room-popup-thumb:hover {
    opacity: 0.8;
}

.room-popup-thumb.active {
    opacity: 1;
    border-color: var(--color-gold, #b5935a);
}

/* Gallery nav arrows */
.room-popup-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(calc(-50% - 30px));
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #333;
    transition: background 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.room-popup-gallery-nav:hover {
    background: #fff;
}

.room-popup-gallery-prev {
    left: 0.75rem;
}

.room-popup-gallery-next {
    right: 0.75rem;
}

.room-popup-img-counter {
    position: absolute;
    bottom: 70px;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    letter-spacing: 0.05em;
}

/* ----- Details (Right Side) ----- */
.room-popup-details {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.room-popup-name {
    font-family: var(--font-heading, 'Cormorant Garamond', serif);
    font-size: 1.6rem;
    font-weight: 400;
    margin: 0;
    color: var(--color-text, #1a1a1a);
}

/* Quick spec badges */
.room-popup-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.room-popup-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    background: var(--color-bg-light, #f5f5f0);
    border: 1px solid var(--color-border, #e0ddd5);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-text, #1a1a1a);
}

.room-popup-badge svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Size & Bed info */
.room-popup-specs {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.room-popup-spec {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--color-text, #1a1a1a);
}

.room-popup-spec strong {
    font-weight: 600;
}

.room-popup-spec svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
    flex-shrink: 0;
}

/* Description */
.room-popup-description {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--color-text-muted, #6b6b6b);
    margin: 0;
}

/* ----- Amenities ----- */
.room-popup-amenities-section {
    border-top: 1px solid var(--color-border, #e0ddd5);
    padding-top: 1.25rem;
}

.room-popup-amenities-title {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    color: var(--color-text, #1a1a1a);
}

.room-popup-amenities-group {
    margin-bottom: 1rem;
}

.room-popup-amenities-group-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text, #1a1a1a);
    margin-bottom: 0.5rem;
}

.room-popup-amenities-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.room-popup-amenities-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--color-text-muted, #6b6b6b);
}

.room-popup-amenities-list li::before {
    content: '✓';
    color: var(--color-gold, #b5935a);
    font-weight: 600;
    font-size: 0.75rem;
}

/* Smoking rule */
.room-popup-rules {
    font-size: 0.82rem;
    color: var(--color-text-muted, #6b6b6b);
}

.room-popup-rules strong {
    font-weight: 600;
    color: var(--color-text, #1a1a1a);
}

/* ----- Pricing & CTA ----- */
.room-popup-footer {
    border-top: 1px solid var(--color-border, #e0ddd5);
    padding-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.room-popup-price {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.room-popup-price-from {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted, #6b6b6b);
}

.room-popup-price-amount {
    font-family: var(--font-heading, 'Cormorant Garamond', serif);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--color-text, #1a1a1a);
}

.room-popup-price-period {
    font-size: 0.8rem;
    color: var(--color-text-muted, #6b6b6b);
}

.room-popup-cta {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: var(--color-gold, #b5935a);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.3s ease;
}

.room-popup-cta:hover {
    background: var(--color-gold-hover, #a07d45);
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .room-popup-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .room-popup {
        max-height: 95vh;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
    }

    .room-popup-layout {
        grid-template-columns: 1fr;
    }

    .room-popup-details {
        padding: 1.5rem;
    }

    .room-popup-name {
        font-size: 1.35rem;
    }

    .room-popup-amenities-list {
        grid-template-columns: 1fr;
    }

    .room-popup-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .room-popup-cta {
        text-align: center;
    }

    .room-popup-price {
        justify-content: center;
    }
}