:root {
    --checkout-fundo: #eef1f4;
    --checkout-borda: #cfd4d9;
    --checkout-texto: #171717;
    --checkout-texto-suave: #66717b;
    --checkout-azul: #3f99eb;
    --checkout-verde: #27b864;
    --checkout-destaque: #dda000;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--checkout-texto);
    background: var(--checkout-fundo);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

.tarja-urgencia {
    display: grid;
    width: min(1000px, calc(100% - 32px));
    min-height: 70px;
    margin: 16px auto 0;
    padding: 10px 22px;
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: center;
    gap: 17px;
    color: #fff;
    background: var(--checkout-destaque);
}

.tarja-cronometro {
    display: flex;
    align-items: center;
    gap: 11px;
}

.tarja-cronometro strong {
    min-width: 90px;
    font-size: 35px;
    font-weight: 400;
    line-height: 1;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.icone-relogio {
    position: relative;
    display: block;
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    background: #fff;
    border-radius: 50%;
}

.icone-relogio::before,
.icone-relogio::after {
    position: absolute;
    left: 50%;
    bottom: 50%;
    display: block;
    width: 3px;
    content: '';
    background: var(--checkout-destaque);
    border-radius: 3px;
    transform-origin: 50% 100%;
}

.icone-relogio::before {
    height: 10px;
    transform: translateX(-50%) rotate(0deg);
}

.icone-relogio::after {
    height: 8px;
    transform: translateX(-50%) rotate(135deg);
}

.tarja-urgencia p {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
}

.checkout {
    display: grid;
    width: min(1000px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 24px;
    grid-template-columns: minmax(0, 672px) 288px;
    align-items: start;
    gap: 24px;
}

.checkout--sem-beneficios {
    width: min(672px, calc(100% - 32px));
    grid-template-columns: minmax(0, 672px);
}

.checkout-coluna-principal {
    min-width: 0;
}

.checkout-cabecalho {
    display: flex;
    margin-bottom: 30px;
    padding: 16px 16px 0;
    align-items: center;
    gap: 17px;
}

.checkout-produto-imagem {
    width: 128px;
    height: 128px;
    flex: 0 0 128px;
    object-fit: cover;
    background: #fff;
    border: 1px solid #d8dde1;
    border-radius: 6px;
}

.checkout-cabecalho h1 {
    margin: 0;
    color: #000;
    font-size: 23px;
    line-height: 1.2;
    text-transform: uppercase;
}

.checkout-beneficios {
    display: grid;
    gap: 16px;
}

.checkout-beneficios--mobile {
    display: none;
}

.beneficio-card {
    display: grid;
    min-height: 142px;
    padding: 12px 20px;
    grid-template-columns: 42px 1fr;
    align-items: start;
    gap: 17px;
    background: #fff;
    border: 2px solid var(--checkout-destaque);
    border-radius: 8px;
}

.beneficio-icone {
    display: block;
    width: 32px;
    height: 32px;
    margin: 12px auto 0;
    overflow: visible;
    fill: var(--checkout-destaque);
}

.beneficio-check {
    fill: none;
    stroke: #fff;
    stroke-width: 5.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.beneficio-card h2 {
    margin: 10px 0 12px;
    color: #050505;
    font-size: 18px;
    line-height: 1.35;
}

.beneficio-card p {
    margin: 0;
    color: var(--checkout-destaque);
    font-size: 15px;
    line-height: 1.45;
}

.checkout-cartao {
    padding: 40px 24px 18px;
    background: #fff;
    border: 1px solid #d8dde1;
    border-radius: 7px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}

.checkout-campos {
    display: grid;
    gap: 12px;
}

.campo-checkout {
    position: relative;
    display: block;
}

.campo-checkout input,
.campo-checkout select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    color: var(--checkout-texto);
    background: #fff;
    border: 1px solid var(--checkout-borda);
    border-radius: 5px;
    outline: 0;
    font-size: 15px;
}

.campo-checkout input::placeholder {
    color: #65707a;
    opacity: 1;
}

.campo-checkout input:focus,
.campo-checkout select:focus {
    border-color: var(--checkout-azul);
    box-shadow: 0 0 0 1px var(--checkout-azul);
}

.campos-lado-a-lado {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.campo-telefone input {
    padding-left: 53px;
}

.telefone-bandeira {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 13px;
    display: grid;
    width: 27px;
    height: 24px;
    align-items: center;
    justify-content: center;
    background: #f4f7f9;
    border: 1px solid #dce3e8;
    border-radius: 4px;
    font-size: 15px;
    line-height: 1;
    transform: translateY(-50%);
}

.formas-de-pagamento {
    display: grid;
    margin-top: 43px;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.forma-de-pagamento {
    position: relative;
    display: flex;
    height: 64px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #050505;
    background: #fff;
    border: 1px solid #d8dee4;
    border-radius: 4px;
    box-shadow: 0 3px 7px rgba(0, 0, 0, .13);
    font-size: 14px;
}

.forma-de-pagamento.selecionada {
    color: var(--checkout-azul);
    border-color: var(--checkout-azul);
}

.forma-de-pagamento svg {
    width: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
}

.forma-check {
    position: absolute;
    top: -6px;
    right: -6px;
    display: grid;
    width: 17px;
    height: 17px;
    place-items: center;
    color: #fff;
    background: #42c37e;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

.icone-pix {
    position: relative;
    display: block;
    width: 24px;
    height: 24px;
    transform: rotate(45deg);
}

.icone-pix i {
    position: absolute;
    width: 11px;
    height: 11px;
    background: #000;
    border-radius: 5px;
}

.icone-pix i:nth-child(1) { inset: 0 auto auto 0; }
.icone-pix i:nth-child(2) { inset: 0 0 auto auto; }
.icone-pix i:nth-child(3) { inset: auto auto 0 0; }
.icone-pix i:nth-child(4) { inset: auto 0 0 auto; }

.informacoes-pix {
    margin-top: 24px;
    padding: 22px 24px;
    color: #25313a;
    background: #f5f7f8;
    border: 1px solid #d9e1e6;
    border-radius: 5px;
}

.informacoes-pix h2 {
    margin: 0 0 14px;
    color: #17232c;
    font-size: 16px;
    line-height: 1.4;
}

.informacoes-pix ul {
    margin: 0;
    padding-left: 20px;
}

.informacoes-pix li {
    margin: 6px 0;
    padding-left: 3px;
    line-height: 1.45;
}

.informacoes-pix strong {
    color: #17232c;
}

.dados-do-cartao {
    display: grid;
    margin-top: 24px;
    padding: 12px 16px;
    gap: 12px;
    background: #fbfcfd;
    border: 1px solid #cdd8e3;
    border-radius: 4px;
}

.cartao-carregando {
    padding: 24px 0;
    color: var(--checkout-texto-suave);
    text-align: center;
}

.cartao-carregando p {
    margin: 0;
    font-size: 13px;
}

#cardPaymentBrick_container {
    width: 100%;
    min-height: 120px;
}

/* O Brick não reserva o intervalo padrão após o nome do titular. */
#cardPaymentBrick_container div:has(> input[name="HOLDER_NAME"]) {
    margin-bottom: 20px;
}

.desafio-3ds {
    margin-top: 24px;
    padding: 20px;
    background: #f8fbfc;
    border: 1px solid #cdd8e3;
    border-radius: 5px;
}

.desafio-3ds h2 {
    margin: 0 0 7px;
    color: #202b33;
    font-size: 19px;
}

.desafio-3ds p,
.desafio-3ds small {
    color: var(--checkout-texto-suave);
    font-size: 12px;
    line-height: 1.45;
}

.desafio-3ds p {
    margin: 0 0 14px;
}

.desafio-3ds iframe {
    display: block;
    width: 100%;
    min-height: 480px;
    background: #fff;
    border: 1px solid var(--checkout-borda);
    border-radius: 4px;
}

.desafio-3ds small {
    display: block;
    margin-top: 12px;
}

.forma-de-pagamento:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.dados-do-cartao-linha {
    display: grid;
    grid-template-columns: 1fr 1.05fr 1.75fr;
    gap: 8px;
}

.campo-cartao input,
.dados-do-cartao-linha input,
.dados-do-cartao-linha select {
    height: 48px;
}

.campo-cartao input {
    padding-right: 40px;
}

.icone-seguranca,
.campo-codigo-seguranca > span:last-child {
    position: absolute;
    top: 50%;
    right: 12px;
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    color: #fff;
    background: #000;
    border-radius: 50%;
    font-size: 11px;
    transform: translateY(-50%);
}

.campo-selecao::after,
.seta-baixo {
    position: absolute;
    top: 50%;
    right: 16px;
    width: 10px;
    height: 10px;
    content: "";
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.campo-selecao select {
    color: #65707a;
    appearance: none;
}

.resumo-do-valor {
    position: relative;
    display: flex;
    min-height: 48px;
    padding: 6px 40px 6px 14px;
    justify-content: center;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--checkout-borda);
    border-radius: 4px;
}

.resumo-do-valor > span:first-child {
    color: #66717a;
    font-size: 11px;
}

.resumo-do-valor strong {
    font-size: 14px;
    font-weight: 400;
}

.resumo-do-valor .seta-baixo {
    top: 44%;
}

.botao-pagar,
.botao-pagar-cartao {
    width: 100%;
    height: 59px;
    color: #fff;
    background: var(--checkout-verde);
    border: 0;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 700;
}

.botao-pagar {
    margin-top: 30px;
}

.botao-pagar-cartao {
    margin-top: 16px;
}

.botao-pagar:disabled,
.botao-pagar-cartao:disabled {
    cursor: wait;
    opacity: .72;
}

.resultado-pix {
    margin-top: 24px;
    padding: 22px;
    background: #f8fbfc;
    border: 1px solid #cfe2e6;
    border-radius: 5px;
    text-align: center;
}

.pix-carregando {
    padding: 18px 0;
    color: var(--checkout-texto-suave);
}

.pix-indicador {
    display: block;
    width: 32px;
    height: 32px;
    margin: 0 auto 12px;
    border: 3px solid #d5e7ea;
    border-top-color: #17a2b8;
    border-radius: 50%;
    animation: girar .8s linear infinite;
}

.pix-conteudo h2 {
    margin: 0;
    font-size: 20px;
}

.pix-orientacao,
.pix-aviso {
    color: var(--checkout-texto-suave);
    font-size: 13px;
}

.pix-qr-code {
    display: block;
    width: 210px;
    max-width: 100%;
    height: auto;
    margin: 18px auto;
    background: #fff;
    border: 8px solid #fff;
}

.pix-copia-cola {
    display: block;
    text-align: left;
}

.pix-copia-cola > span {
    display: block;
    margin-bottom: 7px;
    color: #3c4952;
    font-size: 12px;
    font-weight: 700;
}

.pix-copia-cola textarea {
    width: 100%;
    padding: 11px;
    resize: none;
    color: #46525b;
    background: #fff;
    border: 1px solid var(--checkout-borda);
    border-radius: 4px;
    font: 12px/1.45 monospace;
}

.botao-copiar-pix {
    width: 100%;
    min-height: 44px;
    margin-top: 9px;
    color: #fff;
    background: #17a2b8;
    border: 0;
    border-radius: 4px;
    font-weight: 700;
}

.pix-vencimento {
    margin: 17px 0 0;
    color: #38454e;
    font-size: 13px;
}

.mensagem-checkout {
    margin: 18px 0;
    padding: 12px 14px;
    color: #8b2525;
    background: #fff2f2;
    border: 1px solid #edc6c6;
    border-radius: 4px;
    font-size: 13px;
}

.resultado-pago {
    margin-top: 24px;
    padding: 34px 22px;
    color: #174b2d;
    background: #f0fbf5;
    border: 1px solid #bde5cd;
    border-radius: 6px;
    text-align: center;
}

.icone-pagamento-confirmado {
    display: grid;
    width: 54px;
    height: 54px;
    margin: 0 auto 15px;
    place-items: center;
    color: #fff;
    background: var(--checkout-verde);
    border-radius: 50%;
    font-size: 30px;
    font-weight: 700;
}

.resultado-pago h2 {
    margin: 0 0 8px;
    color: #173c26;
    font-size: 21px;
}

.resultado-pago p {
    margin: 0;
    color: #496456;
    font-size: 14px;
    line-height: 1.5;
}

.resultado-pago small {
    display: block;
    margin-top: 12px;
    color: #688275;
}

[hidden] {
    display: none !important;
}

@keyframes girar {
    to { transform: rotate(360deg); }
}

.checkout-rodape {
    padding: 18px 8px 0;
    color: #9cafc8;
    text-align: center;
    font-size: 10px;
    line-height: 1.55;
}

.marca-checkout {
    display: block;
    margin-bottom: 9px;
    color: #c2ccd9;
    font-size: 19px;
}

.checkout-rodape p {
    margin: 0 auto 5px;
    max-width: 700px;
}

.texto-acessivel {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.order-bumps-checkout {
    display: grid;
    margin-top: 24px;
    gap: 16px;
}

.order-bump-checkout {
    position: relative;
    display: block;
    overflow: hidden;
    background: #f8fafc;
    border: 2px dashed #9baabd;
    border-radius: 6px;
    cursor: pointer;
}

.order-bump-checkout::before {
    position: absolute;
    top: calc(50% + 20px);
    left: -1px;
    width: 0;
    height: 0;
    content: '';
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-left: 17px solid #e53e3e;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity .15s ease;
}

.order-bump-checkout:hover,
.order-bump-checkout:focus-within {
    border-color: var(--checkout-azul);
}

.order-bump-checkout:focus-within {
    outline: 3px solid rgba(63, 153, 235, .25);
    outline-offset: 2px;
}

.order-bump-checkout.selecionado {
    background: #edf6ff;
    border-color: var(--checkout-azul);
    border-style: solid;
    box-shadow: 0 0 0 3px rgba(63, 153, 235, .13);
}

.order-bump-checkout.selecionado::before {
    opacity: 1;
}

.order-bump-checkout.selecionado .order-bump-checkout-titulo {
    color: #fff;
    background: var(--checkout-azul);
}

.order-bump-checkout-titulo {
    display: block;
    padding: 11px 16px;
    color: var(--checkout-azul);
    background: #e5ebf3;
    font-size: 17px;
    line-height: 1.3;
    text-align: center;
    text-transform: uppercase;
}

.order-bump-checkout-conteudo {
    display: grid;
    margin: 10px;
    padding: 15px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
}

.order-bump-checkout input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--checkout-azul);
}

.order-bump-checkout input[type="checkbox"]:focus-visible {
    outline: 3px solid rgba(63, 153, 235, .35);
    outline-offset: 3px;
}

.order-bump-checkout-texto {
    color: #e53e3e;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.order-bump-checkout-produto {
    color: #e53e3e;
    text-decoration: underline;
}

.order-bump-checkout-frase,
.order-bump-checkout-preco {
    color: var(--checkout-texto-suave);
}

.order-bump-checkout-preco {
    white-space: nowrap;
}

.resumo-order-bumps {
    margin-top: 24px;
}

.resumo-order-bumps h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 17px;
    line-height: 1.35;
}

.resumo-order-bumps-cabecalho,
.resumo-order-bump-item {
    display: grid;
    padding: 12px 16px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
}

.resumo-order-bumps-cabecalho {
    color: #475569;
    background: #e8eef5;
    font-size: 14px;
}

.resumo-order-bumps-cabecalho strong:last-child,
.resumo-order-bump-item strong {
    text-align: right;
}

.resumo-order-bumps-itens {
    border-bottom: 1px solid #dce3ea;
}

.resumo-order-bump-item {
    color: #334155;
    border-bottom: 1px solid #edf0f3;
    font-size: 14px;
    line-height: 1.4;
}

.resumo-order-bump-item:last-child {
    border-bottom: 0;
}

.resumo-order-bump-item strong {
    color: #1f2937;
    white-space: nowrap;
}

.resumo-order-bump-item:not(.resumo-order-bump-principal) {
    animation: order-bump-entrar .16s ease-out;
}

.resumo-pedido-totais {
    display: grid;
    margin-top: 0;
}

.resumo-pedido-total-linha {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
    color: #475569;
    font-size: 14px;
    line-height: 1.4;
}

.resumo-pedido-total-linha strong {
    color: #1f2937;
    text-align: right;
    white-space: nowrap;
}

.resumo-pedido-total-geral {
    margin-top: 0;
    padding: 14px 16px;
    border: 1px solid #a7e1be;
    border-top: 0;
    border-radius: 0 0 6px 6px;
    color: #14532d;
    background: #effbf4;
    font-size: 17px;
    font-weight: 700;
}

.resumo-pedido-total-geral strong {
    color: #168c4d;
    font-size: 19px;
}

@keyframes order-bump-entrar {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1050px) {
    .checkout {
        width: min(672px, calc(100% - 32px));
        grid-template-columns: 1fr;
    }

    .checkout-beneficios--desktop {
        display: none;
    }

    .checkout-beneficios--mobile {
        display: grid;
        margin: 0 0 24px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .tarja-urgencia {
        width: calc(100% - 32px);
        min-height: 64px;
        margin-top: 10px;
        padding: 10px 12px;
        gap: 14px;
    }

    .tarja-cronometro {
        gap: 9px;
    }

    .tarja-cronometro strong {
        min-width: 68px;
        font-size: 25px;
    }

    .icone-relogio {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .tarja-urgencia p {
        font-size: 11px;
    }

    .checkout {
        width: min(100% - 20px, 520px);
        padding-top: 25px;
    }

    .checkout-beneficios--mobile {
        grid-template-columns: 1fr;
    }

    .beneficio-card {
        min-height: 0;
        padding: 20px 18px;
    }

    .checkout-cabecalho {
        margin-bottom: 24px;
        padding: 0 8px;
        gap: 14px;
    }

    .checkout-cabecalho h1 {
        font-size: 19px;
    }

    .checkout-produto-imagem {
        width: 82px;
        height: 82px;
        flex-basis: 82px;
    }

    .checkout-cartao {
        padding: 24px 16px 18px;
    }

    .campos-lado-a-lado,
    .dados-do-cartao-linha {
        grid-template-columns: 1fr;
    }

    .formas-de-pagamento {
        margin-top: 30px;
        gap: 7px;
    }

    .forma-de-pagamento {
        height: 68px;
        gap: 6px;
        font-size: 14px;
    }

    .forma-de-pagamento svg,
    .icone-pix {
        width: 24px;
    }

    .informacoes-pix {
        padding: 18px;
    }

    .informacoes-pix h2 {
        font-size: 15px;
    }

    .informacoes-pix li {
        font-size: 13px;
    }

    .dados-do-cartao {
        padding: 12px;
    }

    .order-bump-checkout-titulo {
        padding: 10px 12px;
        font-size: 14px;
    }

    .order-bump-checkout-conteudo {
        margin: 8px;
        padding: 13px 11px;
        gap: 9px;
    }

    .order-bump-checkout input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }

    .order-bump-checkout-texto {
        font-size: 14px;
    }

    .resumo-order-bumps-cabecalho,
    .resumo-order-bump-item {
        padding: 11px 10px;
        gap: 10px;
        font-size: 13px;
    }

    .resumo-pedido-total-linha {
        gap: 10px;
        padding-right: 10px;
        padding-left: 10px;
        font-size: 13px;
    }

    .resumo-pedido-total-geral {
        padding: 13px 10px;
        font-size: 15px;
    }

    .resumo-pedido-total-geral strong {
        font-size: 17px;
    }

    .desafio-3ds {
        padding: 12px;
    }

    .desafio-3ds iframe {
        min-height: 520px;
    }

    .botao-pagar,
    .botao-pagar-cartao {
        height: 62px;
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
    }
}
