/* --- ESTILO GERAL --- */
body { 
    margin: 0; padding: 0; 
    font-family: 'Segoe UI', sans-serif; 
    background-color: #fdf5f0; 
    color: #5d4037; 
    font-size: 1.1rem; 
    line-height: 1.6; 
}

/* --- CAPA E MENU --- */
.capa-container { width: 100%; border-bottom: 5px solid #a0522d; }
.capa-img { width: 100%; height: auto; display: block; }
.menu-categorias { display: flex; justify-content: center; gap: 15px; padding: 20px; flex-wrap: wrap; }
.item-cat { 
    text-decoration: none; color: #5d4037; background-color: #ffffff; 
    font-weight: bold; text-transform: uppercase; padding: 15px 20px; 
    border-radius: 12px; border: 2px solid #d7ccc8; width: 180px;
    display: flex; justify-content: center; align-items: center; text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); transition: 0.3s; font-size: 0.9rem;
}
.item-cat:hover { background-color: #a0522d; color: white; }

/* --- GRID DE CATEGORIAS (Corrigido para ficar como na sua foto) --- */
.grid-categorias { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 25px; 
    padding: 25px; 
    max-width: 800px; 
    margin: auto; 
}

.card-categoria { 
    background: white; 
    border-radius: 18px; 
    padding: 20px; 
    box-shadow: 0 5px 12px rgba(0,0,0,0.1); 
    text-decoration: none; 
    color: inherit; 
    transition: 0.3s;
    display: flex;
    flex-direction: column; /* Coloca a imagem em cima do texto */
    align-items: center;
    text-align: center;
}

.card-categoria:hover { transform: scale(1.02); border: 2px solid #a0522d; }

.card-categoria img { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
    border-radius: 12px; 
    margin-bottom: 15px; 
}

.info-cat h3 { margin: 0; font-size: 1.4rem; text-transform: uppercase; color: #4e342e; }
.info-cat p { margin: 8px 0; font-style: italic; color: #8d6e63; font-size: 1rem; }
.info-cat .preco { font-size: 1.2rem; font-weight: bold; color: #a0522d; margin-top: 10px; display: block; }

/* --- CARRINHO FLUTUANTE --- */
.carrinho-flutuante { 
    position: fixed; bottom: 25px; right: 25px; background: #25d366; color: white; 
    padding: 15px 25px; border-radius: 50px; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-weight: bold; font-size: 1.1rem; z-index: 1000;
}

/* --- RODAPÉ --- */
.rodape-divisor { border-top: 3px solid #a0522d; margin: 50px auto 30px auto; width: 80%; }
.rodape { padding-bottom: 40px; text-align: center; color: #5d4037; font-size: 0.9rem; }

/* --- DEMAIS SEÇÕES (Mantidas do seu código original) --- */
.secao-titulo { color: #5d4037; font-size: 1.8rem; margin: 40px 0 20px; display: flex; align-items: center; justify-content: center; }
.grid-formatos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; padding: 20px; }
.card-formatos { border: 2px solid #d7ccc8; border-radius: 15px; padding: 20px; text-align: center; cursor: pointer; }
.card-formatos.selecionado { border: 2px solid #a0522d; background-color: #fffaf9; }


/* --- LAYOUT DA PÁGINA DE BOLOS --- *//* --- LAYOUT ESTRUTURAL --- */
.container-bolos {
    display: flex; 
    gap: 40px; 
    padding: 20px;
    max-width: 1000px; 
    margin: 0 auto; 
    flex-wrap: wrap;
    /* Inverte a ordem para o resumo ficar na direita */
    flex-direction: row-reverse; 
}

/* Colunas */
.coluna-opcoes { flex: 2; min-width: 300px; }
.coluna-resumo { flex: 1; min-width: 300px; }

/* --- PAINEL DE RESUMO (DIREITA) --- */
.painel-resumo { 
    position: sticky; 
    top: 25px; 
    border: 1px solid #d7ccc8; 
    padding: 30px; 
    border-radius: 18px; 
    background: white; 
    color: #5d4037;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* --- VISIBILIDADE DAS SEÇÕES --- */
.secao-tamanhos, .secao-recheios { 
    display: none; 
    margin-top: 20px; 
}

/* --- ESTILOS DE COMPONENTES --- */
.secao-titulo { 
    color: #5d4037; 
    font-size: 1.5rem; 
    margin: 30px 0 15px; 
}

/* --- SUBTÍTULOS DAS CATEGORIAS DE RECHEIO (Tradicional / Frutas / Especiais) --- */
.subsecao-titulo {
    color: #a0522d;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 20px 0 12px;
    padding-left: 12px;
    border-left: 3px solid #d7ccc8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.secao-titulo + .subsecao-titulo {
    margin-top: 15px;
}

.grid-formatos, .grid-tamanhos, .grid-tags { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 15px; 
}

.card-formatos, .card-tamanho, .tag-recheio { 
    border: 2px solid #d7ccc8; 
    padding: 15px 25px; 
    border-radius: 12px; 
    cursor: pointer; 
    transition: 0.3s;
    background: #fff;
}

/* Card de tamanho agora com descrição + preço lado a lado */
.card-tamanho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.tamanho-desc {
    color: #5d4037;
}

/* --- PREÇO EM DESTAQUE --- */
.tamanho-preco {
    font-size: 1.35rem;
    font-weight: 800;
    color: #b8860b !important; /* dourado âmbar, harmoniza com o marrom/terracota */
    white-space: nowrap;
}

.preco-resumo {
    font-size: 1.3rem;
    font-weight: 800;
    color: #b8860b;
}

.card-formatos:hover, .card-tamanho:hover, .tag-recheio:hover {
    border-color: #a0522d;
}

/* Classe aplicada via JS ao clicar */
.selecionado { 
    border-color: #a0522d !important; 
    background-color: #fffaf9 !important; 
    font-weight: bold; 
    color: #a0522d;
}

/* Botão de pagamento */
.btn-pagar { 
    background: #a0522d; 
    color: white; 
    width: 100%; 
    padding: 15px; 
    border: none; 
    border-radius: 10px; 
    cursor: pointer; 
    margin-top: 20px; 
    font-size: 1.1rem;
}

/* Garante que o rodapé ocupe toda a largura disponível */
.rodape {
    width: 100%;
    text-align: center;
    padding: 40px 0;
    margin-top: 50px;
    background-color: #fdf5f0;
    /* Isso força o rodapé a ficar abaixo de qualquer elemento flex/grid */
    clear: both; 
    display: block; 
}

/* O divisor deve ocupar a largura total */
.rodape-divisor {
    border-top: 3px solid #a0522d;
    margin: 40px auto;
    width: 90%;
}

/* Responsividade para celular */
@media (max-width: 768px) {
    .container-bolos { flex-direction: column; }
    .painel-resumo { position: relative; }

    .card-tamanho {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Estilo para o Modal */
#modalResumo {
    display: none; 
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.7); 
    z-index: 10000;
}
.conteudo-modal {
    background: #fff; margin: 15% auto; padding: 20px; 
    width: 80%; max-width: 400px; border-radius: 10px;
    text-align: center;
}