/* Listings Grid */
.listings-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1400px;
    margin: auto;
    padding: 30px;
}

/* Remove default link styling */
.listings-container a {
    text-decoration: none;
    color: inherit;
}

/* Card Styling */
.card {
    background: #171717;
    border: 1px solid #333333;
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Hover Effect */
.card:hover {
    transform: translateY(-8px);
    border-color: #ff4d8d;
    box-shadow: 0 0 30px rgba(255, 77, 141, 0.25);;
}

/* Image */
.listing-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* Title */
.title {
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #f5f5f5;
    text-align: center;
    letter-spacing: 0.5px;
}

.price{
    color: #22c55e;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    padding-bottom: 20px;
    margin-top: auto;
}

.location {
    color: #9ca3af;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 12px;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    .listing-img {
        height: 180px;
    }

    .title {
        font-size: 1rem;
        padding: 14px;
    }
}

/* Category Filters */
.filters-wrapper {
    display: flex;
    margin: 1rem auto 0 auto;
    padding: 0 0.5rem;
}


.filters-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    padding: 0.5rem 1rem;
    gap: 30px;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
}


.filter {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: max-content;
    padding-bottom: 8px;
    border-bottom: 2px solid transparent;
}

.filter i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.filter p {
    font-size: 0.85rem;
    font-weight: 500;
}

.filter:hover {
    opacity: 1;
    color: #ff4d8d;
}

.filter.active {
    opacity: 1;
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
}

.filter.active i {
    color: #ff4d8d;
}

/* Custom Mobile Dropdown */
.mobile-filter-dropdown {
    display: none;
    margin: 1rem auto;
    padding: 0 1rem;
    width: 100%;
    max-width: 400px;
}

@media (max-width: 1080px) {
    .filters-wrapper {
        display: none !important;
    }
    .mobile-filter-dropdown {
        display: block;
    }
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    border-radius: 12px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.custom-select-trigger span {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ff4d8d;
}

.custom-select-trigger span i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.custom-select-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ff4d8d;
}

.custom-options {
    position: absolute;
    display: none;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #333;
    background: #171717;
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    max-height: 300px;
    overflow-y: auto;
    margin-top: 5px;
    border-radius: 12px;
}

.custom-select.open .custom-options {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.custom-option {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px 18px;
    font-size: 0.95rem;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 12px;
}

.custom-option i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.custom-option:hover {
    background: rgba(255, 77, 141, 0.1);
    color: #ff4d8d;
}

.custom-option.selected {
    color: #fff;
    background: #ff4d8d;
}

/* Custom scrollbar for dropdown */
.custom-options::-webkit-scrollbar {
    width: 6px;
}
.custom-options::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}