/* --- ESTILO DOS MODAIS (CARRINHO E CHECKOUT) --- */
#modal-carrinho, #modal-checkout {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.8); 
    backdrop-filter: blur(10px); 
    z-index: 10000;
    justify-content: center; 
    align-items: center;
}

.modal-content { 
    background: #111111; 
    width: 90%; 
    max-width: 420px; 
    border-radius: 24px; 
    border: 1px solid #222; 
    padding: 30px; 
    text-align: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.titulo-modal {
    color: #10b981;
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

/* LISTA DE ITENS (CARRINHO E CHECKOUT) */
.carrinho-lista, .lista-itens-checkout { 
    max-height: 200px; 
    overflow-y: auto; 
    margin: 15px 0; 
    padding-right: 5px;
}

/* Custom Scrollbar */
.carrinho-lista::-webkit-scrollbar, .lista-itens-checkout::-webkit-scrollbar {
    width: 4px;
}
.carrinho-lista::-webkit-scrollbar-thumb, .lista-itens-checkout::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

/* CORREÇÃO DEFINITIVA: LINHA DO PEDIDO COM LIXEIRA FIXA */
.carrinho-item, .checkout-item-linha { 
    display: flex;
    align-items: center; 
    position: relative; /* Mantém a lixeira presa ao container */
    padding: 12px 45px 12px 15px; /* Espaço na direita reservado para a lixeira */
    background: rgba(255, 255, 255, 0.03); 
    margin-bottom: 8px; 
    border-radius: 12px; 
    border: 1px solid rgba(255,255,255,0.05);
    width: 100%;
    min-height: 45px;
    box-sizing: border-box;
}

.item-nome, .checkout-item-nome {
    color: #efefef;
    font-weight: 600;
    font-size: 13px;
    flex: 1; /* Faz o nome ocupar o espaço que sobrar */
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.item-preco, .checkout-item-preco {
    color: #10b981;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.remove-item {
    position: absolute; /* Tira do fluxo e prega na direita */
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.remove-item svg {
    fill: #ef4444;
    width: 18px;
    height: 18px;
}

/* BOTÃO VER MEU PEDIDO */
.btn-toggle-pedido {
    background: none;
    border: none;
    color: #10b981;
    font-size: 11px;
    cursor: pointer;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: inline-block;
    transition: 0.2s;
}

.btn-toggle-pedido:hover {
    opacity: 0.8;
}

/* FORMULÁRIO DE CHECKOUT */
.label-checkout { 
    display: block; 
    text-align: left; 
    font-size: 11px; 
    color: #777; 
    margin-bottom: 6px; 
    margin-top: 12px; 
    font-weight: 700; 
    padding-left: 2px;
    text-transform: uppercase;
}

.input-checkout { 
    width: 100%; 
    padding: 14px 16px; 
    background: #080808; 
    border: 1px solid #222; 
    color: #fff; 
    border-radius: 14px; 
    box-sizing: border-box; 
    font-size: 14px; 
    font-weight: 500; 
    outline: none; 
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: 0.3s;
}

.input-checkout:focus {
    border-color: #10b981;
    background: #0a0a0a;
}

.input-erro {
    border-color: #ef4444 !important;
}

.erro-msg {
    color: #ef4444;
    font-size: 10px;
    display: block;
    text-align: left;
    margin-top: 4px;
    font-weight: 600;
}

/* AVISO AMARELO */
.msg-aviso-amarela {
    background: rgba(251, 191, 36, 0.08);
    border: 1px dashed rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    padding: 12px;
    border-radius: 12px;
    font-size: 11px;
    margin: 20px 0;
    line-height: 1.4;
}

/* TOTAL */
.container-total-modal, .container-total-checkout {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 20px 0;
    padding-top: 15px;
    border-top: 1px solid #222;
}

.total-destaque {
    color: #10b981;
    font-size: 22px;
    font-weight: 800;
    margin-left: 5px;
}

/* ÁREA DO PIX */
.checkout-pix-area {
    text-align: center;
}

.container-valor-pix {
    margin-bottom: 20px;
}

.label-valor-pix {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.valor-pix-destaque {
    font-size: 28px;
    font-weight: 800;
    color: #10b981;
}

.qr-code-imagem {
    width: 180px;
    height: 180px;
    background: #fff;
    padding: 12px;
    border-radius: 18px;
    margin: 0 auto 15px;
    display: block;
}

.pix-codigo-box {
    background: #000;
    padding: 12px;
    border: 1px solid #222;
    margin-bottom: 15px;
    font-size: 10px;
    word-break: break-all;
    color: #666;
    border-radius: 10px;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-pagamento-box {
    margin: 20px 0;
    padding: 12px;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 12px;
    border: 1px dashed rgba(16, 185, 129, 0.3);
}

.texto-status-aguardando {
    font-size: 12px;
    color: #10b981;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
}

/* BOTÕES */
.acoes-modal { 
    display: flex; 
    gap: 12px; 
    margin-top: 10px; 
}

.btn-finalizar-modal { 
    flex: 1.3; 
    background: #10b981; 
    color: #fff; 
    border: none; 
    padding: 16px; 
    border-radius: 50px; 
    font-weight: 800; 
    cursor: pointer; 
    font-size: 13px; 
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: 0.3s;
}

.btn-finalizar-modal:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-voltar-modal { 
    flex: 1; 
    background: #222; 
    color: #aaa; 
    border: none; 
    padding: 16px; 
    border-radius: 50px; 
    font-weight: 700; 
    cursor: pointer; 
    font-size: 13px; 
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: 0.3s;
}

.btn-voltar-modal:hover {
    background: #2a2a2a;
    color: #fff;
}

.btn-cancelar-pix {
    margin-top: 10px;
    width: 100%;
}

.required-mark {
    color: #ef4444;
    margin-left: 2px;
}