/* ARQUIVO: public/style.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.4;
    -webkit-tap-highlight-color: transparent;
}

/* HEADER BASE */
header {
    background-color: #00609b;
    color: white;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 100;
}

.topo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.btn-toggle-menu {
    display: block;
    background: #004b7a;
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 14px;
    border-radius: 5px;
    font-size: 0.9em;
    cursor: pointer;
    min-height: auto;
}

/* REGRAS EXCLUSIVAS PARA CELULAR (Telas menores que 768px) */
@media (max-width: 767px) {
    .menu-botoes {
        display: none; /* Escondido por padrão no celular */
        flex-direction: column;
        gap: 8px;
        margin-top: 10px;
        width: 100%;
    }

    .menu-botoes.aberto {
        display: flex; /* Exibe ao clicar no botão Opções no celular */
    }

    .menu-botoes button {
        width: 100%;
        padding: 12px;
        font-size: 0.95em;
        text-align: center;
    }

    .painel {
        padding: 15px;
        display: flex;
        flex-direction: column; /* Produtos em cima, Carrinho embaixo no celular */
        gap: 20px;
    }
}

/* REGRAS EXCLUSIVAS PARA DESKTOP E TABLET (Telas de 768px ou mais) */
@media (min-width: 768px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .btn-toggle-menu {
        display: none; /* Oculta o botão Opções no PC */
    }

    .menu-botoes {
        display: flex; /* Exibe os botões sempre na horizontal no PC */
        flex-direction: row;
        gap: 8px;
        width: auto;
        margin-top: 0;
    }

    .menu-botoes button {
        width: auto;
        padding: 8px 14px;
        font-size: 0.9em;
    }

    .painel {
        padding: 20px;
        display: grid;
        grid-template-columns: 2fr 1fr; /* Lado a lado no PC */
        gap: 20px;
    }
}

/* COMPONENTES GERAIS */
button {
    background-color: #00609b;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    min-height: 44px;
}

button:active {
    transform: scale(0.98);
}

select, input {
    width: 100%;
    padding: 10px 12px;
    margin: 6px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #fff;
}

.area-pdv-produtos {
    width: 100%;
}

.caixa-lateral {
    width: 100%;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.grid-produtos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.btn-produto {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 8px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    word-break: break-word;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.btn-produto span {
    color: #2e7d32;
    font-weight: bold;
    margin-top: 4px;
}

.tabela-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}