/* Newfield ordering: colours, type and spacing follow the "Newfield Ordering — Redesign" mock-ups. */

@font-face {
  font-family: "Oswald";
  src: url("/fonts/oswald-latin.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --bg: #f6f5f1;
  --surface: #fff;
  --ink: #14112c;
  --muted: #5b5a66;
  --line: #e4e2da;
  --line-soft: #eceae3;
  --field: #cfcdc4;
  --head-bg: #f1f0ea;
  --hover: #fbfaf7;
  --green: #4a7334;
  --green-dark: #365726;
  --green-bright: #5d8a42;
  --green-tint: #edf4e6;
  --navy: #14112c;
  --navy-deep: #0d0b1e;
  --navy-raised: #26223f;
  --navy-line: #2a2642;
  --on-navy: #d9d7e6;
  --on-navy-muted: #b9b6cc;
  --on-navy-faint: #8f8ba6;
  --warn-bg: #fff6df;
  --warn-line: #efd185;
  --warn: #7a5000;
  --error-bg: #fdecec;
  --error-line: #f0b7b7;
  --error: #a31d1d;
  --info-bg: #eef3fb;
  --info-line: #c3d3ec;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --text: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --gutter: 24px;
  --max: 1180px;
  color-scheme: light;
}
@media (width < 44rem) { :root { --gutter: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 400 1.0625rem/1.5 var(--text); color: var(--ink); background: var(--bg);
}
a { color: var(--green); text-underline-offset: .15em; }
a:hover { color: var(--green-dark); }
img { max-width: 100%; }
.icon { flex: none; vertical-align: middle; }
[hidden] { display: none !important; }

h1, h2 { font-family: var(--display); font-weight: 600; text-transform: uppercase; line-height: 1.15; }
h1 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.25rem); letter-spacing: .01em; margin: 0 0 .5rem; }
h2 { font-size: 1.375rem; letter-spacing: .02em; margin: 2rem 0 .75rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 .75rem; }
.lede { margin: 0; font-size: 1.0625rem; color: var(--muted); max-width: 46rem; }
.eyebrow { font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.num { text-align: end; font-variant-numeric: tabular-nums; }
.sku, .code { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.visually-hidden {
  position: absolute; clip-path: inset(50%); overflow: hidden;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; white-space: nowrap;
}
.skip-link { position: absolute; left: 8px; top: -100px; z-index: 100; background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: 8px; }
@media (width < 44rem) { .hide-sm { display: none !important; } }

:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }

/* --- Utility strip + header --------------------------------------------------------------------- */
.inner { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.utility { background: var(--navy-deep); color: var(--on-navy-muted); font-size: .875rem; }
.utility .inner { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; align-items: center; padding-block: 8px; }
.utility-contact, .utility-user { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.utility-contact span { display: inline-flex; gap: 6px; align-items: center; }
.utility a { color: #fff; text-decoration: none; font-weight: 600; }
.utility strong { color: #fff; font-weight: 600; }
.utility form, .header-user form { margin: 0; }

.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: .15em; cursor: pointer; }
.utility .link-button, .header-user .link-button { color: var(--on-navy-muted); min-height: 32px; }
.utility .link-button:hover, .header-user .link-button:hover { color: #fff; }

.site-header { background: var(--navy); color: #fff; }
.site-header .inner { display: flex; flex-wrap: wrap; gap: 0 32px; justify-content: space-between; align-items: center; }
.brand { display: block; padding-block: 16px; }
.brand img { display: block; height: 52px; width: auto; }

.site-nav { display: flex; gap: 4px; align-self: stretch; font: 500 1.0625rem var(--display); letter-spacing: .06em; text-transform: uppercase; }
.site-nav a { display: flex; align-items: center; padding: 0 18px; min-height: 52px; color: var(--on-navy); text-decoration: none; }
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -4px 0 var(--green-bright); }

@media (width < 44rem) {
  .brand { padding-block: 12px; }
  .brand img { height: 38px; }
  .layout-shop .site-header .inner { padding-inline: 0; }
  .layout-shop .site-header .brand { padding-inline: var(--gutter); }
  .site-nav { flex: 1 1 100%; gap: 0; border-top: 1px solid var(--navy-line); font-size: .9375rem; }
  .site-nav a { flex: 1; justify-content: center; padding: 0 6px; min-height: 48px; text-align: center; }
}

/* --- Page banners (delivery / account) ------------------------------------------------------------ */
.banner { background: var(--surface); border-bottom: 1px solid var(--line); }
.banner .inner { display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; align-items: center; padding-block: 20px; }
.banner-main { display: flex; gap: 16px; align-items: flex-start; flex: 1 1 420px; min-width: 0; }
.banner-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.banner-title { font-size: 1.125rem; font-weight: 600; }
.banner-title .sep { color: var(--muted); font-weight: 400; }
.banner-sub { font-size: .9375rem; color: var(--muted); }
.banner-aside { display: flex; flex-direction: column; gap: 2px; text-align: end; font-size: .9375rem; color: var(--muted); }
.banner-aside strong { color: var(--ink); }
.icon-tile { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--green-tint); color: var(--green); }
@media (width < 44rem) {
  .banner .inner { padding-block: 16px; gap: 10px; }
  .banner-main { flex-basis: 100%; gap: 12px; }
  .banner-title .sep { display: none; }
  .banner-address { display: block; font-weight: 400; font-size: .9375rem; }
  .banner-aside { display: none; }
  .banner-sub { font-size: .875rem; }
}

.banner-account .inner { padding-block: 28px; gap: 24px 40px; }
.banner-account .banner-main { align-items: center; gap: 20px; }
.banner-account h1 { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.125rem); }
.avatar { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; background: var(--navy); color: #fff; font: 600 1.625rem var(--display); }
.banner-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.banner-stats .stat-tile { min-width: 150px; }
@media (width < 44rem) {
  .banner-account .inner { padding-block: 20px; }
  .avatar { width: 52px; height: 52px; font-size: 1.3rem; }
  .banner-stats { flex: 1 1 100%; }
  .banner-stats .stat-tile { flex: 1 1 0; min-width: 0; }
}

/* --- Main layout ------------------------------------------------------------------------------------ */
.shop-main { flex: 1 0 auto; width: 100%; max-width: var(--max); margin-inline: auto; padding: 32px var(--gutter) 48px; }
@media (width < 44rem) { .shop-main { padding-top: 24px; } }

.page-head { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.page-head h1, .page-head h2 { margin: 0; }
.page-head h1 + .lede { margin-top: 6px; }
.back-link { margin: 0 0 12px; }
.back-link a, .card-head a { display: inline-flex; gap: 6px; align-items: center; }

.two-col { display: grid; gap: 24px; align-items: start; }
.two-col > * { margin: 0; }
@media (width >= 60rem) { .two-col { grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 1fr); } }

.account-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.account-main { flex: 999 1 560px; min-width: 0; margin: 0; }
.account-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.account-side .card { margin: 0; }
.account-side:only-child { max-width: 36rem; }

/* --- Cards ------------------------------------------------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-bottom: 24px; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card.narrow { max-width: 36rem; }
@media (width < 44rem) { .card { padding: 20px; } }
.card-title { display: flex; gap: 12px; align-items: center; margin: 0 0 4px; font-size: 1.375rem; }
.card-title .icon { color: var(--green); }
.card-intro { margin: 0 0 24px; font-size: .9375rem; }
.card-title + .details { margin-top: 16px; }
.card-head { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; font-size: 1.25rem; }
.card-foot { padding: 16px 20px; background: var(--head-bg); border-top: 1px solid var(--line); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; color: var(--muted); }
.total-row strong { font: 600 1.625rem var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }

.help-card { background: var(--navy); color: var(--on-navy); border-radius: var(--radius); padding: 24px; }
.help-card h2 { margin: 0 0 8px; font-size: 1.25rem; color: #fff; }
.help-card p { margin: 0 0 16px; line-height: 1.5; }

.stat-row, .grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin-bottom: 24px; }
.stat-tile, .stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 20px; }
.banner .stat-tile { border-color: var(--line); }
.stat-label, .stat > .muted:first-child { font-size: .875rem; color: var(--muted); }
.stat-value, .stat b { display: block; font: 600 1.875rem/1.2 var(--display); font-variant-numeric: tabular-nums; }
.stat-value.small { font-size: 1.375rem; font-weight: 500; line-height: 1.3; }
.stat .muted { font-size: .875rem; }
@media (width < 44rem) {
  .stat-row { grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: 8px; }
  .stat-row .stat-tile { padding: 10px 12px; }
  .stat-row .stat-value { font-size: 1.375rem; }
  .stat-row .stat-value.small { font-size: 1.125rem; }
}

/* --- Flash + alerts ------------------------------------------------------------------------------------------ */
.flash, .alert-warn { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; }
.flash.success { background: var(--green-tint); border-color: #c5dcb3; color: var(--green-dark); }
.flash.info { background: var(--info-bg); border-color: var(--info-line); }
.flash.error, .alert-error { background: var(--error-bg); border-color: var(--error-line); color: var(--error); }
.alert-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.alert-warn a { color: inherit; font-weight: 600; }

/* --- Forms ---------------------------------------------------------------------------------------------------------- */
label { display: block; font-size: .9375rem; font-weight: 600; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--muted); }
.field { margin-bottom: 20px; }
.hint { display: block; color: var(--muted); font-size: .875rem; font-weight: 400; margin-top: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="search"],
input[type="number"], input[type="tel"], select, textarea {
  width: 100%; max-width: 32rem; min-height: 46px; padding: 0 14px;
  font: 400 1.0625rem var(--text); color: var(--ink); background: var(--surface);
  border: 1px solid var(--field); border-radius: var(--radius-sm);
}
textarea { padding: 12px 14px; line-height: 1.5; resize: vertical; min-height: 6rem; max-width: 48rem; }
select { padding-inline-end: 8px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 1px; border-color: var(--green); }
input:user-invalid, textarea:user-invalid { border-color: var(--error); background: var(--error-bg); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 400; min-height: 36px; }
.check input { inline-size: 1.2rem; block-size: 1.2rem; accent-color: var(--green); margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 20px; background: var(--surface); }
legend { float: left; width: 100%; margin-bottom: 16px; padding: 0; font: 600 1.125rem var(--display); text-transform: uppercase; letter-spacing: .02em; }
legend + * { clear: both; }
.form-grid, .form-row { display: grid; gap: 0 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.form-grid { gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.form-grid .field { margin: 0; }
.form-grid input, .form-grid select, .form-grid textarea, .form-row input, .form-row select { max-width: none; }
.span-all { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 16px; }
.details dt { font-weight: 600; color: var(--muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
.details.stacked { grid-template-columns: 1fr; gap: 0; }
.details.stacked dt { font-size: .875rem; }
.details.stacked dd { margin-bottom: 12px; font-weight: 600; }
@media (width < 30rem) { .details { grid-template-columns: 1fr; } .details dd { margin-bottom: 8px; } }

/* --- Buttons ------------------------------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 10px;
  font: 600 1rem var(--text); text-decoration: none; text-align: center; cursor: pointer;
  background: var(--green); color: #fff;
}
.btn:hover { background: var(--green-dark); color: #fff; }
.btn-lg { min-height: 48px; padding: 0 24px; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--field); }
.btn.secondary:hover { border-color: var(--ink); background: var(--surface); }
.btn.danger { background: var(--surface); color: var(--error); border-color: var(--error-line); }
.btn.danger:hover { border-color: var(--error); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .875rem; border-radius: var(--radius-sm); }
.btn:disabled { background: #3a374f; color: #9c99b0; border-color: transparent; cursor: default; }
.btn.secondary:disabled { background: var(--head-bg); color: var(--muted); }
.inline-form { display: inline; margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.toolbar .field, .toolbar label { margin-bottom: 0; }
.toolbar > div { flex: 0 1 16rem; min-width: min(100%, 10rem); }
.toolbar > div label { margin-bottom: 6px; }
.toolbar .spacer { flex: 1 1 0; min-width: 0; }

/* --- Tables ---------------------------------------------------------------------------------------------------------- */
.table-wrap, .table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 24px; }
.table-wrap { overflow: auto; max-inline-size: 100%; }
.table-card { overflow: clip; }
.table-wrap.tall { max-block-size: 75vh; }
.stack, .table-wrap { container-type: inline-size; }
table { border-collapse: separate; border-spacing: 0; inline-size: 100%; }
caption { text-align: start; font-weight: 700; padding: 14px 16px; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); text-align: start; vertical-align: middle; }
thead th {
  position: sticky; top: 0; z-index: 1; background: var(--head-bg); border-bottom-color: var(--line);
  font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
tbody th { font-weight: 600; }
tbody tr > * { transition: background-color .15s; }
tbody tr:hover > * { background: var(--hover); }
tbody tr:last-child > * { border-bottom: 0; }
tfoot td, tfoot th { font-weight: 700; background: var(--head-bg); border-top: 1px solid var(--line); border-bottom: 0; }
td.sku, .order-table td.sku { color: var(--muted); }
.stacked-only { display: none; }
.line-total { font-weight: 600; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 700; border: 1px solid; white-space: nowrap; vertical-align: middle; font-family: var(--text); text-transform: none; letter-spacing: 0; }
.badge.received { background: var(--info-bg); border-color: #b8cbeb; color: #24497f; }
.badge.in_progress, .badge.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.badge.completed { background: var(--green-tint); border-color: #c5dcb3; color: var(--green-dark); }
.badge.cancelled { background: #f1f1f1; border-color: #ccc; color: #666; }

/* Rows become cards on narrow screens: <div class="stack"> or <div class="table-wrap stack"> */
@container (width < 560px) {
  .stack table, .stack thead, .stack tbody, .stack tfoot, .stack tr, .stack th, .stack td { display: block; }
  .stack thead { display: none; }
  .stack tr { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
  .stack tbody tr:last-child { border-bottom: 0; }
  .stack td, .stack tbody th, .stack tfoot th { border: 0; padding: 3px 16px; }
  .stack td[data-label] { display: flex; justify-content: space-between; gap: 16px; text-align: end; }
  .stack td[data-label]::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: start; }
  .stack tfoot tr { background: var(--head-bg); border-top: 1px solid var(--line); }
  .stack tfoot td, .stack tfoot th { background: none; }
  .stack .hide-stacked { display: none; }
  .stack .stacked-only { display: block; font-weight: 400; font-size: .9375rem; }
  .stack tr.split { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 16px; }
  .stack tr.split > * { padding: 0; }
  .stack tr.split > td { flex: none; }
  .stack .link-rows tr { position: relative; }
  .stack .link-rows th a { font-size: 1.0625rem; }
  .stack .link-rows th a::after { content: ""; position: absolute; inset: 0; }
  .stack .link-rows th > .stacked-only:first-of-type { display: inline; margin-inline-start: 8px; }
  .stack tbody tr:hover > * { background: none; }
}

/* --- Order grid --------------------------------------------------------------------------------------------------------- */
.search-box { position: relative; flex: 0 1 320px; min-width: min(100%, 16rem); }
.search-box .icon { position: absolute; left: 14px; top: 13px; color: var(--muted); pointer-events: none; }
.search-box input { max-width: none; min-height: 44px; padding-left: 42px; }
@media (width < 44rem) { .search-box { flex: 1 1 100%; } }

.order-card { container: order / inline-size; margin-bottom: 0; }
.order-table { font-size: 1.0625rem; }
.order-table th, .order-table td { padding: 10px 16px; }
.order-table .col-code, .order-table td.sku { padding-left: 20px; width: 90px; }
.order-table .col-price { width: 90px; }
.order-table .col-qty { width: 170px; text-align: center; }
.order-table .col-total { width: 100px; padding-right: 20px; }
.order-table thead th { top: 0; }
.row-label { display: inline; margin: 0; font-size: inherit; font-weight: 600; cursor: pointer; }
.row-meta { display: none; font-size: .875rem; font-weight: 400; color: var(--muted); }
.order-table .badge { margin-inline-start: 4px; }
.order-table tr.has-qty > * { background: var(--green-tint); }
.order-table tr.has-qty > .col-code { box-shadow: inset 4px 0 0 var(--green-bright); }
.order-table tr.has-qty:hover > * { background: #e6f0dc; }
.line-total { font-weight: 600; color: var(--green); }
.qty-cell { padding-block: 8px; }
.stepper { display: flex; gap: 6px; justify-content: center; align-items: center; }
.step {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; flex: none;
  border: 1px solid var(--field); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); cursor: pointer;
  touch-action: manipulation;
}
.step:hover { border-color: var(--ink); }
.step:disabled { opacity: .35; cursor: default; border-color: var(--field); }
input.qty {
  width: 56px; max-width: 56px; height: 44px; min-height: 44px; padding: 0; flex: none;
  text-align: center; font: 600 1.0625rem var(--text); font-variant-numeric: tabular-nums;
}
.has-qty input.qty { border-color: var(--green); }
.empty-search { padding: 40px 20px; margin: 0; text-align: center; color: var(--muted); }

@container order (width < 40rem) {
  .order-table .col-code, .order-table .col-price, .order-table .col-total { display: none; }
  .order-table .col-qty { width: auto; }
  .row-meta { display: block; }
  .order-table th[scope="row"] { padding: 10px 8px 10px 16px; }
  .order-table .qty-cell { padding: 8px 12px 8px 0; width: 1%; }
  .order-table tr.has-qty > th[scope="row"] { box-shadow: inset 4px 0 0 var(--green-bright); }
  .order-table { font-size: 1rem; }
  .order-table th[scope="row"] { padding-inline-start: 14px; line-height: 1.3; }
  .order-table .qty-cell { padding-inline-end: 10px; }
  .stepper { gap: 3px; }
  .step { width: 40px; }
  input.qty { width: 46px; max-width: 46px; }
}

.basket-bar { position: sticky; bottom: 0; z-index: 5; padding: 20px 0 calc(20px + env(safe-area-inset-bottom)); background: var(--bg); }
.basket-inner {
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between;
  padding: 12px 12px 12px 20px; border-radius: 14px; background: var(--navy); color: #fff;
  box-shadow: 0 10px 30px rgb(20 17 44 / .25);
}
.basket-summary { display: flex; gap: 16px; align-items: center; min-width: 0; }
.basket-icon { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--navy-raised); }
.basket-count {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  display: grid; place-items: center; background: var(--green-bright); color: #fff; font-size: .8125rem; font-weight: 700;
}
.basket-lines { font-size: .875rem; color: var(--on-navy-muted); white-space: nowrap; }
.basket-total { font: 600 1.625rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.basket-actions { display: flex; gap: 8px; align-items: center; margin-inline-start: auto; }
.basket-clear { color: var(--on-navy); font-weight: 600; min-height: 48px; padding: 0 12px; }
.basket-clear:hover { color: #fff; }
.basket-actions .btn { white-space: nowrap; }
@media (width < 44rem) {
  .basket-bar { padding-block: 12px calc(12px + env(safe-area-inset-bottom)); }
  .basket-inner { flex-wrap: nowrap; gap: 12px; padding: 10px 10px 10px 14px; }
  .basket-summary { gap: 12px; }
  .basket-total { font-size: 1.375rem; }
  .basket-lines { font-size: .8125rem; }
  .basket-actions .btn { padding: 0 16px; }
}
@media (width < 30rem) {
  .basket-clear, .basket-lines-products { display: none; }
  .basket-icon { width: 40px; height: 40px; }
}

/* --- Checkout -------------------------------------------------------------------------------------------------------------- */
.checkout-form { margin: 0; }
.address-line { margin: 0 0 20px; font-size: .9375rem; }
.date-picker { border: 0; padding: 0; margin: 0 0 20px; background: none; }
.date-picker legend { font: 600 .9375rem var(--text); text-transform: none; letter-spacing: 0; padding: 0; margin-bottom: 8px; }
.date-tiles { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(5.75rem, 1fr)); }
.date-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; margin: 0;
  padding: 10px 6px; border: 1px solid var(--field); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: center;
}
.date-tile input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.date-tile:hover { border-color: var(--ink); }
.date-tile:has(input:checked) { border-color: var(--green); background: var(--green-tint); box-shadow: inset 0 0 0 1px var(--green); }
.date-tile:has(input:focus-visible) { outline: 3px solid var(--green-bright); outline-offset: 2px; }
.date-weekday { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.date-tile:has(input:checked) .date-weekday { color: var(--green-dark); }
.date-day { font: 600 1.125rem var(--display); }

/* --- Login ----------------------------------------------------------------------------------------------------------------- */
.login-wrap { display: grid; gap: 24px; align-items: start; max-width: 56rem; margin: 16px auto; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.login-card { margin: 0; }
.login-card h1 { margin-bottom: 20px; }
.login-card input { max-width: none; }
.login-links { margin: 16px 0 0; text-align: center; }

/* --- Footer ------------------------------------------------------------------------------------------------------------------- */
.site-footer { background: var(--navy); color: var(--on-navy-muted); font-size: .9375rem; }
.site-footer .inner { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding-block: 40px 24px; }
.site-footer .footer-legal { display: block; padding-block: 16px 24px; border-top: 1px solid var(--navy-line); font-size: .8125rem; color: var(--on-navy-faint); }
.footer-col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer-col p { margin: 0; line-height: 1.5; }
.footer-col h2 { margin: 0; font-size: .9375rem; letter-spacing: .08em; color: #fff; }
.footer-logo { height: 40px; width: auto; margin-bottom: 4px; }
.site-footer a { color: var(--on-navy); }
.site-footer a:hover { color: #fff; }
.site-footer .footer-phone { font-size: 1.25rem; font-weight: 600; color: #fff; text-decoration: none; }

/* --- Admin: header, sidebar and slide-out menu --------------------------------------------------------------------------- */
.layout-admin { font-size: 1rem; }
.layout-admin .site-header .inner { max-width: none; justify-content: flex-start; gap: 0 16px; }
.layout-admin .brand { padding-block: 12px; }
.layout-admin .brand img { height: 40px; }
.admin-tag { font: 500 .8125rem var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--on-navy); border: 1px solid var(--navy-line); background: var(--navy-raised); border-radius: 6px; padding: 2px 8px; }
.header-user { display: flex; gap: 16px; align-items: center; margin-inline-start: auto; color: var(--on-navy-muted); font-size: .9375rem; }
.menu-button, .menu-close {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px 0 8px; margin-inline-start: -8px;
  background: none; border: 0; border-radius: var(--radius-sm); color: #fff; font: 500 1rem var(--display); letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
}
.menu-button:hover { background: var(--navy-raised); }
@media (width < 44rem) {
  .layout-admin .site-header .inner { flex-wrap: nowrap; gap: 0 10px; }
  .layout-admin .brand img { height: 34px; }
  .admin-tag { display: none; }
}

.admin-shell { flex: 1 0 auto; display: grid; grid-template-columns: 15rem minmax(0, 1fr); align-items: start; }
.admin-main { min-width: 0; width: 100%; max-width: 1400px; padding: 28px 32px 64px; }
.admin-main h1 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); margin-bottom: 16px; }
.admin-main h2 { font-size: 1.25rem; }
.admin-main .card { padding: 24px; }
.admin-main .order-card { margin-bottom: 0; }
.admin-main table { font-size: .9375rem; }
.admin-main .order-table { font-size: 1rem; }

/* The nav is a popover: on wide screens it is shown in place as a sidebar; on narrow ones the Menu button opens it as a drawer. */
.admin-nav {
  display: block; position: sticky; inset: auto; top: 0; width: auto; height: auto; max-height: 100dvh; margin: 0;
  padding: 16px 12px 32px; overflow-y: auto; border: 0; border-inline-end: 1px solid var(--line);
  background: var(--surface); color: var(--ink); min-height: calc(100dvh - 64px);
}
.admin-nav-head { display: none; }
.admin-nav-group + .admin-nav-group { margin-top: 12px; }
.admin-nav-label { margin: 8px 12px 6px; font: 700 .75rem var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.admin-nav ul { list-style: none; margin: 0; padding: 0; }
.admin-nav a { display: flex; align-items: center; min-height: 42px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--ink); font-weight: 600; text-decoration: none; }
.admin-nav a:hover { background: var(--head-bg); color: var(--ink); }
.admin-nav a[aria-current="page"] { background: var(--green-tint); color: var(--green-dark); box-shadow: inset 4px 0 0 var(--green-bright); }

@media (width < 64rem) {
  .admin-shell { display: block; }
  .admin-main { padding: 24px var(--gutter) 48px; }
  .admin-nav { position: static; max-height: none; min-height: 0; border: 0; border-bottom: 1px solid var(--line); }
  .admin-nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
}
@supports selector(:popover-open) {
  @media (width < 64rem) {
    .menu-button { display: inline-flex; }
    .admin-nav {
      position: fixed; inset: 0 auto 0 0; width: min(20rem, 86vw); height: 100%; max-height: none;
      padding: 8px 12px 32px; border: 0; box-shadow: 8px 0 32px rgb(13 11 30 / .3);
      translate: -100% 0; transition: translate .25s ease, overlay .25s allow-discrete, display .25s allow-discrete;
    }
    .admin-nav:not(:popover-open) { display: none; }
    .admin-nav:popover-open { display: block; translate: 0 0; }
    @starting-style { .admin-nav:popover-open { translate: -100% 0; } }
    .admin-nav::backdrop { background: rgb(13 11 30 / .55); }
    .admin-nav ul { display: block; }
    .admin-nav a { min-height: 48px; }
    .admin-nav-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); font: 600 1.125rem var(--display); text-transform: uppercase; letter-spacing: .04em; }
    .menu-close { display: inline-flex; color: var(--ink); padding: 0 10px; margin: 0; }
    .menu-close:hover { background: var(--head-bg); }
  }
}
@media (prefers-reduced-motion: reduce) { .admin-nav { transition: none; } }

/* --- From Sage --------------------------------------------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 16px; min-height: 44px; display: flex; align-items: center; font: 500 1rem var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--green-bright); }
.email-log { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.tick { width: 44px; }
.tick input { inline-size: 1.15rem; block-size: 1.15rem; accent-color: var(--green); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.link-form { display: flex; gap: 8px; align-items: center; }
.link-form select { min-width: 0; max-width: 22rem; min-height: 36px; font-size: .9375rem; }
.card-head h2 .badge { margin-inline-start: 6px; }
.hidden-list summary { cursor: pointer; font-weight: 600; }
.hidden-list[open] summary { margin-bottom: 12px; }
.hidden-list td { text-align: end; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--head-bg); padding: 1px 5px; border-radius: 4px; }
input[readonly] { background: var(--head-bg); color: var(--muted); }
@container (width < 560px) { .stack .row-actions { justify-content: flex-start; padding-top: 6px; } .stack .link-form { flex-wrap: wrap; } }

/* --- Product recipe editor ------------------------------------------------------------------------------------------ */
.recipe-head { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.recipe-head .hint { margin: 0; }
.recipe-total { font-size: .9375rem; color: var(--muted); white-space: nowrap; }
.recipe-total strong { font: 600 1.25rem var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.recipe-cols, .recipe-row { display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem 6rem 44px; gap: 8px 12px; align-items: center; }
.recipe-cols { white-space: nowrap; padding: 0 0 6px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.recipe-rows { list-style: none; margin: 0 0 16px; padding: 0; }
.recipe-row { padding: 8px 0; border-top: 1px solid var(--line-soft); }
.recipe-row select { max-width: none; }
.recipe-grams { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.recipe-grams input { max-width: none; text-align: end; font-variant-numeric: tabular-nums; }
.recipe-pct { font-variant-numeric: tabular-nums; color: var(--muted); }
.recipe-remove:hover { border-color: var(--error); color: var(--error); }
@media (width < 44rem) {
  .recipe-cols { display: none; }
  .recipe-row { grid-template-columns: minmax(0, 1fr) auto 44px; padding: 12px 0; }
  .recipe-ingredient { grid-column: 1 / -1; }
  .recipe-grams { max-width: 9rem; }
}

/* --- Print (production sheet, picking notes) ------------------------------------------------------------------------------- */
.print-only { display: none; }
@media print {
  @page { margin: 12mm; }
  body { display: block; background: #fff; font-size: 11pt; }
  .utility, .site-header, .site-footer, .admin-nav, .no-print, .flash, .toolbar, .basket-bar, .banner { display: none !important; }
  .print-only { display: block; }
  .admin-shell { display: block; }
  main, .admin-main, .shop-main { padding: 0; max-width: none; }
  h1 { font-size: 16pt; }
  .table-wrap, .table-card { overflow: visible; border: 0; max-block-size: none; border-radius: 0; }
  thead th { position: static; background: #eee !important; color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  th, td { padding: 3pt 6pt; border-bottom: 1px solid #999; }
  tr { break-inside: avoid; }
  .picking th, .picking td { font-size: 9pt; }
}
