/* =====================================================================
   Pure Desi In-Store Menu — print.css
   A4 booklet pagination. Deterministic: every zone starts on a fresh page;
   no row, card, step, photo or price is split or clipped across a break.
   (This is the failure mode the prior draft had — handled explicitly here.)

   Loaded only for print (media="print"). The screen layout is untouched.
   ===================================================================== */

@page {
  size: A4;
  margin: 14mm;
}

@media print {

  /* Paper is the surface. Keep ink + accents printing (small colour fills,
     photos, confirm tags) via colour-adjust; drop the cream page wash so we
     don't flood A4 with background ink. */
  html, body {
    background: #fff !important;
    color: var(--pd-fg);
  }
  body {
    font-size: 10.5pt;
    line-height: 1.4;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Hide every interactive / review affordance. */
  #pdc-toolbar, #pdc-panel, #pdc-pins, .pdc-pin, #pdc-tip, #pdc-editor { display: none !important; }

  /* Full-width measure — drop the on-screen reading column + side padding. */
  .menu { max-width: none; margin: 0; padding: 0; }

  /* ---- Cover: its own page ---------------------------------------------- */
  .cover {
    background: #fff !important;
    border-bottom: 0;
    padding: 38mm 0 0;
    break-after: page;
  }
  .cover__logo { width: 64mm; }

  /* ---- Zones: each begins on a fresh page ------------------------------- */
  .zone { break-before: page; margin-top: 0; padding-top: 2mm; }
  .zone:first-of-type { break-before: auto; }   /* cover already forced a break */

  .zone__divider { margin-bottom: 6mm; break-after: avoid; }
  .zone__title { font-size: 26pt; }
  .zone__num   { font-size: 20pt; }

  /* Zone intro photo — capped so it never eats a whole page; never split. */
  .zone__photo {
    aspect-ratio: auto;
    height: 46mm;
    break-inside: avoid;
    margin-bottom: 6mm;
  }

  /* ---- Sections & headings --------------------------------------------- */
  .section { margin-bottom: 7mm; break-inside: auto; }
  .sec { margin-bottom: 4mm; break-inside: avoid; }   /* keep eyebrow+title+note together */
  .sec-title { font-size: 18pt; }
  .sec, .sec-title, .zone__divider, .gb-eyebrow,
  .gb-step__title, .gcard__name, .flat-banner, h2, h3, h4 { break-after: avoid; }
  /* Don't strand an addon note at the top of a page, away from its section. */
  .addons, .addon { break-before: avoid; }

  /* ---- Atomic blocks: never split across a page ------------------------ */
  .item, .gcard, .gb-box, .gb-step, .sizing, .gb-sizes, .gb-srow,
  .flat-banner, .kitchen__qr, .kitchen__loc, .oc { break-inside: avoid; }

  /* Two-column lists stay two columns; rows already avoid breaking. */
  .cols-2 { column-count: 2; column-gap: 10mm; }

  /* Gifting: 3 platters across a row, hampers 2 across — tidy on the page. */
  .gifting .gift-grid { grid-template-columns: repeat(3, 1fr); }
  .gifting .gift-grid:last-of-type { grid-template-columns: repeat(2, 1fr); }

  /* ---- Tame heavy fills: keep borders, drop cream card washes ---------- */
  .sizing, .gb-sizes, .gcard, .gb-box__img, .flat-banner, .oc,
  .kitchen__qr-code { background: #fff !important; }
  .gb-srow--head { background: #f1efe8 !important; }
  .gb-box__img--ph {
    background:
      repeating-linear-gradient(45deg, #f4f2ea 0 8px, #eceadf 8px 16px) !important;
  }

  /* ---- Type sizing tuned for print legibility -------------------------- */
  .nm { font-size: 10.5pt; }
  .pr { font-size: 11pt; }
  .pr small { font-size: 7.5pt; }
  .desc { font-size: 8.5pt; line-height: 1.2; }
  .sec-note { font-size: 11pt; }
  .gb-cell, .gb-cell--gift, .gb-cell--reg { font-size: 9.5pt; }
  .gb-cell--size { font-size: 10pt; }
  .gb-step__n { font-size: 30pt; }

  /* ---- Confirm tags & chips: visible even if background printing is off
     (printer "background graphics" unchecked). Outline + bold carry it. -- */
  .confirm {
    background: #f6e4c4 !important;
    color: #7a4a10 !important;
    border: 1px solid #c79a4e;
  }
  .gb-chip {
    background: var(--pd-cherry) !important;
    color: #fff !important;
    border: 1px solid var(--pd-cherry);
  }
  .diet--gf, .diet--vg, .badge { border-width: 1px; }

  /* ---- From the Kitchen close ------------------------------------------ */
  .kitchen { padding-top: 4mm; }
  .kitchen__qr-code { width: 34mm; height: 34mm; padding: 2mm; }

  /* Avoid orphan/widow single lines in prose blocks. */
  p { orphans: 2; widows: 2; }
}
