/* ===========================================
   MOBILE FILTER - BRANDS ONLY
   Simplified version without categories
   =========================================== */

@media (max-width: 768px) {
    /* Hide desktop sidebar */
    .sidebar {
        display: none !important;
    }
    
    .products-layout-container {
        grid-template-columns: 1fr !important;
    }
    
    /* Hide product count, show filter button instead */
    .products-count {
        display: none !important;
    }
    
    /* Toolbar adjustments */
    .toolbar-row {
        flex-direction: column;
        align-items: stretch !important;
    }
    
    .toolbar-left {
        width: 100%;
        justify-content: space-between;
        gap: 8px !important;
    }
    
    .toolbar-right {
        width: 100%;
        justify-content: center;
    }
    
    /* ===================================
       FILTER BUTTON
       =================================== */
    
    .mobile-filter-btn {
        display: flex !important;
        align-items: center;
        gap: 8px;
        padding: 10px 18px;
        background: white;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        color: #374151;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .mobile-filter-btn:active {
        background: #f9fafb;
        border-color: #dc2626;
        transform: scale(0.98);
    }
    
    .mobile-filter-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .mobile-filter-btn .filter-count {
        background: #dc2626;
        color: white;
        font-size: 11px;
        padding: 2px 6px;
        border-radius: 10px;
        min-width: 18px;
        text-align: center;
    }
    
    /* Sort dropdown */
    .sort-group {
        flex: 1;
    }
    
    .sort-select {
        min-width: auto !important;
        width: 100%;
        font-size: 13px !important;
    }
    
    /* ===================================
       FILTER MODAL
       =================================== */
    
    .mobile-filter-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        display: none;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
    }
    
    .mobile-filter-modal.active {
        display: block;
        animation: fadeIn 0.2s ease;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    .mobile-filter-drawer {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-radius: 20px 20px 0 0;
        max-height: 80vh;
        display: flex;
        flex-direction: column;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .mobile-filter-modal.active .mobile-filter-drawer {
        transform: translateY(0);
    }
    
    /* ===================================
       MODAL HEADER
       =================================== */
    
    .mobile-filter-header {
        padding: 20px;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
    }
    
    .mobile-filter-header h2 {
        font-size: 18px;
        font-weight: 700;
        color: #111827;
        margin: 0;
    }
    
    .mobile-filter-close {
        width: 32px;
        height: 32px;
        border: none;
        background: #f3f4f6;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .mobile-filter-close:active {
        background: #e5e7eb;
        transform: scale(0.95);
    }
    
    .mobile-filter-close svg {
        width: 20px;
        height: 20px;
    }
    
    /* ===================================
       RESULTS COUNTER
       =================================== */
    
    .mobile-filter-results {
        padding: 12px 20px;
        background: #f9fafb;
        border-bottom: 1px solid #e5e7eb;
        text-align: center;
        font-size: 14px;
        color: #6b7280;
    }
    
    .mobile-filter-results strong {
        color: #111827;
        font-weight: 600;
    }
    
    /* ===================================
       FILTER CONTENT - BRANDS
       =================================== */
    
    .mobile-filter-content {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
        -webkit-overflow-scrolling: touch;
    }
    
    .brand-filter-wrapper {
        width: 100%;
    }
    
    /* Brand filter list */
    .mobile-filter-content .brand-filter-list {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    .mobile-filter-content .brand-filter-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 0;
        cursor: pointer;
        border-bottom: 1px solid #f3f4f6;
        transition: background 0.2s;
    }
    
    .mobile-filter-content .brand-filter-item:last-child {
        border-bottom: none;
    }
    
    .mobile-filter-content .brand-filter-item:active {
        background: #f9fafb;
    }
    
    .mobile-filter-content .brand-checkbox {
        width: 22px;
        height: 22px;
        cursor: pointer;
        accent-color: #dc2626;
        flex-shrink: 0;
    }
    
    .mobile-filter-content .brand-name {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 500;
        color: #374151;
        font-size: 15px;
    }
    
    .mobile-filter-content .brand-logo-small {
        width: 28px;
        height: 28px;
        object-fit: contain;
        flex-shrink: 0;
    }
    
    .mobile-filter-content .brand-count {
        font-size: 13px;
        color: #9ca3af;
        flex-shrink: 0;
    }
    
    /* Clear filters button */
    .mobile-filter-content .btn-clear-filters {
        width: 100%;
        margin-top: 16px;
        padding: 12px;
        background: white;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        color: #374151;
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .mobile-filter-content .btn-clear-filters:active {
        background: #f9fafb;
        border-color: #dc2626;
        color: #dc2626;
    }
    
    /* ===================================
       MODAL FOOTER
       =================================== */
    
    .mobile-filter-footer {
        padding: 16px 20px;
        border-top: 1px solid #e5e7eb;
        display: flex;
        gap: 12px;
        flex-shrink: 0;
        background: white;
    }
    
    .mobile-filter-footer button {
        flex: 1;
        padding: 14px;
        border-radius: 8px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        border: none;
    }
    
    .btn-clear-mobile-filters {
        background: white;
        border: 2px solid #e5e7eb !important;
        color: #374151;
    }
    
    .btn-clear-mobile-filters:active {
        background: #f9fafb;
    }
    
    .btn-apply-mobile-filters {
        background: #dc2626;
        color: white;
    }
    
    .btn-apply-mobile-filters:active {
        background: #b91c1c;
    }
}

/* Desktop - hide mobile elements */
@media (min-width: 769px) {
    .mobile-filter-btn {
        display: none !important;
    }
    
    .mobile-filter-modal {
        display: none !important;
    }
}