/* Option 5 "Deli Window" masthead + awning (Matt, Desk card ask-20261129-b56a74-1, 2026-11-29T07:34:33Z "Home redo: Yes, as read"; design pack
   docs/design/home-option5-20261129/, DESIGN.md + prototype/home.css). Sitewide on shop builds (build.mjs links it after order-flow.css, so it wins on equal specificity).
   The bar keeps every id and the action order of render.mjs shopHeaderBar; only the look changes: cream masthead, the logo at the image's 45px with the Fraunces wordmark,
   an inline nav (hidden on phones and narrow tablets, where the ☰ panel carries the links), Login as a plain text link, a dark-green Basket button, and the
   raspberry/cream awning under it. Values from prototype/home.css lines 14-25 and 59-70 (FABLE-GAPS.md rows 1, 5, 6, 9, 10; leg L4, 2026-11-29). */

/* The pack's Plus Jakarta Sans face covers weights 200-800; site.css declares the same file as 400-700, which clamps 750 / 800 to 700. An alias face on the same URL
   (no extra download) lets the Deli Window paint the approved 750 / 550 / 800 without changing the rest of the site (FABLE-GAPS row 9). */
@font-face { font-family: 'Plus Jakarta Sans Deli'; src: url('/fonts/plus-jakarta-sans-latin.woff2') format('woff2'); font-style: normal; font-weight: 200 800; font-display: swap; }
:root {
  --deli-ink: #073a26;
  --deli-paper: #faf6eb;
  --deli-masthead: #fff8e9;
  --deli-tag: #ffeeae;
  --awning-berry: #c82751;
  --awning-cream: #fff1dc;
  --awning-border: #ddbaa8;
  --deli-body: 'Plus Jakarta Sans Deli', 'Plus Jakarta Sans', Arial, sans-serif;
}
.deli-masthead, .dw, .dc { font-family: var(--deli-body); }

/* The sticky bar is 76px + the 14px awning from 701px, 57px + 9px on phones: anchors clear it. */
html { scroll-padding-top: 76px; }
@media (min-width: 701px) { html { scroll-padding-top: 100px; } }

.site-header.deli-masthead {
  background: var(--deli-masthead);
  color: var(--deli-ink);
  border-bottom: 0;
}
.deli-masthead .header-inner {
  width: auto;
  max-width: none;
  min-height: 76px;
  padding: 0 4%;
  gap: 32px;
}
.deli-masthead .brand { gap: 10px; color: var(--deli-ink); }
.deli-masthead .brand img { width: 45px; height: 45px; }
.deli-masthead .brand-name {
  display: inline;
  color: var(--deli-ink);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.deli-nav { display: flex; align-items: center; gap: 32px; margin-left: auto; }
.site-header.deli-masthead .deli-nav a[href]:not(.brand):not(.skip-link) {
  min-width: 0;   /* the site's 44px tap box stays as height; width 0 keeps the image's 32px steps (Menu is 38px wide) */
  color: var(--deli-ink);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.deli-masthead .deli-nav a[href]:hover { color: var(--deli-ink); text-decoration: underline; text-underline-offset: 4px; }
.deli-masthead .deli-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }

/* Basket: the dark-green button of the design; the live count + price spans are the same ones js/order-flow.js paints. */
.deli-masthead #basket-open {
  height: 40px;
  padding: 0 16px;
  gap: 8px;
  border-radius: 5px;
  background: var(--deli-ink);
  color: var(--deli-paper);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.2;
}
.deli-masthead #basket-open svg { width: 22px; height: 22px; }
.deli-masthead #basket-open:hover { background: #0d5236; color: var(--deli-paper); }
/* The count, when shown, is the prototype's yellow tag (home.css:22); the total follows it in the button's own type. */
.deli-masthead .basket-count {
  min-width: 0;
  height: auto;
  padding: 2px 5px;
  border-radius: 10px;
  background: var(--deli-tag);
  color: var(--deli-ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}
/* An empty basket reads just "Basket" with the bag, as the image. The hook is the aria-label js/order-flow.js paints ("Basket, 0 meals, £0.00"); count and
   total show the moment something is in the basket, and the aria-label always carries both. */
.deli-masthead #basket-open[aria-label^="Basket, 0 "] .basket-count,
.deli-masthead #basket-open[aria-label^="Basket, 0 "] .basket-price { display: none; }

/* ☰: a borderless two-line glyph (prototype index.html:25). Markup untouched: the third stroke is hidden. */
.deli-masthead #menu-toggle { width: 40px; min-width: 40px; height: 44px; border-color: transparent; border-radius: 5px; color: var(--deli-ink); }
.deli-masthead #menu-toggle:hover { border-color: transparent; background: rgba(7, 58, 38, 0.06); }
.deli-masthead .menu-lines { gap: 5.5px; }
.deli-masthead .menu-lines i { width: 16px; height: 1.5px; background: var(--deli-ink); }
.deli-masthead .menu-lines i:nth-child(3) { display: none; }

/* Login / Account: from 701px a plain nav-style text link in the nav's fourth slot, before the Basket button (four text links, one button, as the image).
   display is left to order-flow.css, which switches the two anchors on html[data-auth-state]. */
.deli-masthead .account-chip { color: var(--deli-ink); }
@media (min-width: 701px) {
  .deli-masthead .header-actions { gap: 12px; }
  .deli-masthead #login-chip,
  .deli-masthead #account-chip {
    order: -1;
    height: 40px;
    min-width: 0;
    padding: 0;
    margin-right: 20px;   /* 20 + 12 = the nav's 32px step */
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--deli-ink);
    font-size: 14px;
    font-weight: 750;
  }
  .deli-masthead #login-chip:hover,
  .deli-masthead #account-chip:hover { background: transparent; color: var(--deli-ink); text-decoration: underline; text-underline-offset: 4px; }
}
/* From 900px (inline nav showing) a logged-out visitor sees no ☰, as the image: every panel link is also in the footer and Sign in is the Login link.
   A signed-in customer or staff keeps it (My orders / My subscription / Back office live there). */
@media (min-width: 900px) {
  html:not([data-auth-state="customer"]):not([data-auth-state="staff"]) .deli-masthead #menu-toggle { display: none; }
}

/* site.css turns header links sky on hover and rings focus in sky (for the old green bar): back to ink on cream. */
.site-header.deli-masthead a:hover { color: var(--deli-ink); }
.site-header.deli-masthead :focus-visible { outline-color: var(--deli-ink); }

/* The awning: raspberry and cream stripes, the header's last child so it stays with the sticky bar. */
.awning {
  height: 14px;
  background: repeating-linear-gradient(95deg, var(--awning-berry) 0 15px, var(--awning-cream) 15px 30px);
  border-block: 1px solid var(--awning-border);
}

/* Narrow tablets: the inline nav would crowd the actions; the ☰ panel carries the same links. */
@media (max-width: 899px) {
  .deli-nav { display: none; }
  .deli-masthead .header-inner { gap: 12px; padding-inline: 2.5%; }
  .deli-masthead .brand-name { font-size: 24px; }
}

/* Phones (design: 57px bar, 35px logo + wordmark, bag icon alone, two-line menu glyph). The Login / Account chip moves into the ☰ panel (its account rows carry Sign in / My account). */
@media (max-width: 700px) {
  .deli-masthead .header-inner { min-height: 57px; padding: 0 16px; gap: 10px; }
  .deli-masthead .brand { gap: 7px; }
  .deli-masthead .brand img { width: 35px; height: 35px; }
  .deli-masthead .brand-name { font-size: 21px; }
  .deli-masthead .header-actions { gap: 4px; }
  .deli-masthead #basket-open { position: relative; width: 43px; min-width: 43px; height: 44px; padding: 0; gap: 0; justify-content: center; background: transparent; color: var(--deli-ink); }
  .deli-masthead #basket-open:hover { background: rgba(7, 58, 38, 0.06); color: var(--deli-ink); }
  .deli-masthead #basket-open svg { width: 21px; height: 21px; }
  .deli-masthead .basket-count { position: absolute; top: 0; right: 0; }
  .deli-masthead .basket-price { display: none; }
  html[data-auth-state] .deli-masthead #login-chip,
  html[data-auth-state] .deli-masthead #account-chip { display: none; }
  .awning { height: 9px; }
}
/* The smallest phones: the mark alone carries the brand. */
@media (max-width: 339px) { .deli-masthead .brand-name { display: none; } }
