/* Vendor Listing Page Styles */

/* Container and Layout */
.vendor-listing-container {
    background: #f8f9fa;
    min-height: 100vh;
}

.listing-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.listing-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.listing-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Service Tabs */
.service-tabs {
    display: flex;
    gap: 1rem;
}

.service-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.service-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.service-tab.active {
    background: white;
    color: #667eea;
    border-color: white;
    font-weight: 600;
}

.service-tab:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.3);
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 2rem;
    position: sticky;
    top: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.filter-section {
    border-bottom: 1px solid #f1f3f4;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
}

.filter-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    border-color: #dee2e6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.filter-header h6 {
    margin: 0;
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.filter-header i {
    color: #667eea;
    font-size: 1.1rem;
    margin-right: 0.75rem;
}

.vendor-count {
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reset-filters {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
    transition: all 0.3s ease;
    font-weight: 600;
}

.reset-filters:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* City Filter */
.city-filter {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    /* background: #ffffff; */
    color: #2c3e50;
}

.city-filter:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.city-filter:hover {
    border-color: #adb5bd;
}

/* Service Category Filters - Removed */

.form-check-label {
    font-size: 0.95rem;
    color: #495057;
    cursor: pointer;
    line-height: 1.5;
    font-weight: 500;
    transition: color 0.2s ease;
}

.form-check:hover .form-check-label {
    color: #2c3e50;
}

/* Mobile Filter Toggle */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Filter Content Styling */
.filter-content {
    padding: 0.5rem 0;
}

/* Vendors Found Section */
.vendors-found {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    margin-bottom: 2rem;
}

.vendors-found .filter-header {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 0;
}

.vendors-found .filter-header:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

/* Enhanced Filter Section Styling */
.filter-section:not(.vendors-found) {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.filter-section:not(.vendors-found):hover {
    border-color: #667eea;
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.12);
    transform: translateY(-2px);
}

/* Scrollbar Styling for Service Categories */
.category-services {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f3f4;
}

.category-services::-webkit-scrollbar {
    width: 6px;
}

.category-services::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 3px;
}

.category-services::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.category-services::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Animation for Category Expansion */
.category-services {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Vendor Cards */
.vendor-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.vendor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.vendor-card.filtered-out {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    left: -9999px;
    visibility: hidden;
}

.vendor-card.visible-vendor {
    opacity: 1;
    pointer-events: auto;
    position: relative;
    left: auto;
    visibility: visible;
}

/* Pagination Styles */
.vendor-pagination .pagination {
    margin-bottom: 0;
    gap: 10px;
}
.pagination-info{
    display: none;
}
.vendor-pagination .page-link {
    color: #667eea;
    border-color: #dee2e6;
    padding: 0.5rem 0.75rem;
    margin: 0 2px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.vendor-pagination .page-link:hover {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-1px);
}

.vendor-pagination .page-item.active .page-link {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
}

.vendor-pagination .pagination-info {
    color: #6c757d;
    font-size: 0.875rem;
}

.vendor-card-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.vendor-card-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.vendor-avatar {
    padding: 5px;
    text-align: center;
}

.vendor-logo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50% !important;
    border: 3px solid #e9ecef;
}

.vendor-logo-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50% !important;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #6c757d;
}

.vendor-info {
    padding: 1rem;
}

.vendor-name {
    color: #212529;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.verified-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.vendor-location {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.more-locations {
    font-size: 0.8rem;
    color: #adb5bd;
}

.vendor-services {
    margin-bottom: 0.75rem;
}

.service-tags {
    margin-top: 0.5rem;
}

.service-tags .badge {
    font-size: 0.75rem;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.more-services {
    font-size: 0.7rem;
}

.vendor-rating {
    margin-bottom: 0.75rem;
}

.rating-text {
    font-size: 0.9rem;
    color: #6c757d;
}

.vendor-experience {
    margin-bottom: 1rem;
}

.vendor-actions {
    margin-top: auto;
}

.vendor-actions .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Star Rating */
.fa-star, .fa-star-half-alt {
    color: #ffc107;
}

.far.fa-star {
    color: #e9ecef;
}

/* No Vendors Message */
.no-vendors {
    background: white;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.no-vendors .expanded {
    text-align: center;
    padding: 2rem 0;
}

.no-vendors i {
    color: #adb5bd;
}

.no-vendors h4 {
    color: #495057;
    margin-bottom: 1rem;
}

.no-vendors p {
    color: #6c757d;
    margin-bottom: 0;
}

/* Responsive Filter Adjustments */
@media (max-width: 991.98px) {
    .filters-sidebar {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .filter-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .category-header {
        padding: 0.875rem 1rem;
        flex-direction: row;
    }
    
    .category-services {
        padding: 1rem;
    }
}

@media (min-width: 768px) {
    #vendors-row{
        gap: 2%;
    }
    #vendors-row .vendor-card{
        width: 49%;
        padding: 0;
    }
}

/* Responsive Design */
@media (max-width: 1199.98px) {
    .vendor-card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 991.98px) {
    .listing-title {
        font-size: 2rem;
    }
    
    .listing-subtitle {
        font-size: 1rem;
    }
    
    .filters-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
    
    .vendor-card-content {
        margin-bottom: 1rem;
    }
    .service-tabs{
        flex-direction: column  !important;    
    }
}

@media (max-width: 767.98px) {
    .listing-header {
        padding: 2rem 0;
        text-align: center;
    }
    
    .listing-title {
        font-size: 1.75rem;
    }
    
    .service-tabs {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .service-tab {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .filters-sidebar {
        padding: 1rem;
    }
    
    .vendor-avatar {
        padding: 1rem;
    }
    
    .vendor-logo,
    .vendor-logo-placeholder {
        width: 200px;
        height: 200px;
    }
    
    .vendor-info {
        padding: 0.75rem;
    }
    
    .vendor-name {
        font-size: 1.1rem;
    }
    
    .vendor-actions .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Mobile Layout */
    .mobile-layout .vendor-avatar {
        padding: 1rem 1rem 0.5rem 1rem;
    }
    
    .mobile-layout .vendor-info {
        padding: 0.5rem 1rem 1rem 1rem;
    }
}

/* Tablet (768–991.98): single column, filters shown like mobile/banner */
@media (min-width: 767.98px) and (max-width: 991.98px) {
    /* Make header controls stack like mobile */
    .service-tabs {
        flex-direction: column;
        width: 100%;
    }

    /* Sidebar behaves like a normal block, not sticky */
    .filters-sidebar {
        position: static;
        top: auto;
        margin-bottom: 1.5rem;
        padding: 1rem;
    }
.vendor-listing-container .listing-header > .container > .row{
    gap: 20px;
    text-align: center;
}
    /* Force vendor cards to a single column like mobile */
    #vendors-row { gap: 2%; }
    /* Enforce two equal-width columns overriding Bootstrap col-lg-12 */
    #vendors-row .vendor-card {
        flex: 0 0 49% !important;
        max-width: 49% !important;
        width: 49% !important;
        margin-bottom: 1.5rem;
    }

    /* Adopt mobile card spacing/size cues for consistency */
    .vendor-avatar {
        padding: 1rem;
    }
    .vendor-logo,
    .vendor-logo-placeholder {
        width: 200px;
        height: 200px;
    }

    .vendor-info {
        padding: 0.75rem 1rem 1rem 1rem;
    }

    /* Override Bootstrap md grid to stack sidebar + listings to one column */
    .vendor-listing-container .col-md-4,
    .vendor-listing-container .col-md-8 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Medium desktops (992–1199.98): two columns */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .service-tabs {
        flex-direction: row;
    }

    .filters-sidebar {
        position: sticky;
        top: 2rem;
        padding: 2rem;
        margin-bottom: 0;
    }

    #vendors-row { gap: 2%; }
    /* Enforce two equal-width columns overriding Bootstrap col-lg-12 */
    #vendors-row .vendor-card {
        flex: 0 0 49% !important;
        max-width: 49% !important;
        width: 49% !important;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .listing-title {
        font-size: 1.5rem;
    }
    
    .listing-subtitle {
        font-size: 0.9rem;
    }
    
    .service-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .service-tab {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .filters-sidebar {
        margin: 0 -15px 1.5rem -15px;
        border-radius: 0;
    }
    
    .vendor-card-content {
        border-radius: 8px;
    }
    
    .vendor-avatar {
        padding: 0.75rem;
    }
    
    .vendor-info {
        padding: 0.5rem 0.75rem 0.75rem 0.75rem;
    }
    
    .vendor-name {
        font-size: 1rem;
    }
    
    .service-tags .badge {
        font-size: 0.7rem;
        margin-right: 0.2rem;
        margin-bottom: 0.2rem;
    }
}

/* Filter Toggle Animation */
.category-services {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.category-services[style*="display: block"] {
    max-height: 1000px;
    opacity: 1;
}

/* Loading States */
.vendor-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Smooth Transitions */
.vendor-card,
.vendor-card-content,
.filter-header,
.category-header {
    transition: all 0.3s ease;
}

/* Focus States for Accessibility */
.form-check-input:focus,
.form-select:focus,
.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.vendor-listing-container {
    max-width: 100% !important;
}

/* Print Styles */
@media print {
    .filters-sidebar,
    .vendor-actions,
    .service-tabs {
        display: none !important;
    }
    
    .vendor-card-content {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .listing-header {
        background: white !important;
        color: black !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .vendor-card-content {
        border: 2px solid #000;
    }
    
    .filter-header,
    .category-header {
        border: 2px solid #000;
    }
    
    .service-tab {
        border: 2px solid #fff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .vendor-card,
    .vendor-card-content,
    .filter-header,
    .category-header,
    .category-services {
        transition: none;
    }
    
    .vendor-card-content:hover {
        transform: none;
    }
}