/* ==========================================================================
   VENDORS LISTING PAGE STYLES
   ========================================================================== */

/* Page Container */
.vendors-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

/* Vendors Main Content */
.vendors-main {
    min-width: 0;
}

/* Vendors Header */
.vendors-header {
    margin-bottom: 16px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 16px;
    color: #6B7280;
    margin-bottom: 24px;
}

/* Vendors Header with Sort Dropdown */
.vendors-header-with-sort {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.vendors-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #059669;
    font-weight: 500;
}

.vendors-count i {
    color: #059669;
    font-size: 16px;
}

.sort-dropdown-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #4B5563;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.sort-label i {
    color: #6B7280;
    font-size: 14px;
}

.sort-dropdown {
    min-width: 180px;
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #1F2937;
    background: #FFFFFF;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234b5563' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    border: 1.5px solid #D1D5DB;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.sort-dropdown:hover {
    border-color: #2563EB;
    background-color: #F9FAFB;
}

.sort-dropdown:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Search Input Styling */
.filter-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    background: white;
    box-sizing: border-box;
}

.filter-search-input:focus {
    border-color: #5B6EF5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(91, 110, 245, 0.1);
}

.filter-search-input::placeholder {
    color: #9CA3AF;
}

/* Filter Options Container */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.filter-options .filter-option span {
    cursor: pointer;
    font-size: 14px;
    color: #4B5563;
    transition: all 0.2s;
}

.filter-options .filter-option input[type="radio"]:checked + span {
    color: #5B6EF5;
    font-weight: 600;
}

/* Vendors Grid - 3 columns */
.vendors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Vendor Card */
.vendor-card {
    width: 100%;
    background: white;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.vendor-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: #5B6EF5;
}

.vendor-card:focus-visible {
    outline: 3px solid rgba(91, 110, 245, 0.45);
    outline-offset: 2px;
}

/* Card header with logo and badge */
.vendor-card-header {
    position: relative;
    padding: 24px;
    background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.vendor-logo-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 5px;
    background: white;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vendor-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.vendor-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5B6EF5 0%, #4C5FE5 100%);
    color: white;
    font-size: 32px;
    font-weight: 700;
    border-radius: 8px;
}

.vendor-badge {
    position: absolute;
    top: 12px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #FFFFFF;
    background: linear-gradient(135deg, #5B6EF5 0%, #4C5FE5 100%);
    box-shadow: 0 2px 8px rgba(75, 85, 99, 0.35);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.vendor-card:hover .vendor-badge {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(75, 85, 99, 0.45);
}

.vendor-badge-text {
    line-height: 1;
}

/* Color variations per business type (based on BusinessType slug) */
.vendor-badge[data-business-type="car-rental"],
.vendor-badge[data-business-type="car_rental"] {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
}

.vendor-badge[data-business-type="wine-shop"],
.vendor-badge[data-business-type="wine_shop"] {
    background: linear-gradient(135deg, #7C2D12 0%, #92400E 100%);
}

.vendor-badge[data-business-type="tours-experiences"],
.vendor-badge[data-business-type="tours_experiences"],
.vendor-badge[data-business-type="tours-and-experiences"] {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.vendor-badge[data-business-type="local-business"],
.vendor-badge[data-business-type="local_business"] {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
}

/* Card body */
.vendor-card-body {
    padding: 20px 5px;
    flex-grow: 1;
}

.vendor-name {
    font-size: 18px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 12px;
    line-height: 1.4;
}

.vendor-description {
    font-size: 14px;
    line-height: 1.6;
    color: #6B7280;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card footer */
.vendor-card-footer {
    padding: 16px 3px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.vendor-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    flex: 1;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    gap: 6px;
    font-size: 13px;
    color: #6B7280;
}

.vendor-card-footer .meta-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    gap: 6px;
    font-size: 13px;
}

.meta-item i {
    color: #5B6EF5;
    font-size: 14px;
}

.btn-view-vendor {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #5B6EF5;
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-view-vendor:hover {
    background: #4C5FE5;
    transform: translateX(2px);
}

.btn-view-vendor i {
    font-size: 12px;
    transition: transform 0.2s;
}

.btn-view-vendor:hover i {
    transform: translateX(3px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    color: #9CA3AF;
}

.empty-state-icon i {
    font-size: 64px;
}

.empty-state h2 {
    color: #1F2937;
    margin-bottom: 10px;
}

.empty-state-text {
    color: #6B7280;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet and below - Stack sidebar */
@media (max-width: 1199px) {
    .vendors-page-container {
        grid-template-columns: 1fr;
        padding: 24px 16px;
    }
    
    .filters-sidebar {
        position: static;
        margin-bottom: 24px;
        max-height: none;
    }
    
    .vendors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Large Mobile */
@media (max-width: 767px) {
    .vendors-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .vendors-page-container {
        padding: 16px;
    }
    
    .filters-sidebar {
        padding: 16px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .vendor-card-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-view-vendor {
        width: 100%;
        justify-content: center;
    }

    .vendors-header-with-sort {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .sort-dropdown-container {
        width: 100%;
    }
    
    .sort-dropdown {
        width: 100%;
    }
}

/* Filter Actions */
.filter-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.btn-clear-filters {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-clear-filters:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #1f2937;
}

.btn-clear-filters:active {
    transform: scale(0.98);
}

/* Loading Indicator */
#filter-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.loading-spinner {
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: #2563eb;
    font-weight: 500;
}

/* ==========================================================================
   HIGH-PRIORITY LAYOUT OVERRIDES — Vendor Card Consistency Fix
   ========================================================================== */

.vendors-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    align-items: stretch !important;
}

@media (max-width: 1024px) {
    .vendors-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .vendors-grid {
        grid-template-columns: 1fr !important;
    }
}

.vendor-card {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
}

.vendor-card-footer {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
}

.vendor-card-footer .meta-item {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.loading-spinner i {
    font-size: 20px;
    color: #2563eb;
}

