/* =========================
   RESET GLOBAL
========================= */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    overflow: hidden; /* 🔥 remove scroll da tela */
}

/* =========================
   BODY
========================= */
body.modo-caixa {
    background: #111;
    color: #fff;
    text-align: center;

    /* 🔥 altura real (corrige bug mobile) */
    height: calc(var(--vh, 1vh) * 100);
}

/* =========================
   CONTAINER PRINCIPAL
========================= */
.caixa-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

/* =========================
   TÍTULO
========================= */
h1 {
    font-size: 20px;
    margin: 5px 0 10px;
}

/* =========================
   BOTÃO SCAN
========================= */
#btn-scan {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 10px;
}

/* =========================
   BOTÕES
========================= */
button {
    background: #28a745;
    border: none;
    padding: 14px;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
}

/* =========================
   INPUT MANUAL
========================= */
.linha-codigo {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#codigo-manual {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    text-align: center;
}

.btn-manual {
    padding: 10px;
}

/* =========================
   RESULTADO
========================= */
#resultado {
    margin: 10px 0;
}

/* =========================
   CARRINHO (ÁREA FLEX)
========================= */
#carrinho {
    flex: 1; /* 🔥 ocupa todo espaço disponível */
    display: flex;
    flex-direction: column;

    background: #222;
    border-radius: 10px;
    padding: 10px;

    overflow: hidden; /* 🔥 impede vazar */
}

/* TÍTULO CARRINHO */
#carrinho h2 {
    font-size: 16px;
    margin-bottom: 8px;
}

/* =========================
   LISTA (ÚNICO SCROLL)
========================= */
.lista-produtos {
    flex: 1;
    overflow-y: auto;
}

/* ITENS */
#carrinho li {
    font-size: 14px;
    padding: 6px 0;
    border-bottom: 1px solid #333;
}

/* =========================
   TOTAL
========================= */
#total {
    font-size: 18px;
    margin: 8px 0;
    font-weight: bold;
}

/* =========================
   FOOTER FIXO
========================= */
#pagamentos {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;

    background: #000;
    padding: 10px;

    display: flex;
    justify-content: center;

    z-index: 9999;
}

/* BOTÃO FINALIZAR */
.btn-pagamento {
    width: 100%;
    max-width: 400px;
    background: #007bff;
    font-size: 16px;
}

/* =========================
   ESCONDER ELEMENTOS OPENCART
========================= */
header,
#top,
.navbar,
.breadcrumb,
footer {
    display: none !important;
}

/* =========================
   POPUP
========================= */
.popup {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.popup-conteudo {
    background: #222;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 300px;
}

/* =========================
   INPUT GERAL
========================= */
input {
    padding: 10px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    width: 80%;
    text-align: center;
}
body.modo-caixa h1 {
    color: #fff !important;
}
body {
    touch-action: manipulation;
    overscroll-behavior: none;
}

html, body {
    height: 100%;
    overflow: auto;
}

<style>
.lista-produtos ul {
    text-align: left;
    padding-left: 10px;
}

.lista-produtos {
    text-align: left;
}


.lista-produtos li {
    text-align: left;
    font-family: monospace; /* estilo cupom */
    border-bottom: 1px dashed #ccc;
    padding: 5px 0;
}
#carrinho h2 {
    color: #fff;
}
#carrinho {
    background: #1e1e1e;
    padding: 10px;
    border-radius: 8px;
}

#scanner-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(var(--vh, 1vh) * 100);
    background: #000;
    z-index: 9999;
    display: none;
    overflow: hidden;
}

/* vídeo da câmera */
#scanner-container video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 🔥 resolve corte lateral */
}

/* canvas do quagga */
#scanner-container canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

</style>