/* Tin House · online shop (coffee page buy row, bag, checkout, order, legal pages).
   Uses only the tokens and components of app.css: --ink, --paper(-2), --teal (fills only, ink text on it),
   --teal-ink for teal text, Manrope, pills, 14 px cards. No new colours except the alert pair of the old brief page. */

.shop-head { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.shop-head .h1 { margin-bottom: .25rem; }
.shop-note {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.25rem; padding: .5rem 1rem .5rem .75rem;
  border-radius: 999px; background: var(--teal-soft); font-size: var(--fs-small); font-weight: 600;
}
.shop-note__icon { width: 1.1rem; height: 1.1rem; color: var(--teal-ink); }
.shop-test {
  margin-top: 1rem; max-width: 40rem; padding: .625rem 1rem; border-radius: var(--r-2);
  box-shadow: inset 0 0 0 1px var(--line-strong); font-size: var(--fs-small); color: var(--muted);
}
.shop-alert { margin-bottom: 1.5rem; padding: .875rem 1.125rem; border-radius: var(--r-2); background: #FBE9E4; color: #8A2A14; font-weight: 500; }
.shop-alert p + p { margin-top: .25rem; }

/* ---------- coffee page: price + Add to bag ---------- */
.buy { align-items: center; }
.buy .btn { order: 2; }
.buy .coffee__where { flex-basis: 100%; order: 3; }
.buy__weight { font-size: var(--fs-small); font-weight: 500; color: var(--muted); margin-left: .25rem; }
.buy .btn.is-added { background: var(--teal); color: var(--ink); }

/* toast after «Add to bag» (shop.js) */
.toast {
  position: fixed; left: 50%; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 60; transform: translate(-50%, 0);
  display: flex; align-items: center; gap: 1rem; width: max-content; max-width: calc(100vw - 2rem);
  padding: .5rem .5rem .5rem 1.25rem; border-radius: 999px; background: var(--ink); color: var(--paper);
  font-size: var(--fs-small); font-weight: 600; box-shadow: 0 12px 32px rgb(14 29 28 / .22);
}
.toast[hidden] { display: none; }
.toast .btn { min-height: 2.5rem; }
@media (max-width: 899px) { .toast { bottom: calc(4.75rem + env(safe-area-inset-bottom)); } } /* above the call / Wolt bar */
@media (prefers-reduced-motion: no-preference) { .toast:not([hidden]) { animation: toast-in var(--d2) var(--ease-out) both; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- bag ---------- */
.bag-empty { display: grid; justify-items: start; gap: 1.5rem; padding-bottom: var(--section); }
.bag { display: grid; gap: var(--gap); align-items: start; padding-bottom: 3rem; }
@media (min-width: 1024px) { .bag { grid-template-columns: minmax(0, 1fr) 24rem; gap: 3rem; } }
.lines { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.line-item {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; grid-template-areas: "img text total" "img step step";
  gap: .75rem 1rem; align-items: center; padding-block: 1.25rem; border-bottom: 1px solid var(--line);
}
@media (min-width: 640px) {
  .line-item { grid-template-columns: 6rem minmax(0, 1fr) auto 6rem; grid-template-areas: "img text step total"; }
}
.line-item__img { grid-area: img; aspect-ratio: 1; border-radius: var(--r-2); overflow: hidden; background: #E6E6E4; }
.line-item__img img { width: 100%; height: 100%; object-fit: cover; }
.line-item__text { grid-area: text; min-width: 0; }
.line-item__name { font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; }
.line-item__name a:hover { color: var(--teal-ink); }
.line-item__meta { font-size: var(--fs-small); color: var(--muted); }
.line-item__del { margin-top: .25rem; min-height: 2.75rem; font-size: var(--fs-small); font-weight: 600; color: var(--teal-ink); text-decoration: underline; text-underline-offset: .2em; }
.line-item__total { grid-area: total; text-align: right; font-weight: 600; }
.stepper { grid-area: step; display: inline-flex; align-items: center; justify-self: start; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); }
@media (min-width: 640px) { .stepper { justify-self: end; } }
.stepper button { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 999px; font-size: 1.25rem; line-height: 1; }
.stepper button:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper__n { min-width: 1.75rem; text-align: center; font-weight: 600; }

.summary { padding: 1.5rem; border-radius: var(--r-2); background: var(--paper-2); }
.summary__title { font-size: var(--fs-label); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--teal-ink); margin-bottom: 1rem; }
.summary__lines { list-style: none; padding: 0; margin-bottom: .75rem; }
.summary__lines li { display: flex; justify-content: space-between; gap: 1rem; padding-block: .45rem; }
.summary__lines small { color: var(--muted); font-size: var(--fs-small); }
.summary__rows > div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .45rem; border-top: 1px solid var(--line); }
.summary__rows dt { color: var(--muted); }
.summary__total dt, .summary__total dd { color: var(--ink); font-weight: 700; font-size: 1.125rem; }
.summary__go { width: 100%; margin-top: 1.25rem; }
.summary__fine { display: flex; gap: .5rem; margin-top: 1rem; font-size: var(--fs-small); color: var(--muted); }
.summary__lock { width: 1rem; height: 1rem; flex: none; margin-top: .2rem; }
.summary__edit { margin-top: .75rem; }
@media (min-width: 1024px) { .summary--sticky { position: sticky; top: calc(var(--header-h) + 1.5rem); } }

.more { padding-block: 2rem var(--section); }
.more__list { list-style: none; padding: 0; display: grid; gap: .75rem; }
@media (min-width: 900px) { .more__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.more__item { display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: .75rem; border-radius: var(--r-2); box-shadow: inset 0 0 0 1px var(--line); }
.more__img { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #E6E6E4; }
.more__img img { width: 100%; height: 100%; object-fit: cover; }
.more__name { font-weight: 600; }
.more__meta { font-size: var(--fs-small); color: var(--muted); }

/* ---------- checkout ---------- */
.checkout { display: grid; gap: 2rem; align-items: start; padding-bottom: var(--section); }
@media (min-width: 1024px) { .checkout { grid-template-columns: minmax(0, 1fr) 24rem; gap: 3.5rem; } }
.checkout__form { display: grid; gap: 2.5rem; min-width: 0; }
@media (max-width: 1023px) { .checkout .summary { order: -1; } }
.group { border: 0; padding: 0; margin: 0; min-width: 0; }
.group__title { display: flex; align-items: baseline; gap: .875rem; padding: 0; margin-bottom: 1rem; font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.018em; }
.group__num { font-size: var(--fs-label); font-weight: 600; letter-spacing: .14em; color: var(--teal-ink); }

.field { display: block; margin-top: 1rem; }
.field-row { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } .field-row--post { grid-template-columns: 9rem 1fr; } }
.field__label { display: block; margin-bottom: .5rem; font-weight: 600; font-size: var(--fs-small); }
.field__label em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: .375rem; }
.field__note { display: block; margin-top: .625rem; font-size: var(--fs-small); color: var(--muted); }
.field__error { display: block; margin-top: .4rem; font-size: var(--fs-small); font-weight: 600; color: #8A2A14; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 3.25rem; padding: .75rem 1rem; border: 0; border-radius: var(--r-2);
  background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); font: inherit; font-size: 1rem; color: var(--ink);
  appearance: none; -webkit-appearance: none;
}
.field textarea { resize: vertical; line-height: 1.5; min-height: 4.5rem; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; }
.field [aria-invalid="true"], .tiles[aria-invalid="true"] .tile__box { box-shadow: inset 0 0 0 1.5px #8A2A14; }

.tiles { display: grid; gap: .625rem; }
.tiles--two { grid-template-columns: 1fr; margin-bottom: 1.5rem; }
@media (min-width: 640px) { .tiles--two { grid-template-columns: 1fr 1fr; } .when--pickup .tiles { grid-template-columns: 1fr 1fr; } }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tile__box {
  display: flex; align-items: flex-start; gap: .875rem; height: 100%; min-height: 3.75rem; padding: 1rem 1.125rem;
  border-radius: var(--r-2); box-shadow: inset 0 0 0 1px var(--line-strong); background: #fff;
  font-weight: 600; line-height: 1.3; transition: background-color var(--d1) linear, color var(--d1) linear, box-shadow var(--d1) linear;
}
.tile__text small { display: block; margin-top: .25rem; font-size: var(--fs-small); font-weight: 400; line-height: 1.45; color: var(--muted); }
.tile__mark { flex: none; width: 1.25rem; height: 1.25rem; margin-top: .05rem; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.tile:hover .tile__box { box-shadow: inset 0 0 0 1.5px var(--ink); }
.tile input:checked + .tile__box { background: var(--ink); color: var(--paper); box-shadow: none; }
.tile input:checked + .tile__box small { color: var(--muted-inv); }
.tile input:checked + .tile__box .tile__mark { background: var(--teal); box-shadow: inset 0 0 0 4px var(--ink), 0 0 0 1.5px var(--teal); }
.tile input:focus-visible + .tile__box { outline: 2px solid var(--teal-ink); outline-offset: 3px; }

/* pickup or delivery: hide the other group where the browser can (no JavaScript needed) */
.checkout:has(input[name="method"][value="pickup"]:checked) .when--delivery,
.checkout:has(input[name="method"][value="delivery"]:checked) .when--pickup { display: none; }

.agree { display: flex; gap: .75rem; align-items: flex-start; cursor: pointer; font-size: var(--fs-small); line-height: 1.5; }
.agree input { appearance: none; -webkit-appearance: none; flex: none; width: 1.375rem; height: 1.375rem; margin: .05rem 0 0; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--line-strong); background: #fff; cursor: pointer; }
.agree input:checked { background: var(--ink); box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 1.5px var(--ink), 0 0 0 1.5px var(--ink); }
.agree input:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; }
.agree input[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px #8A2A14; }
.agree a { color: var(--teal-ink); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.pay { width: 100%; min-height: 3.5rem; margin-top: 1.5rem; font-size: 1rem; }
@media (min-width: 640px) { .pay { width: auto; min-width: 16rem; } }

/* ---------- order page ---------- */
.order-head__seal { width: 3.5rem; height: auto; color: var(--teal-ink); --sw: 14; margin-bottom: 1.5rem; }
.order-head__seal path { stroke-width: 14; }
.order-head .lead { margin-top: 1.25rem; max-width: 40rem; }
.order-head .lead a { color: var(--teal-ink); font-weight: 600; }
.order-head__retry { margin-top: 1.75rem; }
.order-head .shop-alert { margin-top: 1.25rem; max-width: 40rem; }
.order { display: grid; gap: 2rem; align-items: start; padding-bottom: var(--section); }
@media (min-width: 900px) { .order { grid-template-columns: minmax(0, 26rem) minmax(0, 1fr); gap: 4rem; } }
.order__where { display: grid; gap: .25rem; justify-items: start; }
.order__big { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.018em; }
.order__muted { color: var(--muted); font-size: var(--fs-small); max-width: 32rem; margin-top: .75rem; }
.order__muted a { color: var(--teal-ink); font-weight: 600; }

/* ---------- legal pages ---------- */
.legal-nav { max-width: 46rem; padding-top: 1.5rem; } /* same column as .legal */
.legal-nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.legal-nav a { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 1rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); font-size: var(--fs-small); font-weight: 600; }
.legal-nav a:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.legal-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.legal { max-width: 46rem; padding-block: clamp(2.5rem, 2rem + 4vw, 5rem) var(--section); }
.legal .h1 { margin-bottom: .75rem; }
.legal__date { color: var(--muted); font-size: var(--fs-small); margin-bottom: 2.5rem; }
.legal h2 { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -.018em; margin: 2.25rem 0 .625rem; }
.legal p { max-width: 42rem; }
.legal a { color: var(--teal-ink); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.legal code { font-size: .9em; padding: .1em .35em; border-radius: 5px; background: var(--paper-2); }
.gap { background: var(--teal-soft); color: var(--ink); padding: .05em .4em; border-radius: 5px; font-weight: 600; }

/* phones: the call / Wolt bar would sit on the Pay button; the shop pages have their own way forward */
.page-bag .quick, .page-checkout .quick { display: none; }
@media (max-width: 899px) { .page-bag .site-footer, .page-checkout .site-footer { padding-bottom: 0; } }
.legal p + p { margin-top: .75rem; }

/* ---------- withdrawal page, order page additions (2026-11-20) ---------- */
@media (min-width: 1024px) { .checkout--one { grid-template-columns: minmax(0, 44rem); } }
.legal--flush { padding-top: 0; }
.order__wd-title { margin-top: 1.75rem; }
.order__where .btn { margin-top: .5rem; }
.checkout--one p.field__label { margin-top: 1.25rem; }
.checkout--one .tiles { margin-top: 1rem; }
.legal a.btn { text-decoration: none; }
.legal a.btn--ink { color: var(--paper); }
.legal a.btn--ink:hover { color: var(--ink); }
/* phones: the call / Wolt bar would sit on the form (as on the bag and the checkout) */
.page-withdraw .quick { display: none; }
@media (max-width: 899px) { .page-withdraw .site-footer { padding-bottom: 0; } }
.bag-empty__btns { display: flex; flex-wrap: wrap; gap: .75rem; }
.shop-closed { padding-bottom: 1.75rem; }
.shop-closed .shop-test { margin-top: 0; }
