/* Mobile Filters - Compact & Premium Design */

/* Hide desktop filters on mobile */
@media (max-width: 768px) {
    .filters-section {
        display: none !important;
    }
}

/* Mobile Filter Bar - Minimal & Elegant */
.mobile-filter-bar {
    display: none;
    position: sticky;
    top: 60px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 990;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

@media (max-width: 768px) {
    .mobile-filter-bar {
        display: block;
    }
}

/* Filter Summary Row */
.filter-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Active Filters Display */
.active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.active-filters::-webkit-scrollbar {
    display: none;
}

/* Filter Button - Compact */
.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-toggle-btn:active {
    transform: scale(0.95);
}

.filter-toggle-btn i {
    font-size: 0.85rem;
}

.filter-count {
    background: white;
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

/* Filter Chips */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-chip:active {
    background: var(--primary);
    color: white;
    transform: scale(0.95);
}

.filter-chip i {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.filter-chip.active i {
    color: white;
}

/* Clear Filters */
.clear-filters {
    padding: 6px 10px;
    background: transparent;
    color: var(--accent);
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.clear-filters:active {
    opacity: 0.7;
}

/* Filter Bottom Sheet / Modal */
.filter-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1500;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.filter-sheet.active {
    transform: translateY(0);
}

/* Sheet Handle */
.sheet-handle {
    padding: 12px;
    display: flex;
    justify-content: center;
    cursor: grab;
}

.sheet-handle-bar {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
}

/* Sheet Header */
.sheet-header {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--border);
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sheet-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sheet-title h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
}

.sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-light);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.sheet-close:active {
    background: var(--primary);
    color: white;
    transform: scale(0.9);
}

/* Sheet Content */
.sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

/* Filter Sections in Sheet */
.filter-section {
    margin-bottom: 28px;
}

.filter-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Filter Options Grid */
.filter-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.filter-options.single-column {
    grid-template-columns: 1fr;
}

/* Filter Option Button */
.filter-option {
    padding: 12px 16px;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.filter-option:active {
    transform: scale(0.98);
}

.filter-option.selected {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
}

.filter-option.selected::after {
    content: '✓';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-weight: 700;
}

.filter-option-label {
    display: block;
    font-weight: 600;
}

.filter-option-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Price Range Special */
.price-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.price-option {
    flex: 1;
    min-width: 60px;
    padding: 10px;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.price-option:active {
    transform: scale(0.95);
}

.price-option.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Sheet Footer */
.sheet-footer {
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
}

.sheet-footer button {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset {
    background: var(--bg-light);
    color: var(--text-primary);
}

.btn-apply {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-reset:active,
.btn-apply:active {
    transform: scale(0.98);
}

/* Overlay */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1499;
}

.filter-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Quick Filter Pills (Alternative Design) */
.quick-filters {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.quick-filters::-webkit-scrollbar {
    display: none;
}

.quick-filter-pill {
    padding: 8px 16px;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.quick-filter-pill:active {
    transform: scale(0.95);
}

.quick-filter-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.quick-filter-pill i {
    margin-right: 6px;
    font-size: 0.85rem;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Swipe to dismiss gesture indicator */
.swipe-indicator {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
}

/* Results count badge - more compact */
@media (max-width: 768px) {
    .results-info {
        padding: 8px 16px;
        background: var(--bg-light);
        font-size: 0.85rem;
        color: var(--text-secondary);
        text-align: center;
        border-bottom: 1px solid var(--border);
    }
    
    .results-info strong {
        color: var(--primary);
        font-weight: 700;
    }
}