.page_pagamento {
    background-color: #FFF;
}

.page_pagamento .container {
    padding: 32px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.left_pagamento {
    display: flex;
    gap: 72px;
    width: 100%;
}

.left_pagamento .woocommerce {
    width: 100%;
}

#order_review_heading {
    display: none;
}

.left_pagamento .woocommerce .checkout {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
}

.left_pagamento .woocommerce .checkout .col2-set {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 571px;
}

.left_pagamento .woocommerce-checkout-review-order {
    max-width: 548px;
    width: 100%;
}

.left_pagamento .woocommerce-billing-fields,
.left_pagamento .woocommerce-billing-fields__field-wrapper {
    width: 100%;
}

.woocommerce .col2-set .col-1,
.woocommerce-page .col2-set .col-1,
.woocommerce .col2-set .col-2,
.woocommerce-page .col2-set .col-2 {
    width: 100% !important;
}

.left_pagamento .woocommerce-billing-fields h3,
.ship-to-different-address {
    color: var(--GrayScale-Dark, #1D242D);
    font-family: "Hanken Grotesk", system-ui, sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 32px;
    /* 133.333% */
}

.page_pagamento .form-row label {
    color: var(--GrayScale-Dark, #1D242D);
    font-family: "Hanken Grotesk", system-ui, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 24px;
    /* 133.333% */
}

.page_pagamento .form-row input {
    width: 276px;
    height: 56px;
    padding: 16px 32px;

    border-radius: 10px;
    background: var(--GrayScale-Lighter, #F4F5F5);
    outline: none;
    border: none;
}

#billing_state,
#shipping_state {
    height: 56px;
    padding: 16px 32px;

    border-radius: 10px;
    background: var(--GrayScale-Lighter, #F4F5F5);
    outline: none;
    border: none;
}

#order_comments {
    height: 75px;
    padding: 16px 32px;

    border-radius: 10px;
    background: var(--GrayScale-Lighter, #F4F5F5);
    outline: none;
    border: none;
}

.woocommerce-shipping-fields .ship-to-different-address {
    width: 100%;
}

#formPagamento {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-bottom: 108px;
}

#formPagamento .form_section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 16px;
}

#formPagamento h2 {
    width: 100%;
}

#formPagamento .form_section input {
    display: flex;
    width: 100% !important;
    height: 56px;
    padding: 16px 32px;
    border-radius: 10px;
    background: var(--GrayScale-Lighter, #F4F5F5);
    border: none;
    outline: none;
}

.page_pagamento input::placeholder,
.page_pagamento textarea::placeholder {
    color: var(--gray-scale-light-active, #909DAD);
    font-family: "Hanken Grotesk", system-ui, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

#formPagamento .form_group {
    width: 274px;
}

#div_do_nome {
    width: 100% !important;
    max-width: 564px !important;
}

#nomeEntrega {
    max-width: 568px !important;
}

#tipoCadastro,
#tipoEntrega,
#periodo_entrega,
#local_entrega,
#billing_state {
    display: flex;
    width: 100%;
    height: 56px;
    padding: 16px 32px;
    border-radius: 10px;
    background: var(--GrayScale-Lighter, #F4F5F5);
    border: none;
    outline: none;
}

.mp-checkout-custom-card-input {
    width: 100% !important;
}

#anonimo {
    width: 16px !important;
    height: 16px !important;
    border-radius: 100% !important;
    border: 0.3px solid var(--Primary-Dark, #A7899A) !important;
    background: #FFF;
}

#order_mensagem_personalizada {
    display: flex;
    flex-direction: column;
}

#mensagem_personalizada {
    max-width: 564px !important;
}

#mensagemPersonalizada {
    display: flex;
    max-width: 564px;
    height: 138px;
    padding: 16px 32px;
    border-radius: 10px;
    background: var(--GrayScale-Lighter, #F4F5F5);
    outline: none;
    border: none;
}

#observacoes {
    display: flex;
    width: 564px;
    height: 75px;
    padding: 16px 32px;
    border-radius: 10px;
    background: var(--GrayScale-Lighter, #F4F5F5);
    outline: none;
    border: none;
}

#order_anonimo {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;

}

/* Estilização do popup */
/* Estilização do popup */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup.hidden {
    display: none;
}

.popup-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

.woocommerce-checkout-payment,
.mp-checkout-custom-card-form,
.mp-checkout-custom-card-row {
    width: 100%;
}

#mensagemPersonalizada_field label {
    color: var(--GrayScale-Dark, #1D242D);
    font-family: "Hanken Grotesk", system-ui, sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 32px;
    /* 133.333% */
}

#billing_country_field,
#billing_company_field,
#shipping_country_field {
    display: none;
}

#ship-to-different-address-checkbox {
    margin: 20px 0;
}

.woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout {
    /* antes: fixo no topo da tela, cobrindo o formulário */
    position: static;
}


@media (max-width:1024px) {
    .left_pagamento .woocommerce .checkout {
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    #order_review {
        width: 100%;
    }

    .page_pagamento .container {
        padding: 32px 20px;
    }
}

@media (max-width:600px) {

    .mp-checkout-custom-card-form .mp-checkout-custom-card-row {
        display: flex;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: center !important;
        gap: 32px;
    }


    .mp-checkout-custom-card-column {
        width: 100% !important;
    }

    #billing_state {
        display: flex;
        width: 100%;
        height: 56px;
        padding: 16px 32px;
        border-radius: 10px;
        background: var(--GrayScale-Lighter, #F4F5F5);
        border: none;
        outline: none;
    }

    .select2-container .select2-selection--single .select2-selection__rendered {
        display: flex;
        width: 100%;
        height: 56px;
        padding: 16px 32px;
        border-radius: 10px;
        background: var(--GrayScale-Lighter, #F4F5F5);
        border: none;
        outline: none;
    }


    .select2-container .select2-selection--single {
        display: flex;
        width: 100%;
        height: 56px;
        padding: 16px 32px;
        border-radius: 10px;
        background: var(--GrayScale-Lighter, #F4F5F5);
        border: none;
        outline: none;
    }
}
/* ==========================================================================
   Checkout out/2026: etapas numeradas, campos padronizados, resumo fixo
   ========================================================================== */

.page_pagamento .titulo_pagamento {
    width: 100%;
    margin: 0 0 8px;
    color: #1D242D;
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
}

/* Duas colunas: formulário à esquerda, resumo + pagamento fixo à direita */
@media (min-width: 1025px) {
    .left_pagamento .woocommerce .checkout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 420px;
        column-gap: 56px;
        align-items: start;
    }

    .left_pagamento .woocommerce .checkout > * {
        grid-column: 1;
    }

    .left_pagamento .woocommerce .checkout > #order_review {
        grid-column: 2;
        grid-row: 1 / span 8;
        position: sticky;
        top: 24px;
    }
}

.left_pagamento .woocommerce .checkout .col2-set,
.left_pagamento .woocommerce-checkout-review-order {
    max-width: none;
}

/* Etapas */
.flora-etapa-bloco,
.page_pagamento .woocommerce-billing-fields,
.page_pagamento .woocommerce-additional-fields {
    margin-bottom: 32px;
}

.page_pagamento .flora-etapa {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 20px;
    color: #1D242D;
    font-size: 22px;
    line-height: 28px;
    font-weight: 700;
}

.page_pagamento .flora-etapa span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #EF4444;
    color: #FFF;
    font-size: 16px;
    line-height: 1;
}

/* Campos */
.page_pagamento .form-row {
    margin: 0 0 16px;
    padding: 0;
}

.page_pagamento .form-row label {
    display: block;
    margin-bottom: 6px;
    color: #1D242D;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
}

.page_pagamento .form-row .required {
    color: #EF4444;
    text-decoration: none;
}

.page_pagamento .form-row .optional {
    color: #5B6573;
    font-weight: 400;
}

.page_pagamento .form-row input.input-text,
.page_pagamento .form-row select,
.page_pagamento .form-row textarea,
.page_pagamento .select2-container .select2-selection--single {
    width: 100% !important;
    height: auto !important;
    min-height: 48px;
    padding: 12px 14px !important;
    border: 1px solid #DEE2E6 !important;
    border-radius: 8px !important;
    background-color: #FFF !important;
    box-shadow: none;
    outline: none;
    color: #1D242D !important;
    font-size: 16px !important; /* abaixo de 16px o iPhone dá zoom ao tocar */
    line-height: 22px !important;
    font-weight: 400;
}

.page_pagamento .form-row select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 40px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%235B6573' d='M4 5.5 8 9.5l4-4 1.3 1.3L8 12.1 2.7 6.8z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    cursor: pointer;
}

.page_pagamento .form-row textarea {
    min-height: 110px;
    resize: vertical;
}

.page_pagamento .form-row input.input-text::placeholder,
.page_pagamento .form-row textarea::placeholder {
    color: #909DAD;
}

.page_pagamento .form-row input.input-text:focus,
.page_pagamento .form-row select:focus,
.page_pagamento .form-row textarea:focus,
.page_pagamento .select2-container--focus .select2-selection--single,
.page_pagamento .select2-container--open .select2-selection--single {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .15) !important;
}

.page_pagamento .form-row.woocommerce-invalid input.input-text,
.page_pagamento .form-row.woocommerce-invalid select {
    border-color: #C7191F !important;
}

.page_pagamento .select2-container .select2-selection--single .select2-selection__rendered {
    padding: 0 !important;
    height: auto !important;
    background: transparent !important;
    color: #1D242D;
    line-height: 22px;
}

.page_pagamento .select2-container .select2-selection--single .select2-selection__arrow {
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

/* País é sempre Brasil: não precisa aparecer */
.page_pagamento #billing_country_field {
    display: none !important;
}

/* Nome e sobrenome lado a lado, alinhados */
.page_pagamento .form-row-first,
.page_pagamento .form-row-last {
    width: calc(50% - 8px) !important;
}

.page_pagamento .form-row-first {
    float: left;
}

.page_pagamento .form-row-last {
    float: right;
}

/* Anônimo */
.page_pagamento #anonimo_field label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
}

.page_pagamento #anonimo_field input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #EF4444;
}

/* Resumo do pedido */
.left_pagamento #order_review {
    padding: 24px;
    border: 1px solid #DEE2E6;
    border-radius: 14px;
    background: #FFF;
}

.page_pagamento .flora-resumo-titulo {
    margin: 0 0 12px;
    color: #1D242D;
    font-size: 20px;
    line-height: 26px;
    font-weight: 700;
}

.page_pagamento .woocommerce-checkout-review-order-table {
    width: 100%;
    margin: 0 0 20px !important;
    border: 0 !important;
    border-collapse: collapse;
    font-size: 15px;
}

.page_pagamento .woocommerce-checkout-review-order-table th,
.page_pagamento .woocommerce-checkout-review-order-table td {
    padding: 12px 0 !important;
    border: 0 !important;
    border-top: 1px solid #F0F1F3 !important;
    background: transparent !important;
    color: #1D242D;
    text-align: left;
    font-weight: 400;
}

.page_pagamento .woocommerce-checkout-review-order-table td:last-child,
.page_pagamento .woocommerce-checkout-review-order-table tfoot td {
    text-align: right;
}

.page_pagamento .woocommerce-checkout-review-order-table thead {
    display: none;
}

.page_pagamento .woocommerce-checkout-review-order-table tbody tr:first-child td {
    border-top: 0 !important;
}

.page_pagamento .woocommerce-checkout-review-order-table .order-total th,
.page_pagamento .woocommerce-checkout-review-order-table .order-total td {
    font-size: 18px;
    font-weight: 700;
    border-top: 1px solid #DEE2E6 !important;
}

.flora-resumo-pendente {
    color: #B45309;
    font-weight: 600;
}

/* Pagamento */
.page_pagamento #payment {
    background: #FFF !important;
    border-radius: 0 !important;
}

.page_pagamento #payment ul.payment_methods {
    padding: 0 !important;
    border-bottom: 0 !important;
}

.page_pagamento #payment ul.payment_methods li {
    padding: 12px 0;
    border-top: 1px solid #F0F1F3;
    font-size: 15px;
    line-height: 22px;
}

.page_pagamento #payment ul.payment_methods li input[type="radio"] {
    accent-color: #EF4444;
    margin-right: 8px;
}

.page_pagamento #payment div.payment_box {
    margin: 10px 0 0 !important;
    border-radius: 8px;
    background: #F4F5F5 !important;
    color: #1D242D !important;
    font-size: 14px;
}

.page_pagamento #payment div.payment_box::before {
    display: none !important;
}

.page_pagamento #payment div.form-row.place-order {
    margin: 16px 0 0;
    padding: 0 !important;
}

.page_pagamento #place_order {
    float: none !important;
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 10px;
    background: #15803D !important; /* verde = confirmação (contraste 5:1 com o branco) */
    color: #FFF !important;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}

.page_pagamento #place_order:hover,
.page_pagamento #place_order:focus-visible {
    background: #166534 !important;
}

.page_pagamento #place_order:focus-visible {
    outline: 3px solid rgba(21, 128, 61, .35);
    outline-offset: 2px;
}

@media (max-width: 1024px) {
    .left_pagamento .woocommerce .checkout {
        display: block;
    }
}

@media (max-width: 600px) {
    .page_pagamento .container {
        padding: 24px 16px;
    }

    .page_pagamento .titulo_pagamento {
        font-size: 26px;
        line-height: 32px;
    }

    .page_pagamento .flora-etapa {
        font-size: 20px;
    }

    .page_pagamento .form-row-first,
    .page_pagamento .form-row-last {
        float: none;
        width: 100% !important;
    }

    .left_pagamento #order_review {
        padding: 20px 16px;
    }
}

/* Mensagem do cartão no mesmo padrão dos outros campos */
.page_pagamento #mensagemPersonalizada_field label {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
}

.page_pagamento #mensagemPersonalizada {
    max-width: none;
    height: auto;
}

.page_pagamento #anonimo_field .optional {
    display: none;
}
