/* Barkada House — digital menu. Mobile first, no frameworks. */
:root {
  --gold: #D0AA2B;
  --gold-dk: #A9861B;
  --gold-lt: #F6EBC6;
  --brown: #392214;
  --brown-2: #5A3A24;
  --red: #E61D25;
  --maroon: #9C364B;
  --cream: #FBF7EE;
  --card: #FFFFFF;
  --ink: #2A1A10;
  --muted: #7A6656;
  --line: #EDE3CF;
  --ph: #EFE8DA;           /* image placeholder (matches photo backgrounds) */
  --radius: 16px;
  --bar-h: 108px;          /* sticky bar height, updated by JS */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Arial Rounded MT Bold", "Nunito", ui-rounded, "SF Pro Rounded", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--bar-h); }
html.lock { overflow: hidden; }
body {
  margin: 0;
  font: 15px/1.45 var(--font);
  color: var(--ink);
  background: var(--cream);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
h1, h2, h3, p { margin: 0; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(120% 80% at 85% -10%, rgba(255,255,255,.28), transparent 60%),
    linear-gradient(180deg, var(--gold) 0%, #C99F22 100%);
  color: #fff;
  padding: max(22px, env(safe-area-inset-top)) 0 18px;
  overflow: hidden;
}
.hero__inner { padding: 6px 20px 0; text-align: center; }
.hero__kicker {
  display: inline-block;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700;
  background: rgba(57,34,20,.18); padding: 5px 12px; border-radius: 999px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px, 15vw, 76px);
  line-height: .92;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 12px 0 10px;
  text-shadow: 0 3px 0 rgba(57,34,20,.18);
}
.hero__addr {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; opacity: .95;
}
.btn-call {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 12px auto 0;
  background: var(--red); color: #fff; text-decoration: none;
  font-weight: 800; font-size: 15px; letter-spacing: .02em;
  padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 6px 16px -6px rgba(140,10,15,.6);
}
.btn-call:active { transform: scale(.97); }

/* highlight tiles under the logo (from the printed cover) */
.highlights {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr);
  gap: 10px; overflow-x: auto; padding: 18px 20px 4px;
  scroll-snap-type: x mandatory; scroll-padding: 0 20px; scrollbar-width: none;
}
.highlights::-webkit-scrollbar { display: none; }
.hl {
  position: relative; display: block; scroll-snap-align: start;
  border-radius: 14px; overflow: hidden; background: var(--ph);
  aspect-ratio: 1 / 1; text-decoration: none;
  border: 3px solid #fff; box-shadow: 0 8px 18px -10px rgba(57,34,20,.6);
}
.hl img { width: 100%; height: 100%; object-fit: cover; }
.hl__t {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 10px 8px; color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(30,16,8,.85));
  font-weight: 800; font-size: 13.5px; line-height: 1.2;
}
.hl__p { display: block; font-size: 12px; font-weight: 700; color: var(--gold-lt); margin-top: 2px; }

/* ---------- Sticky bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.bar__search { display: flex; gap: 8px; padding: 10px 14px 6px; }
.search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 0 12px; height: 42px; color: var(--muted);
}
.search:focus-within { border-color: var(--gold); }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: 16px var(--font); color: var(--ink); height: 100%;
}
.search input::-webkit-search-cancel-button { cursor: pointer; }
.view-toggle {
  width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; display: grid; place-items: center; color: var(--brown); font-size: 18px; cursor: pointer;
}
/* shows the view you will switch TO */
.view-toggle .i-grid { display: none; }
.list-view .view-toggle .i-grid { display: block; }
.list-view .view-toggle .i-list { display: none; }

.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 6px 14px 10px;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 0; cursor: pointer;
  padding: 8px 14px; border-radius: 999px;
  background: #fff; color: var(--brown-2);
  font-size: 13.5px; font-weight: 700; white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: background-color .15s, color .15s;
}
.chip.is-active { background: var(--brown); color: #fff; box-shadow: none; }

/* ---------- Sections ---------- */
.menu { padding: 6px 0 24px; }
.sec { padding: 22px 14px 4px; scroll-margin-top: var(--bar-h); }
.sec[hidden] { display: none; }
.sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 2px 12px; }
.sec__title { font-family: var(--font-display); font-weight: 900; font-size: 21px; line-height: 1.15; color: var(--brown); }
.sec__en { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.sec__count {
  flex: none; font-size: 12px; font-weight: 800; color: var(--gold-dk);
  background: var(--gold-lt); padding: 3px 9px; border-radius: 999px;
}

/* ---------- Item cards ---------- */
.items { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit; position: relative;
  box-shadow: 0 1px 2px rgba(57,34,20,.06), 0 6px 16px -10px rgba(57,34,20,.25);
  transition: transform .12s ease;
}
.card:active { transform: scale(.98); }
.card[hidden] { display: none; }
.ph { background: var(--ph); aspect-ratio: 1 / 1; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 10px 11px 11px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card__name { font-size: 14.5px; font-weight: 800; line-height: 1.25; }
.card__desc {
  font-size: 12.5px; color: var(--muted); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta { margin-top: auto; padding-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.price { font-weight: 900; color: var(--red); font-size: 15px; white-space: nowrap; }
.price small { font-size: .78em; font-weight: 800; }
.cal { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tag {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  background: var(--gold); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .03em;
  padding: 3px 8px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.18);
}

/* list view */
.list-view .items { grid-template-columns: 1fr; gap: 10px; }
.list-view .card { flex-direction: row; align-items: stretch; }
.list-view .ph { width: 104px; flex: none; aspect-ratio: auto; min-height: 104px; }
.list-view .card__body { padding: 10px 12px; }
.list-view .tag { top: 6px; left: 6px; font-size: 10px; padding: 2px 6px; }

/* ---------- Combos ---------- */
.sec--combo { padding-left: 0; padding-right: 0; }
.sec--combo .sec__head { margin-left: 16px; margin-right: 16px; }
.free {
  margin: 0 14px 14px; padding: 12px 14px;
  background: var(--brown); color: #fff; border-radius: 14px;
  display: flex; gap: 12px; align-items: flex-start;
}
.free__badge {
  flex: none; background: var(--red); color: #fff; font-weight: 900; font-size: 12px; letter-spacing: .06em;
  padding: 4px 8px; border-radius: 6px; margin-top: 1px;
}
.free p { font-size: 13px; line-height: 1.45; }
.free strong { color: var(--gold); }
.combos {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(82vw, 330px);
  gap: 12px; overflow-x: auto; padding: 2px 14px 10px;
  scroll-snap-type: x mandatory; scroll-padding: 0 14px; scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.combos::-webkit-scrollbar { display: none; }
.combo {
  scroll-snap-align: start; display: flex; flex-direction: column;
  background: var(--card); border-radius: 18px; overflow: hidden; text-decoration: none; color: inherit;
  box-shadow: 0 1px 2px rgba(57,34,20,.06), 0 10px 22px -14px rgba(57,34,20,.45);
}
.combo[hidden] { display: none; }
.combo .ph { aspect-ratio: 4 / 3; position: relative; }
.combo__price {
  position: absolute; right: 10px; top: 10px;
  background: var(--maroon); color: #fff; font-weight: 900; font-size: 16px;
  padding: 5px 11px; border-radius: 10px; box-shadow: 0 4px 12px -4px rgba(0,0,0,.4);
}
.combo__body { padding: 12px 14px 14px; }
.combo__name { font-family: var(--font-display); font-weight: 900; font-size: 18px; color: var(--brown); }
.combo__dishes { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; }
.combo__dishes li { font-size: 13.5px; font-weight: 600; padding-left: 16px; position: relative; }
.combo__dishes li::before {
  content: ""; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
}
.combo__more { margin-top: 10px; font-size: 12px; color: var(--muted); font-weight: 600; }
.combo__more b { color: var(--red); }
.swipe-hint { text-align: center; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Empty / footer ---------- */
.empty { text-align: center; color: var(--muted); padding: 40px 20px 60px; font-weight: 600; }
.foot {
  background: var(--brown); color: #E9DCCB; text-align: center;
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom)); font-size: 13.5px; display: grid; gap: 4px;
}
.foot a { color: #fff; font-weight: 700; text-decoration: none; }
.foot__name { font-family: var(--font-display); font-weight: 900; font-size: 20px; color: var(--gold); text-transform: uppercase; letter-spacing: .04em; }
.foot__note { font-size: 11.5px; opacity: .7; margin-top: 8px; }

/* ---------- Bottom sheet ---------- */
.sheet {
  padding: 0; border: 0; margin: 0; background: transparent;
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  overflow: hidden;
}
.sheet::backdrop { background: rgba(25,14,6,.55); }
.sheet[open] { display: flex; align-items: flex-end; justify-content: center; }
.sheet__panel {
  position: relative; width: 100%; max-width: 560px;
  max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 22px 22px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  animation: sheet-up .32s cubic-bezier(.2,.9,.25,1);
  will-change: transform;
}
.sheet.closing .sheet__panel { animation: sheet-down .22s ease-in forwards; }
.sheet.closing::backdrop { opacity: 0; transition: opacity .22s; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { to { transform: translateY(100%); } }
.sheet__grip {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 42px; height: 5px; border-radius: 9px; background: rgba(255,255,255,.85);
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.sheet__close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--brown); font-size: 20px;
  display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
.sh__img { background: var(--ph); aspect-ratio: 1 / 1; }
.sh__img.wide { aspect-ratio: 4 / 3; }
.sh__img img { width: 100%; height: 100%; object-fit: cover; }
.sh__body { padding: 16px 20px 24px; }
.sh__cat { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dk); }
.sh__name { font-family: var(--font-display); font-weight: 900; font-size: 26px; line-height: 1.15; color: var(--brown); margin-top: 4px; }
.sh__desc { margin-top: 8px; color: #4D3A2C; font-size: 15px; }
.sh__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.sh__price { font-size: 26px; font-weight: 900; color: var(--red); }
.sh__price small { font-size: .6em; }
.sh__cal { display: inline-flex; align-items: center; gap: 6px; background: var(--gold-lt); color: var(--brown-2); font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; }
.sizes { display: grid; gap: 8px; margin-top: 16px; }
.size { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--cream); border: 1.5px solid var(--line); font-weight: 700; }
.size .price { font-size: 18px; }
.sh__h { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.sh__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.sh__list li { padding: 10px 12px; background: var(--cream); border-radius: 10px; font-weight: 700; border: 1px solid var(--line); }
.freebies { display: flex; flex-wrap: wrap; gap: 6px; }
.freebies span { background: #FDECEC; color: #B3141B; font-weight: 700; font-size: 13px; padding: 6px 10px; border-radius: 999px; }
.sh__actions { display: flex; gap: 10px; margin-top: 20px; }
.btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; border-radius: 14px; border: 0; cursor: pointer; text-decoration: none;
  font-weight: 800; font-size: 15px;
}
.btn--call { background: var(--red); color: #fff; }
.btn--ghost { background: var(--cream); color: var(--brown); border: 1.5px solid var(--line); }

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  .items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .sec { padding-left: 20px; padding-right: 20px; }
  .highlights { justify-content: center; grid-auto-columns: 170px; }
}
@media (min-width: 900px) {
  .menu, .bar__search, .chips { max-width: 1100px; margin-left: auto; margin-right: auto; }
  .items { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .list-view .items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet[open] { align-items: center; }
  .sheet__panel { border-radius: 22px; max-height: 88vh; }
  .sheet__grip { display: none; }
}
@media (hover: hover) {
  .card:hover, .combo:hover { box-shadow: 0 2px 4px rgba(57,34,20,.08), 0 14px 26px -14px rgba(57,34,20,.45); }
  .chip:hover:not(.is-active) { background: var(--gold-lt); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
