/* Estilos Gerais */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Header */
header {
    background-color: #8B4513; /* Marrom para remeter ao açaí */
    color: white;
    padding: 10px 0;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

header p {
    margin: 5px 0 15px;
    font-size: 1.1em;
}

header nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

header nav a:hover {
    background-color: #A0522D;
}

/* Main Content */
main {
    padding-top: 20px;
}

main h2 {
    text-align: center;
    color: #8B4513;
    margin-bottom: 30px;
    border-bottom: 2px solid #8B4513;
    padding-bottom: 10px;
}

/* Categorias */
.categoria {
    margin-bottom: 40px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.categoria h3 {
    color: #A0522D;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    margin-top: 0;
}

/* Produtos Grid */
.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.produto-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: box-shadow 0.3s;
}

.produto-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.produto-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.produto-item h4 {
    margin: 10px 0 5px;
    color: #333;
}

.produto-item .descricao {
    font-size: 0.9em;
    color: #666;
    height: 3em; /* Limita a altura para manter o layout */
    overflow: hidden;
}

.produto-item .preco {
    font-weight: bold;
    color: #008000; /* Verde para o preço */
    font-size: 1.2em;
    margin: 10px 0;
}

.btn-pedir, .btn-adicionar, .btn-finalizar {
    background-color: #8B4513;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-pedir:hover, .btn-adicionar:hover, .btn-finalizar:hover {
    background-color: #A0522D;
}

/* Detalhe do Produto */
.produto-detalhe {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.produto-info {
    display: flex;
    gap: 30px;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 800px;
    width: 100%;
}

.produto-info img {
    width: 40%;
    max-width: 300px;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
}

.produto-info .detalhes {
    width: 60%;
}

.produto-info h3 {
    color: #A0522D;
}

.produto-info .preco {
    font-size: 1.5em;
    color: #008000;
    margin: 15px 0;
}

.opcoes-list {
    margin-top: 10px;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
}

.opcao-item {
    margin-bottom: 8px;
}

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

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

.form-group input[type="number"],
.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.btn-voltar {
    background-color: #6c757d;
}

.btn-voltar:hover {
    background-color: #5a6268;
}

/* Carrinho */
.carrinho-tabela {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.carrinho-tabela th, .carrinho-tabela td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.carrinho-tabela th {
    background-color: #8B4513;
    color: white;
}

.carrinho-total {
    text-align: right;
    font-size: 1.5em;
    margin-bottom: 30px;
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-remover {
    color: #dc3545;
    text-decoration: none;
    font-weight: bold;
}

.btn-remover:hover {
    text-decoration: underline;
}

.form-checkout {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto 30px;
}

.form-checkout h3 {
    text-align: center;
    color: #8B4513;
    margin-top: 0;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
    margin-top: 30px;
}

/* Responsividade */
@media (max-width: 768px) {
    .produtos-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .produto-info {
        flex-direction: column;
        align-items: center;
    }

    .produto-info img, .produto-info .detalhes {
        width: 100%;
        max-width: none;
    }

    .carrinho-tabela, .carrinho-tabela tbody, .carrinho-tabela td, .carrinho-tabela tr {
        display: block;
    }
    
    .carrinho-tabela thead {
        display: none;
    }

    .carrinho-tabela tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
    }

    .carrinho-tabela td {
        text-align: right;
        padding-left: 50%;
        position: relative;
    }

    .carrinho-tabela td::before {
        content: attr(data-label);
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        text-align: left;
    }
    
    .carrinho-tabela td:nth-of-type(1)::before { content: "Produto"; }
    .carrinho-tabela td:nth-of-type(2)::before { content: "Qtd"; }
    .carrinho-tabela td:nth-of-type(3)::before { content: "Preço Unitário"; }
    .carrinho-tabela td:nth-of-type(4)::before { content: "Subtotal"; }
    .carrinho-tabela td:nth-of-type(5)::before { content: "Ação"; }
}
