html {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top, #f7eedc, #e6d3b1);
  color: #2c1d12;
  overflow-x: hidden;
}

/* HEADER */
header {
  background:
    linear-gradient(135deg, #7a0000 0%, #9d0000 55%, #5f0000 100%);
  color: white;
  padding: 28px 10px 18px;
  text-align: center;
  border-bottom: 4px solid #500000;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

/* ORGANIZAÇÃO DO HEADER */
.header-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.logo-img {
  max-width: 140px;
  height: auto;
  filter: drop-shadow(0px 4px 10px rgba(0,0,0,0.3));
}

.header-text h1 {
  margin: 0;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 1px;
  font-family: 'Playfair Display', serif;
}

.header-text p {
  margin-top: 8px;
  font-size: 16px;
  opacity: 0.95;
}

/* BADGES DO HEADER */
.hero-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.horario-badge {
  display: inline-block;
  margin-top: 10px;
  background: rgba(255,255,255,0.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  border: 1px solid rgba(255,255,255,0.25);
}

/* CATEGORIAS */
.categorias {
  display: flex;
  gap: 10px;
  padding: 12px 15px;
  background: #fdf2da;
  border-bottom: 2px solid #d8c3a2;
  overflow-x: auto;
  white-space: nowrap;
}

.categorias a {
  background: #7a0000;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
  transition: 0.2s;
}

.categorias a:hover {
  background: #a00000;
}

/* MAIN */
main {
  display: flex;
  gap: 20px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

.menu {
  flex: 2;
}

/* BUSCA */
#busca {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 14px 14px 42px;
  border-radius: 14px;
  border: 1px solid #bda98a;
  margin-bottom: 12px;
  font-size: 16px;
  background: #fff6e4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a0000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='20' y1='20' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 12px center no-repeat;
  background-size: 18px 18px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

.resultado-busca {
  display: none;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid #e5c483;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffaf2 0%, #fff6e4 100%);
  box-shadow: 0 6px 14px rgba(122, 0, 0, 0.08);
}

.resultado-busca.ativo {
  display: block;
}

.resultado-titulo {
  margin: 0 0 10px 0;
  color: #7a0000;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.resultado-vazio {
  margin: 0;
  color: #7a0000;
  font-weight: 700;
}

/* TITULO CATEGORIA */
.tituloCategoria {
  background: #7a0000;
  color: white;
  padding: 12px 15px;
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 6px;
  margin-top: 25px;
  cursor: pointer;
  border-bottom: 4px solid #500000;
  transition: 0.2s;
}

.tituloCategoria:hover {
  background: #8f0000;
}

/* SETA */
.seta {
  float: right;
  transition: transform 0.3s ease;
}

.tituloCategoria.ativo .seta {
  transform: rotate(180deg);
}

/* PRODUTOS COM ANIMAÇÃO */
.produtos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 15px;

  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 10px;

  transition: max-height 0.5s ease, opacity 0.3s ease, padding 0.3s ease;
}

.produtos.ativo {
  max-height: 10000px;
  opacity: 1;
  padding: 12px 10px;
}

/* CARD */
.card {
  background: linear-gradient(180deg, #fffaf2 0%, #fff6e4 100%);
  padding: 15px;
  border-radius: 14px;
  border: 1px solid #d8c3a2;
  box-shadow: 0px 6px 14px rgba(0,0,0,0.12);
  transition: 0.2s;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 120px;
  height: 120px;
  background: rgba(122, 0, 0, 0.06);
  border-radius: 50%;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0px 6px 14px rgba(0,0,0,0.18);
}

.tag-popular {
  display: inline-block;
  margin-bottom: 6px;
  background: #fff2d4;
  color: #7a0000;
  border: 1px solid #e5c483;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card h4 {
  margin: 0;
  font-size: 18px;
  color: #2c1d12;
}

.card p {
  margin: 6px 0;
}

.descricao {
  font-size: 13px;
  opacity: 0.85;
  line-height: 1.4;
}

/* BOTÃO */
.card button {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #7a0000;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.card button:hover {
  background: #a00000;
}

/* CARRINHO */
.carrinho {
  flex: 1;
  background: #fff6e4;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #d8c3a2;
  box-shadow: 0px 2px 10px rgba(0,0,0,0.15);
  height: fit-content;
  position: sticky;
  top: 15px;
}

/* CARRINHO VAZIO */
.carrinho-vazio {
  background: #f3e7d1;
  border: 1px dashed #bda98a;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  font-weight: bold;
  opacity: 0.9;
}

.carrinho-vazio span {
  display: block;
  font-size: 32px;
  margin-bottom: 8px;
}

.total {
  margin-top: 12px;
  font-size: 18px;
  font-weight: bold;
  background: #f3e7d1;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #d8c3a2;
  display: flex;
  justify-content: space-between;
}

/* INPUTS */
input, textarea, select {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid #bda98a;
  background: #fffaf0;
  font-size: 14px;
}

textarea {
  height: 80px;
  resize: none;
}

/* TAXA INFO */
.taxa-info {
  font-size: 13px;
  margin-top: 10px;
  background: #f3e7d1;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid #d8c3a2;
}

/* VALIDAÇÃO CUSTOMIZADA */
input.erro, textarea.erro, select.erro {
  border: 2px solid #d32f2f !important;
  background-color: #ffebee !important;
}

.erro-msg {
  color: #d32f2f;
  font-size: 12px;
  margin-top: 4px;
  font-weight: bold;
  display: none;
}

.erro-msg.ativo {
  display: block;
}

/* BOTÃO FINALIZAR */
.btn-finalizar {
  width: 100%;
  margin-top: 15px;
  padding: 12px;
  background: green;
  color: white;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-finalizar:hover {
  background: darkgreen;
}

.btn-limpar {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: #7a0000;
  color: white;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}

.btn-limpar:hover {
  background: #0a7105;
}

/* TOTAL DO CARRINHO */
.totalBox {
  margin-top: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f3e7d1;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #d8c3a2;
  font-weight: bold;
}

/* ITENS CARRINHO */
#itensCarrinho .itemCarrinho {
  background: #f3e7d1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #d8c3a2;
  margin: 10px 0;
  display: grid;
  gap: 10px;
}

#itensCarrinho .itemCarrinho .preco {
  display: block;
  font-weight: bold;
  color: #7a0000;
}

#itensCarrinho .itemCarrinho.taxaEntrega {
  background: #fff2d4;
  border-color: #e0c49d;
}

.controlesQtd {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* BOTÕES + - */
.btnQtd {
  background: #7a0000;
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}

.btnQtd:hover {
  background: #a00000;
}

.qtd {
  margin: 0 8px;
  font-weight: bold;
  font-size: 16px;
}

/* NOTIFICAÇÃO TOPO FAIXA */
.toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  background: #7a0000;
  color: white;
  padding: 16px;
  font-weight: bold;
  text-align: center;

  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;

  transition: 0.4s ease;
  z-index: 9999;

  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;

  box-shadow: 0px 6px 15px rgba(0,0,0,0.3);
}

.toast.mostrar {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* BOTÃO SUBIR TOPO */
#scrollTopBtn {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  background: linear-gradient(145deg, #8a0000, #6e0000);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

#scrollTopBtn:hover {
  transform: translateY(-2px) scale(1.03);
  background: linear-gradient(145deg, #a00000, #7a0000);
  box-shadow: 0 14px 28px rgba(0,0,0,0.32);
}

#scrollTopBtn:active {
  transform: translateY(0) scale(0.98);
}

@media (max-width: 768px) {
  #scrollTopBtn {
    bottom: 14px;
    right: 14px;
    width: 48px;
    height: 48px;
    font-size: 18px;
  }
}
/*adicionais sobremesas*/
.modal{
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);

    display: none;
    justify-content: center;
    align-items: center;

    z-index: 9999;
}

.modal.ativo{
    display: flex
    ;
}

.modalConteudo{
    background: #bda98a;
    padding: 25px;
    border-radius: 20px;
    width: 320px;
    color: black;
}

.modalConteudo h2{
    margin-bottom: 20px;
}

#listaAdicionais {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 8px;
}

#listaAdicionais::-webkit-scrollbar {
    width: 8px;
}

#listaAdicionais::-webkit-scrollbar-track {
    background: #f0e4cc;
    border-radius: 10px;
}

#listaAdicionais::-webkit-scrollbar-thumb {
    background: #d8c3a2;
    border-radius: 10px;
}

#listaAdicionais::-webkit-scrollbar-thumb:hover {
    background: #bda98a;
}

#listaSabores {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 8px;
}

#listaSabores::-webkit-scrollbar {
    width: 8px;
}

#listaSabores::-webkit-scrollbar-track {
    background: #f0e4cc;
    border-radius: 10px;
}

#listaSabores::-webkit-scrollbar-thumb {
    background: #d8c3a2;
    border-radius: 10px;
}

#listaSabores::-webkit-scrollbar-thumb:hover {
    background: #bda98a;
}

.categoria-header {
    margin-top: 15px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #7a0000;
}

.categoria-header h3 {
    margin: 0;
    font-size: 16px;
    color: #7a0000;
    font-weight: bold;
}

.categoria-header h3:first-child {
    margin-top: 0;
}

.modalConteudo label{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #d8c3a2;
    transition: all 0.2s;
    user-select: none;
    background: #fff6e4;
}

.modalConteudo label:hover{
    background: #f0e4cc;
    border-color: #bda98a;
}

.adicional-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.adicional-nome {
    font-weight: bold;
    font-size: 15px;
    color: #2c1d12;
}

.modalConteudo input[type="checkbox"] {
    margin-right: 0;
    margin-left: 10px;
    cursor: pointer;
    accent-color: #7a0000;
    flex-shrink: 0;
}

.modalConteudo input[type="checkbox"]:checked + *,
.modalConteudo label:has(input[type="checkbox"]:checked) {
    background: #e8d4b8;
    border-color: #7a0000;
    font-weight: bold;
}

.modalConteudo input[type="radio"] {
    margin-right: 0;
    margin-left: 10px;
    cursor: pointer;
    accent-color: #7a0000;
    flex-shrink: 0;
}

.modalConteudo label:has(input[type="radio"]:checked) {
    background: #e8d4b8;
    border-color: #7a0000;
    font-weight: bold;
}

.sabor-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.sabor-nome {
    font-weight: bold;
    font-size: 15px;
    color: #2c1d12;
}

.modalConteudo button{
    margin-top: 15px;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-modal-confirmar {
    background: #7a0000;
    color: white;
    margin-bottom: 8px;
}

.btn-modal-confirmar:hover {
    background: #008c57;
}

.btn-modal-fechar {
    background: #999999;
    color: white;
}

.btn-modal-fechar:hover {
    background: #777777;
}

/* IMAGENS DOS PRODUTOS */
.card-imagem {
  width: 100%;
  height: 200px;
  background: #f0e4cc;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -15px 0 15px 0;
  transition: 0.3s ease;
}

.card-imagem:hover {
  transform: scale(1.05);
  filter: brightness(0.9);
}

.card-imagem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: 0.3s ease;
}

.card-imagem:hover img {
  transform: scale(1.1);
}

/* MODAL DE IMAGEM AMPLIADA */
.modal-imagem {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 20px;
}

.modal-imagem.ativo {
  display: flex;
}

.modal-imagem-conteudo {
  position: relative;
  background: white;
  border-radius: 16px;
  padding: 30px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.btn-fechar-imagem {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #7a0000;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-fechar-imagem:hover {
  background: #a00000;
}

.modal-imagem-conteudo img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 15px;
  max-height: 500px;
  object-fit: contain;
}

.modal-imagem-conteudo h2 {
  margin: 0;
  font-size: 24px;
  color: #2c1d12;
  text-align: center;
}

/* RESPONSIVO */
@media (max-width: 768px) {
  main {
    flex-direction: column;
    padding: 12px;
    gap: 14px;
  }

  .menu,
  .carrinho {
    width: 100%;
    min-width: 0;
  }

  .carrinho {
    position: static;
    padding: 14px;
  }

  .produtos.ativo {
    max-height: none;
    overflow: visible;
  }

  header h1 {
    font-size: 30px;
  }

  .header-inner {
    flex-direction: column;
  }

  .header-text h1 {
    font-size: 28px;
  }

  .tituloCategoria {
    font-size: 18px;
    padding: 10px 12px;
  }

  .produtos {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 8px 0;
  }

  .card {
    padding: 12px;
  }

  .card-imagem {
    height: 180px;
    margin: -12px 0 12px 0;
  }
}