.wcawvc-shop-toolbar-widget,
.wcawvc-shop-toolbar-widget * {
    box-sizing: border-box;
}

.wcawvc-shop-toolbar-widget {
    width: 100%;
    position: relative;
}

html.wcawvc-filter-lock,
body.wcawvc-filter-lock {
    overflow: hidden !important;
}

/* =========================
   TOOLBAR
========================= */

.wcawvc-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    padding: 0 0 14px;
    border-bottom: 1px solid #ececec;
}

.wcawvc-shop-toolbar-cats-wrap {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 6px;
}

.wcawvc-shop-toolbar-cats-wrap::-webkit-scrollbar {
    height: 6px;
}

.wcawvc-shop-toolbar-cats-wrap::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.22);
    border-radius: 999px;
}

.wcawvc-shop-toolbar-cats-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.wcawvc-shop-toolbar-cats {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 100%;
    width: max-content;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* =========================
   CHIPS / CATEGORIAS BASE
========================= */

.wcawvc-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 18px;
    border: 1px solid #4a4a4a;
    border-radius: 999px;
    background: #ffffff;
    color: #404040;
    text-decoration: none;
    white-space: nowrap;
    font-size: 14px;
    line-height: 1;
    font-weight: 400;
    transition: all .2s ease;
}

.wcawvc-chip:hover {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

.wcawvc-chip.is-active {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

/* =========================
   AÇÕES DA DIREITA
========================= */

.wcawvc-shop-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
    min-width: max-content;
}

/* =========================
   ORDENAR POR
========================= */

.wcawvc-sort {
    position: relative;
    flex: 0 0 auto;
}

.wcawvc-sort-toggle {
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #222222;
    border-radius: 8px;
    background: #ffffff;
    color: #2b2b2b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 136px;
    transition: all .2s ease;
    box-shadow: none;
}

.wcawvc-sort-toggle:hover {
    background: #fafafa;
}

.wcawvc-sort-toggle-text {
    line-height: 1;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
}

.wcawvc-sort-arrow {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease;
    flex: 0 0 auto;
}

.wcawvc-sort-arrow svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: currentColor;
}

.wcawvc-sort.is-open .wcawvc-sort-arrow {
    transform: rotate(180deg);
}

.wcawvc-sort-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 284px;
    background: #ffffff;
    border: 1px solid #cfcfcf;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.10);
    padding: 8px 0;
    display: none;
    z-index: 60;
}

.wcawvc-sort.is-open .wcawvc-sort-dropdown {
    display: block;
}

.wcawvc-sort-option {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: #2d2d2d;
    transition: all .2s ease;
    font-size: 14px;
    line-height: 1.35;
    box-shadow: none;
}

.wcawvc-sort-option:hover {
    background: #f8f8f8;
}

.wcawvc-sort-option.is-active {
    font-weight: 700;
}

.wcawvc-check {
    min-width: 18px;
    text-align: center;
    font-size: 18px;
    line-height: 1;
    color: #111111;
}

/* =========================
   BOTÃO FILTRAR
========================= */

.wcawvc-filter-open {
    min-height: 40px;
    padding: 8px 16px;
    border: none;
    border-radius: 999px;
    background: #222222;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
    white-space: nowrap;
    transition: all .2s ease;
    box-shadow: none;
}

.wcawvc-filter-open:hover {
    opacity: .94;
    background: #111111;
}

.wcawvc-filter-open-text,
.wcawvc-filter-count {
    line-height: 1;
    font-size: 14px;
}

.wcawvc-filter-open-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.wcawvc-filter-open-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    display: block;
}

/* =========================
   OVERLAY
========================= */

.wcawvc-filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    opacity: 0;
    visibility: hidden;
    transition: all .25s ease;
    z-index: 998;
}

.wcawvc-shop-toolbar-widget.is-filter-open .wcawvc-filter-overlay {
    opacity: 1;
    visibility: visible;
}

/* =========================
   DRAWER FILTROS
========================= */

.wcawvc-filter-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(395px, 92vw);
    height: 100dvh;
    background: #ffffff;
    box-shadow: -12px 0 35px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform .28s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.wcawvc-shop-toolbar-widget.is-filter-open .wcawvc-filter-drawer {
    transform: translateX(0);
}

.wcawvc-filter-drawer-header {
    padding: 24px 22px 18px;
    border-bottom: 1px solid #ececec;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.wcawvc-filter-drawer-header h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    color: #1f1f1f;
}

.wcawvc-filter-close {
    border: none;
    background: transparent;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    color: #888888;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
    box-shadow: none;
}

.wcawvc-filter-close:hover {
    color: #111111;
    background: transparent;
}

.wcawvc-filter-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0;
}

.wcawvc-filter-group {
    border-bottom: 1px solid #ececec;
}

.wcawvc-filter-group-toggle {
    width: 100%;
    border: none;
    background: #ffffff;
    padding: 18px 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    text-align: left;
    transition: background-color .2s ease, color .2s ease;
    color: #1f1f1f;
    box-shadow: none;
}

.wcawvc-filter-group-toggle:hover {
    background: #fafafa;
}

.wcawvc-filter-group-arrow {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease;
    flex: 0 0 auto;
}

.wcawvc-filter-group-arrow svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: currentColor;
}

.wcawvc-filter-group.is-collapsed .wcawvc-filter-group-arrow {
    transform: rotate(180deg);
}

.wcawvc-filter-group-body {
    padding: 0 22px 18px;
}

.wcawvc-filter-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    cursor: pointer;
    color: #333333;
    font-size: 15px;
    line-height: 1.35;
}

.wcawvc-filter-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
}

.wcawvc-filter-check span {
    display: block;
}

/* =========================
   RODAPÉ DRAWER
========================= */

.wcawvc-filter-drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid #ececec;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #ffffff;
}

.wcawvc-filter-clear {
    min-height: 44px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #111111;
    cursor: pointer;
    font-weight: 600;
    transition: all .2s ease;
    box-shadow: none;
}

.wcawvc-filter-clear:hover {
    background: #f7f7f7;
    color: #111111;
}

.wcawvc-filter-apply {
    min-height: 44px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: #222222;
    color: #ffffff;
    cursor: pointer;
    font-weight: 700;
    transition: all .2s ease;
    white-space: nowrap;
    box-shadow: none;
}

.wcawvc-filter-apply:hover {
    background: #111111;
    color: #ffffff;
}

/* =========================
   TABLET
========================= */

@media (max-width: 1024px) {
    .wcawvc-shop-toolbar {
        align-items: center;
        gap: 14px;
    }

    .wcawvc-shop-toolbar-cats-wrap {
        flex: 1 1 auto;
    }

    .wcawvc-shop-toolbar-actions {
        flex: 0 0 auto;
        gap: 12px;
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 767px) {
    .wcawvc-shop-toolbar {
        flex-wrap: wrap;
        align-items: stretch;
        gap: 12px;
    }

    .wcawvc-shop-toolbar-cats-wrap {
        width: 100%;
        order: 1;
    }

    .wcawvc-shop-toolbar-cats {
        width: max-content;
        min-width: 100%;
    }

    .wcawvc-shop-toolbar-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 10px;
        order: 2;
    }

    .wcawvc-chip {
        min-height: 34px;
        padding: 8px 16px;
        font-size: 14px;
    }

    .wcawvc-sort-toggle {
        min-width: auto;
        padding: 8px 12px;
    }

    .wcawvc-sort {
        position: relative;
    }

    .wcawvc-sort-dropdown {
        position: absolute;
        top: calc(100% + 10px);
        left: 0 !important;
        right: auto !important;
        width: min(285px, calc(100vw - 32px));
        max-width: calc(100vw - 32px);
        transform: none !important;
    }

    .wcawvc-filter-open {
        padding: 8px 14px;
    }

    .wcawvc-filter-drawer {
        width: min(395px, 100vw);
    }

    .wcawvc-filter-drawer-header {
        padding: 22px 18px 16px;
    }

    .wcawvc-filter-group-toggle {
        padding: 16px 18px;
        font-size: 17px;
    }

    .wcawvc-filter-group-body {
        padding: 0 18px 16px;
    }

    .wcawvc-filter-drawer-footer {
        padding: 14px 16px;
    }

    .wcawvc-filter-apply {
        padding-left: 14px;
        padding-right: 14px;
    }
}