/* Quick Filters — pill buttons for category/brand pages */

.quickfilter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.qf-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.qf-btn {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    padding: 8px 20px;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #800020;
    background: #fff;
    border: 1.5px solid #800020;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: pointer;
    line-height: 1.4;
}

.qf-btn:hover {
    background: #fdf2f5;
    color: #800020;
    text-decoration: none;
}

.qf-btn.active {
    background: #800020;
    color: #fff;
    border-color: #800020;
}

.qf-btn.active:hover {
    background: #a3002e;
    border-color: #a3002e;
    color: #fff;
}

/* Right group: category dropdown + sort select */
.qf-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.quickfilter-bar > .sort-block {
    margin-left: auto;
}

.qf-right .sort-block {
    margin-left: 0;
}

.quickfilter-bar .sort-block select,
.quickfilter-bar select#input-sort {
    appearance: none;
    box-sizing: border-box;
    border: 1.5px solid #e0e0e0;
    border-radius: 50px;
    padding: 0 36px 0 16px;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23800020' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
    cursor: pointer;
    transition: border-color 0.2s;
    line-height: 1;
    width: auto;
    min-width: 0;
    height: 37px;
}

.quickfilter-bar .sort-block select:hover,
.quickfilter-bar select#input-sort:hover {
    border-color: #800020;
}

.quickfilter-bar .sort-block select:focus,
.quickfilter-bar select#input-sort:focus {
    border-color: #800020;
    box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.08);
    outline: none;
}

/* Category dropdown */
.qf-select {
    appearance: none;
    border: 1.5px solid #e0e0e0;
    border-radius: 50px;
    padding: 8px 36px 8px 16px;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    width: auto;
    min-width: 0;
    max-width: 220px;
    line-height: 1.4;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23800020' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
    cursor: pointer;
    transition: border-color 0.2s;
    line-height: 1.4;
    height: auto;
}

.qf-select:hover {
    border-color: #800020;
}

.qf-select:focus {
    border-color: #800020;
    box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.08);
    outline: none;
}


/* Override main.css sort-block styles inside quickfilter-bar */
.quickfilter-bar .sort-block select,
body[class*="product-manufacturer-info"] .quickfilter-bar .sort-block select,
body[class*="product-category"] .quickfilter-bar .sort-block select,
body.product-special .quickfilter-bar .sort-block select,
body.product-latest .quickfilter-bar .sort-block select,
body.product-search .quickfilter-bar .sort-block select {
    height: 37px;
    min-height: 37px;
    max-height: 37px;
    padding: 0 36px 0 16px;
    font-size: 13px;
    line-height: 37px;
    border-radius: 50px;
    border: 1.5px solid #e0e0e0;
    min-width: 0;
    box-sizing: border-box;
}

body[class*="product-manufacturer-info"] .quickfilter-bar .sort-block,
body[class*="product-category"] .quickfilter-bar .sort-block {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .quickfilter-bar {
        gap: 8px;
        justify-content: flex-start;
    }
    .qf-pills {
        gap: 6px;
        width: 100%;
    }
    .qf-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
    .quickfilter-bar .sort-block {
        margin-left: 0;
    }
    .quickfilter-bar .sort-block select,
    .quickfilter-bar select#input-sort,
    .qf-select {
        font-size: 12px;
        padding: 6px 32px 6px 14px;
    }
}
