/* ==========================================================
   MOBILE FILTERS - COMPLETE STYLES
   ========================================================== */

/* Base mobile filters container */
.mobile-filters {
    display: none;
    margin: 15px 0;
    padding: 0 12px;
    width: 100%;
    box-sizing: border-box;
}

/* Show on tablet and mobile */
@media screen and (max-width: 1024px) {
    .mobile-filters {
        display: block !important;
    }
    
    /* Hide desktop filters */
    .products .main .filters {
        display: none !important;
    }
    
    /* Adjust product grid */
    .products .cards {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 0 12px;
    }
}

/* Mobile only (small screens) */
@media screen and (max-width: 768px) {
    .products .cards {
        grid-template-columns: 1fr !important;
    }
}

/* Hide on desktop */
@media screen and (min-width: 1025px) {
    .mobile-filters {
        display: none !important;
    }
}

/* Mobile filter header */
.mobile-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #1C3F60;
    border-radius: 10px 10px 0 0;
    margin-bottom: 2px;
}

.mobile-filter-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.close-mobile-filters {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.close-mobile-filters:hover {
    opacity: 1;
}

/* Mobile dropdown container */
.mobile-filter-dropdowns {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    background: #ffffff;
    border-radius: 0 0 10px 10px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-dropdown {
    width: 100%;
    border: 1px solid #e5e9f0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

/* Dropdown toggle button */
.filter-dropdown-toggle {
    width: 100%;
    padding: 16px 18px;
    background: #f8fafd;
    color: #1C3F60;
    border: none;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.filter-dropdown-toggle:hover,
.filter-dropdown-toggle:active {
    background: #edf2f9;
}

.filter-dropdown-toggle.active {
    background: #1C3F60;
    color: #ffffff;
}

.filter-dropdown-toggle .arrow {
    transition: transform 0.3s ease;
    font-size: 14px;
    color: #FBC333;
}

.filter-dropdown-toggle.active .arrow {
    transform: rotate(180deg);
    color: #FBC333;
}

/* Dropdown content */
.filter-dropdown-content {
    display: none;
    padding: 15px;
    background: #ffffff;
    border-top: 1px solid #e5e9f0;
    max-height: 300px;
    overflow-y: auto;
}

.filter-dropdown-content.active {
    display: block !important;
}

/* Filter options list */
.filter-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.filter-option:hover {
    background: #edf2f9;
    border-color: #FBC333;
}

.filter-option.selected {
    background: #fff9e6;
    border-color: #FBC333;
}

.filter-option input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #FBC333;
}

.filter-option-label {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

/* Price range section */
.price-range-wrapper {
    padding: 10px 0;
}

.price-inputs {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.price-field {
    flex: 1;
}

.price-field label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.mobile-price-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e9f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.mobile-price-input:focus {
    border-color: #FBC333;
    outline: none;
    box-shadow: 0 0 0 3px rgba(251, 195, 51, 0.1);
}

/* Mobile filter actions */
.mobile-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding: 0 15px;
}

.mobile-apply-filters-btn,
.mobile-clear-filters-btn {
    flex: 1;
    padding: 16px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-apply-filters-btn {
    background: #FBC333;
    color: #1C3F60;
    box-shadow: 0 4px 12px rgba(251, 195, 51, 0.3);
}

.mobile-apply-filters-btn:hover,
.mobile-apply-filters-btn:active {
    background: #e6b02e;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(251, 195, 51, 0.4);
}

.mobile-clear-filters-btn {
    background: #f0f2f5;
    color: #666;
    border: 1px solid #d0d7e2;
}

.mobile-clear-filters-btn:hover,
.mobile-clear-filters-btn:active {
    background: #e0e4eb;
    color: #333;
}

/* Mobile applied filters summary */
.mobile-applied-filters {
    display: none;
    margin: 15px 15px 0;
    padding: 15px;
    background: #fff9e6;
    border-left: 4px solid #FBC333;
    border-radius: 8px;
    font-size: 14px;
}

.mobile-applied-filters strong {
    display: block;
    color: #1C3F60;
    margin-bottom: 10px;
    font-size: 14px;
}

.mobile-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-filter-tag {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    padding: 8px 15px;
    border: 1px solid #FBC333;
    border-radius: 30px;
    font-size: 13px;
    color: #1C3F60;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mobile-filter-tag button {
    background: none;
    border: none;
    margin-left: 8px;
    color: #999;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.mobile-filter-tag button:hover {
    color: #ff0000;
}

/* Product images fix for mobile */
@media screen and (max-width: 1024px) {
    .product-card .header img {
        display: block !important;
        width: 100%;
        height: auto;
        max-height: 180px;
        object-fit: contain;
        background: #f8f9fa;
        padding: 10px;
    }
}

/* Container fix */
.products .container {
    padding: 0 15px !important;
    max-width: 1366px !important;
    margin: 0 auto !important;
    width: 100%;
    box-sizing: border-box;
}

/* Extra small devices */
@media screen and (max-width: 480px) {
    .mobile-filters {
        padding: 0 8px;
    }
    
    .mobile-filter-header {
        padding: 12px 15px;
    }
    
    .mobile-filter-header h3 {
        font-size: 15px;
    }
    
    .filter-dropdown-toggle {
        padding: 14px 15px;
        font-size: 15px;
    }
    
    .mobile-filter-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .mobile-apply-filters-btn,
    .mobile-clear-filters-btn {
        width: 100%;
        padding: 14px;
        font-size: 15px;
    }
    
    .price-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .mobile-filter-tag {
        font-size: 12px;
        padding: 6px 12px;
    }
}