/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    transition: colors 0.15s ease-in-out;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
}

.btn:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

.btn-primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
    background-color: hsl(var(--primary) / 0.9);
}

.btn-secondary {
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
    background-color: hsl(var(--secondary) / 0.8);
}

.btn-outline {
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
}

.btn-outline:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-ghost {
    color: hsl(var(--foreground));
}

.btn-ghost:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-sm {
    height: 2.25rem;
    padding: 0 0.75rem;
    border-radius: calc(var(--radius) - 4px);
}

.btn-md {
    height: 2.5rem;
    padding: 0 1rem;
}

.btn-lg {
    height: 2.75rem;
    padding: 0 2rem;
}

/* Smart Tag System - Clean Design */
.tag-system-showcase {
    margin: 1rem 0;
    padding: 1rem;
    background: hsl(var(--card));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
}



.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: hsl(var(--primary));
    opacity: 0.7;
}

.system-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    color: hsl(var(--foreground));
}

.ai-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.375rem;
    background: hsl(var(--primary) / 0.1);
    border: 1px solid hsl(var(--primary) / 0.2);
    border-radius: calc(var(--radius) - 2px);
}

.ai-icon {
    font-size: 0.75rem;
}

.ai-text {
    font-size: 0.625rem;
    font-weight: 600;
    color: hsl(var(--primary));
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag-system-insights {
    margin-top: 0.25rem;
}

.insights-text {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.4;
}

.smart-suggestions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 2rem;
}

.suggestion-tag {
    padding: 0.375rem 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.suggestion-tag:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--primary) / 0.3);
}

.suggestion-tag.primary {
    background: hsl(var(--primary) / 0.1);
    border-color: hsl(var(--primary) / 0.3);
    color: hsl(var(--primary));
}

.suggestion-tag.secondary {
    background: hsl(var(--muted) / 0.5);
    border-color: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.suggestion-tag.selected {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    font-weight: 600;
}

.suggestion-tag.selected:hover {
    background: hsl(var(--primary) / 0.9);
    border-color: hsl(var(--primary) / 0.9);
}

.suggestion-tag.selected::after {
    content: '✓';
    position: absolute;
    top: -2px;
    right: -2px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.suggestions-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.suggestions-actions.show {
    opacity: 1;
    transform: translateY(0);
}

.clear-suggestions-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-suggestions-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.clear-suggestions-btn svg {
    transition: transform 0.2s ease;
}

.clear-suggestions-btn:hover svg {
    transform: rotate(90deg);
}

[data-theme="dark"] .clear-suggestions-btn {
    background: #374151;
    border-color: #4b5563;
    color: #9ca3af;
}

[data-theme="dark"] .clear-suggestions-btn:hover {
    background: #7f1d1d;
    border-color: #dc2626;
    color: #fca5a5;
}

.empty-suggestions {
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    font-style: italic;
    padding: 0.5rem 0;
}

.suggestion-loading {
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestion-loading::before {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid hsl(var(--muted-foreground) / 0.3);
    border-top: 2px solid hsl(var(--muted-foreground));
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.suggestion-error {
    color: hsl(var(--destructive));
    font-size: 0.75rem;
    padding: 0.5rem 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations */
@keyframes statusPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes statusRipple {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes sparkle {
    0%, 100% { 
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
    25% { 
        transform: rotate(-10deg) scale(1.1);
        opacity: 0.8;
    }
    50% { 
        transform: rotate(10deg) scale(0.9);
        opacity: 1;
    }
    75% { 
        transform: rotate(-5deg) scale(1.05);
        opacity: 0.9;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.category-btn {
    position: relative;
    overflow: hidden;
}

.category-btn:hover {
    background: hsl(var(--primary) / 0.1) !important;
    border-color: hsl(var(--primary) / 0.3) !important;
    color: hsl(var(--primary)) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px hsl(var(--primary) / 0.1);
}

.category-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px hsl(var(--primary) / 0.1);
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, hsl(var(--primary) / 0.1), transparent);
    transition: left 0.5s;
}

.category-btn:hover::before {
    left: 100%;
}

/* Enhanced Ranking Metadata Components */
.ranking-metadata {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, hsl(var(--muted) / 0.2), hsl(var(--muted) / 0.1));
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--border));
    position: relative;
}

.ranking-metadata::before {
    content: '🏷️';
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    font-size: 0.75rem;
    opacity: 0.5;
}

.ranking-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
}

.ranking-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: calc(var(--radius) - 4px);
    border: 1px solid;
    position: relative;
    transition: all 0.2s;
    cursor: help;
}

.ranking-badge:hover {
    transform: scale(1.05);
}

.ranking-badge.improved-score {
    background: linear-gradient(135deg, hsl(142 76% 36% / 0.15), hsl(142 76% 36% / 0.05));
    color: hsl(142 76% 36%);
    border-color: hsl(142 76% 36% / 0.4);
    box-shadow: 0 1px 3px hsl(142 76% 36% / 0.1);
}

.ranking-badge.improved-score::before {
    content: '⭐';
    margin-right: 0.25rem;
}

.ranking-badge.base-score {
    background-color: hsl(221 83% 53% / 0.1);
    color: hsl(221 83% 53%);
    border-color: hsl(221 83% 53% / 0.2);
}

.ranking-badge.base-score::before {
    content: '📊';
    margin-right: 0.25rem;
}

.ranking-badge.semantic-score {
    background: linear-gradient(135deg, hsl(262 83% 58% / 0.15), hsl(262 83% 58% / 0.05));
    color: hsl(262 83% 58%);
    border-color: hsl(262 83% 58% / 0.4);
    box-shadow: 0 1px 3px hsl(262 83% 58% / 0.1);
}

.ranking-badge.semantic-score::before {
    content: '🧠';
    margin-right: 0.25rem;
}

.ranking-badge.query-intent {
    background: linear-gradient(135deg, hsl(25 95% 53% / 0.15), hsl(25 95% 53% / 0.05));
    color: hsl(25 95% 53%);
    border-color: hsl(25 95% 53% / 0.4);
    text-transform: capitalize;
    box-shadow: 0 1px 3px hsl(25 95% 53% / 0.1);
}

.ranking-badge.query-intent::before {
    content: '🎯';
    margin-right: 0.25rem;
}

/* Score comparison indicator */
.score-comparison {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.25rem;
    font-size: 0.625rem;
    color: hsl(var(--muted-foreground));
}

.score-improvement {
    color: hsl(var(--primary));
    font-weight: 600;
}

.score-improvement.positive::before {
    content: '↗️ ';
}

.score-improvement.negative::before {
    content: '↘️ ';
}

/* Tag relevance and chips */
.tag-relevance {
    margin-top: 0.375rem;
    padding-top: 0.375rem;
    border-top: 1px solid hsl(var(--border) / 0.5);
}

.tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.375rem;
    font-size: 0.625rem;
    font-weight: 500;
    background: hsl(var(--muted) / 0.5);
    color: hsl(var(--muted-foreground));
    border-radius: calc(var(--radius) - 6px);
    border: 1px solid hsl(var(--border) / 0.3);
    transition: all 0.2s;
}

.tag-chip:hover {
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    border-color: hsl(var(--primary) / 0.3);
}

.tag-chip.more {
    background: hsl(var(--accent) / 0.1);
    color: hsl(var(--accent-foreground));
    border-color: hsl(var(--accent) / 0.3);
    font-weight: 600;
}

/* Dark mode support for ranking badges */
[data-theme="dark"] .ranking-badge.improved-score {
    background-color: hsl(142 76% 36% / 0.15);
    color: hsl(142 76% 45%);
    border-color: hsl(142 76% 36% / 0.3);
}

[data-theme="dark"] .ranking-badge.base-score {
    background-color: hsl(221 83% 53% / 0.15);
    color: hsl(221 83% 63%);
    border-color: hsl(221 83% 53% / 0.3);
}

[data-theme="dark"] .ranking-badge.semantic-score {
    background-color: hsl(262 83% 58% / 0.15);
    color: hsl(262 83% 68%);
    border-color: hsl(262 83% 58% / 0.3);
}

[data-theme="dark"] .ranking-badge.query-intent {
    background-color: hsl(25 95% 53% / 0.15);
    color: hsl(25 95% 63%);
    border-color: hsl(25 95% 53% / 0.3);
}

/* Input Components */
.input {
    display: flex;
    height: 2.5rem;
    width: 100%;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: colors 0.15s ease-in-out;
}

.input:focus {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.input::placeholder {
    color: hsl(var(--muted-foreground));
}

/* Card Components */
.card {
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.025em;
}

.card-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.card-content {
    padding: 1.5rem;
    padding-top: 0;
}

.card-footer {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    padding-top: 0;
}

/* Badge Components */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    transition: colors 0.15s ease-in-out;
    white-space: nowrap;
}

.badge-default {
    border: 1px solid transparent;
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.badge-secondary {
    border: 1px solid transparent;
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.badge-outline {
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
}

/* Modal Components */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: rgb(0 0 0 / 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: hsl(var(--background));
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    max-width: 32rem;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1.5rem;
    border-top: 1px solid hsl(var(--border));
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    border-radius: 0.375rem;
    opacity: 0.7;
    transition: opacity 0.15s ease-in-out;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.modal-close:hover {
    opacity: 1;
}

/* Alert Components */
.alert {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    padding: 1rem;
    font-size: 0.875rem;
}

.alert-destructive {
    border-color: hsl(var(--destructive) / 0.5);
    color: hsl(var(--destructive));
    background-color: hsl(var(--destructive) / 0.1);
}

.alert-title {
    margin-bottom: 0.25rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.025em;
}

.alert-description {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Loading Spinner */
.spinner {
    border: 2px solid hsl(var(--border));
    border-top: 2px solid hsl(var(--primary));
    border-radius: 50%;
    width: 1rem;
    height: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Search Results */
#results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.vehicle-card {
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background-color: hsl(var(--card));
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Ensures child elements conform to border radius */
}

.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px hsl(var(--shadow) / 0.1);
    border-color: hsl(var(--primary));
}

.vehicle-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.vehicle-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid hsl(var(--border));
}

.vehicle-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem; /* Reduced margin */
    flex-grow: 1;
}

.vehicle-subtitle {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
}

.vehicle-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(var(--primary));
    margin-bottom: 0.5rem;
}

.vehicle-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

/* Sidebar Navigation */
.nav-section {
    margin-bottom: 2rem;
}

.nav-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
}

.checkbox:checked {
    background-color: hsl(var(--primary));
    border-color: hsl(var(--primary));
}

/* Range Slider */
.range-slider {
    margin: 0 auto;
    margin-top: 0;
    position: relative;
    display: block;
    text-align: center;
    order: 1;
}

.range-input {
    width: 100%;
    height: 0.5rem;
    border-radius: 0.25rem;
    background: hsl(var(--muted));
    outline: none;
    -webkit-appearance: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.range-input:hover {
    background: hsl(var(--muted) / 0.8);
}

.range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: hsl(var(--primary));
    cursor: pointer;
    border: 2px solid hsl(var(--background));
    box-shadow: 0 2px 8px hsl(var(--primary) / 0.25), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
}

.range-input::-webkit-slider-thumb:hover {
    box-shadow: 0 4px 12px hsl(var(--primary) / 0.35), 0 2px 6px rgba(0, 0, 0, 0.15);
    background: hsl(var(--primary) / 0.9);
    transform: scale(1.1);
}

.range-input::-webkit-slider-thumb:active {
    box-shadow: 0 1px 6px hsl(var(--primary) / 0.4), 0 0 0 3px hsl(var(--primary) / 0.2);
    transform: scale(0.95);
}

.range-input::-moz-range-thumb {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: hsl(var(--primary));
    cursor: pointer;
    border: 2px solid hsl(var(--background));
    box-shadow: 0 2px 8px hsl(var(--primary) / 0.25), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.range-input::-moz-range-thumb:hover {
    box-shadow: 0 4px 12px hsl(var(--primary) / 0.35), 0 2px 6px rgba(0, 0, 0, 0.15);
    background: hsl(var(--primary) / 0.9);
    transform: scale(1.1);
}

.range-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.75rem;
    font-weight: 500;
}

/* Dual Range Slider */
.slider-container {
    display: flex;
    flex-direction: column;
    margin: 0.5rem 0;
    padding: 0.75rem;
    border-radius: var(--radius);
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    transition: all 0.2s ease;
}

.slider-container:hover {
    border-color: hsl(var(--primary) / 0.3);
    background: hsl(var(--card));
}

.slider-values {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: hsl(var(--muted) / 0.5);
    border-radius: calc(var(--radius) - 2px);
}

.dual-range-slider {
    position: relative;
    height: 1.25rem;
    margin: 0.25rem 0 0.5rem 0;
}

.dual-range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 0.5rem;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
    outline: none;
    z-index: 3;
    top: 0.5rem;
}

.dual-range-slider input[type="range"]::-webkit-slider-track {
    width: 100%;
    height: 0.5rem;
    background: transparent;
    border-radius: 0.25rem;
}

.dual-range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0.875rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    background: hsl(var(--primary));
    cursor: pointer;
    pointer-events: all;
    border: 1px solid hsl(var(--primary) / 0.8);
    box-shadow: none;
    transition: all 0.15s ease;
    position: relative;
    margin-top: -0.375rem;
}

.dual-range-slider input[type="range"]::-webkit-slider-thumb:hover {
    background: hsl(var(--primary) / 0.9);
}

.dual-range-slider input[type="range"]::-webkit-slider-thumb:active {
    background: hsl(var(--primary) / 0.8);
}

.dual-range-slider input[type="range"]::-moz-range-track {
    width: 100%;
    height: 0.5rem;
    background: transparent;
    border-radius: 0.25rem;
    border: none;
}

.dual-range-slider input[type="range"]::-moz-range-thumb {
    width: 0.875rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    background: hsl(var(--primary));
    cursor: pointer;
    pointer-events: all;
    border: 1px solid hsl(var(--primary) / 0.8);
    box-shadow: none;
    transition: all 0.15s ease;
    margin-top: -0.375rem;
}

.dual-range-slider input[type="range"]::-moz-range-thumb:hover {
    background: hsl(var(--primary) / 0.9);
}

.dual-range-slider input[type="range"]:focus::-webkit-slider-thumb {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.dual-range-slider input[type="range"]:focus::-moz-range-thumb {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}
/* Label */
.label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: hsl(var(--foreground) / 0.9);
    letter-spacing: 0.025em;
}

/* Select */
.select {
    display: flex;
    height: 2.5rem;
    width: 100%;
    border-radius: calc(var(--radius));
    border: none;
    background-color: hsl(var(--muted));
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

.select:focus {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

/* Slider Presets */
.slider-presets {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    order: -1;
}

.range-preset {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
    border: none;
    border-radius: calc(var(--radius));
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.range-preset:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.range-preset:active {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

/* Range Inputs */
.range-inputs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, hsl(var(--card)), hsl(var(--muted) / 0.05));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border) / 0.5);
    transition: all 0.3s ease;
}

.range-inputs:hover {
    border-color: hsl(var(--primary) / 0.3);
}

.range-inputs input {
    transition: all 0.2s ease;
}

.range-inputs input:focus {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 1px;
}

.price-separator {
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    background: hsl(var(--primary) / 0.1);
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--primary) / 0.2);
}

/* Search Container */
.search-container {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-input-group {
    display: flex;
    gap: 0.5rem;
}

.search-input-container {
    flex-grow: 1;
    position: relative;
}

.search-input {
    display: flex;
    height: 2.75rem;
    width: 100%;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
    padding: 0.5rem 3rem 0.5rem 1rem; /* Padding for icon */
    font-size: 1rem;
}

.image-upload-input {
    display: none;
}

.search-input-container .btn-ghost {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(var(--muted-foreground));
}

.search-mode-select {
    height: 2.75rem;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
    padding: 0 0.75rem;
    font-size: 0.875rem;
    width: 140px; /* Fixed width for the dropdown */
    flex-shrink: 0; /* Prevent shrinking in flex container */
}

.search-btn {
    height: 2.75rem;
    padding: 0 1.5rem;
}

/* Image Preview */
.image-preview-area {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background-color: hsl(var(--muted) / 0.1);
}

.image-preview {
    max-width: 120px;
    max-height: 80px;
    border-radius: var(--radius);
    object-fit: cover;
}



/* Filter Tags */
.filter-tags-section {
    padding: 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    margin-top: 1rem;
}

.filter-tags-section h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
}

.filter-tag, .model-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    border: 1px solid hsl(var(--border));
    margin: 0.25rem;
}

.filter-tag:hover, .model-tag:hover {
    background-color: hsl(var(--accent));
    border-color: hsl(var(--primary));
}

.filter-tag.active {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

.clear-tags-btn {
    background: none;
    border: none;
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0.25rem;
}

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.results-count {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.results-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Pagination */
#paginationContainer {
    margin-top: 1.5rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    transition: colors 0.15s ease-in-out;
    cursor: pointer;
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
    height: 2.25rem;
    padding: 0 1rem;
}

.pagination-btn:hover:not(:disabled) {
    background-color: hsl(var(--accent));
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

.pagination-info {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    border: 2px dashed hsl(var(--border));
    border-radius: var(--radius);
    background-color: hsl(var(--card));
    color: hsl(var(--muted-foreground));
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Sidebar Filter Categories */
.filter-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-title {
    font-size: 1.25rem;
    font-weight: 600;
    border-bottom: 1px solid hsl(var(--border));
    padding-bottom: 0.75rem;
}

.filter-category {
    border-radius: calc(var(--radius) - 2px);
    padding: 1rem;
    background: hsl(var(--card));
    margin-bottom: 1rem;
}

.filter-category-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}
/* Dual Range Slider Track */
.dual-range-track {
    position: absolute;
    top: 0.5rem;
    left: 0;
    right: 0;
    height: 0.5rem;
    background: hsl(var(--muted));
    border-radius: 0.25rem;
    z-index: 1;
    transition: all 0.2s ease;
}

.dual-range-slider:hover .dual-range-track {
    background: hsl(var(--muted) / 0.8);
}

.dual-range-progress {
    position: absolute;
    top: 0.5rem;
    height: 0.5rem;
    background: hsl(var(--primary));
    border-radius: 0.25rem;
    z-index: 2;
    pointer-events: none;
    transition: all 0.2s ease;
}

.dual-range-slider:hover .dual-range-progress {
    background: hsl(var(--primary) / 0.9);
}

/* Selected Filter Chip */
.filter-chip {
    display: inline-flex;
    align-items: center;
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    padding: 0.5rem 0.75rem;
    border-radius: calc(var(--radius));
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    gap: 0.375rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px hsl(var(--shadow) / 0.1);
    animation: filterChipSlideIn 0.3s ease-out;
    transform-origin: left center;
}

.filter-chip-label {
    opacity: 0.9;
    font-weight: 400;
}

.filter-chip-value {
    font-weight: 600;
    color: hsl(var(--accent-foreground));
}

.filter-chip-remove {
    background: hsl(var(--accent-foreground) / 0.2);
    border: none;
    color: hsl(var(--accent-foreground));
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1;
    padding: 0.25rem;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.filter-chip-remove:hover {
    opacity: 1;
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
    transform: scale(1.1);
}

.filter-chip:hover {
    background-color: hsl(var(--accent) / 0.9);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px hsl(var(--shadow) / 0.15);
}

/* Selected Filters Container */
.selected-filters-container {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) + 2px);
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px hsl(var(--shadow) / 0.1);
}

.selected-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid hsl(var(--border));
}

.selected-filters-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin: 0;
}

.clear-all-filters-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: hsl(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
    border: 1px solid hsl(var(--destructive) / 0.2);
    border-radius: calc(var(--radius));
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-all-filters-btn:hover {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
    transform: translateY(-1px);
    box-shadow: 0 2px 4px hsl(var(--destructive) / 0.2);
}

.selected-filters-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.selected-filters-content:empty::after {
    content: "No active filters";
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    font-style: italic;
}

/* Filter Chip Animations */
@keyframes filterChipSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes filterChipSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(-10px) scale(0.95);
    }
}

.filter-chip.removing {
    animation: filterChipSlideOut 0.2s ease-in forwards;
}

.filter-chip-remove:active {
    transform: scale(0.9);
}

/* Responsive Design */
@media (max-width: 768px) {
    .selected-filters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .clear-all-filters-btn {
        align-self: flex-end;
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .filter-chip {
        font-size: 0.7rem;
        padding: 0.25rem 0.375rem;
    }
}