/* Estilos modernos para checkout - Sabor de Casa */

#checkout {
    padding: 20px 0;
    min-height: calc(100vh - 250px);
    padding-bottom: 120px;
    background: linear-gradient(180deg, #f8f9fc 0%, #f0f2f8 100%);
}

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: 8px;
    margin-bottom: 24px;
    padding: 8px;
    background: rgba(255,255,255,0.9);
    border-radius: 20px;
    border: 1px solid rgba(13,13,13,0.06);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    backdrop-filter: blur(8px);
}

.checkout-steps .step {
    flex: 1;
    text-align: center;
    padding: 14px 10px;
    border-radius: 14px;
    background: transparent;
    color: #8a8f98;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
}

.checkout-steps .step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8eaef;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 700;
    transition: all 0.3s ease;
}

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

.checkout-steps .step.active {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(13,13,13,0.25);
}

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

.checkout-steps .step.done {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #077c22;
}

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

.checkout-section {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(13, 13, 13, 0.08), 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid rgba(13,13,13,0.05);
    transition: box-shadow 0.3s ease;
}

.checkout-section:hover {
    box-shadow: 0 14px 48px rgba(13, 13, 13, 0.1), 0 4px 12px rgba(0,0,0,0.06);
}

.checkout-section h2 {
    color: #0d0d0d;
    margin-bottom: 22px;
    font-size: 18px;
    font-weight: 700;
    font-family: Poppins;
    padding-bottom: 14px;
    border-bottom: 2px solid #f0f2f7;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.3px;
}

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

.item-carrinho {
    display: flex;
    align-items: center;
    padding: 18px;
    background: linear-gradient(135deg, #fafbfd 0%, #f5f7fa 100%);
    border-radius: 18px;
    margin-bottom: 14px;
    gap: 14px;
    border: 1px solid rgba(13,13,13,0.06);
    transition: all 0.3s ease;
}

.item-carrinho:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: rgba(7,124,34,0.2);
    transform: translateY(-1px);
}

.item-carrinho-imagem {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 14px;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.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;
}

/* Limpar Carrinho */
.carrinho-acoes {
    margin: 16px 0;
    padding: 12px 0;
    border-top: 1px solid #f0f2f7;
}

.btn-limpar-carrinho {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    color: #6b7280;
    border: 1px solid #e4e7ed;
    border-radius: 12px;
    font-size: 14px;
    font-family: Poppins;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-limpar-carrinho:hover {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.btn-limpar-carrinho i {
    font-size: 14px;
}

/* Total Section */
.total-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #f0f2f7;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    margin: 24px -24px -24px -24px;
    padding: 24px;
    border-radius: 0 0 20px 20px;
}

.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: 10px;
    font-weight: 600;
    color: #1f2937;
    font-family: Poppins;
    font-size: 14px;
    letter-spacing: 0.2px;
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
}

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0d0d0d;
    box-shadow: 0 0 0 4px rgba(13, 13, 13, 0.06);
    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 iFood Pago */
.pagamento-opcoes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pagamento-ifood-style .pagamento-card {
    background: #f5f5f7;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #e8e8ed;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pagamento-ifood-style .ifood-pago-logo {
    display: block;
    height: 28px;
    width: auto;
    margin-bottom: 16px;
    object-fit: contain;
}

.pagamento-option.pagamento-pix-btn {
    position: relative;
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #e8e8ed;
    border: 1px solid #d8d8de;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: Poppins, sans-serif;
    gap: 14px;
}

.pagamento-option.pagamento-pix-btn:hover {
    background: #e0e0e5;
    border-color: #d0d0d5;
}

.pagamento-option.pagamento-pix-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pagamento-option.pagamento-pix-btn .pix-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.pagamento-option.pagamento-pix-btn .pix-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.pagamento-option.pagamento-pix-btn .pix-text {
    flex: 1;
    font-size: 17px;
    font-weight: 600;
    color: #0d0d0d;
    text-align: left;
}

.pagamento-option.pagamento-pix-btn .pix-selecionado {
    display: none;
    color: #077c22;
}

.pagamento-option.pagamento-pix-btn .pix-selecionado i {
    font-size: 14px;
}

.pagamento-option.pagamento-pix-btn.pix-clicado {
    background: #e8f5e9;
    border-color: #077c22;
    box-shadow: 0 0 0 1px rgba(7, 124, 34, 0.2);
}

.pagamento-option.pagamento-pix-btn.pix-clicado .pix-selecionado {
    display: block;
}

/* Botão Finalizar - Estilo Moderno */
.btn-finalizar {
    width: 100%;
    padding: 18px 28px;
    background: linear-gradient(135deg, #0d0d0d 0%, #1f1f1f 100%);
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 28px;
    transition: all 0.3s ease;
    font-family: Poppins;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 28px rgba(13, 13, 13, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.btn-finalizar:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(13, 13, 13, 0.35);
}

.checkout-summary-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(13,13,13,0.08);
    box-shadow: 0 -12px 32px rgba(0,0,0,0.1);
    padding: 14px 20px;
    display: none;
    align-items: center;
    gap: 16px;
    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: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: 991px) {
    #checkout .container {
        display: flex;
        flex-direction: column;
    }

    #checkout .checkout-steps {
        order: 1;
    }

    #resumo-pedido {
        order: 2;
    }

    #dados-cliente {
        order: 3;
    }
}

@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: 18px;
        border-radius: 16px;
        margin-bottom: 16px;
    }

    .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: 18px -18px -18px -18px;
        padding: 18px;
        border-radius: 0 0 16px 16px;
    }

    .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.pagamento-pix-btn {
        padding: 14px 16px;
        border-radius: 14px;
    }

    .pagamento-ifood-style .pagamento-card {
        padding: 16px;
    }

    .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;
        grid-template-areas:
            "steps steps"
            "formulario resumo";
        gap: 18px;
        align-items: start;
    }

    #checkout .checkout-steps {
        grid-area: steps;
    }

    #dados-cliente {
        grid-area: formulario;
    }

    #resumo-pedido {
        grid-area: resumo;
        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 */
    }
}
