/* Haja Terapia — Frete Grátis | Visual minimalista v1.1.1
 * Carrinho e checkout: mesmo alinhamento à esquerda.
 */
.hfg-bar {
    --hfg-ink: #171717;
    --hfg-track: #ececec;
    --hfg-fill: #191919;
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--hfg-ink);
    font-family: inherit;
}
.hfg-bar *, .hfg-bar *::before, .hfg-bar *::after {
    box-sizing: border-box;
}
.hfg-bar__message {
    margin: 0 0 10px !important;
    color: var(--hfg-ink);
    font-size: 13px !important;
    font-weight: 300 !important;
    line-height: 1.5;
    text-transform: uppercase !important;
    font-family: "Montserrat", sans-serif !important;
}
.hfg-bar__message .woocommerce-Price-amount {
    font-weight: 700;
    white-space: nowrap;
}
.hfg-bar__track {
    display: block;
    width: 100%;
    height: 6px;
    overflow: hidden;
    background: var(--hfg-track);
    border-radius: 100px;
}
.hfg-bar__fill {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    border-radius: inherit;
    background: var(--hfg-fill);
    transition: transform 320ms ease;
}
.hfg-bar--achieved .hfg-bar__message {
    font-weight: 700;
}
@media (max-width: 767px) {
    .hfg-bar__message { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .hfg-bar__fill { transition: none; }
}

/* Linha integrada aos totais dos widgets Elementor Pro. */
.woocommerce .shop_table tr.hfg-progress-row > td.hfg-progress-row__cell {
    box-sizing: border-box;
    width: 100%;
    padding: 12px 0 18px;
    text-align: left;
    vertical-align: top;
}
.woocommerce .shop_table tr.hfg-progress-row .hfg-bar {
    width: 100%;
    margin: 0;
}
@media (max-width: 767px) {
    .woocommerce table.shop_table_responsive tr.hfg-progress-row td.hfg-progress-row__cell {
        display: block;
        float: none;
        width: 100%;
        padding: 10px 0 16px;
        text-align: left;
    }
    .woocommerce table.shop_table_responsive tr.hfg-progress-row td.hfg-progress-row__cell::before {
        display: none;
        content: none;
    }
}

/* Igualar os widgets Carrinho e Checkout do Elementor Pro:
 * o carrinho usa .cart_totals + .shop_table_responsive, enquanto o
 * checkout usa .woocommerce-checkout-review-order-table.
 * Sobrepõe apenas alinhamentos/espacamentos desses dois contextos.
 */
.elementor-widget-woocommerce-cart .cart_totals table.shop_table tr.hfg-progress-row > td.hfg-progress-row__cell,
.elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table tr.hfg-progress-row > td.hfg-progress-row__cell {
    display: table-cell !important;
    float: none !important;
    width: 100% !important;
    padding: 12px 0 18px !important;
    text-align: left !important;
    vertical-align: top;
}

.elementor-widget-woocommerce-cart .cart_totals tr.hfg-progress-row .hfg-bar,
.elementor-widget-woocommerce-checkout-page .woocommerce-checkout-review-order tr.hfg-progress-row .hfg-bar {
    display: block;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

.elementor-widget-woocommerce-cart .cart_totals tr.hfg-progress-row .hfg-bar__message,
.elementor-widget-woocommerce-checkout-page .woocommerce-checkout-review-order tr.hfg-progress-row .hfg-bar__message {
    display: block;
    width: 100%;
    margin-left: 0 !important;
    text-align: left !important;
}

.elementor-widget-woocommerce-cart .cart_totals tr.hfg-progress-row .hfg-bar__track,
.elementor-widget-woocommerce-checkout-page .woocommerce-checkout-review-order tr.hfg-progress-row .hfg-bar__track {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Evita rótulos automáticos e recuos do modo responsivo do WooCommerce. */
.elementor-widget-woocommerce-cart .cart_totals tr.hfg-progress-row td.hfg-progress-row__cell::before,
.elementor-widget-woocommerce-checkout-page .woocommerce-checkout-review-order tr.hfg-progress-row td.hfg-progress-row__cell::before {
    display: none !important;
    content: none !important;
}

@media (max-width: 767px) {
    .elementor-widget-woocommerce-cart .cart_totals table.shop_table_responsive tr.hfg-progress-row > td.hfg-progress-row__cell,
    .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table tr.hfg-progress-row > td.hfg-progress-row__cell {
        display: block !important;
        float: none !important;
        clear: both;
        width: 100% !important;
        padding: 10px 0 16px !important;
        text-align: left !important;
    }
}

/* Tipografia idêntica nos dois widgets, inclusive no valor formatado do WooCommerce.
 * As regras do Elementor para .cart_totals e #order_review podem atribuir
 * tamanhos diferentes aos elementos internos mesmo com o texto em 13px.
 * Estas regras são restritas à barra do frete grátis.
 */
.elementor-widget-woocommerce-cart .cart_totals tr.hfg-progress-row .hfg-bar__message,
.elementor-widget-woocommerce-checkout-page .woocommerce-checkout-review-order tr.hfg-progress-row .hfg-bar__message {
    font-family: "Montserrat", sans-serif !important;
    font-size: 13px !important;
    font-weight: 300 !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
    text-transform: uppercase !important;
    text-align: left !important;
}

/* Valor em negrito com a MESMA altura da mensagem, sem herdar
 * os tamanhos de preço configurados separadamente nos widgets. */
.elementor-widget-woocommerce-cart .cart_totals tr.hfg-progress-row .hfg-bar__message .woocommerce-Price-amount,
.elementor-widget-woocommerce-cart .cart_totals tr.hfg-progress-row .hfg-bar__message .woocommerce-Price-amount bdi,
.elementor-widget-woocommerce-cart .cart_totals tr.hfg-progress-row .hfg-bar__message .woocommerce-Price-currencySymbol,
.elementor-widget-woocommerce-checkout-page .woocommerce-checkout-review-order tr.hfg-progress-row .hfg-bar__message .woocommerce-Price-amount,
.elementor-widget-woocommerce-checkout-page .woocommerce-checkout-review-order tr.hfg-progress-row .hfg-bar__message .woocommerce-Price-amount bdi,
.elementor-widget-woocommerce-checkout-page .woocommerce-checkout-review-order tr.hfg-progress-row .hfg-bar__message .woocommerce-Price-currencySymbol {
    font-family: "Montserrat", sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: inherit !important;
    letter-spacing: normal !important;
}

/* ===========================================================================
 * Haja Terapia | Envio — layout da tabela de totais (Carrinho e Checkout)
 * Desktop: 30% para "Envio" e 70% para os métodos.
 * Tablet e mobile (até 1024px): título em cima, métodos abaixo, ambos com 100%.
 * Mantém o seletor restrito aos widgets Elementor Pro da loja.
 * =========================================================================== */

/* O carrinho compartilha as larguras das colunas com as outras linhas da
 * tabela: definir somente th/td da linha Envio não altera o layout real. */
@media (min-width: 1025px) {
    .elementor-widget-woocommerce-cart .cart_totals table.shop_table tr > th {
        width: 30% !important;
    }
    .elementor-widget-woocommerce-cart .cart_totals table.shop_table tr > td:not([colspan]) {
        width: 70% !important;
    }
}

/* No checkout, o cabeçalho de Produtos tem colunas próprias. Para não reduzir
 * a largura do nome dos produtos, os totais são apresentados como uma seção
 * independente, sem mudar o HTML ou as regras de compra do WooCommerce. */
.elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table > tfoot {
    display: table-caption !important;
    caption-side: bottom;
    box-sizing: border-box;
    width: 100% !important;
    text-align: left;
}

.elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table > tfoot > tr {
    display: table;
    table-layout: fixed;
    width: 100%;
}

@media (min-width: 1025px) {
    .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table > tfoot > tr > th {
        box-sizing: border-box;
        width: 30% !important;
        vertical-align: top;
    }
    .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table > tfoot > tr > td:not([colspan]) {
        box-sizing: border-box;
        width: 70% !important;
        vertical-align: top;
    }
}

/* A linha da barra de progresso é sempre de largura total. */
.elementor-widget-woocommerce-cart .cart_totals tr.hfg-progress-row > td[colspan],
.elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table > tfoot > tr.hfg-progress-row > td[colspan] {
    width: 100% !important;
}

/* Lista de modalidades alinhada à esquerda, aproveitando toda a coluna. */
.elementor-widget-woocommerce-cart .cart_totals tr.woocommerce-shipping-totals > td,
.elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals > td {
    text-align: left !important;
    vertical-align: top;
}

.elementor-widget-woocommerce-cart .cart_totals tr.woocommerce-shipping-totals .woocommerce-shipping-methods,
.elementor-widget-woocommerce-checkout-page tr.woocommerce-shipping-totals .woocommerce-shipping-methods {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    text-align: left;
}

@media (max-width: 1024px) {
    /* O carrinho usa linhas em uma tabela responsiva. Para a linha Envio
     * ocupar a largura INTEIRA, o corpo passa a organizar as linhas de
     * totais individualmente, sem alterar os elementos existentes. */
    .elementor-widget-woocommerce-cart .cart_totals table.shop_table,
    .elementor-widget-woocommerce-cart .cart_totals table.shop_table > tbody {
        display: block !important;
        box-sizing: border-box;
        width: 100% !important;
    }

    .elementor-widget-woocommerce-cart .cart_totals table.shop_table tr:not(.woocommerce-shipping-totals):not(.hfg-progress-row) {
        display: table !important;
        table-layout: fixed;
        width: 100% !important;
    }

    .elementor-widget-woocommerce-cart .cart_totals table.shop_table tr.hfg-progress-row {
        display: table !important;
        width: 100% !important;
    }

    .elementor-widget-woocommerce-cart .cart_totals table.shop_table tr.woocommerce-shipping-totals,
    .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table > tfoot > tr.woocommerce-shipping-totals {
        display: block !important;
        box-sizing: border-box;
        width: 100% !important;
    }

    .elementor-widget-woocommerce-cart .cart_totals table.shop_table tr.woocommerce-shipping-totals > th,
    .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals > th {
        display: block !important;
        float: none !important;
        box-sizing: border-box;
        width: 100% !important;
        padding-bottom: 8px !important;
        text-align: left !important;
        vertical-align: top;
    }

    .elementor-widget-woocommerce-cart .cart_totals table.shop_table tr.woocommerce-shipping-totals > td,
    .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals > td {
        display: block !important;
        float: none !important;
        clear: both;
        box-sizing: border-box;
        width: 100% !important;
        padding-top: 0 !important;
        text-align: left !important;
        vertical-align: top;
    }

    /* WooCommerce insere um segundo título a partir de data-title no carrinho
     * responsivo; evita "Envio" aparecer duas vezes. */
    .elementor-widget-woocommerce-cart .cart_totals tr.woocommerce-shipping-totals > td::before,
    .elementor-widget-woocommerce-checkout-page tr.woocommerce-shipping-totals > td::before {
        display: none !important;
        content: none !important;
    }

    .elementor-widget-woocommerce-cart .cart_totals tr.woocommerce-shipping-totals .woocommerce-shipping-methods,
    .elementor-widget-woocommerce-checkout-page tr.woocommerce-shipping-totals .woocommerce-shipping-methods {
        width: 100% !important;
        max-width: 100%;
        margin: 0 !important;
        padding-left: 0 !important;
    }
}

/* ===========================================================================
 * AJUSTE MOBILE — Envio ocupa 100% da área de totais (Carrinho e Checkout)
 * O Elementor pode preservar a largura das colunas da tabela nos itens de
 * envio, mesmo quando o th/td já estão empilhados. No checkout, preservar
 * table-caption garante que a largura continue vinculada à tabela inteira.
 * Alterar apenas no mobile, sem tocar na tabela de produtos ou nos preços.
 * =========================================================================== */
@media (max-width: 767px) {
    /* Mantém o tfoot com largura total da tabela no checkout. */
    .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table > tfoot {
        display: table-caption !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    /* Mantém as outras linhas de totais em duas colunas, como anteriormente. */
    .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table > tfoot > tr:not(.woocommerce-shipping-totals) {
        display: table !important;
        table-layout: fixed !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    /* Uma única coluna horizontal e 100% da largura somente para Envio. */
    .elementor-widget-woocommerce-cart .cart_totals table.shop_table tr.woocommerce-shipping-totals,
    .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table > tfoot > tr.woocommerce-shipping-totals {
        display: block !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .elementor-widget-woocommerce-cart .cart_totals table.shop_table tr.woocommerce-shipping-totals > th,
    .elementor-widget-woocommerce-cart .cart_totals table.shop_table tr.woocommerce-shipping-totals > td,
    .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals > th,
    .elementor-widget-woocommerce-checkout-page table.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals > td {
        display: block !important;
        position: static !important;
        float: none !important;
        clear: both !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        text-align: left !important;
    }

    /* Lista e opções não ficam limitadas à antiga coluna de preço. */
    .elementor-widget-woocommerce-cart .cart_totals tr.woocommerce-shipping-totals ul.woocommerce-shipping-methods,
    .elementor-widget-woocommerce-checkout-page tr.woocommerce-shipping-totals ul.woocommerce-shipping-methods {
        display: block !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }

    .elementor-widget-woocommerce-cart .cart_totals tr.woocommerce-shipping-totals ul.woocommerce-shipping-methods > li,
    .elementor-widget-woocommerce-checkout-page tr.woocommerce-shipping-totals ul.woocommerce-shipping-methods > li {
        display: flex !important;
        align-items: flex-start !important;
        gap: 8px;
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        text-align: left !important;
    }

    .elementor-widget-woocommerce-cart .cart_totals tr.woocommerce-shipping-totals ul.woocommerce-shipping-methods > li > input.shipping_method,
    .elementor-widget-woocommerce-checkout-page tr.woocommerce-shipping-totals ul.woocommerce-shipping-methods > li > input.shipping_method {
        flex: 0 0 auto !important;
        width: auto !important;
        margin: 4px 0 0 !important;
    }

    .elementor-widget-woocommerce-cart .cart_totals tr.woocommerce-shipping-totals ul.woocommerce-shipping-methods > li > label,
    .elementor-widget-woocommerce-checkout-page tr.woocommerce-shipping-totals ul.woocommerce-shipping-methods > li > label {
        display: block !important;
        flex: 1 1 auto !important;
        box-sizing: border-box !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        text-align: left !important;
        line-height: 1.85 !important; /* Mais respiro entre as linhas dos métodos no mobile. */
    }
}