/*
 * All Rights Reserved.
 *
 * Copyright (c) 2025 DealXchange.in
 *
 * This software is proprietary and confidential. No part of this codebase may be copied, distributed, or modified without express written permission from the author.
 */

/* Listing Cards */
.listing-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
    overflow: hidden;
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.listing-image {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.price-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

.category-badge {
    font-size: 0.75rem;
}

/* Filter Sidebar */
.filter-sidebar {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    position: sticky;
    top: 20px;
}

/* Search Header */
.search-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 40px 0;
    margin-bottom: 30px;
}

.search-header h2 {
    font-weight: 300;
    margin-bottom: 1.5rem;
}

/* No Listings */
.no-listings {
    color: #6c757d;
    padding: 60px 20px;
}

.no-listings i {
    opacity: 0.5;
}

/* Card hover effects */
.card-title a:hover {
    color: #007bff !important;
}

/* Price formatting */
.price-highlight {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
}

/* Pagination */
.pagination .page-link {
    border-radius: 50%;
    margin: 0 2px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-header {
        padding: 20px 0;
    }

    .filter-sidebar {
        position: static;
        margin-bottom: 20px;
    }

    .listing-image {
        height: 180px;
    }

    .price-tag {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Form styling */
.form-control:focus,
.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Badge styling */
.badge {
    font-weight: 500;
}

/* Card footer */
.card-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #f8f9fa !important;
}

/* Button styling */
.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Text truncation */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Image placeholder */
.image-placeholder {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}