/**
 * Rooms Archive Page Styles - New Layout
 */

/* Section Container */
.rooms-archive-section {
    position: relative;
    width: 100%;
    padding: 30px 0 80px;
    background: #f4f7fa;
}

.rooms-archive-section .container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Layout Grid */
.archive-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* Dual Range Slider */
.price-slider-container {
    padding-top: 10px;
}

.dual-range-slider {
    position: relative;
    height: 40px;
    width: 100%;
}

.dual-range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    pointer-events: none;
    appearance: none;
    height: 5px;
    outline: none;
    background: transparent;
    z-index: 2;
}

.dual-range-slider input[type="range"]::-webkit-slider-thumb {
    pointer-events: auto;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #3b71fe;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.slider-track {
    position: absolute;
    top: 6px;
    width: 100%;
    height: 5px;
    background: #e9f0ff;
    border-radius: 5px;
    z-index: 1;
}

.price-inputs {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.price-input-group {
    flex: 1;
    position: relative;
}

.price-input-group input {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid #eee;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.price-input-group span {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: #999;
    font-weight: 700;
}

/* Sidebar Styles */
.archive-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

.sidebar-block {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sidebar-block h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

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

.block-header h4 {
    margin: 0;
}

.reset-link,
.view-all-link {
    font-size: 0.85rem;
    color: #3b71fe;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.sidebar-block.map-block {
    padding: 0;
    overflow: hidden;
}

.map-preview {
    position: relative;
    width: 100%;
    height: 160px;
}

.map-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
}

.explore-map-btn {
    background: #3b71fe;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(59, 113, 254, 0.4);
}

/* Checkbox Styles */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 12px;
    cursor: pointer;
}

.filter-checkbox:last-child {
    margin-bottom: 0;
}

.filter-checkbox input {
    position: absolute;
    opacity: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
}

.filter-checkbox:hover .checkmark {
    border-color: #3b71fe;
}

.filter-checkbox input:checked+.checkmark {
    background: #3b71fe;
    border-color: #3b71fe;
}

.filter-checkbox input:checked+.checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Main Content Styles */
.archive-main {
    flex: 1;
}

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

.location-summary h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 5px;
}

.result-count {
    font-size: 0.9rem;
    color: #666;
}

.header-controls {
    display: flex;
    gap: 20px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #666;
}

.custom-select {
    background: #e9f0ff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
}

/* Room Item Horizontal */
.room-item-horizontal {
    background: #fff;
    border-radius: 16px;
    display: flex;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.room-item-horizontal:hover {
    transform: translateY(-4px);
}

/* Gallery Part */
.item-gallery {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: #fff;
    position: relative;
}

.main-image-link {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Rating badge on image (visible on all screens) */
.archive-rating-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #0056b3;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    z-index: 2;
    line-height: 1.6;
}

/* Hidden by default on desktop; shown only in mobile media query */
.mobile-price-block {
    display: none;
}

.main-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.5s ease;
}

.main-image-link:hover .main-image {
    transform: scale(1.08);
}

.room-title-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.room-title-link:hover .room-name {
    color: #3b71fe;
}

.sale-ribbon {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #ff385c;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.wishlist-btn-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: none;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 10;
}

.wishlist-btn-overlay .heart-icon {
    color: #666;
    transition: all 0.3s ease;
}

.wishlist-btn-overlay .heart-outline {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.wishlist-btn-overlay .heart-filled {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wishlist-btn-overlay:hover {
    transform: scale(1.1);
}

.wishlist-btn-overlay:hover .heart-icon {
    color: #FF5B00;
}

.wishlist-btn-overlay.active {
    background: white;
    box-shadow: 0 4px 15px rgba(255, 91, 0, 0.2);
}

.wishlist-btn-overlay.active .heart-icon {
    color: #FF5B00 !important;
}

.wishlist-btn-overlay.active .heart-outline {
    opacity: 0;
}

.wishlist-btn-overlay.active .heart-filled {
    opacity: 1;
}

.thumb-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.thumb {
    height: 60px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
}

.more-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.more-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
}

.more-thumb span {
    position: relative;
    z-index: 1;
}

/* Content Part */
.item-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid #f0f0f0;
}

.title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.room-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.rating-summary {
    text-align: right;
    margin-left: 15px;
}

.rating-text {
    font-size: 0.85rem;
    color: #3b71fe;
    font-weight: 600;
}

.rating-text strong {
    font-size: 1.1rem;
    display: block;
    color: #1a1a1a;
}

.review-count {
    color: #888;
    font-weight: normal;
}

.room-meta-info {
    margin-bottom: 15px;
}

.room-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e9f0ff;
    color: #3b71fe;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    width: fit-content;
    margin-bottom: 8px;
}

.mini-stars {
    font-size: 0.75rem;
    margin-left: 5px;
}

.room-location {
    font-size: 0.9rem;
    color: #1a1a1a;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.amenities-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.amenities-chips span {
    font-size: 0.75rem;
    color: #666;
    background: #f4f7fa;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.more-chips {
    cursor: help;
    position: relative;
    font-weight: 700 !important;
    color: #3b71fe !important;
    background: #e9f0ff !important;
    border-color: #3b71fe !important;
}

.more-chips[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    width: max-content;
    max-width: 250px;
    white-space: normal;
    line-height: 1.4;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease-out;
}

.more-chips[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1a1a1a;
    z-index: 1000;
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.cancellation-policy {
    font-size: 0.85rem;
    color: #03a65a;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.promo-banner {
    background: #fff5f5;
    color: #ff385c;
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
}

/* Action Part */
.item-action {
    width: 240px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
}

.special-badge {
    background: #fff5f5;
    color: #ff385c;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
}

.action-price {
    text-align: right;
    margin-bottom: 20px;
}

.original-price {
    font-size: 0.85rem;
    color: #999;
    text-decoration: line-through;
}

.discounted-price {
    color: #ff385c;
    margin: 5px 0;
}

.discounted-price .amount {
    font-size: 1.6rem;
    font-weight: 800;
}

.discounted-price .currency {
    font-size: 1rem;
    font-weight: 700;
    margin-left: 4px;
}

.price-notice {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.4;
}

.select-room-btn {
    background: #ff5b00;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
}

.select-room-btn:hover {
    background: #e54f00;
}

/**
* Empty State
*/
.empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 24px;
    text-align: center;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    width: 100%;
    margin-top: 20px;
    border: 1px dashed #ddd;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #666;
    font-weight: 600;
    margin: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .archive-sidebar {
        width: 240px;
    }

    .item-gallery {
        width: 280px;
    }
}

@media (max-width: 1024px) {
    .archive-sidebar {
        display: none;
    }

    .room-item-horizontal {
        flex-direction: row !important;
        align-items: stretch !important;
        border-radius: 5px;
        background: #fff;
        margin-bottom: 16px;
        overflow: hidden;
    }

    .item-gallery {
        width: 140px !important;
        min-width: 140px !important;
        min-height: 100% !important;
        position: relative;
        overflow: hidden;
        padding: 0 !important;
        gap: 0 !important;
        background: transparent !important;
    }

    .main-image-link {
        border-radius: 0 !important;
        box-shadow: none !important;
        height: 100%;
    }

    .main-image-link {
        display: block;
        width: 100%;
        height: 100%;
    }

    .main-image {
        height: 100% !important;
        min-height: 120px;
        width: 100%;
        background-size: cover;
        background-position: center;
    }

    .item-content {
        flex: 1;
        padding: 12px !important;
        border-right: none !important;
        border-bottom: none !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        overflow: hidden;
        position: relative;
        padding-right: 28px !important;
        /* space for chevron */
    }

    /* Chevron on content section */
    .item-content::after {
        content: '';
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
        width: 8px;
        height: 8px;
        border-top: 2px solid #999;
        border-right: 2px solid #999;
    }

    /* Hide the action panel entirely on mobile */
    .item-action {
        display: none !important;
    }

    /* Hide complex desktop-only elements */
    .thumb-images,
    .amenities-chips,
    .cancellation-policy,
    .promo-banner,
    .special-badge,
    .original-price,
    .select-room-btn,
    .rating-summary,
    .room-tag,
    .wishlist-btn-overlay {
        display: none !important;
    }

    /* Mobile price block (only visible on mobile) */
    .mobile-price-block {
        display: block !important;
        margin-top: 4px;
    }

    .mobile-price-helper {
        font-size: 0.7rem;
        color: #888;
        margin-bottom: 2px;
    }

    .mobile-price-amount {
        display: flex;
        align-items: baseline;
        gap: 4px;
    }

    .mobile-price-amount .amount {
        font-size: 1.1rem;
        font-weight: 700;
        color: #d32f2f;
    }

    .mobile-price-amount .currency {
        font-size: 0.85rem;
        font-weight: 600;
        color: #d32f2f;
    }

    /* Show price helper on mobile */
    .price-notice {
        display: none !important;
        /* hidden since we use mobile-price-block instead */
    }

    .room-name {
        font-size: 1rem !important;
        color: #0056b3 !important;
        margin-bottom: 4px !important;
    }

    .room-location {
        font-size: 0.8rem !important;
        color: #0056b3 !important;
    }

    .discounted-price {
        margin: 0 !important;
        text-align: left !important;
    }

    .discounted-price .amount {
        font-size: 1.1rem !important;
        color: #d32f2f;
    }

    .discounted-price .currency {
        font-size: 0.9rem !important;
        color: #d32f2f;
    }

    .action-price {
        margin-bottom: 0 !important;
        text-align: left !important;
    }
}

@media (max-width: 768px) {
    .rooms-archive-section .container {
        padding: 0 16px;
    }

    .main-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .header-controls {
        width: 100%;
    }

    .control-group {
        flex: 1;
    }

    .custom-select {
        width: 100%;
    }
}

/* Mobile: 1 column */
@media (max-width: 768px) {
    .rooms-archive-section {
        padding: 50px 0;
        padding-top: 0;
    }
}