/* Tudo é prefixado para evitar conflitos com Elementor e temas. */
.rwpgf-grid-shell,
.rwpgf-filters {
    box-sizing: border-box;
    width: 100%;
}

.rwpgf-grid-shell *,
.rwpgf-filters * {
    box-sizing: border-box;
}

.rwpgf-grid-shell {
    position: relative;
}

.rwpgf-status {
    min-height: 1.35em;
    margin: 0 0 10px;
    font-size: 13px;
}

.rwpgf-grid {
    display: grid;
    grid-template-columns: repeat(var(--rwpgf-cols-desktop, 4), minmax(0, 1fr));
    gap: 24px;
    transition: opacity .2s ease;
}

.rwpgf-grid-shell.is-loading .rwpgf-grid {
    opacity: .48;
    pointer-events: none;
}

.rwpgf-product-card {
    min-width: 0;
    overflow: hidden;
    margin: 0;
    background: transparent;
}

.rwpgf-product-image-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    isolation: isolate;
}

.rwpgf-image-bg-transparent .rwpgf-product-image-link {
    background: transparent;
}

.rwpgf-image-bg-white .rwpgf-product-image-link {
    background: #fff;
}

.rwpgf-image-bg-light .rwpgf-product-image-link {
    background: #f5f5f5;
}

.rwpgf-product-image,
.rwpgf-product-image-link img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    transition: opacity .38s ease, transform .45s ease;
}

.rwpgf-image-fit-contain .rwpgf-product-image-link img {
    object-fit: contain;
}

.rwpgf-image-fit-cover .rwpgf-product-image-link img {
    object-fit: cover;
}

.rwpgf-product-image-primary {
    z-index: 1;
    opacity: 1;
}

.rwpgf-product-image-secondary {
    z-index: 2;
    opacity: 0;
}

.rwpgf-product-content {
    padding: 14px 0 4px;
}

.rwpgf-text-align-left .rwpgf-product-content {
    text-align: left;
}

.rwpgf-text-align-center .rwpgf-product-content {
    text-align: center;
}

.rwpgf-text-align-right .rwpgf-product-content {
    text-align: right;
}

@media (hover: hover) and (pointer: fine) {
    .rwpgf-product-card:not(.rwpgf-has-secondary-image):hover .rwpgf-product-image-primary,
    .rwpgf-product-card:not(.rwpgf-has-secondary-image):focus-within .rwpgf-product-image-primary {
        transform: scale(1.025);
    }

    .rwpgf-hover-image-enabled .rwpgf-product-card.rwpgf-has-secondary-image:hover .rwpgf-product-image-primary,
    .rwpgf-hover-image-enabled .rwpgf-product-card.rwpgf-has-secondary-image:focus-within .rwpgf-product-image-primary {
        opacity: 0;
        transform: scale(1.015);
    }

    .rwpgf-hover-image-enabled .rwpgf-product-card.rwpgf-has-secondary-image:hover .rwpgf-product-image-secondary,
    .rwpgf-hover-image-enabled .rwpgf-product-card.rwpgf-has-secondary-image:focus-within .rwpgf-product-image-secondary {
        opacity: 1;
        transform: scale(1.025);
    }
}

.rwpgf-product-category {
    margin: 0 0 5px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    line-height: 1.25;
    text-transform: uppercase;
}

.rwpgf-product-title {
    margin: 0;
    color: #111827;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.25;
}

.rwpgf-product-title a {
    color: inherit;
    text-decoration: none;
}

.rwpgf-product-title a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rwpgf-empty {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.rwpgf-pagination-wrap {
    margin-top: 32px;
}

.rwpgf-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.rwpgf-page-button {
    min-width: 40px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    background: #fff;
    color: #111827;
    cursor: pointer;
    font: inherit;
    line-height: 1;
}

.rwpgf-page-button:hover,
.rwpgf-page-button.is-active {
    border-color: #111;
    background: #111;
    color: #fff;
}

.rwpgf-page-button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.rwpgf-page-ellipsis {
    padding: 0 3px;
}

.rwpgf-infinite-sentinel {
    height: 2px;
    margin-top: 24px;
}

.rwpgf-carousel-viewport {
    position: relative;
    width: 100%;
    min-width: 0;
}

.rwpgf-mode-carousel .rwpgf-grid {
    display: flex;
    gap: 24px;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.rwpgf-mode-carousel .rwpgf-grid::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.rwpgf-mode-carousel .rwpgf-product-card {
    flex: 0 0 calc((100% - (var(--rwpgf-cols-desktop, 4) - 1) * 24px) / var(--rwpgf-cols-desktop, 4));
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.rwpgf-carousel-button {
    position: absolute;
    z-index: 5;
    top: 50%;
    display: inline-grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(17, 24, 39, .18);
    border-radius: 50%;
    background: rgba(255, 255, 255, .96);
    color: #111;
    box-shadow: 0 8px 24px rgba(17, 24, 39, .14);
    cursor: pointer;
    font: inherit;
    font-size: 32px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background-color .2s ease, color .2s ease, opacity .2s ease, transform .2s ease;
}

.rwpgf-carousel-button span {
    display: block;
    margin-top: -2px;
}

.rwpgf-carousel-prev {
    left: 8px;
}

.rwpgf-carousel-next {
    right: 8px;
}

.rwpgf-carousel-button:hover,
.rwpgf-carousel-button:focus-visible {
    background: #111;
    color: #fff;
    transform: translateY(-50%) scale(1.04);
}

.rwpgf-carousel-button:disabled {
    opacity: .28;
    cursor: default;
    pointer-events: none;
}

.rwpgf-carousel-dots {
    display: flex;
    min-height: 14px;
    margin-top: 16px;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rwpgf-carousel-dots[hidden] {
    display: none;
}

.rwpgf-carousel-dot {
    width: 9px;
    height: 9px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #c8cbd1;
    cursor: pointer;
    transition: width .2s ease, background-color .2s ease, transform .2s ease;
}

.rwpgf-carousel-dot:hover,
.rwpgf-carousel-dot:focus-visible {
    background: #6b7280;
    transform: scale(1.12);
}

.rwpgf-carousel-dot.is-active {
    width: 24px;
    background: #111;
}

.rwpgf-filter-heading {
    margin-bottom: 24px;
    padding: 14px 16px;
    background: #000;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
}

.rwpgf-filter-form,
.rwpgf-filter-section {
    margin: 0;
    padding: 0;
    border: 0;
}

.rwpgf-filter-section + .rwpgf-filter-section {
    margin-top: 30px;
}

.rwpgf-filter-section legend {
    display: block;
    width: 100%;
    margin: 0 0 15px;
    padding: 0;
    color: #111827;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.2;
}

.rwpgf-filter-options {
    display: grid;
    gap: 12px;
}

.rwpgf-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #596579;
    cursor: pointer;
    font-size: 17px;
    line-height: 1.25;
}

.rwpgf-filter-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin: 0;
    accent-color: #111;
}

.rwpgf-clear-filters {
    width: 100%;
    margin-top: 28px;
    padding: 11px 14px;
    border: 1px solid #111;
    background: transparent;
    color: #111;
    cursor: pointer;
    font: inherit;
}

.rwpgf-clear-filters:hover {
    background: #111;
    color: #fff;
}

.rwpgf-filter-empty,
.rwpgf-notice {
    padding: 15px;
    border: 1px solid #d1d5db;
    background: #fff;
}

@media (max-width: 1024px) {
    .rwpgf-grid {
        grid-template-columns: repeat(var(--rwpgf-cols-tablet, 2), minmax(0, 1fr));
    }

    .rwpgf-mode-carousel .rwpgf-product-card {
        flex-basis: calc((100% - (var(--rwpgf-cols-tablet, 2) - 1) * 24px) / var(--rwpgf-cols-tablet, 2));
    }
}

@media (max-width: 767px) {
    .rwpgf-grid {
        grid-template-columns: repeat(var(--rwpgf-cols-mobile, 1), minmax(0, 1fr));
        gap: 18px;
    }

    .rwpgf-mode-carousel .rwpgf-product-card {
        flex-basis: calc((100% - (var(--rwpgf-cols-mobile, 1) - 1) * 18px) / var(--rwpgf-cols-mobile, 1));
    }

    .rwpgf-carousel-button {
        width: 38px;
        height: 38px;
        font-size: 28px;
    }

    .rwpgf-carousel-prev {
        left: 4px;
    }

    .rwpgf-carousel-next {
        right: 4px;
    }

    .rwpgf-filter-heading {
        font-size: 20px;
    }

    .rwpgf-filter-section legend {
        font-size: 21px;
    }

    .rwpgf-page-prev,
    .rwpgf-page-next {
        width: 100%;
    }
}

/* Filtro mobile com aplicação manual, pensado para popup do Elementor. */
.rwpgf-filters-mobile {
    --rwpgf-mobile-vh: 100dvh;
    width: 100%;
    height: var(--rwpgf-mobile-vh);
    max-height: var(--rwpgf-mobile-vh);
    min-height: 0;
    overflow: hidden;
    background: #fff;
}

.rwpgf-mobile-filter-form {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    background: #fff;
}

.rwpgf-mobile-filter-header {
    flex: 0 0 auto;
    padding: 18px 20px 0;
    background: #fff;
}

.rwpgf-filters-mobile .rwpgf-filter-heading {
    margin: 0;
}

.rwpgf-mobile-filter-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 26px 20px 34px;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.rwpgf-mobile-filter-scroll:focus {
    outline: none;
}

.rwpgf-mobile-filter-actions {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(92px, .65fr) minmax(140px, 1.35fr);
    flex: 0 0 auto;
    gap: 10px;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 -10px 24px rgba(17, 24, 39, .08);
}

.rwpgf-mobile-filter-actions button {
    min-height: 50px;
    margin: 0;
    padding: 12px 16px;
    border-radius: 2px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    line-height: 1.1;
}

.rwpgf-mobile-filter-actions .rwpgf-mobile-clear-filters {
    width: auto;
    border: 1px solid #111;
    background: #fff;
    color: #111;
}

.rwpgf-mobile-filter-actions .rwpgf-mobile-clear-filters:hover:not(:disabled) {
    background: #f3f4f6;
    color: #111;
}

.rwpgf-mobile-filter-actions .rwpgf-mobile-clear-filters:disabled {
    opacity: .38;
    cursor: not-allowed;
}

.rwpgf-apply-filters {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid #111;
    background: #111;
    color: #fff;
}

.rwpgf-apply-filters:hover,
.rwpgf-apply-filters:focus {
    background: #000;
    color: #fff;
}

.rwpgf-mobile-filter-count {
    display: inline-grid;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    place-items: center;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 12px;
    line-height: 1;
}

.rwpgf-mobile-filter-count[hidden] {
    display: none;
}

/* Evita que o bloqueio de rolagem do popup corte o final do filtro. */
.elementor-popup-modal.rwpgf-mobile-filter-popup .dialog-widget-content {
    max-height: var(--rwpgf-mobile-vh, 100dvh) !important;
    overflow: hidden !important;
}

.elementor-popup-modal.rwpgf-mobile-filter-popup .dialog-message,
.elementor-popup-modal.rwpgf-mobile-filter-popup .rwpgf-mobile-filter-host {
    min-height: 0 !important;
    max-height: var(--rwpgf-mobile-vh, 100dvh) !important;
    overflow: hidden !important;
}

.elementor-popup-modal.rwpgf-mobile-filter-popup .dialog-message {
    height: var(--rwpgf-mobile-vh, 100dvh) !important;
}

.elementor-popup-modal.rwpgf-mobile-filter-popup .rwpgf-filters-mobile {
    height: 100% !important;
    max-height: 100% !important;
}

.elementor-popup-modal.rwpgf-mobile-filter-popup .rwpgf-mobile-filter-host {
    height: 100% !important;
}

@media (max-width: 767px) {
    .rwpgf-filters-mobile .rwpgf-filter-section + .rwpgf-filter-section {
        margin-top: 28px;
    }

    .rwpgf-filters-mobile .rwpgf-filter-section legend {
        font-size: 22px;
    }

    .rwpgf-filters-mobile .rwpgf-filter-option {
        min-height: 30px;
        font-size: 17px;
    }
}

/* Conteúdo comercial opcional dos cards. */
.rwpgf-product-card {
    display: flex;
    flex-direction: column;
}

.rwpgf-product-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.rwpgf-product-attribute {
    margin-top: 8px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.35;
}

.rwpgf-product-attribute-label {
    font-weight: 700;
}

.rwpgf-product-price {
    margin-top: 10px;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
}

.rwpgf-product-price del {
    margin-right: 6px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    opacity: .72;
}

.rwpgf-product-price ins {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.rwpgf-product-price .woocommerce-Price-amount {
    white-space: nowrap;
}

.rwpgf-product-actions {
    margin-top: auto;
    padding-top: 14px;
}

.rwpgf-product-actions .rwpgf-add-to-cart-button,
.rwpgf-product-actions .added_to_cart {
    display: inline-flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 11px 14px;
    border: 1px solid var(--rwpgf-cart-bg, #111111);
    border-radius: 3px;
    background: var(--rwpgf-cart-bg, #111111);
    color: var(--rwpgf-cart-color, #ffffff);
    box-shadow: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: filter .2s ease, opacity .2s ease, transform .2s ease;
}

.rwpgf-product-actions .rwpgf-add-to-cart-button:hover,
.rwpgf-product-actions .rwpgf-add-to-cart-button:focus-visible,
.rwpgf-product-actions .added_to_cart:hover,
.rwpgf-product-actions .added_to_cart:focus-visible {
    color: var(--rwpgf-cart-color, #ffffff);
    filter: brightness(.9);
    text-decoration: none;
    transform: translateY(-1px);
}

.rwpgf-product-actions .rwpgf-add-to-cart-button.loading {
    opacity: .65;
    pointer-events: none;
}

.rwpgf-product-actions .rwpgf-add-to-cart-button.added {
    opacity: .82;
}

.rwpgf-product-actions .added_to_cart {
    margin-top: 7px;
    background: transparent;
    color: var(--rwpgf-cart-bg, #111111);
}

.rwpgf-product-actions .added_to_cart:hover,
.rwpgf-product-actions .added_to_cart:focus-visible {
    background: var(--rwpgf-cart-bg, #111111);
    color: var(--rwpgf-cart-color, #ffffff);
}

@media (max-width: 767px) {
    .rwpgf-product-price {
        font-size: 16px;
    }

    .rwpgf-product-price del {
        display: block;
        margin: 0 0 3px;
        font-size: 12px;
    }

    .rwpgf-product-actions .rwpgf-add-to-cart-button,
    .rwpgf-product-actions .added_to_cart {
        min-height: 42px;
        padding: 9px 10px;
        font-size: 12px;
    }
}
