body {
    background: #f2f4f5;
}

.checkout-carrinho {
    max-width: 1280px;
    margin: 35px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 24px;
    align-items: start;
}

.carrinho-esquerda h1 {
    margin: 0;
    font-size: 34px;
    color: #111;
}

.subtitulo-carrinho {
    margin: 8px 0 24px;
    font-size: 17px;
    color: #555;
}

.lista-produtos-carrinho {
    background: white;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.produto-carrinho {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 190px;
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e5;
    align-items: start;
}

.produto-carrinho:last-child {
    border-bottom: none;
}

.foto-produto-carrinho {
    width: 62px;
    height: 62px;
    border-radius: 12px;
    background: #eef3f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.dados-produto-carrinho h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    color: #111;
}

.dados-produto-carrinho p {
    margin: 0 0 8px;
    color: #777;
    font-size: 14px;
}

.linha-estoque-qtd {
    display: flex;
    align-items: center;
    gap: 70px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.estoque-produto-carrinho {
    display: inline-block;
    font-size: 13px !important;
    color: #198754 !important;
    margin: 0 !important;
    font-weight: 700;
    background: #eaf8ef;
    padding: 5px 9px;
    border-radius: 999px;
}

.form-qtd-carrinho {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
}

.form-qtd-carrinho button {
    width: 34px;
    height: 34px;
    border: none;
    background: #0d6efd;
    color: white;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.form-qtd-carrinho button:hover {
    background: #084298;
}

.form-qtd-carrinho button:disabled {
    background: #c8c8c8;
    color: #777;
    cursor: not-allowed;
}

.form-qtd-carrinho input {
    width: 56px;
    height: 34px;
    text-align: center;
    border: 1px solid #d1d1d1;
    border-radius: 10px;
    font-weight: bold;
    background: #f8f9fa;
    color: #222;
}

.precos-produto-carrinho {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.precos-produto-carrinho a {
    color: #0066cc;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
}

.precos-produto-carrinho a:hover {
    text-decoration: underline;
}

.precos-produto-carrinho strong {
    font-size: 19px;
    color: #111;
}

.precos-produto-carrinho span {
    font-size: 13px;
    color: #666;
}

.carrinho-direita {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 120px;
}

.box-frete,
.box-resumo,
.box-pagamento {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.box-frete h3,
.box-resumo h3,
.box-pagamento h3 {
    margin: 0 0 16px;
    font-size: 18px;
    color: #222;
}

.form-frete {
    display: flex;
    gap: 8px;
}

.form-frete input {
    flex: 1;
    min-width: 0;
    height: 42px;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 0 12px;
    outline: none;
}

.form-frete button {
    border: none;
    border-radius: 10px;
    background: #0d6efd;
    color: white;
    padding: 0 14px;
    font-weight: bold;
    cursor: pointer;
}

.linha-resumo,
.linha-total {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid #eee;
}

.linha-total {
    border-bottom: none;
    margin-top: 8px;
    align-items: center;
}

.linha-total span {
    font-size: 20px;
    font-weight: bold;
}

.linha-total strong {
    font-size: 24px;
    color: #0a9f32;
}

.btn-finalizar {
    display: block;
    margin-top: 18px;
    padding: 15px;
    border-radius: 12px;
    background: #08a82f;
    color: white;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
}

.btn-continuar {
    display: block;
    margin-top: 10px;
    padding: 13px;
    border-radius: 12px;
    background: #eef1f4;
    color: #333;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
}

.pagamento-item {
    background: #f5f7f8;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.carrinho-vazio {
    background: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
}

.carrinho-vazio a {
    display: inline-block;
    margin-top: 16px;
    background: #0d6efd;
    color: white;
    padding: 13px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
}

@media (max-width: 950px) {
    .checkout-carrinho {
        grid-template-columns: 1fr;
    }

    .carrinho-direita {
        position: static;
    }
}

@media (max-width: 650px) {
    .checkout-carrinho {
        padding: 0 10px;
        margin-top: 20px;
    }

    .produto-carrinho {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 12px;
        padding: 16px 0;
    }

    .foto-produto-carrinho {
        width: 52px;
        height: 52px;
        font-size: 24px;
    }

    .linha-estoque-qtd {
        gap: 12px;
    }

    .precos-produto-carrinho {
        grid-column: 1 / -1;
        text-align: left;
        align-items: flex-start;
        padding-left: 68px;
    }

    .form-frete {
        flex-direction: column;
    }

    .form-frete button {
        height: 42px;
    }
}

.opcoes-entrega {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.opcao-entrega {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #f5f7f8;
    border: 1px solid #e2e5e8;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
}

.opcao-entrega input {
    margin-top: 4px;
}

.opcao-entrega strong {
    display: block;
    color: #222;
    font-size: 14px;
    margin-bottom: 4px;
}

.opcao-entrega span {
    display: block;
    color: #666;
    font-size: 12px;
    line-height: 1.35;
}

.opcao-entrega:has(input:checked) {
    border-color: #0d6efd;
    background: #eef6ff;
}

#form-frete-carrinho {
    margin-top: 12px;
}

.opcoes-entrega {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.opcao-entrega {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #f5f7f8;
    border: 1px solid #e2e5e8;
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    margin-bottom: 10px;
}

.opcao-entrega input {
    margin-top: 4px;
}

.opcao-entrega strong {
    display: block;
    color: #222;
    font-size: 14px;
    margin-bottom: 4px;
}

.opcao-entrega span {
    display: block;
    color: #666;
    font-size: 12px;
}

.opcao-entrega:has(input:checked) {
    border-color: #0d6efd;
    background: #eef6ff;
}

.btn-finalizar {
    border: none;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
}

.pagina-pagamento {
    max-width: 1100px;
    margin: 0 auto;
}

.etapas-checkout {
    display: flex;
    justify-content: center;
    gap: 35px;
    margin-bottom: 30px;
}

.etapa {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #999;
    font-weight: bold;
}

.etapa.ativa,
.etapa.atual {
    color: #0d6efd;
}

.etapa span {
    font-size: 13px;
    margin-top: 6px;
}

.layout-pagamento {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
}

.opcoes-pagamento h1 {
    margin-top: 0;
    color: #222;
}

.opcao-pagamento {
    background: white;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #222;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.opcao-pagamento strong {
    display: block;
    font-size: 16px;
}

.opcao-pagamento span {
    display: block;
    color: #666;
    font-size: 13px;
    margin-top: 4px;
}

.opcao-pagamento b {
    font-size: 30px;
    color: #111;
}

@media (max-width: 850px) {
    .layout-pagamento {
        grid-template-columns: 1fr;
    }

    .etapas-checkout {
        gap: 16px;
    }
}

.mensagem-entrega {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 17px;
    font-weight: bold;
}

.mensagem-entrega.erro {
    background: #fcfcfc;
    color: #ff0217;
    border: 2px solid #ff031c;
}

.mensagem-entrega.sucesso {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #a3cfbb;
}