/* Página pública de ofertas (mesmo visual do site publicado) */
:root {
    --bg: #f6f5f2;
    --surface: #ffffff;
    --surface-2: #f0eee9;
    --text: #1b1a17;
    --muted: #6b675f;
    --line: #e4e1d9;
    --accent: #e8452c;
    --accent-ink: #ffffff;
    --accent-soft: #fde8e3;
    --price: #1b1a17;
    --shadow: 0 1px 2px rgba(27,26,23,.06), 0 8px 24px rgba(27,26,23,.06);
    --radius: 18px;
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #121110;
      --surface: #1c1b19;
      --surface-2: #262421;
      --text: #f3f1ec;
      --muted: #a29d93;
      --line: #2f2d29;
      --accent: #ff6a4d;
      --accent-ink: #1a0a06;
      --accent-soft: #3a1d16;
      --price: #f3f1ec;
      --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
      --bg: #121110;
      --surface: #1c1b19;
      --surface-2: #262421;
      --text: #f3f1ec;
      --muted: #a29d93;
      --line: #2f2d29;
      --accent: #ff6a4d;
      --accent-ink: #1a0a06;
      --accent-soft: #3a1d16;
      --price: #f3f1ec;
      --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
      color-scheme: dark;
  }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html, body { margin: 0; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.45;
  }
  .wrap {
    max-width: 1200px; margin: 0 auto;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  body::before {
    content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
    z-index: 11; background: var(--bg);
  }

  /* topo */
  header.hero { padding-block: 48px 28px; }
  .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; letter-spacing: .02em;
    color: var(--accent); background: var(--accent-soft);
    padding: 6px 12px; border-radius: 999px;
  }
  .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s infinite; }
  @keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
  h1 {
    font-size: clamp(32px, 5.5vw, 56px); line-height: 1.04; letter-spacing: -.035em;
    font-weight: 800; margin: 18px 0 12px; max-width: 14ch;
  }
  h1 em { font-style: normal; color: var(--accent); }
  .lead { color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); max-width: 52ch; margin: 0; }
  .stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 28px; }
  .stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .stat span { color: var(--muted); font-size: 13px; }

  /* filtros */
  .toolbar {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
    padding-block: 14px;
  }
  .toolbar .wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
  .search {
    flex: 1 1 240px; display: flex; align-items: center; gap: 8px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px;
  }
  .search svg { flex: none; color: var(--muted); }
  .search input {
    flex: 1; border: 0; outline: 0; background: transparent; color: var(--text);
    font: inherit; font-size: 15px; padding: 11px 0; min-width: 0;
  }
  select {
    font: inherit; font-size: 14px; color: var(--text);
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    padding: 10px 12px; cursor: pointer;
  }
  .chips { display: flex; gap: 8px; overflow-x: auto; padding-block: 2px; scrollbar-width: none; flex: 1 1 100%; }
  .chips::-webkit-scrollbar { display: none; }
  .chip {
    flex: none; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
    color: var(--text); background: var(--surface); border: 1px solid var(--line);
    padding: 7px 14px; border-radius: 999px; transition: .15s;
  }
  .chip:hover { border-color: var(--muted); }
  .chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }

  /* grade */
  main { padding-block: 28px 64px; }
  .count { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
  .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
  .card {
    display: flex; flex-direction: column; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
    color: inherit; text-decoration: none;
  }
  .card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 18px 40px rgba(0,0,0,.12); }
  .card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
  .media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
  .card:hover .media img { transform: scale(1.04); }
  .media .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 44px; }
  .badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--accent); color: var(--accent-ink);
    font-weight: 800; font-size: 14px; letter-spacing: -.01em;
    padding: 6px 10px; border-radius: 10px; font-variant-numeric: tabular-nums;
  }
  .new {
    position: absolute; top: 12px; right: 12px;
    background: rgba(0,0,0,.62); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; padding: 5px 8px; border-radius: 8px; backdrop-filter: blur(6px);
  }
  .body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
  .rest { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
  .title { font-size: 16px; font-weight: 700; line-height: 1.3; margin: 0; letter-spacing: -.01em;
           display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .desc { font-size: 13.5px; color: var(--muted); margin: 0;
          display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .foot { margin-top: auto; padding-top: 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
  .prices { display: flex; flex-direction: column; }
  .old { font-size: 13px; color: var(--muted); text-decoration: line-through; font-variant-numeric: tabular-nums; }
  .now { font-size: 22px; font-weight: 800; color: var(--price); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
  .cta {
    flex: none; display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 700; color: var(--accent);
    background: var(--accent-soft); padding: 9px 12px; border-radius: 10px;
  }
  .card:hover .cta { background: var(--accent); color: var(--accent-ink); }

  .empty { text-align: center; padding: 64px 16px; color: var(--muted); }
  footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding-block: 24px 40px; }
  footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

  @media (max-width: 520px) {
    header.hero { padding-block: 32px 20px; }
    .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .body { padding: 12px; }
    .title { font-size: 14px; }
    .desc { display: none; }
    .now { font-size: 18px; }
    .cta span { display: none; }
    .foot { flex-wrap: wrap; }
  }
  @media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* painel com o site do restaurante */
.painel {
  width: min(1100px, 96vw); height: min(92vh, 1000px); max-width: none; max-height: none;
  padding: 0; border: 0; border-radius: 20px; overflow: hidden;
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.painel[open] { display: flex; flex-direction: column; }
.painel::backdrop { background: rgba(15, 14, 12, .55); backdrop-filter: blur(3px); }
.painel-topo {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.painel-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.painel-info b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.painel-externo {
  flex: none; font-size: 13px; font-weight: 700; text-decoration: none;
  color: var(--accent); background: var(--accent-soft); padding: 9px 12px; border-radius: 10px;
}
.painel-externo:hover { background: var(--accent); color: var(--accent-ink); }
.painel-fechar {
  flex: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 16px; cursor: pointer;
}
.painel-fechar:hover { border-color: var(--muted); }
.painel-corpo { position: relative; flex: 1; background: #fff; }
.painel-corpo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.painel-carregando {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 1;
  background: var(--surface); color: var(--muted); font-size: 14px;
}
.painel-dica { margin: 0; padding: 8px 18px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface); }

@media (max-width: 640px) {
  .painel { width: 100vw; height: 100dvh; border-radius: 0; }
  .painel-topo { padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px 14px; gap: 8px; }
  .painel-externo { padding: 8px 10px; font-size: 12px; }
  .painel-dica { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
}
