body.woocommerce-checkout {
    background: #f6f5f2;
    color: #191919;
}

body.woocommerce-checkout header.wp-block-template-part,
body.woocommerce-checkout footer.wp-block-template-part,
body.woocommerce-checkout .wp-block-post-title {
    display: none !important;
}

body.woocommerce-checkout .wp-site-blocks,
body.woocommerce-checkout main,
body.woocommerce-checkout .entry-content,
body.woocommerce-checkout .woocommerce {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
}

body.woocommerce-checkout .woocommerce {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px 72px;
    box-sizing: border-box;
}

.sj-cx-brand {
    background: #171717;
    margin: 0 calc(50% - 50vw) 34px;
}

.sj-cx-brand-inner {
    max-width: 1120px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    box-sizing: border-box;
}

.sj-cx-brand img {
    width: auto;
    height: 34px;
    display: block;
}

.sj-cx-brand span {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    opacity: .86;
}

.sj-cx-brand span::before {
    content: "✓";
    display: inline-grid;
    place-items: center;
    width: 21px;
    height: 21px;
    margin-right: 8px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
    font-size: 12px;
}

.sj-cx-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 32px;
    margin: 0 0 30px;
}

.sj-cx-kicker {
    display: block;
    margin-bottom: 8px;
    color: #d71e28;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
}

.sj-cx-intro h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.04;
    letter-spacing: -.035em;
}

.sj-cx-intro p {
    max-width: 650px;
    margin: 0;
    color: #666;
    font-size: 16px;
    line-height: 1.55;
}

.sj-cx-plan {
    min-width: 245px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e5e2dd;
    border-radius: 16px;
    box-shadow: 0 10px 34px rgba(0,0,0,.05);
}

.sj-cx-plan small,
.sj-cx-plan strong,
.sj-cx-plan span {
    display: block;
}

.sj-cx-plan small {
    margin-bottom: 3px;
    color: #777;
    font-size: 12px;
}

.sj-cx-plan strong {
    margin-bottom: 4px;
    font-size: 16px;
}

.sj-cx-plan span {
    color: #d71e28;
    font-size: 24px;
    font-weight: 800;
}

.sj-cx-progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 8px;
    margin-bottom: 30px;
    background: #ece9e4;
    border-radius: 16px;
}

.sj-cx-progress button {
    appearance: none;
    border: 0;
    background: transparent;
    color: #777;
    min-height: 58px;
    border-radius: 11px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    cursor: default;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.sj-cx-progress button b {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 999px;
    background: rgba(0,0,0,.07);
    color: inherit;
    font-size: 12px;
}

.sj-cx-progress button.is-active {
    background: #fff;
    color: #181818;
    box-shadow: 0 5px 18px rgba(0,0,0,.06);
}

.sj-cx-progress button.is-active b {
    background: #d71e28;
    color: #fff;
}

.sj-cx-progress button.is-done {
    color: #333;
    cursor: pointer;
}

.sj-cx-progress button.is-done b {
    background: #191919;
    color: #fff;
}

.sj-cx-step-copy {
    margin: 0 0 18px;
}

.sj-cx-step-copy h2 {
    margin: 0 0 6px;
    font-size: 27px;
    line-height: 1.15;
}

.sj-cx-step-copy p {
    margin: 0;
    color: #6d6d6d;
    line-height: 1.5;
}

body.woocommerce-checkout form.checkout {
    display: block;
    padding: 28px;
    background: #fff;
    border: 1px solid #e8e5df;
    border-radius: 20px;
    box-shadow: 0 16px 50px rgba(0,0,0,.055);
}

body.woocommerce-checkout form.checkout > .col2-set,
body.woocommerce-checkout form.checkout .col-1,
body.woocommerce-checkout form.checkout .col-2 {
    width: 100%;
    float: none;
    margin: 0;
}

body.woocommerce-checkout .woocommerce-billing-fields > h3,
body.woocommerce-checkout #order_review_heading {
    display: none;
}

body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row {
    width: 100%;
    margin: 0;
    float: none;
    box-sizing: border-box;
}

body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-wide,
body.woocommerce-checkout #billing_phone_field,
body.woocommerce-checkout #billing_customer_type_field,
body.woocommerce-checkout #billing_email_field,
body.woocommerce-checkout #billing_company_field,
body.woocommerce-checkout #billing_cpf_field,
body.woocommerce-checkout #billing_cnpj_field,
body.woocommerce-checkout #billing_country_field,
body.woocommerce-checkout #billing_address_1_field,
body.woocommerce-checkout #billing_address_2_field {
    grid-column: 1 / -1;
}

body.woocommerce-checkout form.checkout label {
    display: block;
    margin-bottom: 7px;
    color: #303030;
    font-size: 13px;
    font-weight: 750;
}

body.woocommerce-checkout form.checkout input.input-text,
body.woocommerce-checkout form.checkout textarea,
body.woocommerce-checkout form.checkout select,
body.woocommerce-checkout form.checkout .select2-selection {
    width: 100%;
    min-height: 50px;
    border: 1px solid #d9d6d1;
    border-radius: 11px;
    background: #fff;
    color: #1d1d1d;
    box-shadow: none;
    padding: 11px 13px;
    font-size: 15px;
    box-sizing: border-box;
}

body.woocommerce-checkout form.checkout input.input-text:focus,
body.woocommerce-checkout form.checkout textarea:focus,
body.woocommerce-checkout form.checkout select:focus {
    outline: none;
    border-color: #191919;
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

#billing_customer_type_field .woocommerce-input-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

#billing_customer_type_field .woocommerce-input-wrapper label.radio {
    margin: 0;
    min-height: 66px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #ddd9d3;
    border-radius: 13px;
    background: #faf9f7;
    cursor: pointer;
    font-size: 15px;
}

#billing_customer_type_field input[type="radio"] {
    accent-color: #d71e28;
    transform: scale(1.15);
}

.sj-cx-contact-note {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f7f5f1;
    color: #696969;
    font-size: 12px;
    line-height: 1.45;
}

.sj-cx-error {
    display: none;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #efb8bc;
    border-radius: 10px;
    background: #fff5f5;
    color: #a71922;
    font-size: 13px;
    font-weight: 700;
}

.sj-cx-error.is-visible {
    display: block;
}

.sj-cx-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eeeae4;
}

.sj-cx-btn {
    appearance: none;
    min-height: 48px;
    border-radius: 11px;
    padding: 0 20px;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.sj-cx-btn-primary {
    border: 1px solid #d71e28;
    background: #d71e28;
    color: #fff;
}

.sj-cx-btn-primary:hover {
    background: #b91821;
    border-color: #b91821;
}

.sj-cx-btn-secondary {
    border: 1px solid #d8d4ce;
    background: #fff;
    color: #222;
}

body.woocommerce-checkout #order_review {
    width: 100%;
    float: none;
}

body.woocommerce-checkout #order_review .shop_table {
    border: 1px solid #e8e5df;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 18px;
}

body.woocommerce-checkout #payment {
    background: #f7f6f3;
    border-radius: 14px;
}

body.woocommerce-checkout #payment ul.payment_methods {
    padding: 18px;
    border-bottom: 1px solid #e2dfda;
}

body.woocommerce-checkout #payment div.form-row {
    padding: 18px;
}

body.woocommerce-checkout #place_order {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 11px;
    background: #d71e28;
    color: #fff;
    font-size: 15px;
    font-weight: 850;
}

body.woocommerce-checkout #place_order:hover {
    background: #b91821;
}

body.woocommerce-checkout .woocommerce-privacy-policy-text,
body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
    color: #6d6d6d;
    font-size: 12px;
    line-height: 1.5;
}

body.woocommerce-checkout .woocommerce-error,
body.woocommerce-checkout .woocommerce-message,
body.woocommerce-checkout .woocommerce-info {
    border-radius: 12px;
}

@media (max-width: 760px) {
    body.woocommerce-checkout .woocommerce {
        padding: 0 14px 48px;
    }

    .sj-cx-brand {
        margin-bottom: 24px;
    }

    .sj-cx-brand-inner {
        min-height: 64px;
        padding: 0 14px;
    }

    .sj-cx-brand img {
        height: 29px;
    }

    .sj-cx-brand span {
        font-size: 12px;
    }

    .sj-cx-intro {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 22px;
    }

    .sj-cx-plan {
        min-width: 0;
    }

    .sj-cx-progress {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 5px;
        padding: 5px;
    }

    .sj-cx-progress button {
        min-height: 52px;
        padding: 6px 3px;
        gap: 4px;
        flex-direction: column;
        font-size: 10px;
    }

    .sj-cx-progress button b {
        width: 23px;
        height: 23px;
        flex-basis: 23px;
        font-size: 10px;
    }

    .sj-cx-step-copy h2 {
        font-size: 23px;
    }

    body.woocommerce-checkout form.checkout {
        padding: 18px 15px;
        border-radius: 16px;
    }

    body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    body.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row,
    body.woocommerce-checkout #billing_first_name_field,
    body.woocommerce-checkout #billing_last_name_field,
    body.woocommerce-checkout #billing_city_field,
    body.woocommerce-checkout #billing_state_field,
    body.woocommerce-checkout #billing_postcode_field {
        grid-column: 1 / -1;
    }

    #billing_customer_type_field .woocommerce-input-wrapper {
        grid-template-columns: 1fr;
    }

    .sj-cx-nav {
        flex-direction: column-reverse;
    }

    .sj-cx-btn {
        width: 100%;
    }
}

/* =========================================================
   SitesJÁ Checkout Experience v2
   ========================================================= */

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

/* O checkout deve parecer curto e objetivo. */
.sj-cx-brand {
    margin-bottom: 26px;
}

.sj-cx-intro {
    align-items: center;
    margin-bottom: 22px;
}

.sj-cx-kicker {
    margin-bottom: 7px;
    color: #d71e28;
    font-size: 11px;
    letter-spacing: .14em;
}

.sj-cx-intro h1 {
    max-width: 700px;
    margin-bottom: 7px;
    font-size: clamp(30px, 3.7vw, 46px);
}

.sj-cx-intro p {
    font-size: 15px;
}

.sj-cx-plan {
    min-width: 220px;
    padding: 14px 17px;
    border-radius: 14px;
}

.sj-cx-plan span {
    font-size: 21px;
}

.sj-cx-progress {
    margin-bottom: 24px;
    padding: 6px;
    border-radius: 14px;
}

.sj-cx-progress button {
    min-height: 52px;
    border-radius: 10px;
}

.sj-cx-step-copy {
    margin-bottom: 15px;
}

.sj-cx-step-copy h2 {
    font-size: 25px;
}

body.woocommerce-checkout form.checkout {
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 13px 42px rgba(0,0,0,.045);
}

/* Remove qualquer "(opcional)" visual do checkout customizado.
   A obrigatoriedade real é validada pelo fluxo. */
body.woocommerce-checkout form.checkout .optional {
    display: none !important;
}

/* Campos ocultos de compatibilidade nunca ocupam espaço. */
#billing_first_name_field,
#billing_last_name_field,
#billing_cpf_field,
#billing_cnpj_field,
#billing_company_field,
#billing_city_field,
#billing_country_field {
    display: none !important;
}

/* Etapa 1: três campos, sem textos extras. */
#billing_phone_field,
#billing_contact_name_field,
#billing_email_field,
#billing_customer_type_field,
#billing_document_field,
#billing_legal_name_field,
#billing_postcode_field,
#billing_address_1_field,
#billing_state_field {
    grid-column: 1 / -1 !important;
}

#billing_number_field,
#billing_address_2_field {
    grid-column: span 1;
}

body.woocommerce-checkout form.checkout label {
    margin-bottom: 6px;
    color: #242424;
    font-size: 13px;
    font-weight: 700;
}

body.woocommerce-checkout form.checkout input.input-text,
body.woocommerce-checkout form.checkout textarea,
body.woocommerce-checkout form.checkout select,
body.woocommerce-checkout form.checkout .select2-selection {
    min-height: 52px;
    border-color: #d8d5cf;
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

body.woocommerce-checkout form.checkout input.input-text:hover,
body.woocommerce-checkout form.checkout select:hover {
    border-color: #c4c0b9;
}

body.woocommerce-checkout form.checkout input.input-text:focus,
body.woocommerce-checkout form.checkout textarea:focus,
body.woocommerce-checkout form.checkout select:focus {
    border-color: #d71e28;
    box-shadow: 0 0 0 3px rgba(215,30,40,.08);
}

/* PF/PJ como cartões de escolha, não rádio grosseiro. */
#billing_customer_type_field > label {
    margin-bottom: 10px;
}

#billing_customer_type_field .woocommerce-input-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

#billing_customer_type_field .woocommerce-input-wrapper label.radio {
    position: relative;
    min-height: 58px;
    margin: 0;
    padding: 12px 15px;
    border: 1px solid #ddd9d2;
    border-radius: 11px;
    background: #fbfaf8;
    color: #333;
    font-size: 14px;
    font-weight: 750;
    transition: all .15s ease;
}

#billing_customer_type_field .woocommerce-input-wrapper label.radio:hover {
    border-color: #bcb7af;
    background: #fff;
}

#billing_customer_type_field input[type="radio"] {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #d71e28;
    transform: none;
}

#billing_customer_type_field .woocommerce-input-wrapper label.radio:has(input:checked) {
    border-color: #d71e28;
    background: #fff7f7;
    box-shadow: 0 0 0 2px rgba(215,30,40,.06);
    color: #181818;
}

/* Feedback da busca de CEP é curto e discreto. */
.sj-cx-cep-status {
    display: none;
    margin: 10px 0 0;
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.35;
}

.sj-cx-cep-status.is-loading {
    display: block;
    background: #f5f4f1;
    color: #666;
}

.sj-cx-cep-status.is-ok {
    display: block;
    background: #f1f7f2;
    color: #2f6b3b;
}

.sj-cx-cep-status.is-error {
    display: block;
    background: #fff4f4;
    color: #a71922;
}

.sj-cx-nav {
    margin-top: 20px;
    padding-top: 18px;
}

.sj-cx-btn {
    min-height: 46px;
    border-radius: 10px;
}

/* Etapa 4: esconde a tabela extensa do WooCommerce e mantém só resumo curto. */
body.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table {
    display: none !important;
}

.sj-cx-payment-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 14px;
    padding: 14px 16px;
    border: 1px solid #e4e1db;
    border-radius: 12px;
    background: #fff;
}

.sj-cx-payment-summary div {
    min-width: 0;
}

.sj-cx-payment-summary small,
.sj-cx-payment-summary strong {
    display: block;
}

.sj-cx-payment-summary small {
    margin-bottom: 3px;
    color: #777;
    font-size: 11px;
}

.sj-cx-payment-summary strong {
    overflow: hidden;
    color: #222;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sj-cx-payment-summary > span {
    flex: 0 0 auto;
    color: #d71e28;
    font-size: 18px;
    font-weight: 850;
}

body.woocommerce-checkout #payment {
    border: 1px solid #e4e1db;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

body.woocommerce-checkout #payment ul.payment_methods {
    padding: 13px 15px;
}

body.woocommerce-checkout #payment ul.payment_methods > li {
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #efede9;
}

body.woocommerce-checkout #payment ul.payment_methods > li:last-child {
    border-bottom: 0;
}

body.woocommerce-checkout #payment div.payment_box {
    margin: 9px 0 0;
    border-radius: 9px;
}

body.woocommerce-checkout #payment div.form-row {
    padding: 14px 15px;
}

body.woocommerce-checkout #place_order {
    min-height: 52px;
    border-radius: 10px;
}

/* Woo/tema às vezes imprime títulos redundantes. */
body.woocommerce-checkout .woocommerce-additional-fields,
body.woocommerce-checkout .woocommerce-additional-fields__field-wrapper,
body.woocommerce-checkout #order_review_heading {
    display: none !important;
}

@media (max-width: 760px) {
    .sj-cx-brand {
        margin-bottom: 19px;
    }

    .sj-cx-intro {
        gap: 13px;
        margin-bottom: 18px;
    }

    .sj-cx-intro h1 {
        font-size: 31px;
    }

    .sj-cx-intro p {
        font-size: 14px;
    }

    .sj-cx-plan {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
    }

    .sj-cx-plan small {
        display: none;
    }

    .sj-cx-plan strong {
        margin: 0;
        font-size: 13px;
    }

    .sj-cx-plan span {
        font-size: 18px;
        white-space: nowrap;
    }

    .sj-cx-progress {
        margin-bottom: 18px;
    }

    .sj-cx-progress button {
        min-height: 49px;
    }

    .sj-cx-step-copy {
        margin-bottom: 12px;
    }

    .sj-cx-step-copy h2 {
        font-size: 21px;
    }

    .sj-cx-step-copy p {
        font-size: 13px;
    }

    body.woocommerce-checkout form.checkout {
        padding: 16px 14px;
    }

    #billing_customer_type_field .woocommerce-input-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #billing_customer_type_field .woocommerce-input-wrapper label.radio {
        min-height: 54px;
        padding: 10px 11px;
        font-size: 13px;
    }

    #billing_number_field,
    #billing_address_2_field {
        grid-column: 1 / -1;
    }

    .sj-cx-payment-summary {
        padding: 12px 13px;
    }
}


/* =========================================================
   SitesJÁ Checkout V3 — refinamento de Cadastro e Endereço
   ========================================================= */

/* Etapa 2: seleção PF/PJ compacta, no estilo de escolha rápida. */
form.checkout[data-sj-step="2"] .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 16px;
}

form.checkout[data-sj-step="2"] #billing_customer_type_field {
    grid-column: 1 / -1;
    margin-bottom: 2px;
}

#billing_customer_type_field > label {
    margin-bottom: 10px;
}

#billing_customer_type_field .woocommerce-input-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

#billing_customer_type_field input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

#billing_customer_type_field .woocommerce-input-wrapper label.radio {
    position: relative;
    min-height: auto;
    margin: 0;
    padding: 5px 4px 5px 27px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #555;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    cursor: pointer;
    transition: color .16s ease;
}

#billing_customer_type_field .woocommerce-input-wrapper label.radio::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    width: 15px;
    height: 15px;
    border: 1.5px solid #b9b6b1;
    border-radius: 999px;
    background: #fff;
    transform: translateY(-50%);
    transition: all .16s ease;
    box-sizing: border-box;
}

#billing_customer_type_field .woocommerce-input-wrapper label.radio::after {
    content: "✓";
    position: absolute;
    left: 2px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 15px;
    height: 15px;
    border-radius: 999px;
    background: #d71e28;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    opacity: 0;
    transform: translateY(-50%) scale(.72);
    transition: all .16s ease;
}

#billing_customer_type_field input[type="radio"]:checked + label.radio,
#billing_customer_type_field label.radio.is-selected {
    color: #181818;
}

#billing_customer_type_field input[type="radio"]:checked + label.radio::before,
#billing_customer_type_field label.radio.is-selected::before {
    border-color: #d71e28;
}

#billing_customer_type_field input[type="radio"]:checked + label.radio::after,
#billing_customer_type_field label.radio.is-selected::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

form.checkout[data-sj-step="2"] #billing_document_field,
form.checkout[data-sj-step="2"] #billing_legal_name_field {
    grid-column: auto !important;
}

/* Etapa 3: CEP + rua na primeira linha; número + complemento + UF na segunda. */
form.checkout[data-sj-step="3"] .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: minmax(150px, .72fr) minmax(260px, 1.65fr) minmax(110px, .48fr);
    column-gap: 16px;
    row-gap: 16px;
}

form.checkout[data-sj-step="3"] #billing_postcode_field {
    grid-column: 1 / 2 !important;
}

form.checkout[data-sj-step="3"] #billing_address_1_field {
    grid-column: 2 / 4 !important;
}

form.checkout[data-sj-step="3"] #billing_number_field {
    grid-column: 1 / 2 !important;
}

form.checkout[data-sj-step="3"] #billing_address_2_field {
    grid-column: 2 / 3 !important;
}

form.checkout[data-sj-step="3"] #billing_state_field {
    grid-column: 3 / 4 !important;
}

/* Campos e navegação um pouco mais compactos sem perder área de toque. */
form.checkout[data-sj-step="2"] input.input-text,
form.checkout[data-sj-step="3"] input.input-text,
form.checkout[data-sj-step="3"] select,
form.checkout[data-sj-step="3"] .select2-selection {
    min-height: 48px;
}

@media (max-width: 760px) {
    form.checkout[data-sj-step="2"] .woocommerce-billing-fields__field-wrapper,
    form.checkout[data-sj-step="3"] .woocommerce-billing-fields__field-wrapper {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    form.checkout[data-sj-step="2"] #billing_customer_type_field,
    form.checkout[data-sj-step="2"] #billing_document_field,
    form.checkout[data-sj-step="2"] #billing_legal_name_field,
    form.checkout[data-sj-step="3"] #billing_postcode_field,
    form.checkout[data-sj-step="3"] #billing_address_1_field,
    form.checkout[data-sj-step="3"] #billing_number_field,
    form.checkout[data-sj-step="3"] #billing_address_2_field,
    form.checkout[data-sj-step="3"] #billing_state_field {
        grid-column: 1 / -1 !important;
    }

    #billing_customer_type_field .woocommerce-input-wrapper {
        gap: 12px 18px;
    }
}


/* =========================================================
   SitesJÁ Checkout V4 — orientação lateral + UX refinada
   ========================================================= */
form.checkout[data-sj-step="1"] .woocommerce-billing-fields,
form.checkout[data-sj-step="2"] .woocommerce-billing-fields,
form.checkout[data-sj-step="3"] .woocommerce-billing-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
    column-gap: clamp(26px, 4vw, 54px);
    row-gap: 14px;
    align-items: start;
}

form.checkout[data-sj-step="1"] .woocommerce-billing-fields__field-wrapper,
form.checkout[data-sj-step="2"] .woocommerce-billing-fields__field-wrapper,
form.checkout[data-sj-step="3"] .woocommerce-billing-fields__field-wrapper,
form.checkout[data-sj-step="1"] .sj-cx-cep-status,
form.checkout[data-sj-step="2"] .sj-cx-cep-status,
form.checkout[data-sj-step="3"] .sj-cx-cep-status,
form.checkout[data-sj-step="1"] .sj-cx-error,
form.checkout[data-sj-step="2"] .sj-cx-error,
form.checkout[data-sj-step="3"] .sj-cx-error,
form.checkout[data-sj-step="1"] .sj-cx-nav,
form.checkout[data-sj-step="2"] .sj-cx-nav,
form.checkout[data-sj-step="3"] .sj-cx-nav {
    grid-column: 1;
}

.sj-cx-sidecard {
    grid-column: 2;
    grid-row: 1 / span 5;
    align-self: start;
    padding: 24px;
    border: 1px solid #e4e0da;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfaf8 100%);
    box-shadow: 0 12px 34px rgba(25,25,25,.055);
}

.sj-cx-side-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #d71e28;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .11em;
}

.sj-cx-sidecard h3 {
    margin: 0 0 9px;
    color: #191919;
    font-size: 21px;
    line-height: 1.18;
    letter-spacing: -.02em;
}

.sj-cx-sidecard p {
    margin: 0 0 18px;
    color: #686868;
    font-size: 13px;
    line-height: 1.55;
}

.sj-cx-sidecard .sj-cx-btn-primary {
    width: 100%;
    min-height: 50px;
    padding-inline: 16px;
    white-space: normal;
    line-height: 1.25;
}

.sj-cx-sidecard small {
    display: block;
    margin-top: 12px;
    color: #707070;
    font-size: 11px;
    line-height: 1.4;
}

form.checkout[data-sj-step="1"] .sj-cx-nav,
form.checkout[data-sj-step="2"] .sj-cx-nav,
form.checkout[data-sj-step="3"] .sj-cx-nav {
    justify-content: flex-start;
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px solid #efebe5;
}

form.checkout[data-sj-step="1"] .sj-cx-nav { display: none !important; }

.sj-cx-nav .sj-cx-btn-secondary {
    min-height: 42px;
    padding-inline: 13px;
    border-color: transparent;
    background: transparent;
    color: #666;
}

.sj-cx-nav .sj-cx-btn-secondary:hover {
    color: #191919;
    background: #f4f2ee;
}

form.checkout[data-sj-step="2"] #billing_customer_type_field .woocommerce-input-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

form.checkout[data-sj-step="2"] #billing_customer_type_field .woocommerce-input-wrapper label.radio {
    min-height: 38px;
    padding: 9px 13px 9px 35px;
    border: 1px solid #dedad4;
    border-radius: 999px;
    background: #fff;
    color: #565656;
    font-size: 12px;
    font-weight: 750;
}

form.checkout[data-sj-step="2"] #billing_customer_type_field .woocommerce-input-wrapper label.radio::before,
form.checkout[data-sj-step="2"] #billing_customer_type_field .woocommerce-input-wrapper label.radio::after { left: 12px; }

form.checkout[data-sj-step="2"] #billing_customer_type_field .woocommerce-input-wrapper label.radio.is-selected {
    border-color: #d71e28;
    background: #fff7f7;
    color: #181818;
}

form.checkout[data-sj-step="2"] .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}
form.checkout[data-sj-step="2"] #billing_customer_type_field { grid-column: 1 / -1 !important; }
form.checkout[data-sj-step="2"] #billing_document_field,
form.checkout[data-sj-step="2"] #billing_legal_name_field { grid-column: auto !important; }

form.checkout[data-sj-step="3"] .woocommerce-billing-fields__field-wrapper {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}
form.checkout[data-sj-step="3"] #billing_postcode_field { grid-column: span 3 !important; }
form.checkout[data-sj-step="3"] #billing_address_1_field { grid-column: span 9 !important; }
form.checkout[data-sj-step="3"] #billing_number_field { grid-column: span 2 !important; }
form.checkout[data-sj-step="3"] #billing_address_2_field { grid-column: span 7 !important; }
form.checkout[data-sj-step="3"] #billing_state_field { grid-column: span 3 !important; }

form.checkout[data-sj-step="3"] #billing_address_2_field > label,
form.checkout[data-sj-step="3"] #billing_address_2_field > label.screen-reader-text {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 0 7px !important;
    padding: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
}

form.checkout[data-sj-step="3"] #billing_state_field .select2-container,
form.checkout[data-sj-step="3"] #billing_state_field select { width: 100% !important; }

form.checkout[data-sj-step="1"] input.input-text,
form.checkout[data-sj-step="2"] input.input-text,
form.checkout[data-sj-step="3"] input.input-text,
form.checkout[data-sj-step="3"] select,
form.checkout[data-sj-step="3"] .select2-selection { min-height: 50px; }

@media (max-width: 760px) {
    form.checkout[data-sj-step="1"] .woocommerce-billing-fields,
    form.checkout[data-sj-step="2"] .woocommerce-billing-fields,
    form.checkout[data-sj-step="3"] .woocommerce-billing-fields {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    form.checkout[data-sj-step="1"] .woocommerce-billing-fields__field-wrapper,
    form.checkout[data-sj-step="2"] .woocommerce-billing-fields__field-wrapper,
    form.checkout[data-sj-step="3"] .woocommerce-billing-fields__field-wrapper {
        order: 1;
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }

    .sj-cx-cep-status { order: 2; }
    .sj-cx-error { order: 3; }
    .sj-cx-sidecard {
        order: 4;
        width: 100%;
        padding: 17px;
        border-radius: 14px;
        box-sizing: border-box;
    }
    .sj-cx-nav { order: 5; }

    .sj-cx-side-eyebrow { margin-bottom: 6px; font-size: 9px; }
    .sj-cx-sidecard h3 { margin-bottom: 6px; font-size: 18px; }
    .sj-cx-sidecard p { margin-bottom: 14px; font-size: 12.5px; }
    .sj-cx-sidecard .sj-cx-btn-primary { min-height: 52px; font-size: 14px; }

    form.checkout[data-sj-step="2"] #billing_customer_type_field,
    form.checkout[data-sj-step="2"] #billing_document_field,
    form.checkout[data-sj-step="2"] #billing_legal_name_field,
    form.checkout[data-sj-step="3"] #billing_postcode_field,
    form.checkout[data-sj-step="3"] #billing_address_1_field,
    form.checkout[data-sj-step="3"] #billing_number_field,
    form.checkout[data-sj-step="3"] #billing_address_2_field,
    form.checkout[data-sj-step="3"] #billing_state_field { grid-column: 1 / -1 !important; }

    form.checkout[data-sj-step="2"] #billing_customer_type_field .woocommerce-input-wrapper { gap: 8px; }
    form.checkout[data-sj-step="2"] #billing_customer_type_field .woocommerce-input-wrapper label.radio {
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
        padding-left: 34px;
        box-sizing: border-box;
    }

    form.checkout[data-sj-step="1"] .sj-cx-nav { display: none !important; }
    form.checkout[data-sj-step="2"] .sj-cx-nav,
    form.checkout[data-sj-step="3"] .sj-cx-nav {
        margin-top: -2px;
        padding-top: 4px;
        border-top: 0;
    }
}
