/* ==========================================================================
   O Bacano — Menu
   HTML-first: o conteudo do menu vive no HTML; o JS so acrescenta
   comportamento (filtro, pesquisa, detalhe). A base esta em base.css.
   ========================================================================== */

/* ancoras de categoria nao ficam escondidas sob as barras fixas */
html { scroll-padding-top: calc(var(--header-h) + 76px); }

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 52px) var(--gutter) 40px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; z-index: 0;
  top: -180px; left: 50%; width: min(880px, 130vw); aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--gold) 22%, transparent) 0%, color-mix(in srgb, var(--ember) 14%, transparent) 30%, transparent 62%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero__kicker {
  margin: 0;
  font-family: var(--f-accent); font-style: italic; font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  color: var(--gold);
}
.hero__title {
  margin: .2em auto 0;
  max-width: 14ch;
  font-family: var(--f-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(3rem, 11vw, 5.6rem);
  line-height: .95;
  text-wrap: balance;
}
.hero__title span { color: var(--gold); }
.hero__note { margin: 14px auto 0; max-width: 46ch; color: var(--ink-2); font-size: .95rem; }

/* --- Barra de categorias (sticky) --------------------------------------- */
.filters {
  position: sticky; top: var(--header-h); z-index: 70;
  padding: 10px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t) var(--ease-out);
}
.filters.is-stuck { border-bottom-color: var(--line); }

.filters__row {
  display: flex; align-items: center; gap: 14px;
  max-width: var(--maxw); margin-inline: auto;
  padding-inline: var(--gutter);
}

/* trilho horizontal com esbatimento nas pontas */
.chips-wrap { position: relative; flex: 1; min-width: 0; }
.chips-wrap::before, .chips-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 52px; z-index: 2;
  pointer-events: none; opacity: 0;
  transition: opacity var(--t) var(--ease-out);
}
.chips-wrap::before { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
.chips-wrap::after { right: 0; background: linear-gradient(to left, var(--bg), transparent); }
.chips-wrap[data-fade~="start"]::before { opacity: 1; }
.chips-wrap[data-fade~="end"]::after { opacity: 1; }

.chips {
  position: relative; /* ancora o offsetLeft dos chips usado para os centrar */
  display: flex; gap: 8px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none; -ms-overflow-style: none;
  scroll-snap-type: x proximity;
  padding: 2px 0;
}
.chips::-webkit-scrollbar { display: none; }

/* pesquisa */
.search { position: relative; flex: 0 0 auto; width: 210px; display: none; }
@media (min-width: 860px) { .search { display: block; } }
.search__input {
  width: 100%; padding: 10px 34px 10px 38px;
  border-radius: 999px; border: 0;
  background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: .9rem;
  transition: box-shadow var(--t-fast) var(--ease-out);
}
.search__input::placeholder { color: var(--muted); }
.search__input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--ember); }
.search__icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted); pointer-events: none;
}
.search__clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  display: none; place-items: center; color: var(--muted);
}
.search.has-value .search__clear { display: grid; }
.search__clear:hover { color: var(--ink); background: var(--surface-2); }

/* pesquisa em mobile: linha propria por baixo dos chips */
.search-mobile { max-width: var(--maxw); margin-inline: auto; padding: 10px var(--gutter) 0; }
@media (min-width: 860px) { .search-mobile { display: none; } }
.search-mobile .search { display: block; width: 100%; }

/* --- Menu --------------------------------------------------------------- */
.menu { padding-block: 26px 80px; } /* so na vertical: o .container da a margem lateral */

.group { scroll-margin-top: calc(var(--header-h) + 80px); }
.group + .group { margin-top: 46px; }
.group[hidden] { display: none; }

.group__head {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 18px;
}
.group__title {
  margin: 0;
  font-family: var(--f-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.8rem, 5.4vw, 2.5rem); line-height: 1;
  letter-spacing: .01em;
}
.group__note {
  margin: -8px 0 18px; font-family: var(--f-accent); font-style: italic;
  color: var(--ink-2); font-size: 1rem;
}
.group__rule { flex: 1; height: 1px; background: var(--line); }
.group__count { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 700px) { .grid { gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* estado vazio */
.empty { display: none; padding: 70px 0; text-align: center; color: var(--muted); }
.empty.is-on { display: block; }
.empty strong { display: block; color: var(--ink); font-size: 1.15rem; margin-bottom: 6px; }

/* --- Impressao ---------------------------------------------------------- */
@media print {
  .header, .filters, .search-mobile, .drawer, .sheet, .barra, .toast, .card__media, .card__more { display: none !important; }
  body { background: #fff; color: #000; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .card { box-shadow: none; border-bottom: 1px solid #ddd; border-radius: 0; }
  .hero { padding-top: 0; }
}
