/* --- Estilos Gerais --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    background-color: #fef9f8;
    color: #444;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Header --- */
header {
    text-align: center;
    padding: 20px;
    background-color: #f7e8e6;
    border-bottom: 1px solid #e0d8d7;
}

.logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 0 auto;
}

h1 {
    color: #6a4f4b;
    margin: 10px 0 5px 0;
    font-weight: 700;
}

header p {
    margin: 0;
    color: #8c7a77;
    font-style: italic;
    font-weight: 300;
}

/* --- Conteúdo Principal --- */
main {
    padding: 20px 15px 100px 15px; /* Espaço extra no final para o botão flutuante */
    max-width: 1200px;
    margin: 0 auto;
}

.categoria-titulo {
    color: #6a4f4b;
    border-bottom: 2px solid #f7e8e6;
    padding-bottom: 5px;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.6em;
}

/* --- Layout dos Produtos --- */
.categoria {
    display: grid;
    grid-template-columns: 1fr; /* 1 coluna em celulares */
    gap: 20px;
}

.produto {
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Garante que a imagem não vaze */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.produto:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.produto img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.produto h3 {
    margin: 15px 15px 5px 15px;
    color: #55423e;
    font-size: 1.2em;
    font-weight: 600;
}

.produto p {
    font-size: 0.9em;
    color: #666;
    flex-grow: 1;
    margin: 0 15px 15px 15px;
    font-weight: 300;
}

.preco-botao {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-top: 1px solid #f0f0f0;
}

.preco-botao span {
    font-size: 1.3em;
    font-weight: 700;
    color: #6a4f4b;
}

.add-btn {
    background-color: #b56576;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.2s;
    font-size: 0.9em;
}

.add-btn i {
    margin-right: 5px;
}

.add-btn:hover {
    background-color: #a05060;
}

/* --- Botão Flutuante do Carrinho --- */
#abrir-carrinho-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #6a4f4b;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 1em;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 998;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

#abrir-carrinho-btn:hover {
    transform: scale(1.05);
}

#abrir-carrinho-btn i {
    margin-right: 8px;
    font-size: 1.2em;
}

#contagem-carrinho {
    background-color: #b56576;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8em;
    margin-left: 10px;
    font-weight: 700;
}

/* --- Modal do Carrinho --- */
#modal-carrinho {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 999;
    display: none; /* Começa escondido */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#modal-carrinho.aberto {
    display: flex;
    opacity: 1;
}

#modal-conteudo {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#modal-carrinho.aberto #modal-conteudo {
    transform: scale(1);
}

#fechar-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1em;
    color: #888;
    line-height: 30px;
}
#fechar-modal-btn:hover {
    background: #e0e0e0;
}

#modal-conteudo h2 {
    color: #6a4f4b;
    margin-bottom: 20px;
    text-align: center;
}
#modal-conteudo h2 i {
    margin-right: 8px;
}

#carrinho {
    margin-bottom: 20px;
}

.item-carrinho {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.item-carrinho-info {
    flex-grow: 1;
}
.item-carrinho-info span {
    display: block;
    font-weight: 500;
}
.item-carrinho-info small {
    color: #777;
    font-weight: 300;
}

.remover-btn {
    background: none;
    border: none;
    color: #d9534f;
    cursor: pointer;
    font-size: 1.1em;
    margin-left: 10px;
}

#total {
    font-size: 1.3em;
    font-weight: 700;
    margin-top: 15px;
    text-align: right;
    color: #6a4f4b;
}

/* --- Formulário no Modal --- */
#form-pedido h3 {
    font-size: 1.2em;
    color: #55423e;
    margin-top: 20px;
    margin-bottom: 15px;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

#form-pedido label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #55423e;
    font-size: 0.9em;
}

#form-pedido input[type="text"],
#form-pedido select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
}

#btn-enviar {
    width: 100%;
    padding: 15px;
    background-color: #25D366;
    color: white;
    font-weight: 600;
    font-size: 1.1em;
    font-family: 'Poppins', sans-serif;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}
#btn-enviar i {
    margin-right: 8px;
}
#btn-enviar:hover {
    background-color: #1EAE56;
}

/* --- Notificação Toast --- */
.toast {
    position: fixed;
    bottom: -100px; /* Começa fora da tela */
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.9em;
    z-index: 1001;
    transition: bottom 0.5s ease-in-out;
}
.toast.show {
    bottom: 90px; /* Sobe para a tela */
}

/* --- Media Queries (Responsividade) --- */
@media (min-width: 600px) {
    .categoria {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .categoria {
        grid-template-columns: repeat(3, 1fr);
    }
}