/* Queen Concept: somente os botões de Cor do filtro BeRocket na sidebar. */
.berocket_single_filter_widget .bapf_sfilter[data-taxonomy="pa_cor"] .bapf_body ul {
    overflow: visible;
}

.berocket_single_filter_widget .bapf_sfilter[data-taxonomy="pa_cor"] .bapf_body li {
    position: relative;
    overflow: visible;
}

.berocket_single_filter_widget .bapf_sfilter[data-taxonomy="pa_cor"] .bapf_body li > label[aria-label] {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.berocket_single_filter_widget .bapf_sfilter[data-taxonomy="pa_cor"] .bapf_body li > label .bapf_clr_span {
    box-sizing: border-box;
    border: 0;
    border-radius: 50%;
    /* Fill, white spacing, then a subtle 1px light-gray ring. */
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #dedede;
}

/* The checked swatch gets a stronger green ring and a visible tick. */
.berocket_single_filter_widget .bapf_sfilter[data-taxonomy="pa_cor"] input:checked + label .bapf_clr_span {
    transform: none;
    box-shadow: 0 0 0 2px #fff, 0 0 0 5px #013f3a;
}
.berocket_single_filter_widget .bapf_sfilter[data-taxonomy="pa_cor"] input:checked + label .bapf_clr_span_abslt::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font: 700 16px/1 Arial, sans-serif;
    text-shadow: 0 1px 3px #222, 0 0 2px #222;
}

/* Replace the BeRocket blue checked state with the shop's green. */
.berocket_single_filter_widget .bapf_sfilter[data-taxonomy="pa_tamanho"] li input:checked + label {
    background: #013f3a;
    border-color: #013f3a;
    color: #fff;
}
.berocket_single_filter_widget .bapf_sfilter[data-taxonomy="pa_tamanho"] li input:checked + label::before {
    border-color: #fff;
}

/* O nome vem do aria-label que o próprio BeRocket já imprime para cada cor. */
.berocket_single_filter_widget .bapf_sfilter[data-taxonomy="pa_cor"] .bapf_body li > label[aria-label]::after,
.berocket_single_filter_widget .bapf_sfilter[data-taxonomy="pa_cor"] .bapf_body li > label[aria-label]::before {
    position: absolute;
    left: 50%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1001;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.berocket_single_filter_widget .bapf_sfilter[data-taxonomy="pa_cor"] .bapf_body li > label[aria-label]::after {
    content: attr(aria-label);
    bottom: calc(100% + 7px);
    transform: translateX(-50%);
    padding: 5px 8px;
    border-radius: 4px;
    background: #111;
    color: #fff;
    font: 500 12px/1.3 Arial, sans-serif;
    text-shadow: none;
    white-space: nowrap;
}

.berocket_single_filter_widget .bapf_sfilter[data-taxonomy="pa_cor"] .bapf_body li > label[aria-label]::before {
    content: "";
    bottom: calc(100% + 2px);
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom: 0;
    border-top-color: #111;
}

.berocket_single_filter_widget .bapf_sfilter[data-taxonomy="pa_cor"] .bapf_body li > label[aria-label]:hover::after,
.berocket_single_filter_widget .bapf_sfilter[data-taxonomy="pa_cor"] .bapf_body li > label[aria-label]:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Center the remove icon inside the selected-filter pill. */
.bapf-sfa-grey-rounded .berocket_aapf_widget_selected_area li a:not(.braapf_unselect_all) {
    display: inline-flex !important;
    align-items: center;
    min-height: 38px;
    padding-right: 36px;
}
.bapf-sfa-grey-rounded .berocket_aapf_widget_selected_area li a:not(.braapf_unselect_all)::before {
    content: "×";
    width: 18px;
    height: 18px;
    top: 50%;
    right: 9px;
    rotate: none;
    transform: translateY(-50%);
    font: 400 23px/18px Arial, sans-serif;
    text-align: center;
    color: #9ca3a7;
}

.qc-mobile-filters { display: none; }

@media (max-width: 921px) {
    body.qc-mobile-filters-active #secondary { display: none; }
    .qc-mobile-filters {
        display: block;
        margin: 10px 0 20px;
        padding: 8px;
        background: #fff;
        border: 1px solid #e8ecea;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
    }
    .qc-filter-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
    }
    .qc-filter-tab {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 0;
        min-height: 42px;
        padding: 5px 3px;
        border: 1px solid #dbe2df;
        border-radius: 8px;
        background: #f8faf9;
        color: #013f3a;
        font-size: clamp(11px, 3.2vw, 14px);
        font-weight: 600;
        line-height: 1.2;
        cursor: pointer;
    }
    .qc-filter-tab[aria-expanded="true"] { background: #eaf2ef; border-color: #8ca99f; }
    .qc-filter-count {
        flex: none;
        min-width: 18px;
        padding: 1px 4px;
        border-radius: 999px;
        background: #013f3a;
        color: #fff;
        font-size: 11px;
        line-height: 16px;
        text-align: center;
    }
    .qc-filter-count[hidden], .qc-filter-panel[hidden] { display: none !important; }
    .qc-filter-panel {
        max-height: min(55vh, 420px);
        overflow: auto;
        padding: 12px 5px 4px;
        overscroll-behavior: contain;
    }
    .qc-filter-panel .widget { margin: 0; }
    .qc-filter-panel .bapf_head { display: none; }
    .qc-filter-price { max-height: none; overflow: visible; padding-top: 10px; }
    .qc-filter-price .bapf_head { display: block; }
}
