@media (max-width: 768px) {
    .filters {
        grid-template-columns: 1fr !important;
    }

    .filter-item,
    .filter-search,
    .filter-price-range,
    .filter-actions,
    .price-inputs {
        width: 100%;
        max-width: 100%;
    }

    .filter-actions,
    .price-inputs {
        flex-direction: column;
        align-items: stretch;
    }

    .products-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Catalog Filters Styles */
.filter-search {
    min-width: min(250px, 100%);
    flex: 1;
}

.filter-search .form-input {
    width: 100%;
}

.filter-price-range {
    min-width: min(300px, 100%);
    flex: 2;
}

.price-slider-container {
    position: relative;
    height: 30px;
    margin: 1rem 0;
}

/* Track background */
.price-slider-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    z-index: 1;
}

/* Active range between min and max */
.price-slider-range {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: var(--accent-gradient);
    border-radius: 3px;
    z-index: 2;
    pointer-events: none;
}

/* Price sliders - positioned absolutely over the track */
#price-min,
#price-max {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 6px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    z-index: 3;
}

/* Enable pointer events only on the thumb for interaction */
#price-min::-webkit-slider-thumb,
#price-max::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    pointer-events: auto;
    margin-top: -7px;
}

#price-min::-webkit-slider-thumb:hover,
#price-max::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.5);
}

#price-min::-moz-range-thumb,
#price-max::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    pointer-events: auto;
}

#price-min::-moz-range-thumb:hover,
#price-max::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.5);
}

/* Track styling for Firefox */
#price-min::-moz-range-track,
#price-max::-moz-range-track {
    background: transparent;
    height: 6px;
    border: none;
}

/* Focus states */
#price-min:focus,
#price-max:focus {
    outline: none;
}

#price-min:focus::-webkit-slider-thumb,
#price-max:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2), 0 4px 12px rgba(0, 212, 255, 0.5);
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.price-inputs input {
    flex: 1;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.price-inputs input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.price-inputs span {
    color: var(--text-secondary);
    font-weight: 600;
}

#price-display {
    color: var(--accent-primary);
    font-weight: 600;
}

.filter-checkbox {
    display: flex;
    align-items: center;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.filter-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.filter-checkbox-label span {
    color: var(--text-primary);
    font-weight: 500;
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-shrink: 0;
    min-width: fit-content;
}

.platform-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 212, 255, 0.25);
    border: 1px solid rgba(0, 212, 255, 0.5);
    border-radius: 12px;
    font-size: 0.8rem;
    color: #ffffff;
    margin-top: 0.5rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Product Status Badge */
.product-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.products-grid .product-card .product-status-badge {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
}

/* Force colored text for ALL status variations */
.products-grid .product-card .product-status-badge[class*="product-status-"] {
    color: inherit;
}

/* Status colors - Colored text on subtle background */
.products-grid .product-card .product-status-undetected,
.products-grid .product-card .product-status-undetect,
.products-grid .product-card .product-status-un-detect {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.5) !important;
    color: #10b981 !important;
}

.products-grid .product-card .product-status-detected,
.products-grid .product-card .product-status-detect {
    background: rgba(59, 130, 246, 0.1) !important;
    border: 1px solid rgba(59, 130, 246, 0.5) !important;
    color: #3b82f6 !important;
}

.products-grid .product-card .product-status-updating,
.products-grid .product-card .product-status-update {
    background: rgba(245, 158, 11, 0.1) !important;
    border: 1px solid rgba(245, 158, 11, 0.5) !important;
    color: #f59e0b !important;
}

.products-grid .product-card .product-status-находится-в-зоне-риска,
.products-grid .product-card .product-status-risk {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
    color: #ef4444 !important;
}

.products-grid .product-card .product-status-выдаётся-поддержкой,
.products-grid .product-card .product-status-support {
    background: rgba(124, 58, 237, 0.1) !important;
    border: 1px solid rgba(124, 58, 237, 0.5) !important;
    color: #a855f7 !important;
}

/* Mobile devices (up to 480px) */
@media (max-width: 480px) {
    .filter-price-range {
        min-width: 100%;
        width: 100%;
    }
    
    .price-slider-container {
        height: 35px;
        margin: 0.75rem 0;
    }
    
    .price-inputs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .price-inputs input {
        width: 100%;
    }
    
    .filter-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .filter-actions .btn {
        width: 100%;
    }
    
    .filter-checkbox-label {
        font-size: 0.9rem;
    }
}

/* Tablet devices (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .filter-price-range {
        min-width: 100%;
    }
    
    .filter-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-actions .btn {
        width: 100%;
    }
}

/* Final catalog responsive overrides */
@media (max-width: 768px) {
    .filters,
    .products-grid {
        grid-template-columns: 1fr !important;
    }

    .filter-item,
    .filter-search,
    .filter-price-range,
    .filter-actions,
    .price-inputs {
        width: 100%;
        max-width: 100%;
    }
}
