/* Estilos modernos para checkout - Visual App Delivery */

#checkout {
    padding: 15px 0;
    min-height: calc(100vh - 250px);
    padding-bottom: 120px;
    background: #f6f7fb;
}

body.has-bottom-nav #checkout {
    padding-bottom: 200px;
}

.checkout-page header#topo .cover {
    height: 150px;
}

.checkout-page header#topo .borda {
    top: 95px;
    height: 55px;
}

.checkout-page header#topo .cover .logo {
    width: 96px;
    height: 96px;
    top: 35px;
    left: calc(50% - 48px);
}

.checkout-page header#topo .info {
    padding-top: 12px;
}

.checkout-steps {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    padding: 6px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.checkout-steps .step {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    border-radius: 12px;
    background: #f8f8f8;
    color: #676767;
    font-weight: 600;
    font-size: 12px;
}

.checkout-steps .step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e8e8e8;
    color: #0d0d0d;
    font-size: 12px;
    margin-bottom: 6px;
}

.checkout-steps .step p {
    margin: 0;
    font-size: 12px;
}

.checkout-steps .step.active {
    background: #0d0d0d;
    color: #fff;
}

.checkout-steps .step.active span {
    background: #fff;
    color: #0d0d0d;
}

.checkout-steps .step.done {
    background: #d7fdd7;
    color: #077c22;
}

.checkout-steps .step.done span {
    background: #077c22;
    color: #fff;
}

.checkout-section {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 8px 24px rgba(13, 13, 13, 0.08);
    border: 1px solid #eef0f4;
}

.checkout-section h2 {
    color: #0d0d0d;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
    font-family: Poppins;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef0f4;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Lista de Produtos - Estilo Moderno */
#lista-produtos {
    margin-bottom: 15px;
}

.item-carrinho {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fafafa;
    border-radius: 16px;
    margin-bottom: 12px;
    gap: 12px;
    border: 1px solid #eef0f4;
    transition: all 0.2s;
}

.item-carrinho:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border-color: #e1e5ee;
}

.item-carrinho-imagem {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.item-carrinho-info {
    flex: 1;
    min-width: 0;
}

.item-carrinho-nome {
    font-weight: 600;
    color: #0d0d0d;
    margin-bottom: 4px;
    font-family: Poppins;
    font-size: 15px;
    line-height: 1.3;
}

.item-carrinho-preco {
    color: #077c22;
    font-size: 14px;
    font-weight: 600;
}

.item-carrinho-observacao {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-top: 4px;
}

.item-carrinho-quantidade {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e1e5ee;
    border-radius: 50px;
    padding: 4px 8px;
    height: 36px;
}

.qtde-btn {
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #676767;
    font-size: 18px;
    font-weight: bold;
    padding: 0;
    transition: all 0.2s;
}

.qtde-btn:hover {
    background: #f0f0f0;
    color: #0d0d0d;
}

.qtde-valor {
    min-width: 25px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    color: #0d0d0d;
}

.item-carrinho-total {
    font-weight: 700;
    color: #0d0d0d;
    min-width: 90px;
    text-align: right;
    font-family: Poppins;
    font-size: 16px;
}

.item-carrinho-remover {
    background: transparent;
    color: #ff4444;
    border: 1px solid #ff4444;
    padding: 6px 12px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 12px;
    font-family: Poppins;
    font-weight: 600;
    transition: all 0.2s;
}

.item-carrinho-remover:hover {
    background: #ff4444;
    color: white;
}

/* Total Section */
.total-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eef0f4;
    background: linear-gradient(180deg, #f8f9fb, #ffffff);
    margin: 20px -20px -20px -20px;
    padding: 20px;
    border-radius: 0 0 16px 16px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 16px;
    font-family: Poppins;
}

#total-final {
    font-size: 24px;
    color: #0d0d0d;
    font-weight: 900;
}

/* Formulário Moderno */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #0d0d0d;
    font-family: Poppins;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e1e5ee;
    border-radius: 12px;
    font-size: 16px;
    font-family: Poppins, sans-serif;
    box-sizing: border-box;
    transition: all 0.2s;
    background: #fafbff;
}

.form-group textarea {
    min-height: 90px;
    resize: vertical;
}

.form-group input[readonly] {
    background-color: #f8f8f8;
    cursor: not-allowed;
    color: #666;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0d0d0d;
    box-shadow: 0 0 0 3px rgba(13, 13, 13, 0.08);
    background: #ffffff;
}

.form-group input.error {
    border-color: #ff4444;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #077c22;
    font-weight: 500;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

/* Pagamento PIX - Estilo Moderno */
.pagamento-opcoes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pagamento-label {
    background: #d7fdd7;
    color: #077c22;
    padding: 8px 12px;
    border-radius: 20px;
    font-family: Poppins;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    width: fit-content;
}

.pagamento-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 1px solid #e1e5ee;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: Poppins;
    background: #fff;
    gap: 12px;
}

.pagamento-option:hover {
    border-color: #cfd6e3;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.pagamento-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

.pix-logo-small {
    width: 32px;
    height: auto;
    flex-shrink: 0;
}

.pagamento-option span {
    font-size: 16px;
    color: #0d0d0d;
    font-weight: 700;
}

.pagamento-option input[type="radio"]:checked + img + span {
    color: #0d0d0d;
}

.pagamento-option:has(input[type="radio"]:checked) {
    border-color: #0d0d0d;
    background: #f9fafc;
}

/* Botão Finalizar - Estilo Moderno */
.btn-finalizar {
    width: 100%;
    padding: 16px 24px;
    background: #0d0d0d;
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 25px;
    transition: all 0.3s;
    font-family: Poppins;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(13, 13, 13, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkout-summary-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    border-top: 1px solid #e8e8e8;
    box-shadow: 0 -10px 24px rgba(0,0,0,0.08);
    padding: 12px 16px;
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 999;
}

body.has-bottom-nav .checkout-summary-bar {
    bottom: 64px;
}

.checkout-summary-bar .summary-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: Poppins;
    flex: 1;
}

.checkout-summary-bar .summary-info span {
    font-size: 12px;
    color: #676767;
}

.checkout-summary-bar .summary-info strong {
    font-size: 18px;
    color: #0d0d0d;
}

.btn-finalizar-bar {
    padding: 12px 18px;
    background: #0d0d0d;
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 16px rgba(13, 13, 13, 0.25);
}

.btn-finalizar-bar:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-finalizar:hover {
    background: #1a1a1a;
    box-shadow: 0 6px 16px rgba(13, 13, 13, 0.4);
    transform: translateY(-2px);
}

.btn-finalizar:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(13, 13, 13, 0.3);
}

.btn-finalizar:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Modal de Sucesso */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-content {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-content h2 {
    color: #0d0d0d;
    margin-bottom: 20px;
    font-family: Poppins;
    font-weight: 900;
    font-size: 24px;
}

.modal-content p {
    margin-bottom: 15px;
    color: #676767;
    font-family: Poppins;
    line-height: 1.6;
}

.btn-voltar-inicio {
    padding: 14px 28px;
    background: #0d0d0d;
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 20px;
    font-family: Poppins;
    font-weight: 700;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(13, 13, 13, 0.3);
}

.btn-voltar-inicio:hover {
    background: #1a1a1a;
    box-shadow: 0 6px 16px rgba(13, 13, 13, 0.4);
    transform: translateY(-2px);
}

.carrinho-vazio {
    text-align: center;
    padding: 50px 20px;
    color: #676767;
    font-family: Poppins;
}

.carrinho-vazio h3 {
    margin-bottom: 15px;
    color: #0d0d0d;
    font-size: 20px;
    font-weight: 700;
}

.carrinho-vazio a {
    color: #0d0d0d;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 24px;
    background: #f0f0f0;
    border-radius: 50px;
    display: inline-block;
    margin-top: 15px;
    transition: all 0.2s;
}

.carrinho-vazio a:hover {
    background: #0d0d0d;
    color: white;
}

/* Responsivo Mobile - Full Responsive */
@media (max-width: 768px) {
    #checkout {
        padding: 10px 0;
        padding-bottom: 140px;
    }

    body.has-bottom-nav #checkout {
        padding-bottom: 210px;
    }

    .checkout-steps {
        border-radius: 12px;
        padding: 6px;
    }

    .checkout-steps .step {
        padding: 8px 6px;
        font-size: 11px;
    }

    .checkout-steps .step span {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .checkout-section {
        padding: 16px;
        border-radius: 12px;
        margin-bottom: 12px;
    }

    .checkout-section h2 {
        font-size: 18px;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .item-carrinho {
        flex-wrap: wrap;
        padding: 12px;
        gap: 10px;
        border-radius: 12px;
    }

    .item-carrinho-imagem {
        width: 60px;
        height: 60px;
        border-radius: 10px;
    }

    .item-carrinho-info {
        flex: 1;
        min-width: calc(100% - 140px);
    }

    .item-carrinho-nome {
        font-size: 14px;
    }

    .item-carrinho-preco {
        font-size: 13px;
    }

    .item-carrinho-quantidade {
        height: 32px;
        padding: 3px 6px;
        gap: 6px;
    }

    .qtde-btn {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }

    .qtde-valor {
        font-size: 14px;
        min-width: 20px;
    }

    .item-carrinho-total {
        width: 100%;
        text-align: left;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #e8e8e8;
        font-size: 16px;
        min-width: auto;
    }

    .item-carrinho-remover {
        padding: 6px 14px;
        font-size: 11px;
    }

    .total-section {
        margin: 16px -16px -16px -16px;
        padding: 16px;
        border-radius: 0 0 12px 12px;
    }

    .total-line {
        font-size: 15px;
        padding: 6px 0;
    }

    #total-final {
        font-size: 22px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px 14px;
        font-size: 16px;
        border-radius: 10px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 16px;
    }

    .pagamento-option {
        padding: 14px;
        border-radius: 10px;
    }

    .btn-finalizar {
        padding: 14px 20px;
        font-size: 15px;
        margin-top: 20px;
        border-radius: 50px;
    }

    .checkout-summary-bar {
        display: flex;
    }

    .modal-content {
        padding: 30px 20px;
        border-radius: 16px;
    }

    .modal-content h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .checkout-page header#topo .cover {
        height: 135px;
    }

    .checkout-page header#topo .borda {
        top: 85px;
        height: 50px;
    }

    .checkout-page header#topo .cover .logo {
        width: 84px;
        height: 84px;
        top: 28px;
        left: calc(50% - 42px);
    }
}

@media (min-width: 992px) {
    #checkout .container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        align-items: start;
    }

    #resumo-pedido {
        position: sticky;
        top: 90px;
    }
}

@media (max-width: 480px) {
    #checkout {
        padding: 8px 0;
        padding-bottom: 150px;
    }

    body.has-bottom-nav #checkout {
        padding-bottom: 220px;
    }

    .checkout-section {
        padding: 14px;
        border-radius: 10px;
    }

    .item-carrinho {
        padding: 10px;
    }

    .item-carrinho-imagem {
        width: 55px;
        height: 55px;
    }

    .item-carrinho-info {
        min-width: calc(100% - 130px);
    }

    .form-group input,
    .form-group textarea {
        padding: 12px;
        font-size: 16px; /* Evita zoom no iOS */
    }
}
