html, body{
  font-family: Arial, Helvetica, sans-serif;
  padding: 5px;
  margin: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background-size: 25px;
}

:root {
  --cor-primaria: #ff0000;
  --cor-primariahover: #aa0505;
  --cor-secundaria: #fbff00;
  --cor-secundariahover: gold;
  --cor-branca: #f0f0f0;
  --cor-preta: #333;
  --contrast-primaria: oklch(from var(--cor-primaria) clamp(0, (0.7 - l) * 100, 100) 0 0);
  --contrast-secundaria: oklch(from var(--cor-secundaria) clamp(0, (0.7 - l) * 100, 100) 0 0);
}


/* Esta fórmula mágica decide entre preto ou branco baseada na luminância (l) */
.contrast-color-primaria {
  background-color: var(--cor-primaria);
  /* Se L (luminosidade) > 0.5, usa preto (#333); senão, branco (#fff) */
  color: oklch(from var(--cor-primaria) clamp(0, (0.7 - l) * 100, 100) 0 0);
}

.contrast-color-secundaria {
  background-color: var(--cor-secundaria);
  /* Se L (luminosidade) > 0.5, usa preto (#333); senão, branco (#fff) */
  color: oklch(from var(--cor-secundaria) clamp(0, (0.7 - l) * 100, 100) 0 0);
}

button {
  font-weight: bold;
  border: none;
  border-radius: 10px;
}
 
#caixaVerde {
  background-color: lightgreen;
  justify-content: space-around;
  display: flex;
  padding: 5px;
  border-radius: 10px;
}

#caixaVerde span {
  font-weight: bold;
  border: none;
  border-radius: 10px;
}

@keyframes fadeIn { from {opacity:0;} to {opacity:1;} }

#logando {
  width: max-content;
  justify-content: center;
  margin-top: 10px;
  background-color: var(--cor-secundaria);
  display: grid;
  padding: 10px;
  border-radius: 10px;
  margin-top: 15%;
}
#img-logo{
  max-width: 250px;
  margin: 20px;
}
 /* 🔴 Fundo geral */
  #containerLoginCadastro {
    background: linear-gradient(180deg, var(--cor-primaria), var(--cor-primariahover));
    height: 100vh;
    display: grid;
    justify-content: center;
    align-items: center;
    font-family: "Poppins", sans-serif;
  }

  /* 🟡 Formulário base */
  #containerLoginCadastro div {
    background-color: var(--cor-secundaria);
    border-radius: 15px;
    padding: 30px 35px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 360px;
    text-align: center;
    transition: all 0.3s ease;
  }

  #toggleSenhaLogin {
    position: absolute;
    margin-top: 25px;
    margin-left: 5px;
    color: red;
    font-size: 20px;
  }

  #toggleSenhaCadastro {
    position: absolute;
    margin-top: 25px;
    margin-left: 5px;
    color: red;
    font-size: 20px;
  }

  #containerLoginCadastro h3 {
    color: #c40000;
    margin-bottom: 20px;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
  }

  /* 🧾 Campos de entrada */
  #containerLoginCadastro input,
  #containerLoginCadastro select {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 2px solid #ffd633;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    background-color: white;
    transition: 0.2s;
    box-sizing: border-box;
  }

  #containerLoginCadastro input:focus,
  #containerLoginCadastro select:focus {
    border-color: #ff6600;
    box-shadow: 0 0 6px #ff6600;
  }

  /* 🔘 Botões */
  #containerLoginCadastro button {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background-color: #ff0000;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
  }

  #containerLoginCadastro button:hover {
    background-color: #cc0000;
    transform: scale(1.03);
  }

  /* 🔗 Links e texto */
  #containerLoginCadastro p {
    margin-top: 15px;
    color: #333;
    font-size: 0.9rem;
  }

  #containerLoginCadastro a {
    color: #ff0000;
    font-weight: bold;
    text-decoration: none;
  }

  #containerLoginCadastro a:hover {
    text-decoration: underline;
  }

  /* ✨ Animação suave de transição */
  #loginForm,
  #cadastroForm {
    animation: fadeIn 0.4s ease;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
  }

  /* 📱 Responsivo */
  @media (max-width: 480px) {
    #containerLoginCadastro div {
      padding: 25px;
      max-width: 90%;
    }

    #containerLoginCadastro h3 {
      font-size: 1.2rem;
    }
  }

#cabecalho {
  margin-top: 10px;
  background-color: var(--cor-primaria);
  justify-content: space-around;
  display: flex;
  padding: 10px;
  border-radius: 10px;
  max-height: 110px;
}

#cabecalho-img {
  min-width: 50px;
  min-height: auto;
  max-width: 75px;
  max-height: auto;
  margin: auto;
  padding: 10px;
  border-radius: 25px;
}

#bi-bag-fill {
  margin: auto;
}

#indicador-cliente {
  background-color: green;
  margin-top: 10px;
  text-align: center;
  color: white;
}

/* 🔘 Botões de abrir/fechar menu */
.menu-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  transition: transform 0.3s;
}

.menu-btn:hover {
  transform: scale(1.1);
}

/* Botão dentro do menu lateral */
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
}

/* 🎬 MENU LATERAL */
#sidebar {
  position: fixed;
  left: -260px;
  top: 0;
  width: 250px;
  height: 100%;
  background-color: var(--cor-secundaria);
  color: black;
  transition: left 0.3s ease;
  z-index: 1000;
  padding-top: 50px;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
}

#sidebar.active {
  left: 0;
}

/* Header do menu */
.sidebar-header {
  text-align: center;
  padding: 10px;
  position: relative;
  margin: 5px;
  border-radius: 10px;
}


#menu-logo {
  width: 80px;
  border-radius: 50px;
  margin-top: 10px;
}

/* Itens do menu */
#sidebar ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

#sidebar ul li {
  padding: 10px 20px;
}

#sidebar ul li a {
  color: black;
  text-decoration: none;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.3s;
}

#sidebar ul li a:hover {
  background-color: gray;
  border-radius: 8px;
}
/* 🌑 Fundo escurecido com blur */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 900; /* abaixo do sidebar (1000) */
}

#overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 🔥 Ajuste leve no menu para aparecer acima do overlay */
#sidebar {
  z-index: 1001;
}

#banner-slider {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: auto;
  margin: 15px auto;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  background: #fff;
}

#banner-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1s ease-in-out;
  border-radius: 15px;
}

#banner-dots {
  position: absolute;
  bottom: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.banner-dot {
  width: 10px;
  height: 10px;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
}

.banner-dot.active {
  background-color: var(--cor-primaria);
  transform: scale(1.3);
}
/* 🟡🔴 Container do expediente */
#expediente-container {
  width: 90%;
  max-width: 800px;
  margin: 15px auto;
  padding: 10px;
  border-radius: 15px;
  text-align: center;
  background-color: var(--cor-secundaria);
  color: black;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#expediente-container h4 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

#expediente-container p {
  margin: 5px 0;
  font-size: 1rem;
}

/* 🔍 Campo de busca */
#pesquisa-produto {
  width: 90%;
  max-width: 500px;
  margin: 10px auto;
  display: block;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid red;
  font-size: 1rem;
}

/* 🟡 Lista de categorias (scroll horizontal) */
.scroll-categorias {
  width: 90%;
  max-width: 600px;
  justify-content: space-around;
  background-color: var(--cor-secundaria);
  display: flex;
  overflow-x: auto;
  padding: 10px;
  gap: 10px;
  border-radius: 10px;
}

.scroll-categorias button {
  background-color: var(--cor-secundaria);
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}

.btn-categoria {
  border-radius: 8px;
  padding: 8px 14px;
  margin: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-categoria:hover {
  background: var(--cor-secundariahover);
}

.btn-categoria.ativo {
  background: var(--cor-secundariahover);
  color: green;
  border-color: yellow;
  font-weight: bold;
}

/* 🧾 Sheet Bar */
#sheetBar {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  background-color: var(--cor-secundaria);
  font-weight: bold;
  box-shadow: 0 -5px 15px rgba(0,0,0,0.3);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  transition: bottom 0.3s ease-in-out;
  z-index: 9999;
}

#sheetBar.active {
  bottom: 0;
}

#sheetContent {
  padding: 20px;
  text-align: center;
}

#sheetContent img {
  max-width: 200px;
  border-radius: 10px;
  margin-bottom: 10px;
}

#fecharSheet {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 1.8rem;
  cursor: pointer;
  font-weight: bold;
}

/* Estilos para os Grupos de Complementos no Modal */
.grupo-container {
  border-bottom: 8px solid #f2f2f2; /* Separador grosso estilo iFood */
  padding: 15px 0;
}
.grupo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  margin-bottom: 10px;
}
.grupo-titulo { font-weight: bold; font-size: 16px; color: #333; margin: 0; }
.grupo-regras { font-size: 12px; color: #666; }
.badge-obrig { background: #333; color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: bold; text-transform: uppercase; }

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}
.item-row:last-child { border-bottom: none; }
.item-info { flex: 1; display: flex; flex-direction: column; }
.item-nome { font-size: 14px; color: #333; }
.item-desc { font-size: 12px; color: #999; margin-top: 2px; }
.item-preco { font-size: 14px; color: #333; font-weight: 600; margin-top: 4px; }
.item-img { width: 50px; height: 50px; border-radius: 5px; object-fit: cover; margin-right: 15px; }

/* Custom Checkbox/Radio */
.check-custom {
  width: 20px; height: 20px;
  border: 2px solid #ccc;
  border-radius: 50%; /* Redondo por padrão */
  display: flex; align-items: center; justify-content: center;
  margin-left: 10px;
}
.check-custom.active { border-color: #28a745; background: #28a745; }
.check-custom.active::after { content: '✔'; color: white; font-size: 12px; }
/* Se for checkbox multiplo, deixa quadrado */
.check-square { border-radius: 4px; }

#btnAdicionarCarrinho {
  background-color: red;
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-weight: bold;
  margin-top: 10px;
  cursor: pointer;
}
#btnShareProduto {
  background-color: white;
  color: black;
  padding: 10px;
  border-radius: 50px;
  border: none;
  font-weight: bold;
  margin-top: 10px;
  margin-left: 15px;
  cursor: pointer;
}
#btnFavoritarProduto {
  background-color: white;
  color: black;
  padding: 10px;
  border-radius: 50px;
  border: none;
  font-weight: bold;
  margin-top: 10px;
  margin-left: 15px;
  cursor: pointer;
}
.hidden {
  display: none;
}
#iconeBagContainer {
  position: relative;
  margin: auto;
}

#iconeBag {
  font-size: 24px;color: var(--contrast-primaria);
  border-radius: 50%;
  padding: 2px 6px;
  min-width: 20px;
  text-align: center;
  top: -5px;
  right: -8px;
}

#badgeCarrinho {
  position: absolute;
  top: -5px;
  right: -8px;
  background: lightgreen;
  color: black;
  font-size: 14px;
  border-radius: 50%;
  padding: 2px 6px;
  min-width: 20px;
  text-align: center;
}

#favoritos-container ul li:hover {
  background-color: #fff59d;
  transition: 0.2s;
}

/* === MODAL DO CARRINHO === */
#carrinhoContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#carrinhoBox {
  background: white;
  width: 90%;
  max-width: 400px;
  max-height: 80vh; /* altura máxima visível */
  border-radius: 15px;
  padding: 20px;
  overflow-y: auto; /* ativa o scroll vertical */
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  position: relative;
}

#carrinhoBox::-webkit-scrollbar {
  width: 6px;
}
#carrinhoBox::-webkit-scrollbar-thumb {
  background: red;
  border-radius: 10px;
}

#fecharCarrinho {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.8rem;
  cursor: pointer;
  color: red;
}

#listaCarrinho {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

#listaCarrinho li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
  padding: 10px 0;
}

#listaCarrinho img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

#totalCarrinhoContainer {
  margin-top: 15px;
  font-size: 1.2em;
  text-align: right;
}

#btnIrPagamento {
  background: red;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px;
  width: 100%;
  font-weight: bold;
  margin-top: 10px;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* === MODAL CHECKOUT === *//* container branco do mapa */
.box {
  background: #fff;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 0 10px #ccc;
  max-width: 100%;
  margin: 10px auto;
  box-sizing: border-box;
}

/* mapa responsivo */
#map {
  width: 100%;
  height: 250px; /* ajuste ideal */
  border-radius: 10px;
  overflow: hidden;
}
#checkoutContainer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.leaflet-routing-container {
    display: none !important;
}

#checkoutContainer.hidden {
  display: none;
}

#checkoutBox {
  width: 90%;
  max-width: 500px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  color: #333;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  position: relative;
  animation: slideUp 0.3s ease;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#checkoutBox .fechar {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 22px;
  cursor: pointer;
  color: #f00;
}

.checkout-section {
  margin-bottom: 20px;
}

.checkout-section input, 
.checkout-section select {
  width: 100%;
  margin: 6px 0;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.checkout-section button {
  margin-top: 5px;
}
/* aparência quando bloqueado */
.expediente-bloqueado {
  opacity: 0.5;
  pointer-events: none; /* evita cliques */
  filter: grayscale(0.2);
}

/*modal perfil do cliente*/


  .hidden{display:none}
  .modal{position:fixed;inset:0;background:rgba(0,0,0,.4);display:flex;align-items:center;justify-content:center;z-index:9999}
  .modal-content{width:95%;max-width:420px;background:#fff;border-radius:12px;padding:20px;box-shadow:0 10px 30px rgba(0,0,0,.15)}
  .modal-content h2{margin:0 0 12px}
  .modal-content label{display:block;font-size:14px;color:#333;margin:10px 0 4px}
  .modal-content input{width:100%;padding:10px;border:1px solid #ddd;border-radius:8px}
  .actions{display:flex;gap:10px;margin-top:14px}
  .actions button{flex:1;padding:12px;border:none;border-radius:8px;background:#18a558;color:#fff;cursor:pointer}
  .actions .secundario{background:#f0f0f0;color:#333}

/*responsivo*/
@media screen and (max-width: 400px) {
  
}
