*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f6f5f3;
  color: #1c1917;
  padding-bottom: 96px;
}

/* Header */
.hero {
  position: relative;
  background: var(--accent, #9a3412);
  color: #fff;
  text-align: center;
  padding: 28px 20px 22px;
  overflow: hidden;
}
.hero.has-banner { padding: 46px 20px 26px; }
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .38;
}
.hero.has-banner::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.55) 100%);
}
.hero-content { position: relative; z-index: 2; }
.hero.has-banner h1 { text-shadow: 0 1px 12px rgba(0,0,0,.5); }
.hero-logo {          /* fixed height, natural width — wordmarks are not square */
  display: block;
  height: 96px; width: auto;
  max-width: min(86%, 420px);
  object-fit: contain;
  margin: 0 auto 6px;
}
.hero h1 { margin: 0; font-size: 1.5rem; letter-spacing: .3px; }
.tagline { margin: 4px 0 0; opacity: .85; font-size: .9rem; }

/* Offer banners — one per view on phones, three on wide screens.
   Scrolling/snapping is native CSS; JS only adds dots and arrows. */
.promos { position: relative; padding: 12px 14px 4px; max-width: 640px; margin: 0 auto; }
.promos-track {
  display: flex; gap: 10px;
  align-items: flex-start;   /* stretch would override the banners' aspect-ratio */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.promos-track::-webkit-scrollbar { display: none; }
.promos-track img {
  flex: 0 0 100%;            /* exactly one banner per view */
  min-width: 0;              /* else the image's intrinsic width is its floor and flex-basis is ignored */
  scroll-snap-align: start;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: 12px;
  background: #e7e5e4;
}
/* aspect-ratio is recent; keep older mobile browsers from collapsing the strip */
@supports not (aspect-ratio: 2 / 1) {
  .promos-track img { height: 46vw; max-height: 260px; }
}

.promo-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.promo-dots button {
  width: 7px; height: 7px; padding: 0;
  border: 0; border-radius: 50%;
  background: #d6d3d1;
  transition: width .2s, background .2s;
}
.promo-dots button.active { width: 20px; border-radius: 99px; background: var(--accent); }

/* arrows are for pointer users; on a phone you just swipe */
.promo-nav { display: none; }

/* Search + filters */
.toolbar {
  position: sticky; top: 0; z-index: 20;
  background: #f6f5f3;
  padding: 10px 14px 8px;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.toolbar-inner { max-width: 640px; margin: 0 auto; }
#search {
  width: 100%;
  padding: 10px 14px;
  font-size: 1rem;
  border: 1px solid #ddd6ce;
  border-radius: 10px;
  background: #fff;
  outline: none;
}
#search:focus { border-color: var(--accent); }
.chips { display: flex; gap: 8px; margin-top: 8px; }
.chip {
  border: 1px solid #ddd6ce;
  background: #fff;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: .82rem;
  color: #57534e;
}
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-veg.active { background: #15803d; border-color: #15803d; }
.chip-nonveg.active { background: #b91c1c; border-color: #b91c1c; }

/* Categories & items */
#menu { padding: 4px 14px 20px; max-width: 640px; margin: 0 auto; }

/* Jumping to a section must land it BELOW the sticky toolbar, not under it.
   --toolbar-h is measured in menu.js because the toolbar's height depends on
   whether the veg filter chips are there. */
.cat { scroll-margin-top: calc(var(--toolbar-h, 62px) + 6px); }

/* The section title sticks while you are inside that section, so it is always
   clear what you are looking at. */
.cat h2 {
  position: sticky; top: var(--toolbar-h, 62px); z-index: 10;
  font-size: 1.05rem;
  margin: 18px -14px 8px; padding: 8px 16px;
  background: #f6f5f3;
  display: flex; align-items: center; gap: 8px;
}
.cat h2 .count {
  font-size: .72rem; font-weight: 600;
  color: #78716c; background: #e7e5e4;
  border-radius: 999px; padding: 2px 8px;
}
.item {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff;
  border: 1px solid #eee8e2;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.item-body { flex: 1; min-width: 0; }
.item-top { display: flex; align-items: flex-start; gap: 8px; }
.item h3 { margin: 0; font-size: .98rem; line-height: 1.3; }
.thumb {
  width: 86px; height: 86px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

/* FSSAI veg / non-veg / egg marks */
.fssai {
  flex-shrink: 0;
  width: 15px; height: 15px;
  border: 1.5px solid;
  border-radius: 3px;
  position: relative;
  margin-top: 2px;
}
.fssai::after {
  content: "";
  position: absolute; inset: 0; margin: auto;
}
.fssai.veg { border-color: #15803d; }
.fssai.veg::after { width: 7px; height: 7px; border-radius: 50%; background: #15803d; }
.fssai.egg { border-color: #ca8a04; }
.fssai.egg::after { width: 7px; height: 7px; border-radius: 50%; background: #ca8a04; }
.fssai.nonveg { border-color: #b91c1c; }
.fssai.nonveg::after {
  width: 0; height: 0;
  border-left: 4.5px solid transparent;
  border-right: 4.5px solid transparent;
  border-bottom: 8px solid #b91c1c;
}

.price { margin: 7px 0 0; font-weight: 700; font-size: .95rem; }
.price .portion { margin-right: 12px; white-space: nowrap; }
.price .portion em { font-style: normal; font-weight: 500; color: #78716c; font-size: .82rem; }
.price .qty { font-style: normal; font-weight: 500; color: #78716c; font-size: .82rem; margin-left: 6px; }
.desc {
  margin: 5px 0 0;
  font-size: .84rem; color: #78716c; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.item { cursor: pointer; }
.item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Dish popup */
.dish {
  width: min(420px, calc(100vw - 32px));
  padding: 0; border: 0; border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.dish::backdrop { background: rgba(0, 0, 0, .82); }
.dish-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e7e5e4; }
/* an author `display` beats the browser's [hidden] rule, so say it explicitly */
.dish-photo[hidden] { display: none; }
.dish-body { padding: 18px 20px 22px; }
.dish-name { margin: 0; font-size: 1.2rem; line-height: 1.25; }
.dish-price { margin: 8px 0 0; font-weight: 700; font-size: 1.05rem; }
.dish-price .portion { margin-right: 14px; white-space: nowrap; }
.dish-price .portion em { font-style: normal; font-weight: 500; color: #78716c; font-size: .85rem; }
.dish-price .qty { font-style: normal; font-weight: 500; color: #78716c; font-size: .85rem; margin-left: 6px; }
.dish-desc { margin: 10px 0 0; color: #57534e; font-size: .92rem; line-height: 1.5; }
.dish-desc:empty { display: none; }
.dish-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.92); color: #1c1917;
  font-size: 1.4rem; line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  cursor: pointer;
}
/* the dialog auto-focuses this; keep a ring for keyboard users, in brand colour */
.dish-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dish-close:focus:not(:focus-visible) { outline: none; }

.empty { text-align: center; color: #78716c; margin: 48px 0; }
.hidden { display: none !important; }


/* Order list: - / + after each portion, the bar, and the list for the waiter */
.step {
  display: inline-flex; align-items: center; gap: 2px; vertical-align: middle;
  margin-left: 8px; border: 1.5px solid var(--accent); border-radius: 999px;
  background: #fff; white-space: nowrap;
}
.step-b {
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--accent);
  font-size: 1.25rem; font-weight: 700; line-height: 1; cursor: pointer;
}
.step-n { min-width: 1.4em; text-align: center; font-size: .92rem; color: #1c1917; }
.step.on { background: var(--accent); }
.step.on .step-b, .step.on .step-n { color: #fff; }
.dish-price .step { margin-left: 10px; }

.order-bar {
  position: fixed; left: 12px; right: 12px; bottom: 14px; z-index: 42;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px; border: 0; border-radius: 14px;
  background: var(--accent); color: #fff; font-size: 1rem; font-weight: 600;
  box-shadow: 0 6px 18px rgba(0,0,0,.3); cursor: pointer;
}
.order-bar b { font-weight: 800; }
/* the category button rides above the bar once there is an order */
body.has-order .fab { bottom: 82px; }
body.has-order .site-foot { padding-bottom: 90px; }
.order-note { margin: 4px 0 12px; color: #78716c; font-size: .88rem; }
.order-list { list-style: none; margin: 0; padding: 0; }
.order-list li {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid #eee8e2;
}
.ol-name { grid-column: 1 / 2; font-weight: 700; font-size: 1.02rem; }
.ol-sub { grid-column: 1 / 2; color: #78716c; font-size: .82rem; }
.order-list .step { grid-column: 2; grid-row: 1 / 3; margin: 0; }
.order-clear {
  display: block; margin: 16px auto 0; padding: 8px 16px; border: 0; background: none;
  color: #78716c; font-size: .86rem; text-decoration: underline; cursor: pointer;
}
.dish.order { max-height: calc(100vh - 32px); overflow-y: auto; }
@media (min-width: 900px) {
  .order-bar { left: auto; right: 20px; bottom: 20px; width: 340px; }
  body.has-order .fab { bottom: 22px; }
}

/* Footer — address and phone live here */
.site-foot { text-align: center; padding: 18px 20px 26px; }
.foot-contact {
  max-width: 640px; margin: 0 auto 14px;
  padding-top: 16px; border-top: 1px solid #e7e5e4;
}
.foot-address { margin: 0; font-size: .86rem; color: #57534e; line-height: 1.5; }
.foot-phone {
  display: inline-block; margin-top: 8px;
  font-size: 1rem; font-weight: 700;
  color: var(--accent); text-decoration: none;
}
.foot-credit { color: #a8a29e; font-size: .72rem; text-decoration: none; }

/* Category FAB + bottom sheet */
.fab {
  position: fixed; bottom: 22px; right: 16px;   /* right, so it clears the item rows */
  z-index: 40;
  background: #1c1917; color: #fff;
  border: 0; border-radius: 999px;
  padding: 12px 22px;
  font-size: .9rem; font-weight: 600;
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
}
.sheet-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 45;
  background: rgba(0,0,0,.45);
}
.sheet-overlay.open { display: block; }
.sheet {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 18px 20px 26px;
  max-height: 65vh; overflow-y: auto;
}
.sheet.open { display: block; }
.sheet h4 { margin: 0 0 10px; font-size: .8rem; text-transform: uppercase; letter-spacing: .8px; color: #78716c; }
.sheet ul { list-style: none; margin: 0; padding: 0; }
.sheet li a {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 2px;
  color: #1c1917; text-decoration: none; font-weight: 500;
  border-bottom: 1px solid #f5f5f4;
}
.sheet .count { flex-shrink: 0; }
.sheet li:last-child a { border-bottom: 0; }
.sheet .count { color: #a8a29e; font-size: .8rem; }

/* ---------------------------------------------------------------------------
   Wide screens: the bottom sheet becomes a permanent sidebar (same markup),
   the floating button goes away, and items use the width instead of leaving
   most of the page empty.
   --------------------------------------------------------------------------- */
@media (min-width: 900px) {
  body { padding-bottom: 24px; }

  .promos { max-width: 1180px; padding: 18px 20px 6px; }
  .promos-track img { flex-basis: calc((100% - 20px) / 3); }   /* three across, two 10px gaps */
  .promo-nav {
    display: grid; place-items: center;
    position: absolute; top: calc(50% - 12px); transform: translateY(-50%);
    width: 38px; height: 38px; z-index: 5;
    border: 1px solid #e7e5e4; border-radius: 50%;
    background: #fff; color: #1c1917;
    font-size: 1.3rem; line-height: 1; padding-bottom: 3px;
    box-shadow: 0 3px 10px rgba(0,0,0,.16);
    cursor: pointer;
  }
  .promo-prev { left: 2px; }
  .promo-next { right: 2px; }

  .hero.has-banner { padding: 74px 20px 56px; }
  .hero h1 { font-size: 2rem; }
  .hero-logo { height: 128px; max-width: min(62%, 560px); }

  .toolbar { padding: 14px 20px 12px; }
  .toolbar-inner { max-width: 1180px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
  .toolbar-inner #search { flex: 1; min-width: 320px; }
  .chips { margin-top: 0; flex-shrink: 0; }

  .layout {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
  }

  /* same element, different job */
  .fab, .sheet-overlay, .sheet-overlay.open { display: none; }
  .sheet, .sheet.open {
    display: block;
    position: sticky; top: 84px;
    left: auto; right: auto; bottom: auto;
    z-index: 1;
    border-radius: 14px;
    border: 1px solid #eee8e2;
    padding: 16px 18px;
    max-height: calc(100vh - 110px);
    margin-top: 26px;
  }

  #menu { padding: 4px 0 24px; max-width: none; margin: 0; }
  .cat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .cat h2 { grid-column: 1 / -1; margin: 22px 0 4px; padding: 10px 4px; }
  .item { margin-bottom: 0; }
}

