/* ==========================================================
   HANGONI — Cardápio Público (Frontend v3)

   Requisitos desta versão:
   - Visual mobile-first (app-like)
   - Barra lateral esquerda com atalhos de CATEGORIAS:
       * ícone grande + nome abaixo
       * sempre exposta (sticky)
       * clique faz scroll para o início da seção da categoria
   - Coluna principal direita:
       * TODAS as subcategorias empilhadas (sem precisar “abrir categoria”)
       * cada subcategoria com foto cadastrada
       * produtos dentro da subcategoria ficam recolhidos (min/max)
       * produtos criados diretamente na categoria ficam visíveis
   ========================================================== */

body.hg-public{
  margin:0;
  min-height:100vh;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:#0f172a;
  background:#f2f4f7;
}

.hg-public__wrap{
  max-width:1100px;
  margin:0 auto;
  padding: 14px 14px 22px;
}

/* =========================
   Header (sticky, app-like)
========================= */
.hg-public__header{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 10px 0 12px;
  background: linear-gradient(#f2f4f7 75%, rgba(242,244,247,0));
  backdrop-filter: blur(6px);
}

.hg-public__brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.hg-public__logo,
.hg-public__logoPlaceholder{
  width:46px;
  height:46px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,0.10);
  background:#fff;
  box-shadow:0 10px 22px rgba(15,23,42,0.10);
}

.hg-public__logo{ object-fit:cover; }

.hg-public__logoPlaceholder{
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
}

.hg-public__brandText{ min-width:0; }

.hg-public__title{
  margin:0;
  font-size:18px;
  font-weight:950;
  letter-spacing:-0.02em;
  line-height:1.15;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.hg-public__subtitle{
  margin:4px 0 0;
  font-size:12px;
  color:rgba(15,23,42,0.58);
}

.hg-public__actions{ display:flex; gap:10px; align-items:center; }

.hg-public__btn{
  /* Reset total do Elementor */
  all: unset !important;
  box-sizing: border-box !important;
  /* Nosso estilo */
  display:inline-flex !important;
  align-items:center !important;
  gap:8px !important;
  padding:10px 16px !important;
  border-radius:999px !important;
  text-decoration:none !important;
  font-weight:700 !important;
  font-size:13px !important;
  border: none !important;
  outline: none !important;
  color:#fff !important;
  background:#22c55e !important;
  box-shadow:0 4px 16px rgba(34,197,94,0.35) !important;
  cursor:pointer !important;
  line-height:1 !important;
  letter-spacing:normal !important;
  text-transform:none !important;
  white-space:nowrap !important;
  flex-shrink:0 !important;
  transition: transform 0.1s, box-shadow 0.1s !important;
}
.hg-public__btn:hover{
  box-shadow:0 6px 20px rgba(34,197,94,0.45) !important;
  transform: translateY(-1px) !important;
}
.hg-public__btn:active{ transform:translateY(1px) !important; }
.hg-public__btn:focus{ outline:none !important; box-shadow:0 4px 16px rgba(34,197,94,0.35) !important; }

.hg-public__btn--hist{
  background:#6366f1 !important;
  box-shadow:0 4px 16px rgba(99,102,241,0.35) !important;
  border: 1.5px solid rgba(99,102,241,0.3) !important;
  color:#fff !important;
}
.hg-public__btn--hist:hover{
  box-shadow:0 6px 20px rgba(99,102,241,0.45) !important;
}
.hg-public__btn--hist:focus{
  outline:none !important;
  box-shadow:0 4px 16px rgba(99,102,241,0.35) !important;
}

/* =========================
   Estado vazio
========================= */
.hg-public__emptyCard{
  background:#fff;
  border:1px solid rgba(15,23,42,0.10);
  border-radius:22px;
  padding:18px;
  box-shadow:0 16px 32px rgba(15,23,42,0.08);
}

.hg-public__emptyCard h2{
  margin:0 0 6px;
  font-size:16px;
  font-weight:950;
}

.hg-public__emptyCard p{
  margin:0;
  font-size:13px;
  color:rgba(15,23,42,0.65);
}

/* =========================
   Shell (barra lateral + coluna principal)
========================= */
.hg-shell{
  display:flex !important;
  gap:14px !important;
  align-items:flex-start !important;
  max-width: 660px !important; /* sidebar 120px + gap 14px + main 520px = 654px */
}

/* ===== Barra de categorias ===== */
.hg-catbar{
  /* JS vai posicionar com position:fixed — aqui só definimos o tamanho */
  position: sticky;
  top: 74px;
  z-index: 40;
  width: 120px;
  max-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  /* Garante que sticky funcione mesmo se ancestral tiver overflow */
  align-self: flex-start;
}

.hg-catbar__inner{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding: 10px 8px;
  border-radius:18px;
  border:1px solid rgba(15,23,42,0.10);
  background:rgba(255,255,255,0.78);
  box-shadow:0 16px 32px rgba(15,23,42,0.08);
  backdrop-filter: blur(8px);
  /* Scroll independente das categorias */
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 110px);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(15,23,42,0.15) transparent;
  /* Transição suave ao rolar */
  scroll-behavior: smooth;
}

.hg-catbar__inner::-webkit-scrollbar {
  width: 3px;
}
.hg-catbar__inner::-webkit-scrollbar-track {
  background: transparent;
}
.hg-catbar__inner::-webkit-scrollbar-thumb {
  background: rgba(15,23,42,0.18);
  border-radius: 999px;
}

.hg-catbtn{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px; /* aproxima ícone do nome */
  padding:10px 8px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,0.10);
  background:#fff;
  cursor:pointer;
  text-align:center;
  box-shadow:0 10px 18px rgba(15,23,42,0.06);
}

.hg-catbtn__ico{
  width:60px;
  height:60px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(15,23,42,0.04);
  border:1px solid rgba(15,23,42,0.08);
  font-size:34px; /* ÍCONE maior e mais legível */
  line-height:1;
}

.hg-catbtn__txt{
  font-weight:900;
  color:rgba(15,23,42,0.80);
  line-height:1.2;
  width:100%;
  max-width:100%;
  text-align:center;
  white-space:normal;
  overflow:hidden;
  word-break:keep-all;       /* nunca quebra no meio de uma palavra */
  overflow-wrap:normal;      /* nunca quebra no meio de uma palavra */
  hyphens:none;              /* sem hifenização */
  transition: color 0.15s;
  /* font-size é definido inline pelo JS por botão */
  font-size:12px;            /* default mínimo, JS pode aumentar */
}

.hg-catbtn.is-active{
  outline: none;
  border-color: rgba(255,122,26,0.55);
  box-shadow: 0 16px 26px rgba(255,122,26,0.18);
}

.hg-catbtn.is-active .hg-catbtn__ico{
  background: rgba(255,122,26,0.12);
  border-color: rgba(255,122,26,0.35);
}

/* Hover: fundo laranja, texto branco — ícone preservado (não herda cor do texto) */
.hg-catbtn:hover {
  background: linear-gradient(135deg, #ff7a1a, #f97316);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(255,122,26,0.40);
}
.hg-catbtn:hover .hg-catbtn__txt {
  color: #fff;
}
.hg-catbtn:hover .hg-catbtn__ico {
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.30);
  /* NÃO altera color/fill para não tingir o emoji */
}

/* ===== Coluna principal ===== */
.hg-main{
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 520px !important; /* cards idênticos ao mobile — !important bate Elementor */
  width: 100% !important;
}

/* Neutraliza sobrescrita do Elementor nos cards */
.hg-main .hangoni-shop__card,
.hg-main .hangoni-shop__premium {
  box-sizing: border-box !important;
}

.hg-catsection{
  margin-bottom: 14px;
}

.hg-catsection__head{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 12px 14px;
  background:#fff;
  border:1px solid rgba(15,23,42,0.10);
  border-radius:22px;
  box-shadow:0 16px 32px rgba(15,23,42,0.08);
}

.hg-catsection__ico{
  width:40px;
  height:40px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(15,23,42,0.04);
  border:1px solid rgba(15,23,42,0.08);
  font-size:22px;
}

.hg-catsection__title{
  margin:0;
  font-size:16px;
  font-weight:950;
  letter-spacing:-0.01em;
}

.hg-catproducts{
  margin-top:10px;
}

.hg-substack{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

/* =========================
   Subcategoria (card simples com imagem)
========================= */
.hg-subcard{
  background:#fff;
  border:1px solid rgba(15,23,42,0.10);
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 16px 32px rgba(15,23,42,0.08);
}

.hg-subcard__head{
  width:100%;
  display:flex;
  align-items:center;
  gap:12px;
  padding: 12px;
  border:0;
  background:transparent;
  cursor:pointer;
  text-align:left;
}

.hg-subcard__head:focus{ outline:none; }

.hg-subcard__img{
  width:220px;  /* banner médio, usa mais as laterais */
  height:120px;
  border-radius:18px;
  overflow:hidden;
  background:
    linear-gradient(135deg, rgba(255,122,26,0.20), rgba(34,197,94,0.18)),
    rgba(15,23,42,0.03);
  border:1px solid rgba(15,23,42,0.10);
  flex: 0 0 220px;
  position:relative;
}

/* Botão "Produtos" (pill) sobre a imagem */
.hg-subcard__pill{
  position:absolute;
  right:10px;
  bottom:10px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,0.92);
  border:1px solid rgba(15,23,42,0.12);
  box-shadow:0 16px 30px rgba(15,23,42,0.16);
  font-weight:950;
  font-size:12px;
  color:rgba(15,23,42,0.90);
}

.hg-subcard__pillIco{
  width:22px;
  height:22px;
  border-radius:9px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(15,23,42,0.06);
  border:1px solid rgba(15,23,42,0.10);
  font-size:16px;
  line-height:1;
}

.hg-subcard.is-open .hg-subcard__pill{
  background:rgba(255,122,26,0.14);
  border-color:rgba(255,122,26,0.28);
}

.hg-subcard__img img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.hg-subcard__meta{ min-width:0; flex: 1 1 auto; }

.hg-subcard__name{
  font-size:15px;
  font-weight:950;
  letter-spacing:-0.01em;
  line-height:1.15;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.hg-subcard__count{
  margin-top:4px;
  font-size:12px;
  color:rgba(15,23,42,0.58);
  font-weight:800;
}

/* (removido) antigo +/- quadrado – agora usamos pill sobre a imagem */

.hg-subcard__body{
  padding: 0 12px 12px;
}

.hg-mbl-muted{
  padding: 8px 4px 0;
  font-size:13px;
  color:rgba(15,23,42,0.62);
}

/* =========================
   Produtos (mini cards)
========================= */
.hg-mbl-products{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding-top:8px;
}

.hg-prod{
  display:flex;
  align-items:stretch;
  gap:10px;
  padding:10px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,0.10);
  background:rgba(15,23,42,0.02);
}

.hg-prod__img{
  width:72px;
  height:72px;
  border-radius:14px;
  background:
    linear-gradient(135deg, rgba(255,122,26,0.20), rgba(34,197,94,0.18)),
    rgba(15,23,42,0.03);
  overflow:hidden;
  border:1px solid rgba(15,23,42,0.10);
  flex: 0 0 72px;
}

.hg-prod__img img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.hg-prod__info{ min-width:0; flex: 1 1 auto; }

.hg-prod__name{
  font-size:14px;
  font-weight:950;
  letter-spacing:-0.01em;
  line-height:1.15;
  margin-top:2px;
}

.hg-prod__desc{
  margin-top:4px;
  font-size:12px;
  line-height:1.3;
  color:rgba(15,23,42,0.62);
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

.hg-prod__right{
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  flex: 0 0 auto;
}

.hg-prod__price{
  font-weight:950;
  font-size:13px;
  color:#0f172a;
  background:#fff;
  border:1px solid rgba(15,23,42,0.10);
  padding:6px 10px;
  border-radius:999px;
  box-shadow:0 10px 20px rgba(15,23,42,0.08);
  white-space:nowrap;
}

/* =========================
   Footer
========================= */
.hg-public__footer{
  margin-top:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  color:rgba(15,23,42,0.52);
  font-size:12px;
}

.hg-public__footerBrand{ font-weight:900; }

/* =========================
   Responsivo: mantém sidebar vertical no mobile
========================= */
@media (max-width: 860px){
  .hg-public__wrap{
    max-width: 100%;
    padding: 14px 10px 24px;
  }
  .hg-shell{
    gap:10px;
  }
  .hg-catbar{
    width:106px;
    top:70px;
    max-height: calc(100vh - 86px);
  }
  .hg-catbar__inner{
    padding: 10px 7px;
    gap:10px;
    max-height: calc(100vh - 106px);
  }
  .hg-catbtn{
    padding:10px 6px;
  }
  .hg-catbtn__ico{
    width:54px;
    height:54px;
    border-radius:16px;
    font-size:32px;
  }
  .hg-catbtn__txt{
    max-width:86px;
    font-size:12px;
    line-height:1.05;
  }
  .hg-subcard__img{
    width:200px;
    height:112px;
    flex: 0 0 200px;
  }
}

/* ========================================
   INGREDIENTES E PREÇO PROMOCIONAL
   ======================================== */

/* Badge de Promoção na imagem */
.hg-prod__img {
  position: relative;
}

.hg-prod__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #ff7a1a, #f97316);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 5px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(255, 122, 26, 0.4);
  z-index: 2;
}

/* Seção de Ingredientes */
.hg-prod__ingredients {
  margin: 10px 0 0;
  padding: 10px;
  background: rgba(255, 122, 26, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(255, 122, 26, 0.12);
}

.hg-prod__ing-section {
  margin-bottom: 8px;
}

.hg-prod__ing-section:last-child {
  margin-bottom: 0;
}

.hg-prod__ing-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(15, 23, 42, 0.55);
  display: block;
  margin-bottom: 5px;
}

.hg-prod__ing-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.hg-prod__ing-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 122, 26, 0.3);
  background: #fff;
  color: #ff7a1a;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.hg-prod__ing-btn:hover {
  background: rgba(255, 122, 26, 0.08);
  border-color: #ff7a1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 122, 26, 0.15);
}

.hg-prod__ing-btn.selected {
  background: linear-gradient(135deg, #ff7a1a, #f97316);
  color: #fff;
  border-color: #ff7a1a;
  box-shadow: 0 4px 12px rgba(255, 122, 26, 0.3);
}

.hg-prod__ing-btn--remove {
  border-color: rgba(220, 38, 38, 0.3);
  color: #dc2626;
}

.hg-prod__ing-btn--remove:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: #dc2626;
}

.hg-prod__ing-btn--remove.selected {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  border-color: #dc2626;
}

/* Wrapper de Preço */
.hg-prod__price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

/* Preço Riscado */
.hg-prod__price-old {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.35);
  text-decoration: line-through;
  line-height: 1;
}

/* Destaque visual para produtos em promoção */
.hg-prod--promo {
  border-color: rgba(255, 122, 26, 0.2);
  box-shadow: 0 4px 16px rgba(255, 122, 26, 0.08);
}

.hg-prod--promo .hg-prod__price {
  color: #ff7a1a;
  font-weight: 900;
}

/* Responsivo */
@media (max-width: 600px) {
  .hg-prod__ingredients {
    padding: 8px;
  }
  
  .hg-prod__ing-btn {
    font-size: 10px;
    padding: 4px 8px;
  }
  
  .hg-prod__badge {
    font-size: 9px;
    padding: 4px 8px;
  }
}

/* ── Modal: seção de itens do combo ── */
.hangoni-modal__comboSection {
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(234,179,8,0.30);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 4px;
}
/* ── Etapa 6.6: novo visual do combo ──────────────────────────────── */
.hangoni-combo-header {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #1f2937;
  margin: 0 0 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(249,115,22,0.08), rgba(234,88,12,0.04));
  border-radius: 10px;
  border-left: 3px solid #f97316;
}
.hangoni-combo-header::before {
  content: '🍱';
  font-size: 16px;
}

.hangoni-combo-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hangoni-combo-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid rgba(15,23,42,0.06);
  border-radius: 10px;
  transition: border-color .15s, background .15s;
}
.hangoni-combo-item:hover {
  border-color: rgba(249,115,22,0.25);
  background: rgba(249,115,22,0.02);
}
.hangoni-combo-item:last-child { border-bottom: 1px solid rgba(15,23,42,0.06); }

.hangoni-combo-item-linha {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* Quantidade em badge circular laranja */
.hangoni-combo-qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  border-radius: 14px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(234,88,12,0.25);
}

.hangoni-combo-nome {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.3;
}

/* Preco individual escondido (Etapa 6.5) */
.hangoni-combo-sub { display: none !important; }

/* Botao Trocar compacto tipo icone */
.hg-swap-chip {
  margin-top: 0 !important;
  margin-left: auto !important;
  flex-shrink: 0;
}
.hg-swap-chip button {
  min-width: 34px;
  height: 32px;
  border-radius: 16px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  gap: 4px !important;
}

/* Economia em destaque verde */
.hangoni-combo-economy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #15803d;
  margin-top: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(34,197,94,0.10), rgba(22,163,74,0.06));
  border-radius: 10px;
  border: 1px solid rgba(34,197,94,0.20);
  text-align: center;
}
.hangoni-combo-economy::before {
  content: '💰';
  font-size: 15px;
}
