/* ==========================================================================
   CAFE QUALITA — MENU PAGE  (/menu/)
   Loaded after ../style.css and only on this page. Reuses the site tokens
   (--display, --body, --cream, --black, --muted, --gutter, --ease).
   1. Tokens         4. Intro & key      7. Item list
   2. Page fixes     5. Category nav     8. Pizza & price tables
   3. Header         6. Sections         9. Responsive
   ========================================================================== */

/* ---------------------------------------------------------------
   1. TOKENS
   --------------------------------------------------------------- */
:root {
  --qm-red:     #d52b25;   /* brand red used across the homepage */
  --qm-red-ink: #b3241f;
  --qm-rule:    #111111;
  --qm-line:    rgba(17, 17, 17, .13);
  --qm-dots:    rgba(17, 17, 17, .32);
  --qm-veg:     #2f7d32;
  --qm-nonveg:  #9a2c1e;
  --qm-gap:     clamp(28px, 3.6vw, 64px);
  --qm-pcol:    5.4rem;
}

/* ---------------------------------------------------------------
   2. PAGE FIXES
   --------------------------------------------------------------- */
html { scroll-padding-top: calc(var(--qm-catnav-h, 58px) + 28px); }

/* style.css sets overflow-x:hidden on html + body at ≤600px, which turns
   body into a scroll container and breaks position:sticky. clip avoids that. */
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}

.qm-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------
   3. HEADER  (slim brand bar — dark so the logo reads; same brick
      texture and red edge as the site footer)
   --------------------------------------------------------------- */
.qm-header {
  position: relative;
  background:
    linear-gradient(rgba(0, 0, 0, .74), rgba(0, 0, 0, .84)),
    url("../images/background.png") center / cover;
  color: var(--cream);
}
.qm-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--qm-red), transparent);
}

.qm-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: clamp(76px, 7.5vw, 104px);
}

.qm-header__logo { grid-column: 2; display: block; }
.qm-header__logo img { width: clamp(150px, 13vw, 196px); height: auto; }

.qm-header .site-quicknav {
  position: static;
  grid-column: 3;
  justify-self: end;
}

/* ---------------------------------------------------------------
   4. INTRO & KEY
   --------------------------------------------------------------- */
.qm-intro { padding-block: clamp(40px, 5vw, 80px) clamp(30px, 3.4vw, 50px); }

/* Halal mark — one per page, top-left above the menu breadcrumb */
.qm-halal-wrap {
  display: flex;
  justify-content: flex-start;
  margin-bottom: clamp(16px, 2vw, 26px);
}
.qm-halal {
  display: block;
  width: clamp(48px, 4.2vw, 62px);
  height: auto;
  color: #5d7a41;   /* muted olive green */
}

.qm-intro__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
  align-items: end;
}
.qm-intro__head  { grid-column: 1 / 8; }
.qm-intro__aside { grid-column: 9 / 13; padding-bottom: .5rem; }

.qm-intro__title {
  margin-top: .35em;
  font-family: var(--display);
  font-variation-settings: "opsz" 144, "SOFT" 24, "WONK" 1;
  font-weight: 800;
  font-size: clamp(2.9rem, 7.2vw, 6.4rem);
  line-height: .9;
  word-spacing: .14em;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.qm-intro__title em { font-style: normal; color: var(--qm-red); }

.qm-kicker {
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}

.qm-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem 1.5rem;
  margin: .9rem 0 0;
  padding: 1.1rem 0;
  list-style: none;
  border-block: 1px solid var(--qm-line);
}

.qm-intro__fine {
  margin-top: 1rem;
  font-size: .86rem;
  color: var(--muted);
}

/* Badges & diet marks ------------------------------------------ */
.qm-badge {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .28em .62em .24em .5em;
  border: 1px solid rgba(213, 43, 37, .38);
  border-radius: 2px;
  font-family: var(--body);
  font-size: .6rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--qm-red-ink);
  white-space: nowrap;
}
.qm-badge__icon { font-size: .82rem; line-height: 1; letter-spacing: 0; }

.qm-diet {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--black);
}
.qm-diet svg { width: 14px; height: 14px; flex: none; }
.qm-diet--veg svg    { color: var(--qm-veg); }
.qm-diet--nonveg svg { color: var(--qm-nonveg); }
.qm-diet--egg svg    { color: #b0802a; }   /* muted ochre — egg */

/* ---------------------------------------------------------------
   5. CATEGORY NAV  (sticky; scrolls sideways when it overflows)
   --------------------------------------------------------------- */
.qm-catnav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(245, 240, 232, .94);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  border-block: 1px solid var(--qm-line);
}

.qm-catnav__list {
  --fade-l: 0px;
  --fade-r: 0px;
  position: relative;
  display: flex;
  gap: clamp(22px, 2.3vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
}
.qm-catnav__list::-webkit-scrollbar { display: none; }
.qm-catnav__list.has-left  { --fade-l: 36px; }
.qm-catnav__list.has-right { --fade-r: 56px; }
.qm-catnav__list li { flex: none; }

.qm-catnav a {
  position: relative;
  display: block;
  padding: 1.2rem 0 1.15rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
  transition: color .3s var(--ease);
}
.qm-catnav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: .16em;
  bottom: 0;
  height: 2px;
  background: var(--qm-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
.qm-catnav a:hover,
.qm-catnav a.is-active { color: var(--black); }
.qm-catnav a.is-active::after { transform: scaleX(1); }

/* ---------------------------------------------------------------
   6. SECTIONS
   --------------------------------------------------------------- */
/* Spacing sits on the ruled block rather than the section, so category
   links land on the rule instead of the empty space above it. */
.qm-main > .qm-section:last-child { padding-bottom: clamp(96px, 12vw, 180px); }

.qm-section__grid,
.qm-pizza__intro { margin-top: clamp(64px, 8vw, 128px); }
.qm-catnav + .qm-section .qm-section__grid { margin-top: clamp(36px, 4vw, 64px); }

.qm-section__grid {
  position: relative;
  padding-top: clamp(20px, 2.2vw, 30px);
}
/* Rule drawn at the content edge (inside .wrap padding), like the pizza rules */
.qm-section__grid::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--qm-rule);
}

.qm-section__head { margin-bottom: clamp(26px, 3vw, 46px); }

.qm-section__num {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .24em;
  color: var(--qm-red);
  font-variant-numeric: tabular-nums;
}

.qm-section__title {
  margin-top: .6rem;
  font-family: var(--display);
  font-variation-settings: "opsz" 144, "SOFT" 24, "WONK" 1;
  font-weight: 800;
  font-size: clamp(2.3rem, 4.8vw, 4.4rem);
  line-height: .92;
  letter-spacing: -.028em;
  text-transform: uppercase;
  text-wrap: balance;
}

.qm-section__note {
  margin-top: .8rem;
  font-family: var(--display);
  font-variation-settings: "opsz" 24, "SOFT" 100, "WONK" 0;
  font-weight: 400;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.4;
  color: var(--muted);
}

.qm-section__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.2rem;
  margin-top: 1rem;
}

/* Compact sections: heading in column 1, items across columns 2–3 */
.qm-section--compact .qm-section__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--qm-gap);
  align-items: start;
}
.qm-section--compact .qm-section__head  { grid-column: 1; margin-bottom: 0; padding-right: 1rem; }
.qm-section--compact .qm-section__title { font-size: clamp(2.1rem, 3.3vw, 3.4rem); }
.qm-section--compact .qm-list           { grid-column: 2 / 4; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qm-section--compact .qm-list .qm-item:nth-child(-n+2) { border-top: 0; padding-top: .35rem; }
.qm-section--compact .qm-note           { grid-column: 2 / 4; }

/* Notes */
.qm-note {
  display: flex;
  align-items: flex-start;
  gap: .8em;
  margin-top: clamp(22px, 2.4vw, 34px);
  font-size: .84rem;
  color: var(--muted);
}
.qm-note::before {
  content: "";
  flex: none;
  width: 20px;
  height: 1px;
  margin-top: .82em;   /* centred on the first line */
  background: var(--qm-red);
}

.qm-callout {
  max-width: 60ch;
  margin-top: clamp(26px, 2.8vw, 40px);
  padding: .15rem 0 .2rem 1.15rem;
  border-left: 2px solid var(--qm-red);
  font-family: var(--display);
  font-variation-settings: "opsz" 30, "SOFT" 60, "WONK" 0;
  font-weight: 500;
  font-size: clamp(1.02rem, 1.3vw, 1.2rem);
  line-height: 1.4;
}
.qm-callout small {
  display: block;
  margin-top: .3rem;
  font-family: var(--body);
  font-size: .84rem;
  font-weight: 400;
  color: var(--muted);
}

/* ---------------------------------------------------------------
   7. ITEM LIST
   --------------------------------------------------------------- */
.qm-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--qm-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.qm-item {
  padding: 1.3rem 0 1.45rem;
  border-top: 1px solid var(--qm-line);
}

.qm-item__line {
  display: flex;
  align-items: baseline;
  gap: .65rem;
}

.qm-item__name {
  font-family: var(--display);
  font-variation-settings: "opsz" 30, "SOFT" 50, "WONK" 0;
  font-weight: 600;
  font-size: clamp(1.06rem, 1.2vw, 1.2rem);
  line-height: 1.3;
  letter-spacing: -.005em;
}

.qm-item__dots {
  flex: 1 1 1.5rem;
  min-width: 1.5rem;
  border-bottom: 2px dotted var(--qm-dots);
  transform: translateY(-.3em);
}

.qm-item__price {
  flex: none;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.qm-item__desc {
  max-width: 42ch;
  margin-top: .45rem;
  font-size: .88rem;
  line-height: 1.55;
  color: var(--muted);
}

.qm-item__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .9rem;
  margin-top: .7rem;
}

.qm-item--extra .qm-item__name { font-weight: 500; font-style: normal; color: var(--muted); }

/* ---------------------------------------------------------------
   8. PIZZA & PRICE TABLES
   --------------------------------------------------------------- */
.qm-pizza__intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
  align-items: end;
  padding-top: clamp(20px, 2.2vw, 30px);
  border-top: 1px solid var(--qm-rule);
}

.qm-pizza__copy { grid-column: 1 / 7; padding-bottom: clamp(4px, 1vw, 16px); }

.qm-pizza__title {
  margin-top: .9rem;
  font-family: var(--display);
  font-variation-settings: "opsz" 144, "SOFT" 18, "WONK" 1;
  font-weight: 800;
  font-size: clamp(4.2rem, 13vw, 11.5rem);
  line-height: .8;
  letter-spacing: -.045em;
  text-transform: uppercase;
}

.qm-pizza__sizes {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  margin: clamp(22px, 2.6vw, 36px) 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--display);
  font-variation-settings: "opsz" 40, "SOFT" 50, "WONK" 0;
  font-weight: 600;
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
  line-height: 1.2;
}
.qm-pizza__sizes span {
  display: block;
  margin-bottom: .2rem;
  font-family: var(--body);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.qm-subnav {
  display: grid;
  margin-top: clamp(30px, 3.6vw, 52px);
  border-top: 1px solid var(--qm-line);
}
.qm-subnav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--qm-line);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: color .3s var(--ease);
}
.qm-subnav a span { color: var(--qm-red); transition: transform .35s var(--ease); }
.qm-subnav a:hover { color: var(--qm-red-ink); }
.qm-subnav a:hover span { transform: translateY(3px); }

.qm-pizza__media {
  grid-column: 7 / 13;
  margin: 0;
  aspect-ratio: 4 / 5;
  max-height: 86svh;
  overflow: hidden;
  background: var(--dark);
}
.qm-pizza__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 58%;
  transition: transform 1.4s var(--ease);
}
.qm-pizza__media:hover img { transform: scale(1.03); }

/* Sub-categories */
.qm-sub { margin-top: clamp(68px, 7.5vw, 120px); }

.qm-sub__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .7rem 1.5rem;
  margin-bottom: clamp(18px, 2.2vw, 30px);
  padding-top: clamp(18px, 2vw, 26px);
  border-top: 1px solid var(--qm-rule);
}

.qm-sub__title {
  font-family: var(--display);
  font-variation-settings: "opsz" 144, "SOFT" 24, "WONK" 1;
  font-weight: 800;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: .95;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

/* Price table: two columns of rows on wide screens */
.qm-ptable {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--qm-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.qm-ptable__head,
.qm-prow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, var(--qm-pcol));
  column-gap: .9rem;
}

.qm-ptable__head {
  align-items: end;
  padding-bottom: .8rem;
  font-size: .6rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.qm-ptable__head span:not(:first-child) { text-align: right; }
.qm-ptable__head b {
  display: block;
  font-family: var(--display);
  font-variation-settings: "opsz" 30, "SOFT" 50, "WONK" 0;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--black);
}

.qm-prow {
  align-items: baseline;
  padding: 1.05rem 0 1.15rem;
  border-top: 1px solid var(--qm-line);
}

.qm-prow__name {
  font-family: var(--display);
  font-variation-settings: "opsz" 30, "SOFT" 50, "WONK" 0;
  font-weight: 600;
  font-size: clamp(1.04rem, 1.15vw, 1.15rem);
  line-height: 1.3;
}
.qm-prow__item .qm-badge { margin-left: .6rem; vertical-align: .14em; }

/* Veg / Non-Veg mark under each pizza and add-on */
.qm-prow__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .9rem;
  margin-top: .55rem;
}

.qm-prow__desc {
  margin-top: .35rem;
  font-size: .84rem;
  line-height: 1.5;
  color: var(--muted);
}

.qm-prow__price {
  font-size: .9rem;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.qm-prow__size { display: none; }

/* ---------------------------------------------------------------
   9. RESPONSIVE
   --------------------------------------------------------------- */
@media (max-width: 1100px) {
  .qm-ptable { grid-template-columns: minmax(0, 1fr); }
  .qm-ptable__head--dup { display: none; }
  :root { --qm-pcol: 6rem; }
}

@media (max-width: 1024px) {
  .qm-intro__head  { grid-column: 1 / -1; }
  .qm-intro__aside { grid-column: 1 / 9; margin-top: 44px; }

  .qm-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .qm-section--compact .qm-section__grid { display: block; }
  .qm-section--compact .qm-section__head { margin-bottom: clamp(26px, 3vw, 46px); padding-right: 0; }
  .qm-section--compact .qm-section__title { font-size: clamp(2.3rem, 4.8vw, 4.4rem); }
  .qm-section--compact .qm-list .qm-item:nth-child(-n+2) { border-top: 1px solid var(--qm-line); padding-top: 1.3rem; }

  .qm-pizza__copy  { grid-column: 1 / -1; padding-bottom: 0; }
  .qm-pizza__media { grid-column: 1 / -1; order: -1; aspect-ratio: 4 / 3; max-height: none; margin-bottom: clamp(32px, 5vw, 48px); }
  .qm-pizza__media img { object-position: 50% 60%; }
  .qm-subnav { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--qm-gap); }
}

@media (max-width: 768px) {
  .qm-intro__aside { grid-column: 1 / -1; }

  /* Halal mark: small and subtle on tablets and phones */
  .qm-halal-wrap { margin-bottom: 14px; }
  .qm-halal { width: 58px; height: 58px; }
}

@media (max-width: 600px) {
  .qm-header__inner { min-height: 68px; }
  .qm-header__logo img { width: 136px; }

  .qm-intro { padding-block: 34px 28px; }
  .qm-intro__aside { margin-top: 26px; }

  /* Full-bleed scroll strip for categories */
  .qm-catnav__inner { padding-inline: 0; }
  .qm-catnav__list  { gap: 24px; padding-inline: 22px; scroll-padding-inline: 22px; }
  .qm-catnav__list::after { content: ""; flex: 0 0 1px; }
  .qm-catnav a { padding: 1.05rem 0 1rem; font-size: .68rem; }

  .qm-section__grid,
  .qm-pizza__intro { margin-top: 60px; }
  .qm-section__head { margin-bottom: 22px; }

  .qm-list,
  .qm-section--compact .qm-list { grid-template-columns: minmax(0, 1fr); }
  .qm-section--compact .qm-list .qm-item:nth-child(2) { border-top: 1px solid var(--qm-line); }
  .qm-item { padding: 1.1rem 0 1.2rem; }
  .qm-item__desc { font-size: .86rem; }

  .qm-pizza__media { aspect-ratio: 1 / 1; }
  .qm-subnav { grid-template-columns: minmax(0, 1fr); }
  .qm-pizza__sizes { gap: .5rem 1.6rem; }

  .qm-sub { margin-top: 64px; }

  /* Price rows: name on top, three labelled prices beneath */
  .qm-ptable__head { display: none; }
  .qm-prow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: .7rem;
    column-gap: 0;
    padding: 1.05rem 0 1.1rem;
  }
  .qm-prow__item { grid-column: 1 / -1; }
  .qm-prow__price { text-align: left; font-size: .88rem; }
  .qm-prow__price + .qm-prow__price { padding-left: .8rem; border-left: 1px solid var(--qm-line); }
  .qm-prow__size {
    display: block;
    margin-bottom: .1rem;
    font-size: .56rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
  }
}

@media (prefers-reduced-motion: reduce) {
  .qm-pizza__media:hover img { transform: none; }
}
