/* ========================================
   Archive Filter Styles
   ======================================== */

.wvwc-archive-filter {
    background: #fff;
    padding: 15px 20px;
    margin-bottom: 30px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

.wvwc-filter-form {
    margin: 0;
}

/* Toggle Button */
.wvwc-toggle-filter-btn {
    display: inline-block;
    padding: 0px 15px;
    margin-right: 15px;
    background: #dc2626;
    border: 1px solid #dc2626;
    border-radius: 3px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: middle;
    color: #fff;
}

.wvwc-toggle-filter-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* Filter Label */
.wvwc-filter-label {
    display: inline-block;
    font-size: 0.9rem;
    color: #111;
    margin-right: 15px;
    vertical-align: middle;
}

/* Price Sorting Checkboxes */
.wvwc-price-sort {
    display: inline-block;
    margin-bottom: 15px;
    vertical-align: middle;
}

.wvwc-sort-option {
    display: inline-block;
    margin-right: 15px;
    cursor: pointer;
    font-size: 0.9rem;
}

.wvwc-sort-option input[type="radio"] {
    margin-right: 5px;
    vertical-align: middle;
    margin-bottom: 0;
}

.wvwc-sort-option span {
    vertical-align: middle;
}

/* Brand Logos */
.wvwc-brand-logos {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.wvwc-brand-logo-item {
    width: 60px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 5px;
}

.wvwc-brand-logo-item:hover {
    border-color: #999;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.wvwc-brand-logo-item.active {
    border-color: #000;
    background: #f5f5f5;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.wvwc-brand-logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.wvwc-brand-logo-item .wvwc-brand-name {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    color: #333;
}

/* Filter Row - Single Line */
.wvwc-filter-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.wvwc-filter-row::-webkit-scrollbar {
    height: 6px;
}

.wvwc-filter-row::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.wvwc-filter-row::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.wvwc-filter-row::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.wvwc-filter-select {
    /* flex: 0 0 auto; */
    min-width: 140px;
    padding: 8px 12px;
    padding-right: 30px;
    /* Space for arrow */
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    height: auto;
    color: #111;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.wvwc-filter-select:hover {
    border-color: #999;
}

.wvwc-filter-select:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.wvwc-filter-submit {
    flex: 0 0 auto;
    padding: 5px 25px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.wvwc-filter-submit:hover {
    background: #333;
}

.wvwc-filter-submit:active {
    transform: translateY(1px);
}

/* Loading State */
.wvwc-filter-form.loading .wvwc-filter-submit {
    opacity: 0.6;
    cursor: not-allowed;
}

.wvwc-filter-form.loading .wvwc-filter-submit::after {
    content: '...';
    animation: loading 1s infinite;
}

@keyframes loading {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .wvwc-filter-select {
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .wvwc-archive-filter {
        padding: 12px 15px;
    }

    .wvwc-filter-label {
        display: block;
        margin-bottom: 8px;
    }

    .wvwc-price-sort {
        display: block;
        margin-bottom: 12px;
    }

    .wvwc-sort-option {
        margin-right: 12px;
        font-size: 12px;
    }

    .wvwc-brand-logos {
        gap: 8px;
        margin-bottom: 12px;
    }

    .wvwc-brand-logo-item {
        width: 50px;
        height: 42px;
    }

    .wvwc-filter-row {
        gap: 8px;
    }

    .wvwc-filter-select {
        min-width: 110px;
        font-size: 12px;
        padding: 7px 10px;
    }

    .wvwc-filter-submit {
        padding: 7px 20px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .wvwc-sort-option {
        display: block;
        margin-bottom: 5px;
    }

    .wvwc-brand-logo-item {
        width: 45px;
        height: 38px;
    }

    .wvwc-filter-select {
        min-width: 100px;
    }
}