:root {
  --cream: #FBF3E4;
  --paper: #FFFBF3;
  --coral: #E4553C;
  --coral-d: #B93E28;
  --teal: #1E9C92;
  --teal-d: #0E5F5B;
  --ink: #2A2623;
  --muted: #7A6F66;
  --line: #ECDDC3;
  --gold: #F4B23F;
  --shadow: 0 10px 30px -12px rgba(79, 52, 20, .28);
  --radius: 18px;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --body: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 20%, rgba(30,156,146,.07) 0 2px, transparent 3px) 0 0 / 26px 26px,
    var(--cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button, input { font: inherit; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--teal) 0%, var(--teal-d) 100%);
  padding: 28px 16px 0;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.18);
  pointer-events: none;
}
.hero::before { width: 380px; height: 380px; top: -180px; right: -140px; }
.hero::after { width: 240px; height: 240px; top: 40px; left: -120px; }
.hero-wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 56px; }
.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 46px;
  animation: rise .8s cubic-bezier(.2,.7,.2,1) both;
}
.logo-card {
  width: min(250px, 70vw);
  background: var(--cream);
  border-radius: 22px;
  padding: 10px;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.45), inset 0 0 0 3px #fff8;
  transform: rotate(-1.5deg);
}
.logo { width: 100%; height: auto; mix-blend-mode: multiply; border-radius: 12px; }
.ribbon {
  margin: 14px 0 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  font-size: 15px;
  background: var(--coral);
  padding: 6px 18px;
  border-radius: 999px;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.4);
}
.notices { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.notices span {
  font-size: 12.5px;
  color: #fff;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
  padding: 5px 11px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.notices span.cash { background: #fff; color: var(--coral-d); font-weight: 700; border-color: #fff; }

/* ---------- Category nav ---------- */
.cats {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 12px 14px;
  background: rgba(251,243,228,.88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.cats::-webkit-scrollbar { display: none; }
.cats.stuck { box-shadow: 0 8px 22px -14px rgba(60,40,15,.45); }
.cat-pill {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 4px 14px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: transform .2s, background .25s, color .25s, border-color .25s;
  white-space: nowrap;
}
.cat-pill img {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  border: 2px solid #fff;
}
.cat-pill:active { transform: scale(.96); }
.cat-pill.active { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 6px 16px -8px var(--teal-d); }

/* ---------- Toolbar / search ---------- */
.toolbar { padding: 16px 16px 4px; max-width: 980px; margin: 0 auto; }
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  box-shadow: 0 2px 0 var(--line);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(30,156,146,.15); }
.search svg { width: 20px; height: 20px; stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; flex: 0 0 auto; }
.search input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 13px 0;
  font-size: 16px; /* evita zoom automático en iOS */
  color: var(--ink);
  outline: none;
  min-width: 0;
}

/* ---------- Menu ---------- */
main { max-width: 980px; margin: 0 auto; padding: 8px 16px 24px; min-width: 0; }
.loading { text-align: center; color: var(--muted); padding: 60px 0; }

.cat-sec { scroll-margin-top: 120px; padding: 26px 0 8px; }
.cat-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}
.cat-photo {
  flex: 0 0 auto;
  width: 84px; height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--coral);
  box-shadow: 0 0 0 4px var(--cream), 0 10px 22px -10px rgba(0,0,0,.5);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.cat-sec:hover .cat-photo { transform: rotate(-8deg) scale(1.04); }
.cat-head > div { min-width: 0; flex: 1; }
.cat-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.02; text-transform: uppercase; color: var(--coral); letter-spacing: .02em; overflow-wrap: anywhere; }
@media (max-width: 420px) { .cat-title { font-size: 27px; } .cat-photo { width: 72px; height: 72px; } }
.cat-note { margin: 6px 0 0; color: var(--muted); font-size: 14px; font-style: italic; }

.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 720px) { .items { grid-template-columns: 1fr 1fr; column-gap: 16px; } }

.item {
  width: 100%;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px 10px 10px;
  cursor: pointer;
  color: inherit;
  transition: transform .2s, box-shadow .25s, border-color .25s;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.item:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #E2CDA8; }
.item:active { transform: scale(.98); }
.item:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.item-thumb {
  width: 58px; height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--coral);
  background: var(--line);
}
.item-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.item-name { font-weight: 700; font-size: 16px; line-height: 1.25; min-width: 0; }
.item-leader { flex: 1; min-width: 12px; border-bottom: 2px dotted #D9C6A6; transform: translateY(-4px); }
.item-price { font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--coral-d); white-space: nowrap; }
.item-price small { font-family: var(--body); font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 3px; }
.item-desc { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.item-sizes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.item-sizes span { font-size: 12px; background: #E6F4F2; color: var(--teal-d); border-radius: 999px; padding: 2px 9px; font-weight: 700; }
.item-tag { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--muted); border-radius: 6px; padding: 2px 6px; vertical-align: middle; }
.item.soldout { opacity: .55; }
.item.soldout .item-thumb { filter: grayscale(.8); }

.empty { text-align: center; color: var(--muted); padding: 40px 10px; display: none; }
.empty.show { display: block; }
.hidden { display: none !important; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 30px 20px 48px; color: var(--muted); }
.footer-logo { width: 110px; margin: 0 auto; mix-blend-mode: multiply; opacity: .9; }
.thanks { font-family: var(--display); font-size: 26px; color: var(--teal-d); text-transform: uppercase; letter-spacing: .06em; margin: 10px 0 6px; }
.footer-note { font-size: 12.5px; max-width: 520px; margin: 0 auto; line-height: 1.5; display: grid; gap: 6px; }
.footer-line { display: block; }

/* ---------- Sheet (ficha del platillo) ---------- */
.sheet {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  background: var(--paper);
  color: var(--ink);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -20px 60px -10px rgba(0,0,0,.4);
  position: fixed;
  inset: auto 0 0 0;
  margin-inline: auto;
  overflow: hidden;
}
.sheet::backdrop { background: rgba(30, 20, 10, .55); backdrop-filter: blur(3px); }
.sheet[open] { animation: slideUp .42s cubic-bezier(.2,.9,.2,1); }
.sheet.closing { animation: slideDown .26s ease-in forwards; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes slideDown { to { transform: translateY(100%); } }
@media (min-width: 720px) {
  .sheet { inset: 50% auto auto 50%; transform: translate(-50%, -50%); border-radius: 24px; max-height: 90vh; }
  .sheet[open] { animation: pop .35s cubic-bezier(.2,.9,.2,1); }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.96); } to { opacity: 1; transform: translate(-50%, -50%); } }
}
.sheet-inner { overflow-y: auto; max-height: inherit; }
.sheet-media { position: relative; background: #EADBC2; aspect-ratio: 4 / 3; }
.sheet-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s, transform .4s; }
.sheet-media img.swap { opacity: 0; transform: scale(1.03); }
.sheet-close, .sheet-nav {
  position: absolute;
  z-index: 2;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.5);
  display: grid;
  place-items: center;
  transition: transform .2s;
}
.sheet-close { top: 12px; right: 12px; }
.sheet-nav { top: 50%; transform: translateY(-50%); }
.sheet-nav.prev { left: 12px; }
.sheet-nav.next { right: 12px; }
.sheet-nav:active, .sheet-close:active { transform: translateY(-50%) scale(.9); }
.sheet-close:active { transform: scale(.9); }
.sheet-nav:disabled { opacity: .3; cursor: default; }
.sheet-caption {
  position: absolute; left: 12px; bottom: 10px;
  font-size: 11.5px; color: #fff; background: rgba(0,0,0,.45);
  padding: 3px 9px; border-radius: 999px;
}
.sheet-caption:empty { display: none; }
.sheet-body { padding: 18px 22px 26px; }
.sheet-cat { margin: 0; font-family: var(--display); text-transform: uppercase; letter-spacing: .12em; font-size: 13px; color: var(--teal); font-weight: 600; }
.sheet-name { margin: 4px 0 6px; font-family: var(--display); font-size: 32px; font-weight: 700; line-height: 1.05; text-transform: uppercase; }
.sheet-price { margin: 0; font-family: var(--display); font-size: 30px; color: var(--coral-d); font-weight: 600; }
.sheet-price:empty { display: none; }
.sheet-sizes { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-sizes li { background: #E6F4F2; color: var(--teal-d); border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.sheet-sizes li b { display: block; font-family: var(--display); font-size: 19px; color: var(--teal-d); }
.sheet-sizes:empty { display: none; }
.sheet-desc { margin: 14px 0 0; line-height: 1.55; color: #4D4641; font-size: 15.5px; }
.sheet-desc:empty { display: none; }
.sheet-hint { margin: 18px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.sheet-tag { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700; color: #fff; background: var(--muted); border-radius: 6px; padding: 3px 8px; }
.sheet-tag:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
