* {
    scrollbar-width: thin;
    scrollbar-color: var(--bg-base-yellow) var(--bg-base-grey);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-button {
    display: none !important;
    width: 0;
    height: 0;
}

::-webkit-scrollbar-track {
    background: var(--bg-base-grey) !important;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--bg-base-yellow) !important;
    border-radius: 10px;
    border: 2px solid var(--bg-base-grey) !important;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-bg-btn-yellow-hover) !important;
}

.vit-catalog-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    width: 100%;
    max-width: 1360px;
    margin: 30px auto 80px auto;
    padding: 0 24px;
    align-items: start;

    & .vit-filter-sidebar {
        position: sticky;
        top: 90px;
        height: fit-content;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 30px;
        background-color: var(--bg-base-light, #fcfcfc);
        padding: 24px;
        border-radius: 12px;
        border: 1px solid var(--bg-base-grey-dark, #d5d5da);

        .vit-mobile-filter-btn {
            display: none;
        }

        .vit-filter-content {
            display: flex;
            flex-direction: column;
        }

        & h3 {
            margin-top: 10px;
            font-size: 1.2rem;
            color: var(--text-dark, #222);
            font-weight: 600;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--text-yellow, #ffd700);
        }

        & .vit-search-box {
            display: flex;
            flex-direction: column;
            gap: 10px;
            width: 100%;

            & input {
                width: 100%;
                padding: 5px 12px;
                border: 1px solid var(--bg-base-grey-dark, #d5d5da);
                border-radius: 8px;
                font-size: 1rem;
                outline: none;
                transition: border-color 0.3s ease;
                box-sizing: border-box;

                &:focus {
                    border-color: var(--text-yellow, #ffd700);
                }
            }

            & button {
                width: 100%;
                padding: 5px 12px;
                background-color: var(--color-bg-btn-dark, #222);
                color: var(--text-light, #fff);
                border: none;
                border-radius: 8px;
                font-weight: 600;
                cursor: pointer;
                transition: background-color 0.3s ease;

                &:hover {
                    background-color: var(--color-bg-btn-hover, #444);
                }
            }
        }

        & .vit-category-list {
            list-style: none;
            padding: 0;
            margin: 5px 0 0 0;
            display: flex;
            flex-direction: column;
            gap: 12px;

            & li label {
                display: flex;
                align-items: center;
                gap: 10px;
                font-size: 1rem;
                color: var(--text-dark, #444);
                cursor: pointer;
                transition: color 0.2s ease;

                &:hover {
                    color: var(--text-yellow, #e6c200);
                }

                & input[type="checkbox"],
                & input[type="radio"] {
                    appearance: none;
                    -webkit-appearance: none;
                    width: 18px;
                    height: 18px;
                    min-width: 18px;
                    cursor: pointer;
                    margin: 0;
                    display: grid;
                    place-content: center;
                    border: 2px solid var(--bg-base-grey-dark, #d5d5da);
                    background-color: var(--bg-base-light, #ffffff);
                    transition: all 0.2s ease;

                    &:checked {
                        background-color: var(--text-yellow, #ffd700);
                        border-color: var(--text-yellow, #ffd700);
                    }
                }

                & input[type="checkbox"] {
                    border-radius: 4px;

                    &::before {
                        content: "";
                        width: 10px;
                        height: 10px;
                        transform: scale(0);
                        transition: 120ms transform ease-in-out;
                        box-shadow: inset 1em 1em var(--text-dark, #222);
                        clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
                    }

                    &:checked::before {
                        transform: scale(1);
                    }
                }

                & input[type="radio"] {
                    border-radius: 50%;

                    &::before {
                        content: "";
                        width: 8px;
                        height: 8px;
                        border-radius: 50%;
                        transform: scale(0);
                        transition: 120ms transform ease-in-out;
                        background-color: var(--text-dark, #222);
                    }

                    &:checked::before {
                        transform: scale(1);
                    }
                }
            }
        }

        & .vit-filter-actions {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 20px;

            /* ESTILO APLICADO AO BOTÃO 'APLICAR FILTROS' AQUI */
            & button {
                width: 100%;
                padding: 8px 12px;
                background-color: var(--color-bg-btn-dark, #222);
                color: var(--text-light, #fff);
                border: none;
                border-radius: 8px;
                font-size: 1rem;
                font-weight: 600;
                cursor: pointer;
                transition: background-color 0.3s ease;

                &:hover {
                    background-color: var(--color-bg-btn-hover, #444);
                }
            }

            & .vit-btn-limpar {
                text-align: center;
                color: var(--text-grey, #7d7d7d);
                padding: 8px 12px;
                text-decoration: none;
                border: 1px solid var(--text-grey, #7d7d7d);
                border-radius: 8px;
                font-size: 1rem;
                font-weight: 500;
                transition: all 0.3s ease;

                &:hover {
                    background-color: var(--bg-base-grey-dark, #d5d5da);
                    color: var(--text-dark, #222);
                }
            }
        }

        & .vit-results-count {
            margin-top: 15px;
            font-size: 0.9rem;
            color: var(--text-grey, #7d7d7d);
            text-align: center;
            border-top: 1px dashed var(--bg-base-grey-dark, #d5d5da);
            padding-top: 20px;

            & b {
                color: var(--text-dark, #222);
            }
        }
    }

    & .vit-product-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
        align-content: start;

        & .vit-ordering-top {
            grid-column: 1 / -1;
            display: flex;
            justify-content: flex-end;
            padding-bottom: 15px;
            margin-bottom: 5px;
            border-bottom: 1px solid var(--bg-base-grey-dark, #d5d5da);
            width: 100%;

            form {
                display: flex;
                align-items: center;
            }

            .vit-select-order {
                padding: 8px 12px;
                border: 1px solid var(--bg-base-grey-dark, #d5d5da);
                border-radius: 8px;
                background-color: transparent;
                color: var(--text-dark, #222);
                font-size: 0.95rem;
                font-weight: 600;
                font-family: "Oswald", sans-serif;
                outline: none;
                cursor: pointer;
                transition: all 0.2s ease;

                &:hover,
                &:focus {
                    background-color: var(--bg-base-grey, #f2f2f5);
                    border-color: var(--text-dark, #222);
                }
            }

            @media (max-width: 600px) {
                justify-content: flex-start;

                form,
                .vit-select-order {
                    width: 100%;
                }
            }
        }

        & .vit-product-card {
            display: flex;
            flex-direction: column;
            background-color: var(--bg-base-light, #ffffff);
            border: 1px solid var(--bg-base-grey-dark, #d5d5da);
            border-radius: 12px;
            overflow: hidden;
            transition: transform 0.3s ease, box-shadow 0.3s ease;

            &:hover {
                transform: translateY(-5px);
                box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);

                & .vit-product-image img {
                    transform: scale(1.05);
                }
            }

            & .vit-product-image {
                width: 100%;
                aspect-ratio: 4 / 3;
                overflow: hidden;
                display: flex;
                align-items: center;
                justify-content: center;
                background-color: var(--bg-base-grey, #f2f2f5);

                & img,
                & video {
                    width: 100%;
                    height: 100%;
                    object-fit: contain;
                    transition: transform 0.3s ease;
                }
            }

            & .vit-product-info {
                display: flex;
                flex-direction: column;
                flex: 1;
                padding: 20px;
                gap: 12px;

                & .inf-product-name_company {

                    & h3 {
                        font-size: 1.1rem;
                        font-weight: 500;
                        color: var(--text-dark, #222);
                        margin: 0;
                    }

                    & a {

                        & span {
                            font-size: 0.9rem;
                            color: var(--text-grey, #7d7d7d);
                            display: flex;
                            align-items: center;
                            gap: 5px;
                            transition: var(--transition-all);

                            & i {
                                display: flex;
                                align-items: center;
                                justify-content: center;
                                color: var(--text-yellow, #ffd700);
                                font-size: 0.9rem;
                                margin-top: 5px;
                            }
                        }

                        & span:hover {
                            color: var(--text-yellow, #e6c200);
                        }
                    }

                }

                & .vit-product-old-price {
                    font-size: 0.95rem;
                    color: var(--text-grey, #7d7d7d);
                    text-decoration: line-through;
                    margin: 0 -5px 0 0;
                }

                & .vit-product-prices {
                    display: flex;
                    flex-direction: column;
                    gap: 2px;
                    margin: 0;

                    .vit-region-label {
                        font-size: 0.8rem;
                        color: var(--text-grey, #7d7d7d);
                        text-transform: uppercase;
                        letter-spacing: 0.5px;
                        font-weight: 600;
                    }

                    .vit-product-price {
                        font-size: 1.5rem;
                        font-weight: 700;
                        color: var(--text-yellow, #ffd700);
                        margin: 0;
                    }
                }

                & .vit-product-inf {
                    display: flex;
                    gap: 10px;

                }

                & .vit-product-actions {
                    display: flex;
                    flex-direction: column;
                    gap: 10px;
                    margin-top: auto;
                    width: 100%;

                    .vit-btn-view {
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        width: 100%;
                        padding: 0px 12px;
                        border: 1px solid var(--bg-base-grey-dark, #d5d5da);
                        border-radius: 8px;
                        background-color: transparent;
                        color: var(--text-dark, #222);
                        font-size: 0.95rem;
                        font-weight: 600;
                        text-align: center;
                        text-decoration: none;
                        transition: all 0.2s ease;
                        height: 38px;

                        &:hover {
                            background-color: var(--bg-base-grey, #f2f2f5);
                            border-color: var(--text-dark, #222);
                        }
                    }

                    .vit-cart-controls {
                        display: flex !important;
                        flex-direction: row !important;
                        align-items: center !important;
                        justify-content: space-between !important;
                        gap: 8px !important;
                        height: 44px !important;
                        width: 100% !important;

                        form.ajax-add-to-cart {
                            display: flex !important;
                            flex-direction: row !important;
                            align-items: stretch !important;
                            flex: 1 !important;
                            gap: 8px !important;
                            height: 100% !important;
                            margin: 0 !important;
                            padding: 0 !important;
                            min-width: 0 !important;

                            input.vit-qtd-input {
                                width: 50px !important;
                                height: auto !important;
                                flex-shrink: 0 !important;
                                border: 1px solid var(--bg-base-grey-dark, #d5d5da) !important;
                                border-radius: 8px !important;
                                text-align: center !important;
                                font-weight: 700 !important;
                                font-size: 1rem !important;
                                color: var(--text-dark, #222) !important;
                                background-color: var(--bg-base-grey, #f2f2f5) !important;
                                margin: 0 !important;
                                padding: 0 !important;
                                outline: none !important;
                                transition: all 0.2s ease !important;

                                &:focus {
                                    border-color: var(--text-yellow, #ffd700) !important;
                                    background-color: var(--bg-base, #ffffff) !important;
                                }

                                &::-webkit-outer-spin-button,
                                &::-webkit-inner-spin-button {
                                    -webkit-appearance: none !important;
                                    margin: 0 !important;
                                }
                            }

                            button.vit-btn-add-cart {
                                flex: 1 !important;
                                height: auto !important;
                                min-width: 0 !important;
                                background-color: var(--color-bg-btn-dark, #222) !important;
                                color: var(--text-light, #fff) !important;
                                border: none !important;
                                border-radius: 8px !important;
                                font-size: 0.95rem !important;
                                font-weight: 700 !important;
                                margin: 0 !important;
                                padding: 0 5px !important;
                                display: flex !important;
                                align-items: center !important;
                                justify-content: center !important;
                                cursor: pointer !important;
                                white-space: nowrap !important;
                                overflow: hidden !important;
                                text-overflow: ellipsis !important;
                                transition: all 0.2s ease !important;

                                &:hover {
                                    background-color: var(--color-bg-btn-hover, #444) !important;
                                }
                            }
                        }

                        button.vit-btn-favorite {
                            width: 44px !important;
                            height: 44px !important;
                            flex-shrink: 0 !important;
                            background-color: transparent !important;
                            border: 1px solid var(--bg-base-grey-dark, #d5d5da) !important;
                            border-radius: 8px !important;
                            color: var(--text-grey, #7d7d7d) !important;
                            font-size: 1.3rem !important;
                            display: flex !important;
                            align-items: center !important;
                            justify-content: center !important;
                            margin: 0 !important;
                            padding: 0 !important;
                            cursor: pointer !important;
                            transition: all 0.2s ease !important;

                            &:hover {
                                color: #e63946 !important;
                                border-color: #e63946 !important;
                                background-color: #fff0f1 !important;
                            }
                        }
                    }
                }
            }

            .favorite-btn {
                width: 50px;
                min-height: 38px;
                border-radius: 8px;
                border: 1px solid #f5c6cb;
                background-color: #fff0f1;
                color: #e63946;
                font-size: 0.9rem;
                font-weight: 600;
                font-family: "Oswald", sans-serif;
                cursor: pointer;
                transition: var(--transition-all);
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 8px;

                i {
                    color: #e63946;
                    font-size: 1rem;
                    transition: var(--transition-all);
                }

                &:hover {
                    background-color: #e63946;
                    border-color: #e63946;
                    color: var(--text-light);
                    transform: translateY(-2px);

                    i {
                        color: var(--text-light);
                    }
                }

                &.is-favorite {
                    background-color: #e63946;
                    border-color: #e63946;
                    color: var(--text-light);

                    i {
                        color: var(--text-light);
                    }

                    &:hover {
                        background-color: #b91c1c;
                        border-color: #b91c1c;
                    }
                }

                &.loading {
                    opacity: 0.65;
                    pointer-events: none;
                    cursor: wait;
                }
            }
        }

        & .vit-empty-state {
            grid-column: 1 / -1;
            text-align: center;
            padding: 60px 20px;
            color: var(--text-grey, #7d7d7d);
            background-color: var(--bg-base-light, #ffffff);
            border: 1px dashed var(--color-border, #7d7d7d);
            border-radius: 12px;
            font-size: 1.1rem;
        }

        & .vit-pagination {
            grid-column: 1 / -1;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 15px;
            margin-top: 20px;
            padding-top: 30px;
            border-top: 1px solid var(--bg-base-grey-dark, #d5d5da);

            & a {
                padding: 8px 16px;
                border: 1px solid var(--color-border, #7d7d7d);
                border-radius: 8px;
                color: var(--text-dark, #222);
                font-weight: 500;
                transition: all 0.3s ease;
                background-color: var(--bg-base-light, #fff);
                text-decoration: none;

                &:hover:not(.disabled) {
                    background-color: var(--color-bg-btn-dark, #222);
                    color: var(--text-light, #fff);
                    border-color: var(--color-bg-btn-dark, #222);
                }

                &.disabled {
                    opacity: 0.5;
                    pointer-events: none;
                    background-color: var(--bg-base-grey, #f2f2f5);
                }
            }

            & span {
                font-weight: 600;
                color: var(--text-dark, #222);
            }
        }
    }

    @media (max-width: 900px) {
        grid-template-columns: 1fr;

        & .vit-filter-sidebar {
            position: static;
            gap: 0;
            padding: 16px;

            .vit-mobile-filter-btn {
                display: flex;
                justify-content: space-between;
                align-items: center;
                width: 100%;
                padding: 12px 16px;
                background-color: var(--text-yellow, #ffd700);
                color: var(--text-dark, #222);
                border: none;
                border-radius: 8px;
                font-size: 1.1rem;
                font-weight: 700;
                cursor: pointer;
                transition: background-color 0.3s ease;

                .icon-toggle {
                    font-size: 1.5rem;
                    line-height: 1;
                    transition: transform 0.3s ease;
                }
            }

            .vit-filter-content {
                display: none;
                margin-top: 20px;
            }

            &.is-open {
                .vit-filter-content {
                    display: flex;
                }

                .vit-mobile-filter-btn {
                    background-color: var(--bg-base-grey-dark, #d5d5da);

                    .icon-toggle {
                        transform: rotate(45deg);
                    }
                }
            }
        }
    }
}

.vit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;

    &.show {
        display: flex;
        opacity: 1;

        .vit-modal-content {
            transform: translateY(0);
        }
    }

    .vit-modal-content {
        background-color: var(--bg-base, #ffffff);
        padding: 30px;
        border-radius: 12px;
        max-width: 400px;
        width: 90%;
        text-align: center;
        position: relative;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        transform: translateY(-20px);
        transition: transform 0.3s ease;

        .vit-modal-close {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--text-grey, #7d7d7d);
            transition: color 0.2s;

            &:hover {
                color: var(--text-dark, #222);
            }
        }

        .vit-modal-icon {
            font-size: 3rem;
            color: var(--color-bg-btn-sucess, green);
            margin-bottom: 15px;
        }

        h2 {
            color: var(--text-dark, #222);
            margin-bottom: 10px;
        }

        .vit-modal-details {
            margin: 20px 0;
            padding: 15px;
            background-color: var(--bg-base-grey, #f2f2f5);
            border-radius: 8px;
            border: 1px solid var(--bg-base-grey-dark, #d5d5da);
            font-size: 1.1rem;
            color: var(--text-dark, #222);
        }

        .vit-modal-actions {
            display: flex;
            flex-direction: column;
            gap: 10px;

            .vit-btn-go-cart {
                background-color: var(--bg-base-yellow, #ffc757);
                color: var(--text-dark, #222);
                padding: 12px;
                border-radius: 8px;
                text-decoration: none;
                font-weight: bold;
                transition: filter 0.2s;

                &:hover {
                    filter: brightness(0.95);
                }
            }

            .vit-btn-continue {
                background-color: transparent;
                color: var(--text-grey, #7d7d7d);
                border: 1px solid var(--bg-base-grey-dark, #d5d5da);
                padding: 12px;
                border-radius: 8px;
                cursor: pointer;
                font-weight: 600;
                transition: all 0.2s ease;

                &:hover {
                    background-color: var(--bg-base-grey-dark, #d5d5da);
                    color: var(--text-dark, #222);
                }
            }
        }
    }
}