/* ============================================
   RENTALS LISTING PAGE STYLES
   ============================================ */

/* Filter Bar */
.filter-bar-sticky {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
    border-bottom: 1px solid #e8e8ef;
    padding: 12px 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-input-wrapper input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1px solid #a7a7ad;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

.search-input-wrapper input:focus {
    border-color: #006aff;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #54545a;
}

.btn-primary-blue {
    background: #006aff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary-blue:hover {
    background: #0051c9;
}

.filter-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: #fff;
    border: 1px solid #d1d1d5;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    color: #2a2a33;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover {
    border-color: #006aff;
}

.filter-btn i {
    font-size: 12px;
    color: #54545a;
}

.filter-btn.save-search {
    background: #006aff;
    color: white;
    border-color: #006aff;
}

/* Dropdown Styles */
.dropdown-wrapper {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    background: white;
    border: 1px solid #e8e8ef;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    width: 280px;
    z-index: 200;
    padding: 16px;
}

.dropdown-content.show {
    display: block;
}

.dropdown-section {
    margin-bottom: 16px;
}

.dropdown-section:last-child {
    margin-bottom: 0;
}

.dropdown-section label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2a2a33;
}

.dropdown-section select {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d1d5;
    border-radius: 6px;
    font-size: 14px;
}

.option-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.option-btn {
    background: #fff;
    border: 1px solid #d1d1d5;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
}

.option-btn:hover,
.option-btn.active {
    background: #006aff;
    color: white;
    border-color: #006aff;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #006aff;
}

/* Main Container */
.rentals-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 80px;
}

.results-header {
    margin-bottom: 20px;
}

.results-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #2a2a33;
    margin-bottom: 4px;
}

.results-count {
    font-size: 14px;
    color: #54545a;
}

/* Rentals Grid */
.rentals-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Rental Card */
.rental-card {
    background: #fff;
    border: 1px solid #e8e8ef;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.rental-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.rental-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.rental-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rental-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #d93c00;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.rental-badge.available {
    background: #4caf50;
}

.rental-badge.new {
    background: #006aff;
}

.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #2a2a33;
}

.favorite-btn:hover {
    background: #fff;
}

.rental-info {
    padding: 16px;
}

.rental-price {
    font-size: 22px;
    font-weight: 800;
    color: #2a2a33;
    margin-bottom: 4px;
}

.rental-price-note {
    font-size: 12px;
    color: #54545a;
    margin-bottom: 8px;
}

.rental-details {
    font-size: 14px;
    color: #2a2a33;
    margin-bottom: 8px;
}

.rental-details b {
    font-weight: 700;
}

.rental-address {
    font-size: 14px;
    color: #54545a;
    margin-bottom: 12px;
}

.rental-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #54545a;
}

.rental-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rental-meta i {
    color: #006aff;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 30px;
    padding: 20px 0;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d1d1d5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #2a2a33;
}

.page-btn:hover {
    border-color: #006aff;
    color: #006aff;
}

.page-info {
    font-size: 14px;
    color: #54545a;
}

/* Floating Map Toggle */
.floating-map-toggle {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 90;
}

.floating-map-toggle button {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #2a2a33;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-map-toggle button i {
    color: #006aff;
}

/* Map View */
.map-view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background: #fff;
}

#rentalsMap {
    width: 100%;
    height: 100%;
}

.close-map-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 201;
}

.close-map-btn i {
    color: #006aff;
}

/* Price Marker for Map */
.price-marker {
    background: #006aff;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    white-space: nowrap;
}

/* Desktop Styles */
@media screen and (min-width: 768px) {
    .rentals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rental-image {
        height: 220px;
    }
}

@media screen and (min-width: 1024px) {
    .rentals-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .filter-bar-sticky {
        padding: 16px 40px;
    }
    
    .rentals-container {
        padding: 30px 40px 100px;
    }
}

@media screen and (min-width: 1400px) {
    .rentals-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
