/* Estilos gerais para o corpo e cabeçalho */
body {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

header {
    padding: 5px 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header nav.menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

header nav.menu ul li {
    margin-right: 20px;
}

header nav.menu ul li:last-child {
    margin-right: 0;
}

header nav.menu ul li img {
    width: 60px;
    height: auto;
    vertical-align: middle;
}

header nav.menu ul li:nth-child(2) {
    font-size: 1.5em;
    font-weight: bold;
    margin-left: 10px;
}

header nav.menu ul li.lupa {
    cursor: pointer;
    margin-left: auto;
}

header nav.menu ul li:last-child {
    display: flex;
    align-items: center;
}

header nav.menu ul li:last-child img {
    width: 60px;
    margin-left: 15px;
}

header nav.menu ul li:last-child span#QTD_ITEM {
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 8px 12px;
    font-size: 0.9em;
    font-weight: bold;
    margin-left: 5px;
}

/* Estilos para o banner */
section.banner {
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

section.banner img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Estilos para as categorias */
section.categorias {
    padding: 5px 10px;
    margin-bottom: 8px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

section.categorias .menu-deslizante ul#ulMenuDeslizante {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    overflow-x: auto;
}

section.categorias .menu-deslizante ul#ulMenuDeslizante li {
    margin-right: 2px;
}

section.categorias .menu-deslizante ul#ulMenuDeslizante li:last-child {
    margin-right: 0;
}

section.categorias .menu-deslizante ul#ulMenuDeslizante li a {
    display: block;
    text-decoration: none;
    color: #007bff;
    border-radius: 5px;
    background-color: #e9ecef;
    white-space: nowrap;
}

section.categorias .menu-deslizante ul#ulMenuDeslizante li a:hover {
    background-color: #d3d7db;
}

/* Estilos para a seção principal do menu */
main {
    padding: 0 20px;
    margin-bottom: 70px;
}

main section {
    margin-bottom: 25px;
}

main section#menuD h2,
main section#menu h2 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

/* Estilos para o rodapé fixo */
footer {
    padding: 5px 10px;
}

footer div.d-flex {
    justify-content: space-around;
}

footer div.d-flex div.col {
    font-size: 1em;
    font-weight: bold;
}

/* Estilos para os modais (dialog) */
dialog {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    /* padding: 20px; */
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

dialog legend {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    display: block;
    width: 100%;
    text-align: center;
}

dialog button#btn-sair {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: #6c757d;
}

dialog button#btn-sair:hover {
    color: #dc3545;
}

dialog .form-group {
    margin-bottom: 15px;
}

dialog .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

dialog .form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}

dialog .btn-primary {
    background-color: #007bff;
    color: white;
}

dialog .btn-primary:hover {
    background-color: #0056b3;
}

dialog .btn-danger {
    background-color: #dc3545;
    color: white;
}

dialog .btn-danger:hover {
    background-color: #c82333;
}

dialog .minhalista table#tabelaMinhaLista thead th {
    background-color: #f0f0f0;
    padding: 10px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
}

dialog .minhalista table#tabelaMinhaLista tbody td {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

dialog .minhalista table#tabelaMinhaLista tfoot th {
    padding-top: 10px;
    font-weight: bold;
    text-align: left;
}

dialog .finalizarPedido p {
    text-align: center;
    margin-bottom: 20px;
}

dialog .finalizarPedido p button {
    padding: 12px 20px;
    margin: 0 10px;
    font-size: 1.1em;
}

dialog .finalizarPedCEP .d-flex {
    margin-bottom: 10px;
    align-items: center;
}

dialog .finalizarPedCEP label {
    font-weight: bold;
    color: #555;
    margin-right: 5px;
}

dialog .finalizarPedCEP .input-group {
    width: auto !important;
}

dialog .finalizarPedCEP .input-group-text {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
    cursor: pointer;
}

dialog .finalizarPedCEP .input-group-text:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Estilos para a tabela de busca */
dialog #modalPesquisa table#contact-detail thead th {
    background-color: #007bff;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    border-bottom: 2px solid #0056b3;
}

dialog #modalPesquisa table#contact-detail tbody td {
    padding: 8px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

dialog #modalPesquisa table#contact-detail tbody td:first-child {
    text-align: left;
}

dialog #modalPesquisa button#fecharModal {
    padding: 10px 20px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

dialog #modalPesquisa button#fecharModal:hover {
    background-color: #545b62;
}

#modalPesquisa {
    margin: auto;
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    #fecharModal {
        top: 5px;
        right: 5px;
        font-size: 0.8em;
        padding: 3px 7px;
    }
}

.login-container {
    width: 350px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    padding: 40px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.login-box .input-group {
    margin-bottom: 20px;
}

.login-box label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

.login-box input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.login-box button {
    width: 100%;
    padding: 10px;
    background-color: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-box button:hover {
    background-color: #764ba2;
}

.card-promocao {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    text-align: center;
}

.card-promocao img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.card-promocao h3 {
    font-size: 1.1em;
    margin-bottom: 8px;
    min-height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-promocao p {
    font-size: 1em;
    color: green;
    margin-bottom: 12px;
}

.card-promocao > div:nth-child(4) {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.card-promocao > div:nth-child(4) button {
    font-size: 1.2em;
    padding: 8px 15px;
    border-radius: 5px;
}

.card-promocao > div:nth-child(4) input {
    width: 50px;
    text-align: center;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #ccc;
    padding: 8px;
}

.card-promocao > button.btn-primary {
    width: 100%;
    padding: 12px 20px;
    font-size: 1.1em;
    border-radius: 5px;
    margin-top: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-promocao > button.btn-primary:hover {
    background-color: #0056b3;
}

#modalPedidos {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 80%;
    max-width: 600px;
}

#modalPedidos h1 {
    color: #333;
    margin-bottom: 20px;
}

#modalPedidos table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#modalPedidos th, #modalPedidos td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

#modalPedidos th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #555;
}

#modalPedidos tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

#modalPedidos button#fecharModal {
    background: none;
    border: none;
    color: #777;
    font-size: 1.2em;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#modalPedidos button#fecharModal:hover {
    opacity: 1;
    color: #333;
}

/* --- ESTILOS DO CHATBOT --- */

/* Contêiner principal do chatbot */
.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* Estilos da bolha do chat (quando minimizado) */
.chat-bubble {
    background-color: #007bff; /* Cor primária do Bootstrap */
    color: white;
    padding: 10px 15px;
    border-radius: 30px; /* Bordas arredondadas para parecer uma bolha */
    display: flex; /* Por padrão, a bolha é um flex container */
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease; /* Transição suave para o hover */
}

.chat-bubble:hover {
    background-color: #0056b3; /* Um tom mais escuro no hover */
    transform: translateY(-2px); /* Leve movimento para cima */
}

.chat-bubble .bubble-icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.chat-bubble .bubble-text {
    font-weight: bold;
    white-space: nowrap; /* Impede que o texto quebre linha */
}

.chat-bubble .close-bubble {
    font-size: 1.2rem;
    margin-left: 15px;
    cursor: pointer;
    opacity: 0.8;
}

.chat-bubble .close-bubble:hover {
    opacity: 1;
}

/* Estilos do cartão do chat (quando maximizado) */
.chat-card {
    width: 350px; /* Largura fixa para o chat */
    /*height: 500px; /* Altura fixa para o chat */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    overflow: hidden; /* Garante que o conteúdo não vaze */
    flex-direction: column; /* Para usar flexbox para o layout interno */
    display: none; /* POR PADRÃO, O CARTÃO FICA ESCONDIDO */
    max-height: 550px;
}

.chat-card .card-header {
    padding: 10px 15px;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #007bff; /* Garante que o cabeçalho tenha cor */
    color: white;
}

.chat-card .card-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #e9ecef;
    display: flex; /* Para alinhar as mensagens corretamente */
    flex-direction: column; /* Para que as mensagens se empilhem */
}

.chat-card .card-footer {
    padding: 10px 15px;
    border-top: 1px solid #dee2e6;
    background-color: #fff;
}

/* Estilos das bolhas de mensagem dentro do chat */
.message {
    padding: 8px 12px;
    border-radius: 15px;
    margin-bottom: 8px;
    max-width: 85%;
    word-wrap: break-word;
}

.bot-message {
    background-color: #f8f9fa;
    border: 1px solid #e2e6ea;
    align-self: flex-start;
    margin-right: auto;
}

.user-message {
    background-color: #d1e7dd;
    align-self: flex-end;
    margin-left: auto;
}

/* Ocultar scrollbar (opcional) */
.chat-body::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}
.chat-body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Regras principais para o estado minimizado e maximizado */

/* Quando o widget está minimizado: mostra a bolha, esconde o card */
.chatbot-widget.minimized .chat-bubble {
    display: flex; /* A bolha deve aparecer */
}

.chatbot-widget.minimized .chat-card {
    display: none; /* O card deve estar escondido */
}

/* Quando o widget está maximizado: mostra o card, esconde a bolha */
.chatbot-widget.maximized .chat-bubble {
    display: none; /* A bolha deve estar escondida */
}

.chatbot-widget.maximized .chat-card {
    display: flex; /* O card deve aparecer (usando flex para layout interno) */
}