﻿/* Each hotel column wrapper — we'll change its Bootstrap column classes in JS */
.hotel-col {
    transition: all .2s ease;
}

/* Card base */
.hotel-card {
    border-radius: 10px;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .hotel-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0,0,0,.08);
    }

/* internal row that switches between row (list) and column (grid) */
.card-row {
    display: flex;
    gap: 0;
    width: 100%;
}

/* List view: image left, content right */
.list .card-row {
    flex-direction: row;
    align-items: center;
}

.list .card-img {
    flex: 0 0 33%;
    max-width: 33%;
}

    .list .card-img img {
        width: 100%;
        max-height: 170px; /* do not exceed 170px */
        height: auto; /* maintain aspect ratio */
        object-position: center;
        display: block;
    }

.list .card-content {
    flex: 1;
    padding: 16px;
}

/* Grid view: image on top, content below */
.grid .card-row {
    flex-direction: column;
}

.grid .card-img {
    width: 100%;
    max-width: 100%;
}

    .grid .card-img img {
        width: 100%;
        max-height: 170px; /* do not exceed 170px */
        height: auto; /* maintain aspect ratio */
        object-position: center;
        display: block;
    }

.grid .card-content {
    padding: 12px 12px 16px 12px;
    text-align: left;
}

/* adjust small screens */
@media (max-width: 768px) {
    .list .card-img img, .grid .card-img img {
        height: 160px;
    }

    .list .card-img {
        max-width: 40%;
        flex-basis: 40%;
    }
}

/* badges & small tweaks */
.badge.bg-success {
    font-size: .78rem;
}

.hotel-title {
    font-size: 1.3rem;
    margin-bottom: .2rem;
}
p.mb-1 {
    font-size: 18px;
}
.small {
    font-size: 19px;
}
.seeAvailability {
    font-size: 19px;
}
a.text-primary.text-decoration-underline.fw-semibold {
    font-size: 19px;
}
.price {
    font-size: 1.1rem;
}
/* Map Container Styling */
.map-container {
    background-color: #f9f9f9;
    height: 250px; /* half of 500px */
    width: 100%;
    position: relative;
    border: 1px solid #dee2e6;
}

/* Map element */
#map {
    height: 100%;
    width: 100%;
    border-radius: 10px;
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .map-container {
        height: 200px;
        margin-bottom: 1rem;
    }
}
.text-discount {
    margin-right: 10px;
    font-size: 17px;
}
small {
    font-size: 100%;
}
.range-slider {
    position: relative;
    height: 15px;
}

    /* Ensure both inputs are layered properly */
    .range-slider input[type="range"] {
        position: absolute;
        width: 100%;
        top: 0;
        pointer-events: none;
        background: none;
        appearance: none;
        height: 0px;
    }
.icon-outline {
    color: transparent;
    -webkit-text-stroke: 1px #000;
}
/* Highlight track between two handles */
#sliderTrack {
    position: absolute;
    height: 5px;
    background: #0d6efd;
    transform: translateY(-50%);
    border-radius: 5px;
    z-index: 1; /* stays below thumbs but above input line */
}

/* Base range line (behind highlight) */
.range-slider input[type="range"]::-webkit-slider-runnable-track {
    height: 5px;
    background: #ddd;
    border-radius: 5px;
}

/* Slider thumb (handle) */
.range-slider input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0d6efd;
    cursor: pointer;
    pointer-events: all;
    position: relative;
    z-index: 2; /* bring above track */
    border: 2px solid white;
    box-shadow: 0 0 3px rgba(0,0,0,0.4);
}

.range-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0d6efd;
    cursor: pointer;
    pointer-events: all;
    border: 2px solid white;
    box-shadow: 0 0 3px rgba(0,0,0,0.4);
    z-index: 2;
}
.favorite-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px; /* fixed width */
    height: 36px; /* fixed height */
    background: rgba(255,255,255,0.95);
    border-radius: 50%; /* perfect circle */
    display: flex;
    justify-content: center; /* center horizontally */
    align-items: center; /* center vertically */
    cursor: pointer;
    z-index: 10;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
}

    .favorite-icon .icon-filled {
        font-size: 18px;
        color: green; /* red heart */
    }

/* =====================================================
   ULTRA RESPONSIVE OPTIMIZATION (HTML unchanged)
   ===================================================== */

/* -----------------------------------------------------
   Large Tablet (<= 1200px)
----------------------------------------------------- */
@media (max-width: 1200px) {

    .card-row {
        gap: 16px;
    }

    .card-img img {
        height: 180px;
    }

    .hotel-title {
        font-size: 1rem;
    }
}

/* -----------------------------------------------------
   Tablet (<= 992px)
----------------------------------------------------- */
@media (max-width: 992px) {

    .hotel-col {
        margin-bottom: 20px;
    }

    .card-row {
        flex-direction: row;
        gap: 14px;
    }

    .card-img {
        flex: 0 0 42%;
        max-width: 42%;
    }

        .card-img img {
            height: 170px;
            object-fit: cover;
        }

    .card-content {
        padding: 12px;
        flex: 1;
    }

    .hotel-title {
        font-size: 1rem;
        line-height: 1.3;
    }

    .d-flex.justify-content-between {
        gap: 10px;
    }
}

/* -----------------------------------------------------
   Mobile Landscape / Medium Screens (<= 768px)
----------------------------------------------------- */
@media (max-width: 768px) {

    .card-row {
        flex-direction: column;
        gap: 10px;
    }

    .card-img {
        width: 100%;
        max-width: 100%;
    }

        .card-img img {
            width: 100%;
            height: 165px;
            object-fit: cover;
        }

    .favorite-icon {
        width: 34px;
        height: 34px;
        top: 8px;
        right: 8px;
    }

        .favorite-icon i {
            font-size: 17px;
        }

    .card-content {
        padding: 14px;
    }

    /* Top (title/content) + right (price) stack vertically */
    .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }

    .text-end {
        text-align: left !important;
        width: 100%;
    }
}

/* -----------------------------------------------------
   Normal Mobile (<= 576px)
----------------------------------------------------- */
@media (max-width: 576px) {

    .card-img img {
        height: 150px;
    }

    .hotel-title {
        font-size: 0.95rem;
    }

    .price {
        font-size: 1rem;
    }

    .badge.bg-primary {
        font-size: 0.75rem;
    }

    .favorite-icon {
        width: 30px;
        height: 30px;
    }

        .favorite-icon i {
            font-size: 15px;
        }
}

/* -----------------------------------------------------
   Small Phones (<= 430px)
----------------------------------------------------- */
@media (max-width: 430px) {

    .card-img img {
        height: 135px;
    }

    .hotel-title {
        font-size: 0.9rem;
    }

    .price {
        font-size: 0.95rem;
    }

    /* Reduce left-right inside content */
    .card-content {
        padding: 10px 12px;
    }

    .list-unstyled.small.text-muted {
        font-size: 12px;
    }
}

/* -----------------------------------------------------
   Extra Small Phones (<= 375px)
----------------------------------------------------- */
@media (max-width: 375px) {

    .card-img img {
        height: 130px;
    }

    .favorite-icon {
        width: 28px;
        height: 28px;
        top: 6px;
        right: 6px;
    }

        .favorite-icon i {
            font-size: 14px;
        }

    .hotel-title {
        font-size: 0.88rem;
    }

    .price {
        font-size: 0.9rem;
    }
}
