/* === RESET / BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", "Segoe UI", sans-serif;
}

body {
  background-color: #f9f9f9;
  color: #222;
  -webkit-font-smoothing: antialiased;
}

/* === HEADER (versão horizontal compacta) === */
.header {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;  /* centraliza horizontalmente o bloco */
  gap: 0.8rem;              /* espaço entre logo e texto */
  padding: 0.6rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-radius: 0 0 20px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header img {
  width: 70px;
  height: auto;
  border-radius: 12px;
  flex-shrink: 0;
}

.header .title-block {
  text-align: left;
  line-height: 1.2;
}

.header h1 {
  font-weight: 700;
  font-size: 1.5rem;
  color: #111;
  margin: 0;
}

.header p {
  font-size: 0.9rem;
  color: #555;
  margin: 0.2rem 0 0;
}

/* === Ajuste mobile === */
@media (max-width: 480px) {
  .header {
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
  }
  .header img {
    width: 55px;
  }
  .header h1 {
    font-size: 1.2rem;
  }
  .header p {
    font-size: 0.8rem;
  }
}

/* === CATEGORIAS === */
.group {
  margin: 2rem auto;
  max-width: 960px;
  text-align: center; /* ✅ Centraliza toda a seção de categorias */
}

.group-category {
  display: inline-block; /* ✅ Permite centralizar o bloco de categoria */
  text-align: left;      /* ✅ Mantém os produtos alinhados à esquerda */
  margin-bottom: 3rem;
  width: 100%;
  max-width: 720px;      /* ✅ Mantém o conteúdo proporcional e centralizado */
}

.group-title {
  display: inline-block;
  background: #fff;
  color: #111;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 20px;
  padding: 0.4rem 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
  text-align: center; /* ✅ Centraliza o texto da categoria */
}

/* === ITEM (FORMATO APP DE DELIVERY) === */
.group-item {
  display: flex;
  align-items: flex-start;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin: 0.8rem auto;
  padding: 0.9rem;
  max-width: 680px;
  transition: transform 0.2s ease;
}

.group-item:hover {
  transform: translateY(-3px);
}

/* === IMAGEM === */
.group-item-img {
  width: 110px;
  height: 90px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

/* === CONTEÚDO DO ITEM === */
.group-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-left: 1rem;
}

/* --- TÍTULO --- */
.group-item-name {
  font-size: 1rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

/* --- DESCRIÇÃO --- */
.group-item-desc {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
  margin-bottom: 0.6rem;
}

/* --- PREÇO --- */
.group-item-price {
  display: inline-block;
  background: #25D366;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 20px;
  padding: 0.25rem 0.8rem;
  width: max-content;
  margin-bottom: 0.6rem;
}

/* --- CONTROLE DE QUANTIDADE (+ / -) --- */
.ctrl-item-total {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  border-radius: 20px;
  overflow: hidden;
  width: max-content;
}

.ctrl-item-total button,
.ctrl-item-total div {
  background: none;
  border: none;
  padding: 0.4rem 0.9rem;
  font-size: 1rem;
  color: #333;
  cursor: pointer;
  transition: background 0.2s;
}

.ctrl-item-total button:hover {
  background: #f4f4f4;
}

/* === CARRINHO / BOTÃO COMMANDER === */
.list-container {
  position: fixed;
  bottom: 1rem;              /* ✅ fixa no rodapé */
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  justify-content: center;
  pointer-events: none;      /* ⚡ permite o scroll passar por baixo */
}

#btn-finish {
  all: unset;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #25D366;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 40px;
  padding: 0.8rem 1.6rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: 0.3s;
  pointer-events: auto;      /* ⚡ permite clicar no botão mesmo com scroll */
}

#btn-finish:hover {
  background: #1ebe5b;
  transform: translateY(-2px);
}

#btn-finish::before {
  content: "🛒";              /* ícone carrinho */
  font-size: 1.1rem;
}

/* === POP-UP DO CARRINHO === */
#list {
  display: block; /* ✅ Mantém sempre no fluxo, mas invisível por posição */
  position: fixed;
  left: 50%;
  bottom: -100%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 25px 25px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
  padding: 1.8rem 1.2rem;
  z-index: 100;
  opacity: 0; /* ✅ começa transparente */
  transition: all 0.45s cubic-bezier(0.25, 1, 0.3, 1);
}

/* Quando ativo */
#list.active {
  bottom: 0;
  opacity: 1; /* ✅ aparece visível */
}

/* Fundo escuro */
#list-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  z-index: 90;
}

/* Quando o carrinho está visível */
#list-overlay.active {
  display: block;
}


#list-overlay.active {
  display: block;
}

/* Cabeçalho e estrutura interna */
.list-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #222;
  text-align: center;
  margin-bottom: 0.5rem;
}

.list-subtitle {
  margin-top: 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #555;
}

#list-items {
  list-style: none;
  margin-top: 0.6rem;
  color: #333;
  text-align: left;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* === botão interno === */
#list-btn {
  background: #25D366;
  border: none;
  border-radius: 40px;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.9rem 2rem;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

#list-btn:hover {
  background: #1ebe5b;
}

/* Suaviza barra de scroll do carrinho */
#list-items::-webkit-scrollbar {
  width: 6px;
}
#list-items::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

/* === NOTAS / ENDEREÇO === */
#order-notes {
  background: #fafafa;
  border-radius: 12px;
  padding: 0.8rem;
  margin-top: 1rem;
}

#order-notes label {
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

#order-notes textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.5rem;
  font-size: 0.9rem;
  color: #333;
  margin-top: 0.4rem;
}

#address-group {
  margin-top: 1rem;
  text-align: center;
}

#address {
  width: 90%;
  padding: 0.6rem;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  color: #333;
}

#list-btn {
  background: #25D366;
  border: none;
  border-radius: 40px;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

#list-btn:hover {
  background: #1ebe5b;
}

/* === FOOTER === */
.footer {
  text-align: center;
  padding: 1.5rem 0;
  background: #fff;
  border-top: 1px solid #eee;
  font-size: 0.85rem;
  color: #777;
  margin-top: 4rem;
  border-radius: 20px 20px 0 0;
}

.footer a {
  color: #25D366;
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  text-decoration: underline;
}

/* === RESPONSIVO === */
@media (max-width: 720px) {
  .group-item {
    flex-direction: row;
    width: 95%;
    max-width: 95%;
    padding: 0.8rem;
  }

  .group-item-img {
    width: 95px;
    height: 80px;
  }

  .group-item-info {
    margin-left: 0.8rem;
  }

  .group-item-name {
    font-size: 1rem;
  }

  .group-item-desc {
    font-size: 0.85rem;
  }

  .group-item-price {
    font-size: 0.9rem;
  }

  .ctrl-item-total {
    transform: scale(0.9);
  }

  /* === FORMULÁRIO DO CLIENTE === */
#client-info label,
#order-notes label {
  font-weight: 500;
  color: #333;
  display: block;
  margin-top: 0.8rem;
  font-size: 0.9rem;
}

#client-info input,
#order-notes textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  color: #333;
  margin-top: 0.3rem;
  background: #fafafa;
  outline: none;
}

#client-info input:focus,
#order-notes textarea:focus {
  border-color: #25D366;
  background: #fff;
}

/* === MODO DE ENTREGA === */
#delivery-mode {
  margin-top: 1rem;
  text-align: center;
}

.delivery-options {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 0.5rem;
}

.delivery-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
  cursor: pointer;
}

.delivery-option input[type="radio"] {
  accent-color: #25D366;
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
}

/* Quando o carrinho (#list) está ativo, esconde o botão fixo */
#list.active ~ .list-container {
  display: none !important;
}

/* 🔧 Garantir que botão Commander funciona em mobile */
.list-container {
  pointer-events: auto !important; /* permite sempre clicar no container */
}

#btn-finish {
  pointer-events: auto !important; /* clique sempre liberado */
  position: relative;
  z-index: 200; /* fica acima de outros elementos */
}

/* Quando o carrinho está aberto, ainda escondemos o botão fixo */
#list.active ~ .list-container {
  display: none !important;
}

/* === TELEFONE VISUAL (prefixo + número) === */
.phone-wrapper {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}

#client-prefix {
  flex: 0 0 80px; /* largura fixa controlada */
  text-align: center;
  font-weight: 600;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.5rem 0.4rem;
  font-size: 0.95rem;
  background: #f7f7f7;
  color: #222;
}

#client-phone {
  flex: 1; /* ocupa o restante espaço */
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  font-size: 0.95rem;
  color: #222;
}

#client-prefix:focus,
#client-phone:focus {
  border-color: #25D366;
  background: #fff;
  outline: none;
}

/* === TELEFONE VISUAL CORRIGIDO (FINAL) === */
.phone-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.4rem;
}

#client-prefix {
  width: 70px;
  text-align: center;
  font-weight: 600;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.5rem 0.4rem;
  font-size: 0.95rem;
  background: #f7f7f7;
  color: #222;
  flex-shrink: 0;
}

#client-phone {
  flex: 1;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  font-size: 0.95rem;
  color: #222;
  width: 100%;
  box-sizing: border-box;
}

#client-prefix:focus,
#client-phone:focus {
  border-color: #25D366;
  background: #fff;
  outline: none;
}
  
}