/* =========================
   1. VARIÁVEIS (TEMA)
========================= */
:root {
  --fundo: #0a0a0a;
  --card: #141414;
  --primaria: #ff6a00;
  --secundaria: #ffc107;
  --sucesso: #25d366;
  --texto-principal: #f0f0f0;
  --texto-apoio: #888;
  --borda: #222;
  --card-secundario: #111;
}

/* =========================
   2. RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:focus-visible {
  outline: 2px solid var(--primaria);
  outline-offset: 2px;
  border-radius: 4px;
}

body {
  background-color: var(--fundo);
  color: var(--texto-principal);
  line-height: 1.5;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.hidden {
  display: none !important;
}

/* =========================
   3. HEADER
========================= */
header {
  background: linear-gradient(175deg, #1c0800 0%, #0d0200 70%, var(--fundo) 100%);
  padding: 28px 20px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 106, 0, 0.25);
}

.logo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--primaria);
  display: block;
  margin: 0 auto 10px;
}

header h1 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--texto-principal);
}

.zap-header {
  margin-top: 7px;
}

.zap-header a {
  color: var(--texto-apoio);
  text-decoration: none;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}

.zap-header a:hover {
  color: var(--sucesso);
}

/* =========================
   4. INFORMAÇÕES
========================= */
.info-container {
  padding: 0 14px;
  margin: 12px 0 14px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--card-secundario);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--borda);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 4px;
}

.info-circle {
  color: var(--primaria);
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  background: rgba(255, 106, 0, 0.08);
  border-radius: 8px;
}

.info-text {
  display: flex;
  flex-direction: column;
}

.info-text strong {
  color: var(--texto-principal);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}

.info-text span {
  color: var(--texto-apoio);
  font-size: 0.7rem;
  line-height: 1.3;
}

/* =========================
   5. CATEGORIAS
========================= */
.categorias {
  display: flex;
  overflow-x: auto;
  padding: 10px 14px;
  gap: 7px;
  position: sticky;
  top: 0;
  background: var(--fundo);
  z-index: 10;
  border-bottom: 1px solid var(--borda);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.categorias::-webkit-scrollbar {
  display: none;
}

.categorias button {
  background: transparent;
  color: var(--texto-apoio);
  border: 1px solid var(--borda);
  padding: 6px 15px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.categorias button:active {
  transform: scale(0.95);
}

.categorias button.active {
  background: var(--primaria);
  color: #fff;
  border-color: var(--primaria);
  font-weight: 600;
}

/* =========================
   6. PRODUTOS
========================= */
main {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.produto-card {
  background: var(--card);
  border-radius: 12px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--borda);
  min-height: 110px;
  position: relative;
  animation: fadeIn 0.25s ease-out;
  transition: border-color 0.2s;
}

@media (hover: hover) {
  .produto-card:hover {
    border-color: rgba(255, 106, 0, 0.35);
  }
}

.produto-img {
  width: 108px;
  min-height: 110px;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

.produto-info {
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
}

.produto-nome {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--texto-principal);
  line-height: 1.3;
}

.produto-desc {
  font-size: 0.75rem;
  color: var(--texto-apoio);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 4px 0 6px;
  line-height: 1.4;
}

.produto-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.produto-preco {
  color: var(--secundaria);
  font-weight: 700;
  font-size: 0.97rem;
}

.btn-add {
  background: var(--primaria);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter 0.15s;
  flex-shrink: 0;
  font-weight: 700;
}

@media (hover: hover) {
  .btn-add:hover {
    filter: brightness(1.2);
  }
}

/* =========================
   7. CARRINHO FLUTUANTE
========================= */
#carrinho-flutuante {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 4%;
  right: 4%;
  background: var(--primaria);
  padding: 12px 18px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 18px rgba(255, 106, 0, 0.28);
  z-index: 100;
  animation: slideUp 0.3s ease-out;
  cursor: pointer;
  border: none;
}

#resumo-carrinho {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-itens {
  background: rgba(0, 0, 0, 0.22);
  color: #0a0a0a;
  border-radius: 50px;
  padding: 2px 9px;
  font-weight: 700;
  font-size: 0.82rem;
}

#total-carrinho {
  color: #0a0a0a;
  font-weight: 700;
  font-size: 0.92rem;
}

#btn-finalizar {
  color: #0a0a0a;
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 7px;
}

#btn-finalizar i {
  color: rgba(0, 0, 0, 0.45);
}

/* =========================
   8. MODAL (bottom sheet mobile)
========================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}

.modal-content {
  background: var(--card-secundario);
  width: 100%;
  max-width: 100%;
  padding: 8px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  max-height: 92vh;
  overflow-y: auto;
  border: 1px solid var(--borda);
  border-bottom: none;
  overscroll-behavior: contain;
}

/* Puxador */
.modal-content::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  background: var(--borda);
  border-radius: 2px;
  margin: 8px auto 14px;
}

.modal-content h2 {
  margin-bottom: 12px;
  font-size: 1.15rem;
  font-weight: 700;
}

.cart-empty {
  text-align: center;
  color: var(--texto-apoio);
  padding: 24px 0;
  font-size: 0.88rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--borda);
  gap: 10px;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.cart-item-info small {
  color: var(--secundaria);
  font-weight: 600;
}

.cart-item-controles {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cart-item-qty {
  min-width: 20px;
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
}

.btn-remover {
  background: var(--borda);
  color: var(--texto-principal);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.btn-adicionar-modal {
  background: var(--primaria);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.15s;
}

@media (hover: hover) {
  .btn-remover:hover { background: #333; }
  .btn-adicionar-modal:hover { filter: brightness(1.2); }
}

.entrega-container {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.entrega-label {
  font-size: 0.75rem;
  color: var(--texto-apoio);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.entrega-select {
  background: var(--card);
  color: var(--texto-principal);
  border: 1px solid var(--borda);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  cursor: pointer;
  width: 100%;
  appearance: auto;
}

.campos-endereco {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 9px;
}

.input-endereco {
  background: var(--card);
  color: var(--texto-principal);
  border: 1px solid var(--borda);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  width: 100%;
  transition: border-color 0.15s;
}

.input-endereco::placeholder {
  color: var(--texto-apoio);
}

.input-endereco:focus {
  border-color: var(--primaria);
  outline: none;
}

.input-endereco.input-erro {
  border-color: #e53e3e;
}

.total-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 1.05rem;
  padding-top: 10px;
  border-top: 1px solid var(--borda);
  font-weight: 600;
}

#total-modal {
  color: var(--secundaria);
  font-weight: 800;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn-finish {
  flex: 2;
  background: var(--sucesso);
  color: #fff;
  border: none;
  padding: 13px 10px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.88rem;
}

@media (hover: hover) {
  .btn-finish:hover { filter: brightness(1.1); }
}

.btn-close {
  flex: 1;
  background: transparent;
  color: var(--texto-apoio);
  border: 1px solid var(--borda);
  padding: 13px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-size: 0.83rem;
}

@media (hover: hover) {
  .btn-close:hover {
    background: var(--borda);
    color: var(--texto-principal);
  }
}

/* =========================
   9. ANIMAÇÕES
========================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@media (prefers-reduced-motion: reduce) {
  .produto-card, #carrinho-flutuante { animation: none; }
  .produto-card, .btn-add, .btn-finish, .btn-close,
  .btn-remover, .btn-adicionar-modal, .categorias button,
  .input-endereco { transition: none; }
}

/* =========================
   10. RESPONSIVO
========================= */
@media (max-width: 320px) {
  .info-grid { grid-template-columns: 1fr; }
}

@media (min-width: 600px) {
  body {
    max-width: 540px;
    margin: 0 auto;
  }

  .info-grid { grid-template-columns: repeat(4, 1fr); }

  #carrinho-flutuante {
    max-width: 510px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  /* Modal centralizado no tablet/desktop */
  .modal {
    align-items: center;
    padding: 16px;
  }

  .modal-content {
    border-radius: 14px;
    border: 1px solid var(--borda);
    border-bottom: 1px solid var(--borda);
    max-width: 450px;
    padding: 20px;
    max-height: 88vh;
  }

  .modal-content::before { display: none; }
}

@media (min-width: 1024px) {
  body { max-width: 480px; }
  #carrinho-flutuante { max-width: 450px; }
}

/* =========================
   11. CUSTOMIZAÇÃO
========================= */
#modal-detalhes h2 {
  color: var(--texto-principal);
  font-size: 1.25rem;
  margin-bottom: 4px;
}

#opcoes-customizacao h4 {
  font-size: 0.72rem;
  color: var(--texto-apoio);
  margin: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.opcao-custom {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--borda);
  padding: 11px 12px;
  border-radius: 10px;
  margin-bottom: 7px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.opcao-custom input {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  accent-color: var(--primaria);
  flex-shrink: 0;
}

.opcao-custom span {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--texto-principal);
}

.opcao-custom:has(input:checked) {
  border-color: var(--primaria);
  background: rgba(255, 106, 0, 0.06);
}

#detalhes-preco {
  font-size: 1.4rem;
  color: var(--secundaria);
  font-weight: 800;
}

.btn-close-detalhes {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--card) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--borda) !important;
  cursor: pointer;
}

#opcoes-customizacao {
  display: flex;
  flex-direction: column;
}

.sabor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

#aviso-sabores {
  background: rgba(255, 106, 0, 0.07);
  color: var(--texto-apoio);
  font-size: 0.78rem;
  padding: 5px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 8px;
}

#obs-customizacao {
  background: var(--card);
  color: var(--texto-principal);
  border: 1px solid var(--borda);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  width: 100%;
  resize: none;
  transition: border-color 0.15s;
  font-family: inherit;
}

#obs-customizacao:focus {
  border-color: var(--primaria);
  outline: none;
}

#obs-customizacao::placeholder {
  color: var(--texto-apoio);
}

/* =========================
   COMBOS — catálogo público
   ========================= */
.secao-combo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
}

.secao-combo-icone {
  width: 32px;
  height: 32px;
  background: rgba(249, 115, 22, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primaria);
  font-size: 1rem;
  flex-shrink: 0;
}

.secao-combo-titulo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--texto-principal);
  letter-spacing: 0.01em;
}

.secao-combo-sub {
  font-size: 0.78rem;
  color: var(--texto-apoio);
  margin-left: auto;
}

.combo-pub-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid rgba(249, 115, 22, 0.18);
  border-radius: 12px;
  padding: 14px 16px 14px 20px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
}

.combo-pub-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primaria);
  border-radius: 12px 0 0 12px;
}

.combo-pub-card:hover {
  border-color: rgba(249, 115, 22, 0.38);
  transform: translateY(-1px);
}

.combo-pub-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.combo-pub-info {
  flex: 1;
  min-width: 0;
}

.combo-pub-nome {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--texto-principal);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.combo-pub-itens {
  font-size: 0.78rem;
  color: var(--texto-apoio);
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.combo-pub-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.combo-pub-badge {
  background: rgba(34, 197, 94, 0.14);
  color: #22c55e;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 6px;
  letter-spacing: 0.03em;
}

.combo-pub-de {
  font-size: 0.75rem;
  color: var(--texto-apoio);
  text-decoration: line-through;
}

.combo-pub-por {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secundaria);
}

.combo-pub-btn {
  margin-left: auto;
  background: var(--primaria);
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}

.combo-pub-btn:hover {
  background: #e85d04;
  transform: scale(1.07);
}
