
/* V2.0.12 — Evita que o titulo original pisque antes do JavaScript.
       CSS entregue no wp_head; restrito ao checkout do staging. */
    body.woocommerce-checkout .store-alt__header-title,
    body.woocommerce-checkout .store-alt__header h1,
    body.woocommerce-checkout .store-alt__header h2,
    body.woocommerce-checkout .store-alt-header h1,
    body.woocommerce-checkout .store-alt-header h2 {
        display: none !important;
    }


	/* FOOTURE V2.0.8 — Ocultar informações adicionais */

	body.woocommerce-checkout .woocommerce-additional-fields {
    	display: none !important;
	}
		
    /* ========================================
       IDENTIDADE E ESTRUTURA
       ======================================== */

    body.woocommerce-checkout {
        background: #f7f8fa;
    }

    body.woocommerce-checkout .wrapper__main {
        background: #f7f8fa;
    }

    body.woocommerce-checkout .store-alt-container,
    body.woocommerce-checkout .store-alt-content {
        width: 100%;
        max-width: 850px;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    body.woocommerce-checkout form.checkout {
        width: 100%;
        max-width: 850px;
        margin: 0 auto;
    }

    /* Cabeçalho comercial só é ocultado quando o novo estiver pronto. */
    body.woocommerce-checkout.footure-v2-header-ready header.header-store {
        display: none !important;
    }

    .footure-v2-secure-header {
        min-height: 94px;
        padding: 16px 20px;
        box-sizing: border-box;
        background: #090909;
        color: #fff;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        text-align: center;
    }
    .footure-v2-secure-header img {
        display: block;
        max-width: 175px;
        max-height: 50px;
        width: auto;
        height: auto;
        object-fit: contain;
    }
    .footure-v2-secure-header .footure-v2-safe-label {
        font-size: 11px;
        letter-spacing: .035em;
        color: #d1d5db;
    }
    .footure-v2-secure-header .footure-v2-logo-fallback {
        font-size: 28px;
        font-weight: 800;
        color: #fff;
    }

    /* Rodapé institucional */
    body.woocommerce-checkout #footer {
        display: none !important;
    }

    /* ========================================
       TÍTULO E ESPAÇAMENTO
       ======================================== */
    body.woocommerce-checkout .store-alt__header,
    body.woocommerce-checkout .store-alt-header {
        margin-top: 0 !important;
        margin-bottom: 18px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    body.woocommerce-checkout .store-alt__header h1,
    body.woocommerce-checkout .store-alt__header h2,
    body.woocommerce-checkout .store-alt-header h1,
    body.woocommerce-checkout .store-alt-header h2 {
        font-size: 24px !important;
        line-height: 1.25;
        margin: 0;
    }
    body.woocommerce-checkout.footure-v2-header-ready .wrapper__main {
        padding-top: 0 !important;
    }
    body.woocommerce-checkout.footure-v2-header-ready .store-alt-container {
        padding-top: 0 !important;
    }

    /* ========================================
       CAIXAS E CAMPOS
       ======================================== */

    body.woocommerce-checkout #customer_details,
    body.woocommerce-checkout #order_review {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    body.woocommerce-checkout .column-title {
        font-size: 20px;
        line-height: 1.3;
    }

    body.woocommerce-checkout
    .woocommerce-billing-fields input,

    body.woocommerce-checkout
    .woocommerce-billing-fields select,

    body.woocommerce-checkout
    .woocommerce-billing-fields textarea {
        border-radius: 7px;
        min-height: 44px;
    }

    /* ========================================
       CARTÃO DO PRODUTO
       ======================================== */

    .footure-v2-product-card {
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 22px;
        margin: 0 auto 22px;
        box-shadow: 0 6px 24px rgba(0,0,0,.035);
        box-sizing: border-box;
    }

    .footure-v2-product-label {
        font-size: 12px;
        font-weight: 700;
        color: #0d9488;
        text-transform: uppercase;
        letter-spacing: .05em;
        margin-bottom: 16px;
    }

    .footure-v2-product-content {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .footure-v2-product-image {
        width: 112px;
        height: 112px;
        flex: 0 0 112px;
        object-fit: cover;
        border-radius: 9px;
        background: #f3f4f6;
    }

    .footure-v2-product-info {
        flex: 1;
        min-width: 0;
    }

    .footure-v2-product-name {
        font-size: 20px;
        line-height: 1.35;
        font-weight: 700;
        color: #202428;
        margin: 0 0 9px;
    }

    .footure-v2-product-price {
        font-size: 24px;
        font-weight: 800;
        color: #202428;
        line-height: 1.2;
    }

    .footure-v2-product-note {
        margin-top: 8px;
        font-size: 12px;
        color: #6b7280;
    }

    /* ========================================
       CUPOM RECOLHÍVEL (sem trocar o form nativo)
       ======================================== */
    .footure-v2-coupon-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 4px 0;
        border: 0;
        background: transparent;
        color: #202428;
        font: inherit;
        font-size: 15px;
        font-weight: 700;
        text-align: left;
        cursor: pointer;
    }
    .footure-v2-coupon-toggle::after {
        content: '+';
        font-size: 23px;
        font-weight: 400;
        color: #0d9488;
    }
    .footure-v2-coupon-toggle[aria-expanded="true"]::after {
        content: '−';
    }
    .footure-v2-coupon-collapsed { display: none !important; }
    .footure-v2-coupon-panel { padding: 0 !important; }
    .footure-v2-coupon-panel > .footure-v2-coupon-toggle {
        padding: 17px 22px;
    }
    /* O tema utiliza form[method="post"] sem classe checkout_coupon. */
    body.woocommerce-checkout .footure-v2-coupon-panel {
        padding: 0 22px !important;
        margin-bottom: 18px !important;
    }
    body.woocommerce-checkout .footure-v2-coupon-panel > .footure-v2-coupon-toggle {
        padding: 17px 0 !important;
        margin: 0 !important;
    }
    body.woocommerce-checkout .footure-v2-coupon-panel > form {
        margin: 0 0 18px !important;
    }
    body.woocommerce-checkout .footure-v2-coupon-panel > form.footure-v2-coupon-collapsed {
        display: none !important;
    }
    /* Encurta a área superior sem alterar os campos do checkout. */
    body.woocommerce-checkout.footure-v2-header-ready .store-alt__header {
        padding: 22px 0 12px !important;
        margin: 0 !important;
    }
    body.woocommerce-checkout.footure-v2-header-ready .store-alt-content {
        padding-top: 0 !important;
    }

    /* ========================================
       RESPONSIVO
       ======================================== */

    @media (max-width: 767px) {

        body.woocommerce-checkout .store-alt-container,
        body.woocommerce-checkout .store-alt-content,
        body.woocommerce-checkout form.checkout {
            width: 100%;
            max-width: 100%;
        }

        .footure-v2-product-card {
            padding: 16px;
        }

        .footure-v2-product-content {
            gap: 12px;
            align-items: flex-start;
        }

        .footure-v2-product-image {
            width: 76px;
            height: 76px;
            flex-basis: 76px;
        }

        .footure-v2-product-name {
            font-size: 16px;
        }

        .footure-v2-product-price {
            font-size: 20px;
        }

        body.woocommerce-checkout .column-title {
            font-size: 18px;
        }
    }


    /* ========================================
       V2.0.5 — REFINAMENTO VISUAL
       ======================================== */

    /* Menos espaço antes do título, sem alterar o cabeçalho seguro. */
    body.woocommerce-checkout.footure-v2-header-ready .store-alt-container {
        padding-top: 0 !important;
    }
    body.woocommerce-checkout.footure-v2-header-ready .store-alt__header,
    body.woocommerce-checkout.footure-v2-header-ready .store-alt-header {
        padding: 14px 0 12px !important;
        margin: 0 !important;
        min-height: 0 !important;
    }
    body.woocommerce-checkout.footure-v2-header-ready .store-alt__header h1,
    body.woocommerce-checkout.footure-v2-header-ready .store-alt-header h1 {
        font-size: 22px !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
    }
    /* Compensa espaçamentos verticais do tema no contêiner de conteúdo. */
    body.woocommerce-checkout.footure-v2-header-ready .store-alt-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Produto e cupom formam visualmente um único conjunto. */
    body.woocommerce-checkout .footure-v2-product-card {
        border-radius: 12px 12px 0 0;
        border-bottom: 0;
        margin-bottom: 0 !important;
        padding: 20px 22px 14px;
        box-shadow: none;
    }
    body.woocommerce-checkout .footure-v2-product-label { margin-bottom: 12px; }
    body.woocommerce-checkout .footure-v2-product-image {
        width: 96px;
        height: 96px;
        flex-basis: 96px;
    }
    body.woocommerce-checkout .footure-v2-product-name {
        font-size: 18px;
        margin-bottom: 5px;
    }
    body.woocommerce-checkout .footure-v2-product-price { font-size: 22px; }
    body.woocommerce-checkout .footure-v2-product-note {
        margin-top: 10px;
        line-height: 1.4;
    }
    body.woocommerce-checkout .footure-v2-coupon-panel {
        border: 1px solid #e5e7eb !important;
        border-top: 1px solid #edf0f2 !important;
        border-radius: 0 0 12px 12px !important;
        background: #fff !important;
        box-shadow: 0 7px 20px rgba(0,0,0,.035) !important;
        padding: 0 22px !important;
        margin: 0 0 18px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    body.woocommerce-checkout .footure-v2-coupon-panel > .footure-v2-coupon-toggle {
        padding: 14px 0 !important;
        font-size: 13px !important;
        font-weight: 600;
        color: #374151;
    }
    body.woocommerce-checkout .footure-v2-coupon-panel > .footure-v2-coupon-toggle::after {
        font-size: 19px;
    }
    body.woocommerce-checkout .footure-v2-coupon-panel > form:not(.footure-v2-coupon-collapsed) {
        padding: 6px 0 16px !important;
        margin: 0 !important;
        border-top: 1px solid #f0f1f3;
    }
    /* Evita que o tema reserve espaço vazio ao formulário recolhido. */
    body.woocommerce-checkout .footure-v2-coupon-panel > form.footure-v2-coupon-collapsed {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Uniformiza os blocos existentes sem tocar nos campos ou hooks. */
    body.woocommerce-checkout #customer_details,
    body.woocommerce-checkout #order_review {
        border-radius: 12px;
    }

    @media (max-width: 767px) {
        body.woocommerce-checkout .footure-v2-product-card {
            padding: 16px 15px 12px;
        }
        body.woocommerce-checkout .footure-v2-product-image {
            width: 76px;
            height: 76px;
            flex-basis: 76px;
        }
        body.woocommerce-checkout .footure-v2-product-name { font-size: 16px; }
        body.woocommerce-checkout .footure-v2-product-price { font-size: 20px; }
        body.woocommerce-checkout .footure-v2-coupon-panel {
            padding: 0 15px !important;
        }
    }


    /* ================================================
       V2.0.5b — CUPOM EXPANDIDO COMPACTO
       Apenas apresentação; formulário e eventos intactos.
       ================================================ */
    body.woocommerce-checkout .footure-v2-coupon-panel > form:not(.footure-v2-coupon-collapsed) {
        padding: 0 0 14px !important;
        margin: 0 !important;
        border: 0 !important;
        border-top: 0 !important;
        border-bottom: 0 !important;
        box-shadow: none !important;
        min-height: 0 !important;
        background: transparent !important;
    }

    body.woocommerce-checkout .footure-v2-coupon-panel > .footure-v2-coupon-toggle[aria-expanded="true"] {
        padding-bottom: 8px !important;
    }

    /* Elimina espaçamentos e separadores herdados do tema
       apenas dentro do formulário do cupom. */
    body.woocommerce-checkout .footure-v2-coupon-panel > form:not(.footure-v2-coupon-collapsed) > * {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        border-top: 0 !important;
        border-bottom: 0 !important;
        box-shadow: none !important;
    }

    body.woocommerce-checkout .footure-v2-coupon-panel > form:not(.footure-v2-coupon-collapsed) p {
        margin-top: 0 !important;
        margin-bottom: 8px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    body.woocommerce-checkout .footure-v2-coupon-panel > form:not(.footure-v2-coupon-collapsed) input[name="coupon_code"] {
        margin-bottom: 0 !important;
        max-width: 100%;
    }

    /* Estado recolhido: nenhum espaço reservado pelo form. */
    body.woocommerce-checkout .footure-v2-coupon-panel > form.footure-v2-coupon-collapsed {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    @media (max-width: 767px) {
        body.woocommerce-checkout .footure-v2-coupon-panel > form:not(.footure-v2-coupon-collapsed) {
            padding-bottom: 12px !important;
        }
    }


    /* V2.0.5b — foco acessível no botão do cupom.
       Remove a borda preta ao clicar com mouse, mas preserva
       indicação visível para navegação por teclado. */
    body.woocommerce-checkout .footure-v2-coupon-panel > button.footure-v2-coupon-toggle:focus:not(:focus-visible) {
        outline: none !important;
        box-shadow: none !important;
    }
    body.woocommerce-checkout .footure-v2-coupon-panel > button.footure-v2-coupon-toggle:focus-visible {
        outline: 2px solid #0d9488 !important;
        outline-offset: 3px !important;
        border-radius: 3px;
        box-shadow: none !important;
    }


    /* ==========================================================
       V2.0.6 — ALINHAMENTO E REFINAMENTO DOS DADOS PESSOAIS
       Não altera a ordem, os IDs nem a validação dos campos.
       ========================================================== */

    /* Uma mesma largura para o cartão do produto, cupom e checkout.
       O tema usa wrappers com paddings diferentes. */
    body.woocommerce-checkout .footure-v2-product-card,
    body.woocommerce-checkout .footure-v2-coupon-panel,
    body.woocommerce-checkout form.checkout,
    body.woocommerce-checkout #customer_details,
    body.woocommerce-checkout #order_review {
        width: 100% !important;
        max-width: 850px !important;
        box-sizing: border-box !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Alinha os blocos internos do formulário sem mudar seus hooks. */
    body.woocommerce-checkout #customer_details,
    body.woocommerce-checkout #order_review {
        border-radius: 12px !important;
    }

    /* Campos com altura, cantos e tipografia consistentes. */
    body.woocommerce-checkout #customer_details .woocommerce-billing-fields input.input-text,
    body.woocommerce-checkout #customer_details .woocommerce-billing-fields select,
    body.woocommerce-checkout #customer_details .woocommerce-billing-fields .select2-selection,
    body.woocommerce-checkout #customer_details .woocommerce-additional-fields textarea {
        min-height: 42px;
        border-radius: 7px;
        box-sizing: border-box;
    }

    body.woocommerce-checkout #customer_details .woocommerce-billing-fields .form-row label {
        line-height: 1.4;
        margin-bottom: 6px;
    }

    /* Não altera as larguras particulares de CEP, DDI, telefone,
       CPF/CNPJ e endereço já definidas por outros snippets. */
    body.woocommerce-checkout #customer_details .woocommerce-billing-fields .form-row {
        margin-bottom: 14px;
    }

    /* Estilo legado inofensivo: campo adicional desativado acima. */
    body.woocommerce-checkout #customer_details .woocommerce-additional-fields textarea {
        width: 100%;
        resize: vertical;
    }

    /* Evita desnível visual entre o cartão superior e os painéis. */
    body.woocommerce-checkout .footure-v2-coupon-panel {
        margin-bottom: 18px !important;
    }

    @media (max-width: 767px) {
        body.woocommerce-checkout .footure-v2-product-card,
        body.woocommerce-checkout .footure-v2-coupon-panel,
        body.woocommerce-checkout form.checkout,
        body.woocommerce-checkout #customer_details,
        body.woocommerce-checkout #order_review {
            max-width: 100% !important;
        }
        body.woocommerce-checkout #customer_details .woocommerce-billing-fields .form-row {
            margin-bottom: 12px;
        }
    }


    /* ==============================================
       V2.0.7 — OFERTA, RESUMO E PAGAMENTO
       Preserva a tabela, os eventos e os hooks originais.
       ============================================== */
    body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }
    body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table > thead {
        display: none;
    }
    body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table > tbody > tr.cart_item > td {
        padding-top: 10px;
        padding-bottom: 10px;
        vertical-align: top;
    }
    body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table > tbody > tr.cart_item > td.product-total {
        text-align: right;
        white-space: nowrap;
    }
    body.woocommerce-checkout #order_review tr.footure-order-bump-row > td {
        padding: 18px 0 22px !important;
        border: 0 !important;
    }
    body.woocommerce-checkout .footure-v2-bump-heading {
        margin: 0 0 12px;
        font-size: 17px;
        font-weight: 700;
        line-height: 1.35;
        color: #202428;
    }
    body.woocommerce-checkout #order_review tr.footure-order-bump-row .footure-bump-card {
        margin: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table > tfoot {
        background: #f8fafb;
    }
    body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table > tfoot th,
    body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table > tfoot td {
        padding: 12px 10px;
        vertical-align: middle;
    }
    body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table > tfoot td {
        text-align: right;
    }
    body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table > tfoot tr.order-total th,
    body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table > tfoot tr.order-total td {
        border-top: 1px solid #dce6e9;
        font-weight: 800;
        font-size: 18px;
    }
    body.woocommerce-checkout #order_review #payment {
        margin-top: 24px;
    }
    body.woocommerce-checkout #order_review #payment .column-title {
        margin-bottom: 16px;
    }
    @media (max-width: 767px) {
        body.woocommerce-checkout .footure-v2-bump-heading { font-size: 16px; }
        body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table > tbody > tr.cart_item > td.product-total {
            white-space: normal;
        }
        body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table > tfoot th,
        body.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table > tfoot td {
            padding: 10px 6px;
        }
    }

    /* ==============================================
       V2.0.9 — OFERTA ANTES DO RESUMO
       Apenas ordenação visual da linha já existente.
       ============================================== */
    body.woocommerce-checkout #order_review tr.footure-order-bump-row > td {
        padding-top: 2px !important;
        padding-bottom: 18px !important;
    }
    body.woocommerce-checkout #order_review tr.footure-v2-summary-heading > td {
        border: 0 !important;
        padding: 12px 0 8px !important;
        background: transparent !important;
        font-size: 17px;
        font-weight: 700;
        color: #202428;
    }
    body.woocommerce-checkout #order_review tr.footure-v2-summary-heading + tr.cart_item > td {
        padding-top: 12px;
    }
    @media (max-width: 767px) {
        body.woocommerce-checkout #order_review tr.footure-v2-summary-heading > td {
            font-size: 16px;
        }
    }

    /* V2.0.10 — acabamento do resumo, sem alterar quantidades reais */
    body.woocommerce-checkout #order_review
    table.woocommerce-checkout-review-order-table > tbody > tr.cart_item
    .product-quantity {
        display: none !important;
    }
    body.woocommerce-checkout #order_review .footure-v2-bump-heading {
        text-align: left !important;
    }
    body.woocommerce-checkout #order_review
    tr.footure-v2-summary-heading > td {
        text-align: left !important;
    }


    /* =========================================================
       V2.0.13 — SUA COMPRA + CUPOM, CONJUNTO CONTÍNUO
       O WooCommerce insere um contêiner de avisos entre ambos.
       Não oculta avisos reais nem altera formulários ou eventos.
       ========================================================= */
    body.woocommerce-checkout .footure-v2-product-card {
        margin-bottom: 0 !important;
        border-bottom: 0 !important;
        border-radius: 12px 12px 0 0 !important;
        box-shadow: none !important;
    }

    /* O contêiner intermediário vazio não deve abrir uma faixa. */
    body.woocommerce-checkout .footure-v2-coupon-notices:empty {
        display: none !important;
    }

    body.woocommerce-checkout .footure-v2-product-card
      ~ .footure-v2-coupon-panel {
        margin-top: 0 !important;
        border-top: 1px solid #e5e7eb !important;
        border-radius: 0 0 12px 12px !important;
    }

    /* Se houver avisos, mantê-los visíveis e destacados. */
    body.woocommerce-checkout .footure-v2-coupon-notices:not(:empty) {
        margin: 8px auto 16px !important;
    }

   /* V2.0.14 — Aproximar o checkout do cabeçalho seguro */
	body.woocommerce-checkout.footure-v2-header-ready
	.store-alt__header,
	body.woocommerce-checkout.footure-v2-header-ready
	.store-alt-header {
	    margin-top: -60px !important;
	}
		   

/* V2.0.14 — Ofertas em painel independente do resumo */
body.woocommerce-checkout .footure-v2-offers-panel {
  background: #fff; border: 1px solid #e3e9eb; border-radius: 12px;
  padding: 20px; margin: 0 0 18px; box-sizing: border-box;
}
body.woocommerce-checkout .footure-v2-offers-title {
  color: #202428; font-size: 18px; font-weight: 800;
  line-height: 1.4; margin: 0 0 16px; text-align: left;
}
body.woocommerce-checkout .footure-v2-offer-item + .footure-v2-offer-item { margin-top: 16px; }
body.woocommerce-checkout .footure-v2-offer-item .footure-bump-card { max-width: 100%; }
@media (max-width: 767px) {
  body.woocommerce-checkout .footure-v2-offers-panel { padding: 14px; }
  body.woocommerce-checkout .footure-v2-offers-title { font-size: 16px; }
}
