/* Professional Filter Container */
.filter-container {
    margin-bottom: 25px;
}

/* Professional Filter Widget Styles */
.filter-widget {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.filter-widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.filter-header {
    background: linear-gradient(135deg, #006b68 0%, #008a87 100%);
    padding: 20px 24px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.filter-header:hover {
    background: linear-gradient(135deg, #008a87 0%, #00a8a3 100%);
    box-shadow: 0 4px 12px rgba(0, 107, 104, 0.3);
}

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

.filter-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.filter-header-content i {
    font-size: 20px;
    color: #ffffff;
}

.filter-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.filter-toggle-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.filter-header:hover .filter-toggle-indicator {
    opacity: 1;
}

.toggle-text {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toggle-text::before {
    content: "Đóng";
}

.filter-header.collapsed .toggle-text::before {
    content: "Mở";
}

.toggle-arrow {
    font-size: 16px;
    transition: transform 0.3s ease;
    display: inline-block;
    color: #ffffff;
    margin-left: 8px;
}

.toggle-arrow.fa-chevron-up {
    transform: rotate(0deg);
}

.toggle-arrow.fa-chevron-down {
    transform: rotate(0deg);
}

.filter-body {
    padding: 20px;
    background: #fafbfc;
    display: block;
    opacity: 1;
    max-height: none;
    transition: opacity 0.3s ease, max-height 0.4s ease;
}

.filter-body.collapsed {
    display: none !important;
    opacity: 0;
    max-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8ecf0;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #27303e;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-section-title i {
    color: #006b68;
    font-size: 16px;
}

/* Sort Select - Enhanced Professional Style */
.filter-select {
    width: 100%;
    padding: 14px 45px 14px 16px;
    border: 2px solid #e8ecf0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 15px;
    font-weight: 500;
    color: #27303e;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    cursor: pointer;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23006b68' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filter-select:hover {
    border-color: #006b68;
    background-color: #f8fffe;
    box-shadow: 0 2px 6px rgba(0, 107, 104, 0.08);
    transform: translateY(-1px);
}

.filter-select:focus {
    outline: none;
    border-color: #006b68;
    box-shadow: 0 0 0 4px rgba(0, 107, 104, 0.12), 0 2px 8px rgba(0, 107, 104, 0.15);
    background-color: #ffffff;
    transform: translateY(0);
}

.filter-select:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 107, 104, 0.2);
}

/* Custom option styling (for browsers that support it) */
.filter-select option {
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #27303e;
    background: #ffffff;
    border: none;
}

.filter-select option:hover {
    background: #f0f7f7;
}

.filter-select option:checked {
    background: #006b68;
    color: #ffffff;
    font-weight: 600;
}

/* Sort Select Wrapper */
.sort-select-wrapper {
    position: relative;
    width: 100%;
}

/* Enhanced Sort Section */
.filter-section.sort-section {
    background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
    padding: 18px;
    border-radius: 8px;
    border: 1px solid #e8ecf0;
    margin-bottom: 20px;
}

.filter-section.sort-section .filter-section-title {
    margin-bottom: 12px;
    font-size: 13px;
    letter-spacing: 0.8px;
}

.filter-section.sort-section .filter-section-title i {
    font-size: 17px;
}

/* Price Range */
.price-range-container {
    margin-top: 10px;
}

.price-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.price-input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e8ecf0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.price-input:focus {
    outline: none;
    border-color: #006b68;
    box-shadow: 0 0 0 3px rgba(0, 107, 104, 0.1);
}

.price-display {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    font-weight: 500;
}

.price-display span {
    color: #006b68;
    font-weight: 600;
}

.price-range-link {
    color: #006b68;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.price-range-link:hover {
    color: #004d4a;
    text-decoration: underline;
}

/* Brand Checkboxes */
.brand-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
}

.brand-list::-webkit-scrollbar {
    width: 6px;
}

.brand-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.brand-list::-webkit-scrollbar-thumb {
    background: #006b68;
    border-radius: 3px;
}

.brand-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 4px;
    padding-left: 8px;
    margin-left: -8px;
}

.brand-item:hover {
    background: #f0f7f7;
}

.brand-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #006b68;
}

.brand-label {
    font-size: 14px;
    color: #454545;
    cursor: pointer;
    flex: 1;
    user-select: none;
}

.brand-count {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}

/* Filter Buttons */
.filter-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.filter-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn-apply {
    background: linear-gradient(135deg, #006b68 0%, #008a87 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 107, 104, 0.3);
}

.filter-btn-apply:hover {
    background: linear-gradient(135deg, #008a87 0%, #006b68 100%);
    box-shadow: 0 4px 8px rgba(0, 107, 104, 0.4);
    transform: translateY(-1px);
}

.filter-btn-reset {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e8ecf0;
}

.filter-btn-reset:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #454545;
}

/* Active Filters Display */
.active-filters {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 15px;
    display: none;
}

.active-filters.has-filters {
    display: block;
}

.active-filters-title {
    font-size: 12px;
    font-weight: 600;
    color: #856404;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.filter-tag {
    display: inline-block;
    background: #ffc107;
    color: #856404;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 6px;
    margin-bottom: 6px;
}

.filter-tag .remove-filter {
    margin-left: 6px;
    cursor: pointer;
    font-weight: bold;
}

.filter-tag .remove-filter:hover {
    color: #fff;
}

/* Smooth transitions - removed duplicate */

/* Responsive */
/* Ensure row uses flexbox for order to work */
/* .row {
    display: flex;
    flex-wrap: wrap;
} */

/* iPad Air and tablets (768px - 1024px) */
@media (max-width: 1024px) {
    /* .row {
        display: flex;
        flex-direction: column;
    } */

    #sidebar {
        order: -1 !important;
        margin-bottom: 30px;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    #main-content {
        order: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .filter-widget {
        margin-bottom: 20px;
    }
}

/* Mobile devices */
@media (max-width: 767.98px) {
    /* .row {
        display: flex;
        flex-direction: column;
    } */

    #sidebar {
        order: -1 !important;
        margin-bottom: 20px;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    #main-content {
        order: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .filter-widget {
        margin-bottom: 20px;
    }
    
    .price-inputs {
        flex-direction: column;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-header h4 {
        font-size: 16px;
    }
    
    .filter-section-title {
        font-size: 13px;
    }
}

