/* Base do cardápio. As cores e fontes de cada restaurante ficam em restaurantes/<nome>/tema.css */
:root {
  --cream: #fbf6ee;
  --paper: #ffffff;
  --sand: #f2e8d8;
  --line: #eadfcb;
  --primary: #c93e24;
  --primary-deep: #a8301a;
  --secondary: #2f5d3a;
  --accent: #f2b33d;
  --ink: #2b1d14;
  --muted: #75655a;


  --primary-rgb: 201, 62, 36;
  --shadow-rgb: 88, 52, 24;
  --shadow-deep-rgb: 60, 14, 4;
  --hero-glow: #dd5a3a;
  --hero-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 64 64'%3E%3Cpath d='M12 56V30a14 14 0 0 1 28 0v26Z' fill='%23fbf6ee' fill-opacity='.08'/%3E%3Ccircle cx='50' cy='16' r='4' fill='%23f2b33d' fill-opacity='.4'/%3E%3C/svg%3E");
  --stage-1: #fffaf1;
  --stage-2: #f6ead7;
  --stage-3: #efe0c8;

  /* cenário 3D (lidos pelo viewer.js) */
  --fog-color: #f3e6d2;
  --table-color: #c4915b;
  --table-grain: 1;

  --font-display: "Fraunces", "New York", Georgia, serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-lg: 28px;
  --radius-md: 20px;
  --shadow-card: 0 1px 0 rgba(43, 29, 20, 0.04), 0 14px 30px -18px rgba(var(--shadow-rgb), 0.35);
  --shadow-lift: 0 1px 0 rgba(43, 29, 20, 0.04), 0 26px 40px -20px rgba(var(--shadow-rgb), 0.45);
}

* { box-sizing: border-box; margin: 0; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; }
button { font: inherit; color: inherit; }
em { font-style: italic; }

/* ---------- Topo ---------- */
.topbar {
  display: flex;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 20px 6px;
}
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; letter-spacing: -0.01em; }
.brand-name em { font-weight: 500; color: var(--primary); }
.brand-sub { font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

/* ---------- Hero ---------- */
.hero { max-width: 1100px; margin: 0 auto; padding: 14px 20px 22px; }

.hero-banner {
  position: relative;
  display: grid;
  gap: 26px;
  overflow: hidden;
  padding: 30px 24px 28px;
  border-radius: 34px;
  background-color: var(--primary);
  background-image:
    var(--hero-pattern),
    radial-gradient(90% 120% at 100% 0%, var(--hero-glow) 0%, transparent 60%);
  color: var(--cream);
  box-shadow: 0 30px 50px -30px rgba(var(--primary-rgb), 0.55);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px 6px 10px;
  border-radius: 999px;
  background: rgba(251, 246, 238, 0.16);
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 700;
}
.eyebrow svg { width: 17px; height: 17px; }

.hero h1 {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 9vw, 3.7rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
}
.hero h1 em { color: var(--accent); font-weight: 500; }
.hero p { margin-top: 14px; max-width: 34ch; color: rgba(251, 246, 238, 0.86); font-size: 1.04rem; }

.steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding: 0; list-style: none; }
.steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  background: rgba(251, 246, 238, 0.14);
  border: 1px solid rgba(251, 246, 238, 0.26);
  font-size: 0.85rem;
  font-weight: 500;
}
.steps b {
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--primary-deep);
  font-size: 0.72rem;
}

/* três pratos redondos sobrepostos */
.hero-art { position: relative; width: min(100%, 420px); aspect-ratio: 6 / 5; justify-self: center; }
.hero-art .plate {
  position: absolute;
  overflow: hidden;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 0 0 7px var(--cream), 0 22px 30px -12px rgba(var(--shadow-deep-rgb), 0.55);
}
.hero-art .plate img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-art .plate:nth-child(1) { left: 2%; top: 14%; width: 58%; aspect-ratio: 1; z-index: 2; }
.hero-art .plate:nth-child(2) { left: 52%; top: 0; width: 42%; aspect-ratio: 1; z-index: 1; }
.hero-art .plate:nth-child(3) { left: 58%; top: 50%; width: 36%; aspect-ratio: 1; z-index: 3; }
.hero-art .sun { position: absolute; left: 6%; top: 1%; z-index: 0; width: 15%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); }
.hero-art .stamp {
  position: absolute;
  left: 0; bottom: 4%;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px 9px 11px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 24px -10px rgba(var(--shadow-deep-rgb), 0.6);
  font-size: 0.85rem;
  font-weight: 700;
}
.hero-art .stamp svg { width: 20px; height: 20px; color: var(--primary); }

/* ---------- Categorias ---------- */
.tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px max(20px, calc((100vw - 1100px) / 2 + 20px));
  background: color-mix(in srgb, var(--cream) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: none;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tab:hover { border-color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }

/* ---------- Lista ---------- */
.menu { max-width: 1100px; margin: 0 auto; padding: 8px 20px 40px; }

.section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 30px 0 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: -0.015em;
}
.section-title small { font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; color: var(--muted); }

.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 10px 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-card);
  text-align: left;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card:active { transform: scale(0.985); }
.card:focus-visible, .tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--sand);
  display: grid;
  place-items: center;
  font-size: 3.4rem;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.card:hover .card-media img { transform: scale(1.05); }

.chip-3d {
  position: absolute;
  left: 10px; bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}
.chip-3d svg { width: 16px; height: 16px; color: var(--primary); }

.card-body { display: flex; flex-direction: column; gap: 6px; padding: 0 8px; }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.2; }
.card-desc { color: var(--muted); font-size: 0.9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.price {
  flex: none;
  padding: 3px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 10%, var(--paper));
  color: var(--primary-deep);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* ---------- Rodapé ---------- */
.footer {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 26px 20px calc(36px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}
.footer strong { color: var(--ink); font-family: var(--font-display); font-size: 1rem; }

/* ---------- Tela do prato ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  animation: sheet-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sheet[hidden] { display: none; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(28px); } }

.sheet-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  touch-action: none;
  background: radial-gradient(80% 60% at 50% 30%, var(--stage-1) 0%, var(--stage-2) 70%, var(--stage-3) 100%);
}
.sheet-stage canvas, .sheet-stage .spin-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}
.sheet-stage .spin-img { object-fit: contain; user-select: none; -webkit-user-drag: none; }

.sheet-loading, .sheet-error {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  pointer-events: none;
}
.sheet-error { color: var(--primary-deep); }
.sheet-loading[hidden], .sheet-error[hidden] { display: none; }

.sheet-hint {
  position: absolute;
  left: 50%; bottom: 18px;
  z-index: 1;
  transform: translateX(-50%);
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.4s;
}
.sheet-hint.fade { opacity: 0; }

.sheet-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 8px 18px -8px rgba(var(--shadow-rgb), 0.5);
  cursor: pointer;
}
.sheet-close svg { width: 20px; height: 20px; }

.sheet-info {
  position: relative;
  padding: 26px 22px calc(26px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-radius: 30px 30px 0 0;
  box-shadow: 0 -18px 40px -22px rgba(var(--shadow-rgb), 0.4);
}
.grabber { position: absolute; top: 9px; left: 50%; width: 38px; height: 4px; border-radius: 4px; background: var(--line); transform: translateX(-50%); }
.sheet-badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--secondary) 12%, var(--paper));
  color: var(--secondary);
  font-size: 0.76rem;
  font-weight: 700;
}
.sheet-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 10px; }
.sheet-row h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; letter-spacing: -0.015em; line-height: 1.15; }
.sheet-row .price { font-size: 1.05rem; }
.sheet-info p { margin-top: 8px; color: var(--muted); font-size: 0.95rem; }

/* Ver na minha mesa (realidade aumentada) */
.ar-box { margin-top: 18px; width: 100%; }
.ar-box[hidden] { display: none; }
.ar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 14px 24px -14px rgba(var(--primary-rgb), 0.8);
  transition: transform 0.15s, filter 0.15s;
}
.ar-btn svg { width: 22px; height: 22px; flex: none; }
.ar-btn:active:not(:disabled) { transform: scale(0.98); }
.ar-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ar-btn:disabled { background: var(--sand); color: var(--muted); box-shadow: none; cursor: default; }
.ar-note { margin-top: 8px; font-size: 0.82rem; text-align: center; }

@media (min-width: 760px) {
  .hero-banner { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 36px; padding: 52px 52px 52px 56px; }
  .sheet { flex-direction: row; }
  .sheet-stage { flex: 1.7; }
  .sheet-info {
    flex: 1;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 44px;
    border-radius: 0;
    box-shadow: -18px 0 40px -26px rgba(var(--shadow-rgb), 0.4);
  }
  .grabber { display: none; }
  .sheet-row { flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 16px; }
  .sheet-row h2 { font-size: 2.4rem; }
  .sheet-info p { font-size: 1.05rem; margin-top: 14px; }
}

/* ---------- Foto com inclinação 3D ---------- */
.photo-view {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  perspective: 900px;
  cursor: grab;
}
.photo-view:active { cursor: grabbing; }

.photo-backdrop {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  opacity: 0.5;
  filter: blur(36px) saturate(1.2);
  pointer-events: none;
}

.photo-float { position: relative; max-width: 90%; animation: photo-float 6s ease-in-out infinite; }
@keyframes photo-float { 50% { transform: translateY(-8px); } }

.photo-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 34px 50px -26px rgba(var(--shadow-rgb), 0.6), 0 0 0 6px var(--paper);
}
.photo-view .photo-img {
  position: static;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(70vh, calc(100dvh - 380px));
  user-select: none;
  -webkit-user-drag: none;
}
.photo-glare {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.32), transparent 55%);
}
@media (min-width: 760px) { .photo-view .photo-img { max-height: 76vh; } }

@media (prefers-reduced-motion: reduce) {
  .sheet, .photo-float { animation: none; }
  .card, .card-media img { transition: none; }
}
