/*
 * The menu pages (/menu/ and /menu/<category>/), laid out like the loyalty
 * app's Menu tab: big serif tabs, a Featured shelf, a sideways shelf per
 * category with "View all", and Discover's ranked Popular list. Colors are
 * the app's (apps/mobile/src/constants/theme.ts). Also a few rules for the
 * drink pages the build makes.
 */
:root {
  --m-ink: #1a1512;
  --m-muted: #6b5f55;
  --m-faint: #b8ab9c;
  --m-crimson: #a30c1f;
  --m-field: #e1d6c6;
  --m-line: #ede4d6;
  --m-cream: #faf6ef;
}

.m-wrap { max-width: 1040px; margin: 0 auto; padding: 12px 24px 40px; box-sizing: border-box; color: var(--m-ink); }
.m-wrap [data-hidden] { display: none !important; }

/* Menu / Discover */
.m-tabs { display: flex; align-items: flex-end; gap: 24px; margin-top: 16px; }
.m-tab {
  position: relative; border: 0; background: none; padding: 0 0 8px; margin: 0; cursor: pointer;
  font-family: var(--font-serif); font-size: 34px; line-height: 38px; color: var(--m-faint);
}
.m-tab[aria-selected="true"] { color: var(--m-ink); }
.m-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 3px; border-radius: 2px; background: var(--m-crimson); }
.m-tab:focus-visible { outline: 2px solid var(--m-crimson); outline-offset: 4px; }

.m-store { margin-top: 2px; display: flex; align-items: center; gap: 5px; color: var(--m-muted); font-size: 13px; }
.m-select {
  min-height: 44px; padding: 0 4px; border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-sans); font-size: 13px; color: var(--m-muted);
  text-decoration: underline dotted; text-underline-offset: 3px;
}

/* type */
.m-h2 { margin: 0; font-family: var(--font-serif); font-size: 21px; line-height: 26px; font-weight: 400; color: var(--m-ink); }
.m-blurb { margin: 0; font-family: var(--font-sans); font-size: 13px; line-height: 19px; color: var(--m-muted); }
.m-blurb--lead { margin-top: 4px; }
.m-title { margin: 18px 0 0; font-family: var(--font-serif); font-size: 34px; line-height: 38px; font-weight: 400; }
.m-count { font-size: 12px; color: var(--m-muted); white-space: nowrap; }
.m-empty { margin-top: 32px; font-size: 14px; color: var(--m-muted); }

/* sections */
.m-section { margin-top: 44px; }
#panel-menu > .m-section:first-child { margin-top: 26px; }
.m-head { display: flex; align-items: center; gap: 16px; }
.m-head--end { align-items: flex-end; }
.m-head__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.m-viewall {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; box-sizing: border-box;
  padding: 0 14px 0 16px; border: 1.5px solid var(--m-crimson); border-radius: 22px;
  font-size: 14px; font-weight: 500; color: var(--m-crimson) !important; text-decoration: none;
}

/* a sideways shelf of drinks that snaps card by card, running to the screen's edges */
.m-shelf {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 24px;
  margin: 16px -24px 0; padding: 0 24px 6px; scrollbar-width: none;
}
.m-shelf::-webkit-scrollbar { display: none; }
.m-tile { flex: none; width: var(--w, auto); display: flex; flex-direction: column; scroll-snap-align: start; color: inherit; text-decoration: none; }
.m-tile:hover .m-tile__img { filter: brightness(0.96); }
.m-tile__img { display: block; width: 100%; height: auto; aspect-ratio: 148 / 184; object-fit: cover; border-radius: 20px; background: #e9ddcb; }
.m-tile--big .m-tile__img { aspect-ratio: 236 / 296; border-radius: 22px; }
.m-tile__img.cup-frame { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.m-tile__img.cup-frame .cup-art { width: 58%; height: auto; }
.m-tile__name {
  margin-top: 10px; padding-bottom: 2px; font-family: var(--font-serif); line-height: 1.3; color: var(--m-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.m-tile__sub { margin-top: 3px; font-size: 12px; color: var(--m-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* "View all" grid */
.m-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; row-gap: 24px; margin-top: 24px; }
.m-grid .m-tile__img { aspect-ratio: 160 / 198; }

/* tea chips on a grouped category */
.m-chips { display: flex; gap: 8px; overflow-x: auto; margin: 20px -24px 0; padding: 0 24px 4px; scrollbar-width: none; }
.m-chips::-webkit-scrollbar { display: none; }
.m-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; box-sizing: border-box;
  padding: 0 14px 0 10px; border: 1px solid var(--m-field); border-radius: 20px;
  font-size: 13px; color: var(--m-ink) !important; text-decoration: none; white-space: nowrap;
}
.m-chip:hover { background: var(--m-ink); border-color: var(--m-ink); color: var(--m-cream) !important; }
.m-swatch { width: 14px; height: 14px; border-radius: 7px; border: 1.5px solid rgba(255, 255, 255, .5); box-sizing: border-box; }

/* Discover: number 1 as a big card, then a ranked list */
.m-top-head { margin-top: 26px; }
.m-top { position: relative; display: block; margin-top: 14px; height: 232px; border-radius: 24px; overflow: hidden; color: #fff; text-decoration: none; }
.m-top__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m-top__img.cup-frame { display: flex; align-items: center; justify-content: center; }
.m-top__fade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(20, 8, 6, 0) 40%, rgba(20, 8, 6, .7)); }
.m-top__rank {
  position: absolute; left: 14px; top: 14px; width: 30px; height: 30px; border-radius: 15px; background: rgba(250, 246, 239, .94);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); font-size: 16px; color: var(--m-crimson);
}
.m-top__text { position: absolute; left: 18px; right: 18px; bottom: 16px; display: flex; flex-direction: column; gap: 3px; }
.m-top__name { font-family: var(--font-serif); font-size: 24px; line-height: 28px; }
.m-top__sub { font-size: 12px; color: rgba(255, 255, 255, .88); }
.m-rows { list-style: none; margin: 6px 0 0; padding: 0; }
.m-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--m-line); color: var(--m-faint); text-decoration: none; }
.m-rank { width: 22px; text-align: center; font-family: var(--font-serif); font-size: 22px; color: var(--m-crimson); }
.m-row__img { width: 56px; height: 56px; flex: none; object-fit: cover; border-radius: 14px; }
.m-row__img.cup-frame { display: flex; align-items: center; justify-content: center; }
.m-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.m-row__name { font-family: var(--font-serif); font-size: 16px; line-height: 20px; color: var(--m-ink); }

@media (min-width: 760px) {
  .m-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 20px; }
  .m-shelf { margin: 16px 0 0; padding: 0 0 6px; scroll-padding: 0; }
  .m-chips { margin: 20px 0 0; padding: 0 0 4px; }
  #panel-discover { max-width: 680px; }
}

/* ---- drink pages made by the build ---- */
.cms-cup-slide { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; }
.cms-cup-slide .cup-art { width: 46%; height: auto; }
.cms-back-to-menu { text-align: center; margin: 28px 0 0; font-family: var(--font-serif); font-style: italic; font-size: 17px; }
.cms-back-to-menu a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.cms-find-row, .cms-find-more { color: inherit; text-decoration: none; }
.cms-find-more { display: block; text-decoration: underline; }
.cms-find-cta { display: inline-block; margin-top: 12px; text-decoration: none; }
