/**
 * BB Modo Catálogo
 * O Flatsome/WooCommerce continua renderizando o conteúdo normalmente.
 * Este arquivo controla somente apresentação.
 */

/* Elementos marcados pelo módulo ou pelo JS. */
html.bb-mode-products .bb-catalog-content {
    display: none !important;
}

/* Saídas nativas do Flatsome que já possuem classe própria. */
html.bb-mode-products body.post-type-archive-product .custom-page-title,
html.bb-mode-products body.tax-product_cat .custom-category-header,
html.bb-mode-products body.tax-product_tag .custom-category-header {
    display: none !important;
}

/* Descrição nativa da categoria. */
html.bb-mode-products body.tax-product_cat .term-description,
html.bb-mode-products body.tax-product_cat .woocommerce-products-header__description,
html.bb-mode-products body.tax-product_tag .term-description,
html.bb-mode-products body.tax-product_tag .woocommerce-products-header__description {
    display: none !important;
}

/* Short description nativa da página individual do produto. */
html.bb-mode-products body.single-product .woocommerce-product-details__short-description {
    display: none !important;
}

/* Descrição longa / aba Description nativa. */
html.bb-mode-products body.single-product #tab-description,
html.bb-mode-products body.single-product .woocommerce-Tabs-panel--description,
html.bb-mode-products body.single-product #tab-title-description,
html.bb-mode-products body.single-product .description_tab {
    display: none !important;
}

@supports selector(.bb-catalog-probe:has(.bb-catalog-probe-child)) {
    html.bb-mode-products body.single-product .accordion-item:has(a[href="#tab-description"]),
    html.bb-mode-products body.single-product .product-section:has(#tab-description) {
        display: none !important;
    }
}

/* O seletor é interface; nunca deve ser ocultado pelo modo Produtos. */
.bb-catalog-mode-switch,
.bb-catalog-mode-switch-relocated {
    display: block;
}

.bb-catalog-mode-switch {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border: 1px solid currentColor;
    border-radius: 999px;
    line-height: 1;
}

.bb-catalog-mode-switch__button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    margin: 0;
    padding: 0.62em 1em;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.bb-catalog-mode-switch__button:hover,
.bb-catalog-mode-switch__button:focus-visible,
.bb-catalog-mode-switch__button[aria-pressed="true"] {
    opacity: 1;
}

.bb-catalog-mode-switch__button[aria-pressed="true"] {
    box-shadow: inset 0 0 0 1px currentColor;
    font-weight: 700;
}

@media (max-width: 549px) {
    .bb-catalog-mode-switch {
        width: 100%;
    }

    .bb-catalog-mode-switch__button {
        flex: 1 1 50%;
        text-align: center;
    }
}
