/* Click and Collect, responsive (WIP view only for now): the same guest app, without the phone frame.
   Phone (≤640px): edge to edge, exactly like the phone demo. iPad and computer: the app fills the
   window and its content sits in a centred column sized for each screen (wide for the menu and the
   dish page, narrow for the basket, checkout and order), dish pages in two columns, drawers as
   centred dialogs. Nothing is added or removed: every screen keeps its content. */

body.is-demo .stage--page { padding: 0; gap: 0; height: 100vh; height: 100dvh; }
.page-screen { position: fixed; inset: 0; overflow: hidden; background: #fff; }

/* No fake iPhone chrome: the visitor's own device already has its status and address bars. */
.page-screen .pat { --status: 0px; --urlbar: 0px; }
.page-screen .pat-status, .page-screen .pat-urlbar { display: none; }

@media (min-width: 641px) {
  .page-screen .pat { --col: 680px; --pad: max(0px, calc((100% - var(--col)) / 2)); font-size: 17px; }
  .page-screen .pat:is([data-screen="menu"], [data-screen="category"], [data-screen="product"]) { --col: 1120px; }

  /* Centred column: the page keeps its full-width background and scrollbar at the window edge. */
  .page-screen .pat-scroll, .page-screen .pat-footer { padding-left: var(--pad); padding-right: var(--pad); }
  .page-screen .pat-footer { padding-top: 16px; padding-bottom: 20px; }
  .page-screen .pat-footer--sheet { border-radius: 0; }
  .page-screen .pat-footer > * { width: 100%; max-width: var(--col); margin-inline: auto; }
  .page-screen .pat-footer:not(.pat-footer--above-tabs) { padding-bottom: 20px; }
  .page-screen .pat-ghost { left: 0; right: 0; }

  /* Venue header: a wider cover, the logo still overlapping it. */
  .page-screen .pat-cover { height: 320px; border-radius: 0 0 28px 28px; }
  .page-screen .pat-venue-sheet { display: none; }
  .page-screen .pat-venue-actions { top: 20px; left: 20px; right: 20px; }

  /* Menu: four category tiles per row, bigger photos. */
  .page-screen .pat-categories { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding-top: 32px; }
  .page-screen .pat-category img { height: 180px; border-radius: 16px; }
  .page-screen .pat-carousel { gap: 20px; }

  /* Category: dishes on two columns, wider section photos, "explore" tiles in a row. */
  .page-screen .pat-menu-section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; align-items: start; }
  .page-screen .pat-menu-section > :not(.pat-menu-card-wrap) { grid-column: 1 / -1; }
  .page-screen .pat-section-cover { height: 220px; border-radius: 20px; margin: 16px 16px 0; }
  .page-screen .pat-explore { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .page-screen .pat-explore-tile img { height: 180px; border-radius: 16px; }

  /* Drawers become centred dialogs. */
  .page-screen .pat-drawer { left: 0; right: 0; top: 0; bottom: 0; margin: auto; width: min(560px, calc(100% - 48px)); height: fit-content; max-height: min(86%, 820px); border-radius: 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25); }
  .page-screen .pat-drawer--full { height: min(760px, 90%); }

  /* Basket pill and toasts stay centred, at a comfortable width. */
  .page-screen .pat-basket-bar { left: 50%; right: auto; width: min(560px, calc(100% - 48px)); transform: translateX(-50%); }
  .page-screen .pat-toast { left: 50%; right: auto; width: min(480px, calc(100% - 48px)); transform: translateX(-50%); }

  /* Order page after paying: the map as a wide banner above the ticket. */
  .page-screen .pat-cc-map { height: 300px; border-radius: 0 0 28px 28px; }
}

/* Computer and iPad landscape: the dish page in two columns, photo on the left. */
@media (min-width: 900px) {
  .page-screen .pat[data-screen="product"] .pat-scroll { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; align-content: start; padding-top: 32px; padding-bottom: 32px; }
  .page-screen .pat[data-screen="product"] .pat-scroll > * { grid-column: 2; }
  .page-screen .pat[data-screen="product"] .pat-product-cover { grid-column: 1; grid-row: 1 / span 40; position: sticky; top: 32px; height: auto; aspect-ratio: 1; border-radius: 24px; overflow: hidden; }
  .page-screen .pat[data-screen="product"] .pat-product-info { padding-top: 8px; }
}

/* iPad portrait: three category tiles per row, one column of dishes. */
@media (min-width: 641px) and (max-width: 899px) {
  .page-screen .pat { --col: 720px; }
  .page-screen .pat:is([data-screen="menu"], [data-screen="category"]) { --col: 760px; }
  .page-screen .pat-categories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-screen .pat-menu-section { grid-template-columns: minmax(0, 1fr); }
  .page-screen .pat[data-screen="product"] .pat-product-cover { height: 460px; border-radius: 0 0 24px 24px; overflow: hidden; }
}
