:root {
  --bg: #050608;
  --bg-card: #15161b;
  --bg-card-soft: #1d1f26;
  --primary: #ff7a29;
  --primary-dark: #e36117;
  --text: #f9fafb;
  --muted: #9ca3af;
  --border: #27272f;
}

/* ============================
   BASE
============================ */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 45%, #000 100%);
  color: var(--text);
}

main.app {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 90px;
}

/* ============================
   CAPA / HEADER
============================ */
.cover-section {
  position: relative;
}

.cover-img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  filter: brightness(0.7);
}

.estabelecimento-header {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile .logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.7);
  background: #020617;
}

.profile-info h1 {
  margin: 0;
  font-size: 1.25rem;
}

.profile-info .detalhes {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ============================
   ABAS CATEGORIAS (SLIDER)
============================ */

.tabs-categorias::-webkit-scrollbar {
  height: 4px;
}
.tabs-categorias::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 999px;
}



/* ============================
   TÍTULO SEÇÃO
============================ */
.titulo-bloco {
  font-size: 1.05rem;
  padding: 0 12px;
  margin: 14px 0 8px;
}

/* ============================
   CARD DE PRODUTO
============================ */
.grid-produtos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 0 12px 16px;
}

.card-produto {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: radial-gradient(circle at top left, #1f2937 0, #020617 65%);
  border: 1px solid rgba(75,85,99,0.5);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.card-produto:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  box-shadow: 0 14px 40px rgba(0,0,0,0.6);
}

.card-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-titulo {
  margin: 0 0 4px;
  font-size: 1rem;
}

.card-descricao {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.card-preco {
  margin: 0;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

.card-imagem img {
  width: 100px;
  height: 90px;
  border-radius: 10px;
  object-fit: cover;
}

/* ============================
   NAV INFERIOR
============================ */
.nav-inferior {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: rgba(15,23,42,0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid #111827;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
}

.nav-item {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}

.nav-item.ativo {
  color: var(--primary);
}

/* ============================
   BARRA DO CARRINHO
============================ */
.barra-carrinho {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 64px;
  background: linear-gradient(90deg, var(--primary) 0, #f97316 100%);
  color: #111827;
  border-radius: 999px;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: 0 15px 45px rgba(0,0,0,0.7);
  cursor: pointer;
  z-index: 60;
}

.carrinho-info span {
  display: block;
  font-size: 0.85rem;
}

.carrinho-botao {
  border-radius: 999px;
  border: none;
  padding: 6px 14px;
  background: #0f172a;
  color: #f9fafb;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

/* ============================
   CARRINHO (OVERLAY)
============================ */
.carrinho-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  z-index: 80;
}

.carrinho-overlay.escondido {
  display: none;
}

.carrinho-caixa {
  width: 100%;
  max-width: 480px;
  height: 100%;
  background: #f9fafb;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  padding: 16px;
  box-shadow: -4px 0 30px rgba(0,0,0,0.5);
}

.carrinho-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.carrinho-fechar {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
}

.carrinho-itens {
  margin-top: 10px;
  flex: 1;
  overflow-y: auto;
}

.carrinho-vazio {
  margin-top: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: #6b7280;
}

.carrinho-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 0;
  font-size: 0.9rem;
}

.carrinho-item-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

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

.carrinho-item-controles button {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  font-size: 0.8rem;
  cursor: pointer;
}

.carrinho-item-controles .remover {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.carrinho-total-area {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.carrinho-finalizar {
  margin-top: 12px;
  width: 100%;
  padding: 11px;
  border-radius: 999px;
  border: none;
  background: #111827;
  color: #f9fafb;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

/* ============================
   MODAL PRODUTO
============================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 90;
}

.modal-overlay.escondido {
  display: none;
}

.modal-caixa {
  width: 100%;
  max-width: 480px;
  background: #020617;
  border-radius: 18px 18px 0 0;
  padding: 16px;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.7);
  position: relative;
}

.modal-fechar {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #e5e7eb;
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-img {
  width: 100%;
  height: 180px;
  border-radius: 14px;
  object-fit: cover;
  margin-bottom: 10px;
}

.modal-nome {
  margin: 0;
  font-size: 1.1rem;
}

.modal-desc {
  margin: 4px 0 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.modal-preco {
  margin: 0 0 10px;
  font-weight: 600;
  color: var(--primary);
}

.modal-quantidade {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 4px 10px;
  margin-bottom: 10px;
}

.btn-qtd {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

.qtd-num {
  min-width: 24px;
  text-align: center;
}

.modal-observacao {
  width: 100%;
  min-height: 70px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #020617;
  color: var(--text);
  padding: 8px;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.modal-adicionar {
  width: 100%;
  padding: 11px;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #111827;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

/* ============================
   CHECKOUT
============================ */
.checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 95;
}

.checkout-overlay.escondido {
  display: none;
}

.checkout-caixa {
  width: 100%;
  max-width: 480px;
  max-height: 92vh;          /* ⬅️ LIMITE DE ALTURA */
  background: #020617;
  border-radius: 18px 18px 0 0;
  padding: 14px 16px 16px;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.7);

  overflow-y: auto;          /* ⬅️ SCROLL INTERNO */
  -webkit-overflow-scrolling: touch;
}

.checkout-caixa h2 {
  margin-top: 0;
  margin-bottom: 8px;
}

.checkout-caixa label {
  display: block;
  font-size: 0.75rem;    /* ⬅️ MENOR */
  margin-top: 6px;      /* ⬅️ MENOR */
  margin-bottom: 2px;
  color: var(--muted);
}


.checkout-caixa input,
.checkout-caixa select,
.checkout-caixa textarea {
  width: 100%;
  padding: 6px 8px;      /* ⬅️ MENOR */
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #020617;
  color: var(--text);
  font-size: 0.85rem;    /* ⬅️ MENOR */
}

.checkout-caixa textarea {
  min-height: 70px;
}

.btn-finalizar-checkout {
  margin-top: 10px;
  width: 100%;
  padding: 11px;
  border-radius: 999px;
  border: none;
  background: var(--primary);
  color: #111827;
  font-weight: 600;
  cursor: pointer;
}

.checkout-fechar {
  margin-top: 8px;
  width: 100%;
  padding: 11px;
  border-radius: 999px;
  border: none;
  background: #374151;
  color: #e5e7eb;
  cursor: pointer;
}

/* ============================
   RESPONSIVO
============================ */
@media (min-width: 600px) {
  main.app {
    max-width: 520px;
  }
}
/* ======================================
   SLIDER DE CATEGORIAS (iFood Dark – sem ícones)
====================================== */
.tabs-categorias {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  background: rgba(15,23,42,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #1e293b;
}


.tabs-categorias::-webkit-scrollbar {
  height: 6px;
}

.tabs-categorias::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
}

.tab-categoria {
  flex-shrink: 0;
  padding: 8px 16px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 999px;
  color: #e5e7eb;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.15s ease;
}

.tab-categoria:hover {
  background: #1f2937;
  transform: translateY(-1px);
}

.tab-categoria.ativa {
  background: var(--cat-color);
  border-color: var(--cat-color);
  color: #ffffff;
  font-weight: 600;
  transform: translateY(-1px);
}

.checkout-resumo {
  margin-top: 8px;
  border-top: 1px solid #374151;
  padding-top: 6px;
  font-size: 0.85rem;
}


.checkout-resumo div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.checkout-resumo .total {
  font-size: 0.95rem;
  margin-top: 4px;
}

.linha-endereco {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 8px;
}
