.item-img {
    width: 15.5rem;
    min-width: 15.5rem;
    height: 200px;
    object-fit: cover;
}

.filter__rental-home {
    min-width: 20rem;
    max-height: fit-content;
    max-width: 20rem;
}

div.hero .hero-overlay {
    --bs-bg-opacity: 0.35;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.form-search input:checked, 
.form-search label:has(input:checked) span  {
    background-color: var(--bs-success) !important;
    color: var(--bs-light) !important;
    border-color: var(--bs-success) !important;
}

.__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

/* ==================== Save Button Styles ==================== */
.save-listing-btn {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 10;
}

.save-listing-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 1);
}

.save-listing-btn:active {
    transform: scale(0.95);
}

.save-listing-btn i {
    transition: all 0.3s ease;
}

.save-listing-btn[data-saved="true"] i {
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1.1);
    }
    75% {
        transform: scale(1.2);
    }
}

/* Detail page save button (with text) */
.btn-outline-danger.save-listing-btn {
    width: auto;
    height: auto;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    border: 1px solid #dc3545;
}

.btn-outline-danger.save-listing-btn:hover {
    background-color: #dc3545;
    color: white;
    transform: translateY(-2px);
}

.btn-outline-danger.save-listing-btn[data-saved="true"] {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

/* ==================== Mobile Optimizations ==================== */
@media screen and (max-width: 992px) {
    .item-img {
        width: 180px !important;
        min-width: 180px;
        height: 160px;
    }
}

@media screen and (max-width: 768px) {
    .list-home .row {
        margin: 0 -0.5rem;
    }
    
    .list-home .col-12,
    .list-home .col-6 {
        padding: 0 0.5rem;
    }
    
    .item-img {
        width: 140px !important;
        min-width: 140px;
        height: 140px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .__title {
        font-size: 0.9rem;
        line-height: 1.3;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

@media screen and (max-width: 576px) {
    /* 2-column grid layout for mobile */
    .list-home {
        padding: 0 !important;
    }
    
    .list-home .d-flex {
        margin: 0 -0.5rem;
    }
    
    .list-home .col-6,
    .list-home .col-12 {
        padding: 0 0.5rem !important;
        margin-bottom: 1rem;
    }
    
    /* Vertical card layout for mobile */
    .list-home .card {
        flex-direction: column !important;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        border: 1px solid #e9ecef;
        height: 100%;
    }
    
    .item-img {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: 130px !important;
        border-radius: 8px 8px 0 0 !important;
    }
    
    .item-info,
    .card-body {
        padding: 0.65rem !important;
        width: 100%;
    }
    
    .__title {
        font-size: 0.825rem !important;
        font-weight: 600;
        line-height: 1.3;
        margin-bottom: 0.3rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        /* max-height: 2.1em; */
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .text-sm,
    .text-muted {
        font-size: 0.7rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .text-md,
    .fw-bold {
        font-size: 0.85rem !important;
    }
    
    .badge {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.4rem;
    }
    
    /* Container spacing */
    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    /* Filter button */
    #btn-open-filter-sidebar {
        font-size: 0.875rem;
        padding: 0.4rem 0.8rem;
        margin-right: 0.5rem !important;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.8rem;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    /* Results summary */
    .list-home .h4 {
        font-size: 1.1rem !important;
    }
    
    /* Hide icon on small screens */
    .item-info i,
    .card-body i {
        display: none;
    }
}