body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f4f4;
}

header {
  background: #008cba;
  color: white;
  padding: 0;
  text-align: center;
}

.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1rem 0.4rem;
  background: #008cba;
  color: white;
  text-align: center;
}

#titulo {
  font-size: 1.3rem;
  line-height: 1.6rem;
  margin: 0;
}

#idiomas {
  margin-top: -1.5rem;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  width: 100%;
}

#idiomas button {
  font-size: 12px;
  background: white;
  color: #008cba;
  border: none;
  border-radius: 6px;
  padding: 3px 6px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

#idiomas button:hover {
  background: #f2f2f2;
}

.categorias {
  display: flex;
  overflow-x: auto;
  padding: 1rem;
  gap: 1rem;
  background: #e6e6e6;
  border-bottom: 1px solid #ccc;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.categoria {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.3s ease;
}

.categoria.active {
  background: #008cba;
  color: white;
  font-weight: bold;
}

.produtos {
  padding: 1rem 1rem 14rem 1rem;
  width: 100%;
  box-sizing: border-box;
}

.produto {
  border: 1px solid #ddd;
  padding: 1rem;
  background: white;
  border-radius: 10px;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.produto.adicionado {
  background: #d4edda !important;
}

.produto-info {
  flex: 1;
}

.produto-info strong {
  display: block;
  font-size: 16px;
}

.produto-info small {
  display: block;
  color: #555;
  font-size: 13px;
}

.notas-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

.notas-input {
  padding: 5px;
  width: 120px;
}

.produto button {
  padding: 5px 10px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  background: #28a745;
  color: white;
  cursor: pointer;
}

#carrinho {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #ccc;
  padding: 0.4rem 1rem 0.6rem 1rem;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 30vh;

  /* 💡 Sugestão extra: restringir largura do carrinho */
  max-width: 600px;
  margin: 0 auto;
}

#carrinho-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem !important;
}

#carrinho select {
  padding: 2px 5px !important;
  margin-top: -3px !important;
  margin-bottom: 0 !important;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

#listaCarrinho {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
  max-height: 25vh;
}

#listaCarrinho li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 5px 0;
  font-size: 14px;
  border-bottom: 1px solid #eee;
  gap: 10px;
}

#listaCarrinho li span:first-child {
  flex: 1;
  word-break: break-word;
}

#listaCarrinho li span:last-child {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.remover {
  background: red;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  padding: 4px 8px;
  cursor: pointer;
}

#total {
  font-weight: bold;
  text-align: left;
  margin-top: 0.2rem;
}

#botao-enviar {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  font-weight: bold;
  color: white;
  background: linear-gradient(135deg, #28a745, #218838);
  border: none;
  border-radius: 8px;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#botao-enviar:hover {
  transform: scale(1.03);
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.25);
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 9999;
  border-radius: 10px;
  text-align: center;
}

.popup button {
  margin-top: 10px;
  padding: 6px 14px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background: #28a745;
  color: white;
  font-weight: bold;
}

.popup-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

#carrinho h2 {
  margin: 4px 0 0 0 !important;
  padding: 0 !important;
  font-size: 1.05rem;
  line-height: 1.2rem;
}
