
/* WooCommerce Custom Filter Styles */
#woo-custom-filter {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-clear-section {
    background: #f8f9fa;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.clear-filters-text {
    font-weight: 600;
    color: #495057;
}

.active-filters {
    background: #ffffff;
    color: #1a1b18;
    border: 1px solid #ccc;
    padding: 6px 12px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 500;
    min-height: 24px;
    display: inline-block;
}

.clear-all-filters {
    background: #1a1b18;
    color: white;
    border: none;
	margin: 0 ;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.clear-all-filters:hover {
    background: #c82333;
}

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

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

.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 15px;
    cursor: pointer;
    user-select: none;
    color: #1a1b18;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-title:hover {
    color: #1a1b18;
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.filter-section.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.filter-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

.filter-section.collapsed .filter-content {
    max-height: 0;
    padding: 0;
    margin: 0;
}

.price-info {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

.price-inputs {
    display: flex;
    gap: 15px;
	align-items: center;
}

.price-input-group {
	flex: 1;
    display: flex;
    align-items: center;
    background: #fff;
    transition: border-color 0.2s;
}

.price-input-group:focus-within {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.price-input-group label {
    margin-right: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.price-input-group input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 14px;
    background: transparent;
}

.price-input-group input::placeholder {
    color: #adb5bd;
}

.stock-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stock-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    position: relative;
    padding-left: 30px;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.stock-option:hover {
    background: #f8f9fa;
}

.stock-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    left: 8px;
}

.checkmark {
    position: absolute;
    left: 8px;
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #dee2e6;
    border-radius: 3px;
    transition: all 0.2s;
}

.stock-option:hover input ~ .checkmark {
    border-color: #1a1b18;
}

.stock-option input:checked ~ .checkmark {
    background-color: #007cba;
    border-color: #007cba;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.stock-option input:checked ~ .checkmark:after {
    display: block;
}

.stock-option .checkmark:after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.stock-count {
    color: #1a1b18;
    font-weight: 500;
    margin-left: 4px;
}

/* Loading state */
.woo-filter-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.woo-filter-loading:after {
    content: "Đang tải sản phẩm...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.95);
    padding: 15px 25px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 999;
    font-weight: 600;
    color: #333;
}

/* Product grid adjustments - Remove custom grid to use WooCommerce default */

@media (max-width: 768px) {
    .price-inputs {
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-clear-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    #woo-custom-filter {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    #woo-custom-filter {
        padding: 10px;
    }
}
