body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-top: 20px;
}

.container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 600px;
}

section {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

section:last-child {
    border-bottom: none;
}

.hidden-section {
    display: none;
}

.active-section {
    display: block;
}

h1, h2 {
    color: #2c3e50;
    text-align: center;
}

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

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

.form-group input[type="text"] {
    width: calc(100% - 22px);
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    background-color: #3498db;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    display: block;
    width: 100%;
}

button:hover {
    background-color: #2980b9;
}

#botoesCategorias button {
    background-color: #ecf0f1;
    color: #2c3e50;
    margin-right: 5px;
    margin-bottom: 5px;
    width: auto; /* Override full width for category buttons */
    display: inline-block;
}

#botoesCategorias button.active {
    background-color: #3498db;
    color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.product-item {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.product-item h3 {
    margin-top: 0;
    color: #333;
}

.product-item p {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 10px;
}

.product-item input[type="number"] {
    width: 60px;
    padding: 5px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.product-item button {
    background-color: #2ecc71;
    font-size: 0.9em;
    padding: 8px 12px;
    width: auto; /* Override full width */
    display: inline-block;
}

.product-item button:hover {
    background-color: #27ae60;
}

#itensCarrinho .cart-item {
    border-bottom: 1px dashed #eee;
    padding: 10px 0;
}

#itensCarrinho .cart-item:last-child {
    border-bottom: none;
}

#infoLojistaCatalogo, #infoLojistaCarrinho {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 4px;
}

/* Responsividade */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr; /* Stack products on small screens */
    }

    #botoesCategorias button {
        width: calc(50% - 10px); /* Two buttons per row */
    }
}


/* Estilos para o Carrinho Flutuante */
#carrinhoFlutuanteContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

#btnToggleCarrinhoFlutuante {
    background-color: #e67e22; /* Cor laranja para destaque */
    color: white;
    padding: 12px 18px;
    border: none;
    border-radius: 25px; /* Botão mais arredondado */
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    width: auto; /* Ajustar largura ao conteúdo */
    display: block;
}

#btnToggleCarrinhoFlutuante:hover {
    background-color: #d35400;
}

#carrinhoFlutuanteConteudo {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.15);
    padding: 15px;
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    position: absolute;
    bottom: 65px; /* Acima do botão de toggle */
    right: 0;
}

#carrinhoFlutuanteConteudo h3 {
    margin-top: 0;
    color: #2c3e50;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

#itensCarrinhoFlutuante .cart-item-flutuante {
    font-size: 0.9em;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

#itensCarrinhoFlutuante .cart-item-flutuante:last-child {
    border-bottom: none;
}

#itensCarrinhoFlutuante p {
    margin: 5px 0;
}

#subtotalCarrinhoFlutuante {
    font-weight: bold;
    text-align: right;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 1.1em;
}

#btnVerCarrinhoCompleto {
    background-color: #3498db;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 15px;
    display: block;
    width: 100%;
}

#btnVerCarrinhoCompleto:hover {
    background-color: #2980b9;
}

/* Ajustes para o botão de ver carrinho original (se for mantido/adaptado) */
#btnVerCarrinho {
    /* display: none; /* Esconder o botão antigo se o flutuante for o principal */
    /* Ou estilizar para complementar */
}

/* Ajuste para o product-actions para melhor alinhamento */
.product-item .product-actions {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.product-item .product-actions input[type="number"] {
    width: 50px; /* Reduzir um pouco a largura */
    margin-right: 8px;
}

.product-item .product-actions button {
    padding: 8px 10px; /* Ajustar padding */
    font-size: 0.85em;
}

/* Esconder o botão de ver carrinho da seção catálogo, pois teremos o flutuante */
#secao-catalogo > button#btnVerCarrinho {
    display: none;
}


