@charset "UTF-8";
/*
 * shop.css : the cart, the checkout, the order placed and Track Your Order (pages/cart.tsx, checkout.tsx,
 * order-placed.tsx, track-order.tsx), scoped under <app-shop>. Drawn in the browser by public/js/sections/cart.js,
 * checkout.js, order-placed.js and track-order.js.
 */

/* ════════ <app-shop> ════════ */

app-shop {
  display: block;
  background: var(--page-inner);
}
app-shop .shop {
  padding-top: clamp(28px, 4vw, 48px);
}

/* while the browser reads the cart */
app-shop .shop__wait {
  height: 320px;
  border-radius: 20px;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.55) 50%, transparent 80%) var(--surface-2);
  background-size: 200% 100%;
  animation: app-shop--shimmer 1.4s linear infinite;
}
@keyframes app-shop--shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ── the two columns: what is bought on the left, the totals on the right ── */
app-shop .shop-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 24px;
  align-items: start;
}
app-shop .shop-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}
app-shop .shop-side {
  position: sticky;
  top: calc(var(--header-h) + 36px);
  display: grid;
  gap: 16px;
}
@media (max-width: 960px) {
  app-shop .shop-grid {
    grid-template-columns: 1fr;
  }
  app-shop .shop-side {
    position: static;
  }
}

app-shop .shop-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 18px 40px -30px rgba(23, 19, 18, 0.3);
}
app-shop .shop-card--pad {
  padding: clamp(18px, 2.4vw, 24px);
}
app-shop .shop-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 700;
}
app-shop .shop-card__title svg {
  width: 20px;
  height: 20px;
  color: var(--red);
}

app-shop .btn--outline {
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
app-shop .btn--outline:hover {
  border-color: var(--ink);
}
app-shop .btn:disabled {
  opacity: 0.7;
  cursor: progress;
}

/* ── empty ── */
app-shop .shop-empty {
  display: grid;
  justify-items: center;
  padding: clamp(40px, 6vw, 64px) 24px;
  text-align: center;
}
app-shop .shop-empty__icon {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 1.5px dashed var(--tint-edge);
  border-radius: 50%;
  background: var(--tint);
  color: var(--red);
}
app-shop .shop-empty__icon svg {
  width: 38px;
  height: 38px;
}
app-shop .shop-empty h2 {
  margin: 18px 0 8px;
  font-size: 22px;
  font-weight: 700;
}
app-shop .shop-empty p {
  max-width: 42ch;
  margin-bottom: 22px;
  font-size: 14.5px;
  color: var(--muted);
}
app-shop .shop-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ── the cart's heading, and the Undo bar ── */
app-shop .shop-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
app-shop .shop-head__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 500;
}
app-shop .shop-head__title svg {
  width: 24px;
  height: 24px;
  color: var(--red);
}
app-shop .shop-head__title span {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}
app-shop .shop-head__clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: background-color 0.2s, color 0.2s;
}
app-shop .shop-head__clear svg {
  width: 16px;
  height: 16px;
}
app-shop .shop-head__clear:hover {
  background: var(--tint);
  color: var(--red);
}
app-shop .shop-undo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--dark-chip);
  color: #fff;
  font-size: 14px;
}
app-shop .shop-undo button {
  font-weight: 700;
  color: #ffb3b6;
}
/* (an empty cart : the Undo bar sits right over the box) */
app-shop .shop-undo + .shop-empty {
  margin-top: 16px;
}

/* ── a line of the cart ── */
app-shop .lines {
  display: grid;
  gap: 14px;
}
app-shop .line {
  display: flex;
  gap: 16px;
  padding: 14px;
}
app-shop .line__img {
  flex: none;
  width: clamp(96px, 14vw, 132px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 14px;
  background: var(--photo-well);
}
app-shop .line__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}
app-shop .line__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
app-shop .line__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
app-shop .line__name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}
app-shop .line__name a:hover {
  color: var(--red);
}
app-shop .line__remove {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  transition: background-color 0.2s, color 0.2s;
}
app-shop .line__remove svg {
  width: 17px;
  height: 17px;
}
app-shop .line__remove:hover {
  background: var(--tint);
  color: var(--red);
}
app-shop .line__meta {
  font-size: 13px;
  color: var(--muted);
}
app-shop .line__price strong {
  font-size: 16px;
  font-weight: 700;
}
app-shop .line__price s {
  margin-left: 6px;
  font-size: 13px;
  color: var(--muted);
}
/* the bulk-buy offer the line's chair reaches (lib/bulk.ts) */
app-shop .line__bulk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ok-bg, rgba(52, 168, 90, 0.12));
  color: var(--ok, #1f8a4c);
  font-size: 12.5px;
  font-weight: 600;
}
app-shop .line__bulk svg {
  width: 14px;
  height: 14px;
}
app-shop .line__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: auto;
  padding-top: 8px;
}
app-shop .line__save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
app-shop .line__save svg {
  width: 16px;
  height: 16px;
}
app-shop .line__save:hover {
  color: var(--red);
}
app-shop .line__total {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}
app-shop .line__total b {
  color: var(--ink);
}

/* the − 1 + stepper */
app-shop .qty {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
}
app-shop .qty__btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background-color 0.2s, opacity 0.2s;
}
app-shop .qty__btn svg {
  width: 15px;
  height: 15px;
}
app-shop .qty__btn:hover:not(:disabled) {
  background: var(--surface-2);
}
app-shop .qty__btn:disabled {
  opacity: 0.35;
  cursor: default;
}
app-shop .qty__value {
  min-width: 30px;
  font-size: 14.5px;
  font-weight: 700;
  text-align: center;
}

/* ── coupons ── */
app-shop .coupon__form {
  display: flex;
  align-items: center;
  gap: 8px;
}
app-shop .coupon__form .btn {
  flex: none;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  box-shadow: 0 8px 20px -10px rgba(215, 26, 33, 0.7);
}
app-shop .coupon__form .btn svg {
  width: 16px;
  height: 16px;
}
app-shop .coupon__form input,
app-shop .f input,
app-shop .f select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--edge-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: 500 14.5px var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}
app-shop .coupon__form input {
  flex: 1;
  text-transform: uppercase;
}
app-shop .coupon__form input::placeholder {
  text-transform: none;
}
app-shop .coupon__form input:focus,
app-shop .f input:focus,
app-shop .f select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(215, 26, 33, 0.12);
}
app-shop .coupon__err {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--red);
}
app-shop .coupon__list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
/* a coupon : its ticket, the code over what it gives, and Apply on the right (so a long text wraps under the code
   and never runs into Apply) */
app-shop .coupon__list button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    'tag code apply'
    'tag text apply';
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px dashed var(--tint-edge);
  border-radius: 12px;
  background: var(--tint);
  text-align: left;
  transition: border-color 0.2s;
}
app-shop .coupon__list button:hover {
  border-color: var(--red);
}
app-shop .coupon__tag {
  grid-area: tag;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--red);
}
app-shop .coupon__tag svg {
  width: 17px;
  height: 17px;
}
app-shop .coupon__list b {
  grid-area: code;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--red);
  overflow-wrap: anywhere;
}
app-shop .coupon__text {
  grid-area: text;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-soft);
}
app-shop .coupon__list em {
  grid-area: apply;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1.5px solid var(--red);
  border-radius: 999px;
  font-style: normal;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
app-shop .coupon__list em svg {
  width: 13px;
  height: 13px;
  transition: transform 0.2s;
}
app-shop .coupon__list button:hover em {
  background: var(--red);
  color: #fff;
}
app-shop .coupon__list button:hover em svg {
  transform: translateX(2px);
}
app-shop .coupon__on {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--ok-bg);
}
app-shop .coupon__on > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ok);
}
app-shop .coupon__on > span svg {
  width: 16px;
  height: 16px;
}
app-shop .coupon__on p {
  flex: 1;
  font-size: 14px;
}
app-shop .coupon__on small {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}
app-shop .coupon__on button {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
}

/* ── price details ── */
app-shop .sum {
  display: grid;
  gap: 8px;
  margin: 0;
}
app-shop .sum__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14.5px;
}
app-shop .sum__row dt {
  color: var(--muted);
}
app-shop .sum__row dd {
  margin: 0;
  font-weight: 600;
}
app-shop .sum__row.is-ok dd {
  color: var(--ok);
}
app-shop .sum__note {
  font-size: 12.5px;
  color: var(--muted);
}
app-shop .sum__row--total {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 17px;
}
app-shop .sum__row--total dt,
app-shop .sum__row--total dd {
  font-weight: 700;
  color: var(--ink);
}
app-shop .sum__saved {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 13.5px;
  font-weight: 600;
}
app-shop .sum__saved svg {
  width: 16px;
  height: 16px;
}
app-shop .shop-go {
  width: 100%;
  margin-top: 18px;
}
app-shop .shop-back {
  display: block;
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  color: var(--muted);
}
app-shop .shop-back:hover {
  color: var(--red);
}

/* 100% safe & secure checkout : a dark box under the button, with the ways to pay */
app-shop .secure {
  margin-top: 16px;
  padding: 14px 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(215, 26, 33, 0.3), transparent 55%),
    linear-gradient(135deg, #2b2422, #171312);
  box-shadow: 0 14px 28px -18px rgba(23, 19, 18, 0.8);
  color: #fff;
  text-align: center;
}
app-shop .secure__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
app-shop .secure__title svg {
  flex: none;
  width: 17px;
  height: 17px;
  color: #4cc27a;
}
app-shop .secure__pay {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
/* each way to pay as a small white card with its mark */
app-shop .secure__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 24px;
  padding: 0 7px;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  color: #2b2422;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.2px;
}
app-shop .secure__mark svg {
  width: 26px;
  height: 16px;
}
app-shop .secure__mark--visa {
  color: #1a1f71;
  font-size: 12px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.6px;
}
app-shop .secure__mark--rupay {
  color: #1d3a8a;
  font-style: italic;
}
app-shop .secure__mark--rupay b {
  color: #f37021;
}
app-shop .secure__mark--upi {
  color: #097939;
  font-style: italic;
  font-weight: 900;
}
app-shop .secure__mark--word {
  font-size: 10px;
}

/* ── the line that says ordering is not live yet ── */
app-shop .shop-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 16px;
  border: 1px solid var(--tint-edge);
  border-radius: 14px;
  background: var(--tint);
  color: var(--tint-ink);
  font-size: 13.5px;
  line-height: 1.55;
}
app-shop .shop-notice svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--red);
}
app-shop .shop-notice a,
app-shop .next a {
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
}

/* ── checkout steps : one open at a time ; a step done folds to one line with Change, the ones to come are greyed ── */
/* the checkout, on the cart page under the chairs */
app-shop .checkout {
  display: grid;
  gap: 14px;
  margin-top: clamp(14px, 2.4vw, 24px);
}
app-shop .checkout .shop-notice {
  margin: 0;
}
app-shop .steps {
  display: grid;
  gap: 14px;
}
app-shop #cart-items {
  scroll-margin-top: calc(var(--header-h) + 28px);
}
app-shop .step {
  scroll-margin-top: calc(var(--header-h) + 28px);
  transition: border-color 0.25s, box-shadow 0.25s, opacity 0.25s;
}
app-shop .step__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px clamp(16px, 2.4vw, 24px);
}
app-shop .step__title {
  flex: 1;
  min-width: 0;
}
app-shop .step__title h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 16.5px;
  font-weight: 700;
}
app-shop .step__title h2:focus {
  outline: none;
}
app-shop .step__no {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  transition: background-color 0.25s, color 0.25s;
}
app-shop .step__no svg {
  width: 16px;
  height: 16px;
}
app-shop .step__body {
  padding: 18px clamp(16px, 2.4vw, 24px) clamp(18px, 2.4vw, 24px);
  border-top: 1px solid var(--line);
  animation: app-shop--step-in 0.35s var(--ease) both;
}
@keyframes app-shop--step-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  app-shop .step__body {
    animation: none;
  }
}

/* the step open */
app-shop .step.is-open {
  border-color: var(--ink);
  box-shadow: 0 22px 44px -30px rgba(23, 19, 18, 0.45);
}

/* a step done : a green tick, Done, what was chosen and Change */
app-shop .step.is-done {
  border-color: color-mix(in srgb, var(--ok) 35%, transparent);
}
app-shop .step.is-done .step__no {
  background: var(--ok);
}
app-shop .step__done {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}
app-shop .step__sum {
  margin-top: 3px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  overflow-wrap: anywhere;
}
app-shop .step__sum b {
  color: var(--ink);
}
app-shop .step__sum .addr__tag {
  padding: 1px 7px;
  font-size: 10.5px;
}
app-shop .step__change {
  flex: none;
  padding: 7px 16px;
  border: 1.5px solid var(--edge-strong);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink);
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
app-shop .step__change:hover {
  border-color: var(--red);
  background: var(--tint);
  color: var(--red);
}

/* a step still to come */
app-shop .step.is-later {
  box-shadow: none;
  opacity: 0.62;
}
app-shop .step.is-later .step__no {
  background: var(--surface-2);
  color: var(--muted);
}
app-shop .step.is-later h2 {
  color: var(--muted);
}

/* who is signed in (Login, opened again with Change) */
app-shop .who {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
}
app-shop .who__face {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--red);
  font-size: 18px;
  font-weight: 800;
}
app-shop .who__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
app-shop .who__body strong {
  font-size: 15px;
}
app-shop .who__body small {
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
app-shop .step__link {
  display: block;
  margin: 14px auto 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}
app-shop .step__link:hover {
  color: var(--red);
}

/* + Add New Address, as a dashed bar */
app-shop .step__new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 13px;
  border: 1.5px dashed var(--edge-strong);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
app-shop .step__new svg {
  width: 16px;
  height: 16px;
}
app-shop .step__new:hover {
  border-color: var(--red);
  background: var(--tint);
  color: var(--red);
}

/* Order Review's chairs, and Edit Cart */
app-shop .mini.review {
  margin-bottom: 0;
}
app-shop .review li + li {
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
app-shop .review img {
  width: 64px;
  height: 64px;
}
app-shop .review .mini__body small {
  display: block;
}
app-shop .step__edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--red);
}
app-shop .step__edit svg {
  width: 16px;
  height: 16px;
}

/* the delivery's fee, at the right of its card */
app-shop .pay__price {
  margin-left: auto;
  padding-left: 10px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
app-shop .pay__price.is-free {
  color: var(--ok);
}

@media (max-width: 520px) {
  app-shop .step__head {
    gap: 12px;
  }
  app-shop .step__change {
    padding: 6px 11px;
    font-size: 11px;
  }
}

app-shop .step__sub {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--muted);
}
app-shop .step__err {
  margin-bottom: 10px;
}
app-shop .step__note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}
app-shop .step__note svg {
  width: 18px;
  height: 18px;
  color: var(--red);
}

/* radio cards: a saved address, a way to pay */
app-shop .addrs,
app-shop .pays {
  display: grid;
  gap: 10px;
}
app-shop .addr,
app-shop .pay {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  text-align: left;
  transition: border-color 0.2s, background-color 0.2s;
}
app-shop .pay {
  align-items: center;
}
app-shop .addr:hover,
app-shop .pay:hover {
  border-color: var(--edge-hover);
}
app-shop .addr.is-on,
app-shop .pay.is-on {
  border-color: var(--red);
  background: var(--tint);
}
app-shop .radio {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 2px solid var(--edge-strong);
  border-radius: 50%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
app-shop .is-on > .radio {
  border-color: var(--red);
  box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 10px var(--red);
}
app-shop .addr__body {
  display: grid;
  gap: 3px;
  min-width: 0;
}
app-shop .addr__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
}
app-shop .addr__tag {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-soft);
}
app-shop .addr__tag--def {
  background: var(--ok-bg);
  color: var(--ok);
}
app-shop .addr__line {
  font-size: 13px;
  color: var(--muted);
}
app-shop .pay__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--red);
}
app-shop .pay__icon svg {
  width: 20px;
  height: 20px;
}
app-shop .pay__body strong {
  display: block;
  font-size: 14.5px;
}
app-shop .pay__body small {
  font-size: 12.5px;
  color: var(--muted);
}

/* a new address */
app-shop .addr-form {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
app-shop .addrs + .addr-form {
  margin-top: 14px;
}
app-shop .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
app-shop .chip {
  padding: 8px 16px;
  border: 1px solid var(--edge-strong);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
app-shop .chip[aria-checked=true] {
  border-color: var(--red);
  background: var(--tint);
  color: var(--red);
}
app-shop .f-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
app-shop .f {
  display: grid;
  align-content: start;
  gap: 6px;
}
app-shop .f--wide {
  grid-column: 1/-1;
}
app-shop .f label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
app-shop .f label b {
  color: var(--red);
}
app-shop .f.has-error input,
app-shop .f.has-error select {
  border-color: var(--red);
}
app-shop .f-err {
  font-size: 12.5px;
  color: var(--red);
}
app-shop .addr-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
@media (max-width: 640px) {
  app-shop .f-grid {
    grid-template-columns: 1fr;
  }
  app-shop .f input,
  app-shop .f select,
  app-shop .coupon__form input {
    font-size: 16px;
  }
}

/* the chairs of an order: thumbnails, or rows with their price */
app-shop .mini {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
app-shop .mini li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}
app-shop .mini img {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: var(--photo-well);
  object-fit: cover;
}
app-shop .mini__body {
  flex: 1;
  min-width: 0;
}
app-shop .mini__body strong {
  display: block;
  font-size: 14px;
}
app-shop .mini__body small {
  font-size: 12.5px;
  color: var(--muted);
}
app-shop .mini b {
  font-size: 14px;
}
app-shop .mini.is-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
app-shop .mini__qty {
  position: absolute;
  right: -6px;
  bottom: -6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--dark-chip);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* ── the order placed ── */
app-shop .placed {
  display: grid;
  gap: 16px;
}
app-shop .placed .shop-notice {
  margin: 0;
}
/* the tick, the words and the ways on in one short row */
app-shop .placed__hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 22px clamp(20px, 2.6vw, 28px);
}
app-shop .placed__tick {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 5px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  box-shadow: 0 0 0 5px var(--ok-bg);
  animation: app-shop--pop 0.6s var(--ease) both;
}
app-shop .placed__tick svg {
  width: 21px;
  height: 21px;
}
@keyframes app-shop--pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}
app-shop .placed__hero h3 {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 500;
  line-height: 1.15;
}
app-shop .placed__hero p {
  margin-top: 4px;
  color: var(--muted);
}
app-shop .placed__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
app-shop .placed__actions .btn--outline svg {
  color: var(--red);
}
@media (max-width: 900px) {
  app-shop .placed__hero {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
    text-align: center;
  }
  app-shop .placed__actions {
    justify-content: center;
  }
}

/* the receipt and what happens next stand as two boxes of one height */
app-shop .placed .shop-grid {
  align-items: stretch;
  gap: 16px;
}
app-shop .placed .shop-main,
app-shop .placed .shop-side {
  position: static;
  grid-template-rows: 1fr;
}
app-shop .receipt__ref {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 13px;
  color: var(--muted);
}
app-shop .receipt__ref button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}
app-shop .receipt__ref button svg {
  width: 16px;
  height: 16px;
  color: var(--red);
}
app-shop .receipt .mini {
  margin-bottom: 14px;
}
app-shop .receipt__facts {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}
app-shop .receipt__facts div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  font-size: 14px;
}
app-shop .receipt__facts dt {
  color: var(--muted);
}
app-shop .receipt__facts dd {
  margin: 0;
}
app-shop .receipt__total {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  font-size: 17px;
  font-weight: 700;
}
/* View & download invoice, under the total */
app-shop .receipt__invoice {
  width: 100%;
  margin-top: 16px;
}
app-shop .receipt__invoice svg,
app-shop .track__help-actions .btn--outline svg {
  color: var(--red);
}
app-shop .next {
  display: grid;
  gap: 16px;
}
app-shop .next li {
  position: relative;
  display: flex;
  gap: 12px;
}
/* the line joining one step to the next */
app-shop .next li:not(:last-child)::before {
  content: '';
  position: absolute;
  top: 30px;
  bottom: -12px;
  left: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}
app-shop .next li.is-done:not(:last-child)::before {
  background: var(--ok);
}
app-shop .next__dot {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid var(--edge-strong);
  border-radius: 50%;
  background: var(--surface);
}
app-shop .is-done .next__dot {
  border-color: var(--ok);
  background: var(--ok);
  color: #fff;
}
app-shop .next__dot svg {
  width: 14px;
  height: 14px;
}
app-shop .next strong {
  display: block;
  font-size: 14.5px;
}
app-shop .next small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 560px) {
  app-shop .line {
    padding: 12px;
    gap: 12px;
  }
  app-shop .line__total {
    margin-left: 0;
    width: 100%;
  }
  app-shop .receipt__facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
@media (prefers-reduced-motion: reduce) {
  app-shop .shop__wait,
  app-shop .placed__tick {
    animation: none;
  }
}

/* ════════ Track Your Order (pages/track-order.tsx, public/js/sections/track-order.js) ════════ */

app-shop .track {
  display: grid;
  gap: 20px;
}

/* ── the form beside a red panel that says how it works ── */
app-shop .track__find {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  overflow: hidden;
}
/* (in the middle of the card, beside the taller red panel) */
app-shop .track__main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(20px, 2.6vw, 30px);
}

app-shop .track__intro {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
app-shop .track__icon {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--tint);
  color: var(--red);
}
/* (a soft ring going out from it, now and then) */
app-shop .track__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: app-shop--halo 2.8s ease-out infinite;
}
app-shop .track__icon svg {
  width: 28px;
  height: 28px;
}
@keyframes app-shop--halo {
  from {
    box-shadow: 0 0 0 0 rgba(215, 26, 33, 0.28);
  }
  60%,
  to {
    box-shadow: 0 0 0 12px rgba(215, 26, 33, 0);
  }
}
app-shop .track__intro h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 500;
}
app-shop .track__intro p {
  margin-top: 2px;
  font-size: 14.5px;
  color: var(--muted);
}

app-shop .track__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px 16px;
}
app-shop .track__form .f label {
  line-height: 20px;
}

/* a field with its icon at the start, red while it is in use or wrong */
app-shop .f__box {
  position: relative;
}
app-shop .f__box svg {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: var(--muted);
  translate: 0 -50%;
  transition: color 0.2s, scale 0.25s var(--ease);
  pointer-events: none;
}
app-shop .track__form .f__box input {
  height: 48px;
  padding-left: 44px;
  border-radius: 14px;
  background: var(--surface-2);
}
app-shop .track__form .f__box input:focus {
  background: var(--surface);
}
app-shop .f__box:focus-within svg {
  color: var(--red);
  scale: 1.1;
}
app-shop .f.has-error .f__box svg {
  color: var(--red);
}
app-shop .track__form input[name=ref] {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
app-shop .track__form input[name=ref]::placeholder {
  text-transform: none;
  letter-spacing: 0;
}

/* (level with the fields, under their labels) */
app-shop .track__go {
  min-height: 48px;
  height: 48px;
  margin-top: 26px;
  padding-inline: 22px;
}
app-shop .track__go svg {
  transition: rotate 0.35s var(--ease), scale 0.35s var(--ease);
}
app-shop .track__go:hover svg {
  rotate: -12deg;
  scale: 1.15;
}

app-shop .track__hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}
app-shop .track__hint svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--red);
}
app-shop .track__hint b {
  color: var(--ink);
}
app-shop .track__hint a {
  font-weight: 600;
  color: var(--red);
}

/* the orders of this device, a tap to track one */
app-shop .track__recent {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
app-shop .track__recent[hidden] {
  display: none;
}
app-shop .track__recent-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}
app-shop .track__recent-title svg {
  width: 16px;
  height: 16px;
  color: var(--red);
}
app-shop .track__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
app-shop .track__chip {
  --tone: var(--red);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
  transition: border-color 0.2s, background-color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s;
}
app-shop .track__chip.is-ok {
  --tone: var(--ok);
}
app-shop .track__chip.is-off {
  --tone: var(--muted);
}
app-shop .track__chip-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--tone);
  transition: background-color 0.2s, color 0.2s;
}
app-shop .track__chip-icon svg {
  width: 18px;
  height: 18px;
}
app-shop .track__chip-body {
  display: grid;
  gap: 1px;
}
app-shop .track__chip b {
  font-size: 13.5px;
  letter-spacing: 0.04em;
}
app-shop .track__chip small {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
app-shop .track__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tone);
}
app-shop .track__chip:hover {
  border-color: var(--edge-hover);
  box-shadow: 0 10px 20px -16px rgba(23, 19, 18, 0.5);
  transform: translateY(-2px);
}
app-shop .track__chip.is-on {
  border-color: var(--red);
  background: var(--tint);
}
app-shop .track__chip.is-on .track__chip-icon {
  background: var(--red);
  color: #fff;
}
app-shop .track__chip.is-on b {
  color: var(--red);
}

/* ── how it works: a van driving along its road, then three steps ── */
app-shop .track__how {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 26px 26px;
  background: radial-gradient(120% 60% at 0% 0%, rgba(255, 110, 96, 0.22) 0%, rgba(255, 110, 96, 0) 60%), linear-gradient(165deg, #9a101c 0%, #7d0a15 40%, #5a0610 75%, #3a0309 100%);
  color: #fff;
}

app-shop .road {
  position: relative;
  height: 138px;
  margin: 0 -26px 20px;
  overflow: hidden;
}
app-shop .road__sun {
  position: absolute;
  right: 44px;
  top: 22px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff3d6 0 45%, rgba(255, 214, 140, 0.55) 46%, rgba(255, 214, 140, 0) 72%);
  box-shadow: 0 0 40px 10px rgba(255, 214, 140, 0.25);
}
/* two rows of hills going by, the far one slower */
app-shop .road__hill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  height: 34px;
  background: radial-gradient(70px 34px at 70px 34px, rgba(43, 2, 6, 0.55) 98%, rgba(43, 2, 6, 0)) 0 0/140px 34px repeat-x;
  animation: app-shop--hills 7s linear infinite;
}
app-shop .road__hill--far {
  bottom: 30px;
  height: 52px;
  background: radial-gradient(110px 52px at 110px 52px, rgba(255, 140, 120, 0.12) 98%, rgba(255, 140, 120, 0)) 0 0/220px 52px repeat-x;
  animation-duration: 16s;
}
@keyframes app-shop--hills {
  to {
    background-position: -140px 0;
  }
}
app-shop .road__hill--far {
  animation-name: app-shop--hills-far;
}
@keyframes app-shop--hills-far {
  to {
    background-position: -220px 0;
  }
}
/* the road, its middle line running back under the van */
app-shop .road__lane {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26px;
  background: #2b0206;
}
app-shop .road__lane::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 226, 189, 0.75) 0 18px, transparent 18px 34px);
  animation: app-shop--lane 0.55s linear infinite;
}
@keyframes app-shop--lane {
  to {
    background-position: -34px 0;
  }
}
app-shop .van {
  position: absolute;
  left: 50%;
  bottom: 12px;
  overflow: visible;
  translate: -50% 0;
  filter: drop-shadow(0 6px 6px rgba(20, 0, 3, 0.45));
}
app-shop .van__body {
  animation: app-shop--bob 0.36s ease-in-out infinite alternate;
}
app-shop .van__wheel {
  transform-box: fill-box;
  transform-origin: center;
  animation: app-shop--wheel 0.5s linear infinite;
}
@keyframes app-shop--bob {
  to {
    transform: translateY(-1.5px);
  }
}
@keyframes app-shop--wheel {
  to {
    transform: rotate(1turn);
  }
}
/* puffs of dust behind it */
app-shop .road__dust {
  position: absolute;
  left: calc(50% - 60px);
  bottom: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 226, 189, 0.5);
  animation: app-shop--dust 0.9s ease-out infinite;
}
app-shop .road__dust::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: app-shop--dust 0.9s ease-out 0.45s infinite;
}
@keyframes app-shop--dust {
  from {
    opacity: 0.8;
    transform: translate(0, 0) scale(0.6);
  }
  to {
    opacity: 0;
    transform: translate(-34px, -8px) scale(1.6);
  }
}

app-shop .track__how-title {
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  opacity: 0.85;
}
app-shop .how {
  display: grid;
  gap: 16px;
}
app-shop .how li {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: app-shop--rise 0.6s var(--ease) backwards;
  animation-delay: calc(0.2s + var(--i, 0) * 0.12s);
}
app-shop .how__icon {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid hsla(0, 0%, 100%, 0.22);
  border-radius: 14px;
  background: hsla(0, 0%, 100%, 0.1);
  color: #ffe2bd;
}
app-shop .how__icon svg {
  width: 20px;
  height: 20px;
}
app-shop .how__icon b {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #ffd9a8;
  color: #5a0610;
  font-size: 11px;
  font-weight: 800;
}
app-shop .how strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
app-shop .how small {
  display: block;
  margin-top: 1px;
  font-size: 12.5px;
  line-height: 1.45;
  opacity: 0.82;
}
@keyframes app-shop--rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ── while no order is shown: the way an order goes, and who to ask ── */
app-shop .track__guide {
  display: grid;
  gap: 20px;
}
app-shop .track__result:not(:empty) + .track__guide {
  display: none;
}

app-shop .journey .shop-card__title svg,
app-shop .track__found .shop-card__title svg {
  width: 20px;
  height: 20px;
  color: var(--red);
}
app-shop .journey__steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 8px;
}
app-shop .journey__steps li {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 3px;
  padding: 4px 8px 0;
  text-align: center;
  animation: app-shop--rise 0.6s var(--ease) backwards;
  animation-delay: calc(0.15s + var(--i, 0) * 0.1s);
}
/* the dashes from one step to the next, marching on */
app-shop .journey__steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 34px;
  left: calc(50% + 40px);
  right: calc(-50% + 40px);
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--edge-strong) 0 7px, transparent 7px 13px);
  animation: app-shop--march 1s linear infinite;
}
@keyframes app-shop--march {
  to {
    background-position: 13px 0;
  }
}
app-shop .journey__icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 8px;
  border-radius: 20px;
  background: var(--tint);
  color: var(--red);
  transition: background-color 0.3s, color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
app-shop .journey__icon svg {
  width: 28px;
  height: 28px;
}
app-shop .journey__steps li:hover .journey__icon {
  background: var(--red);
  color: #fff;
  box-shadow: 0 12px 22px -12px rgba(215, 26, 33, 0.8);
  transform: translateY(-3px) rotate(-4deg);
}
app-shop .journey__n {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--red);
}
app-shop .journey__steps strong {
  font-size: 14.5px;
}
app-shop .journey__text {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

app-shop .ask {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
app-shop .ask__card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 16px 16px;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
app-shop .ask__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--tint);
  color: var(--red);
  transition: background-color 0.25s, color 0.25s;
}
app-shop .ask__icon svg {
  width: 22px;
  height: 22px;
}
app-shop .ask__body {
  display: grid;
  min-width: 0;
}
app-shop .ask__body strong {
  font-size: 14.5px;
}
app-shop .ask__body small {
  overflow: hidden;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}
app-shop .ask__go {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-soft);
  transition: background-color 0.25s, color 0.25s, translate 0.25s var(--ease);
}
app-shop .ask__go svg {
  width: 15px;
  height: 15px;
}
app-shop .ask__card:hover {
  border-color: var(--red);
  box-shadow: 0 18px 30px -22px rgba(215, 26, 33, 0.6);
  transform: translateY(-3px);
}
app-shop .ask__card:hover .ask__icon,
app-shop .ask__card:hover .ask__go {
  background: var(--red);
  color: #fff;
}
app-shop .ask__card:hover .ask__go {
  translate: 3px 0;
}
app-shop .ask__card:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ── the order found ── */
app-shop .track__result {
  scroll-margin-top: calc(var(--header-h) + 24px);
}
app-shop .track__result:empty {
  display: none;
}
app-shop .track__found {
  display: grid;
  gap: 20px;
  animation: app-shop--rise 0.55s var(--ease);
}
app-shop .track__found .shop-notice {
  margin: 0;
}
app-shop .track__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
app-shop .track__ref {
  display: flex;
  align-items: center;
  gap: 14px;
}
app-shop .track__ref-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: var(--tint);
  color: var(--red);
}
app-shop .track__ref-icon svg {
  width: 24px;
  height: 24px;
}
app-shop .track__ref small {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}
app-shop .track__ref button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}
app-shop .track__ref button svg {
  width: 16px;
  height: 16px;
  color: var(--red);
  transition: scale 0.2s;
}
app-shop .track__ref button:hover svg {
  scale: 1.2;
}
app-shop .track__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}
app-shop .track__status svg {
  width: 17px;
  height: 17px;
}
app-shop .track__status.is-ok {
  background: var(--ok-bg);
  color: var(--ok);
}
app-shop .track__status.is-off {
  background: var(--surface-2);
  color: var(--muted);
}
app-shop .track__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-2);
}
/* each fact with its icon beside both lines */
app-shop .track__facts div {
  position: relative;
  min-width: 0;
  padding-left: 50px;
}
app-shop .track__fact-icon {
  position: absolute;
  left: 0;
  top: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--red);
  translate: 0 -50%;
}
app-shop .track__fact-icon svg {
  width: 19px;
  height: 19px;
}
app-shop .track__facts dt {
  font-size: 12.5px;
  color: var(--muted);
}
app-shop .track__facts dd {
  margin: 2px 0 0;
  font-size: 14.5px;
  font-weight: 700;
}

/* the way of the order: a row of steps (a column on a phone), the ones past in green, the next one ringed in red ;
   the lines past fill in one after the other */
app-shop .trail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 28px;
}
app-shop .trail__step {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  padding: 0 6px;
  text-align: center;
}
app-shop .trail__step:nth-child(2) { --n: 1; }
app-shop .trail__step:nth-child(3) { --n: 2; }
app-shop .trail__step:nth-child(4) { --n: 3; }
app-shop .trail__step:nth-child(5) { --n: 4; }
/* the line to the next step */
app-shop .trail__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 20.5px;
  left: calc(50% + 28px);
  right: calc(-50% + 28px);
  height: 3px;
  border-radius: 3px;
  background: var(--edge-strong);
  transform-origin: left;
}
app-shop .trail__step.is-done::after {
  background: var(--ok);
  animation: app-shop--grow-x 0.45s var(--ease) backwards;
  animation-delay: calc(0.25s + var(--n, 0) * 0.3s);
}
app-shop .trail__step.to-now::after {
  background: linear-gradient(90deg, var(--ok) 50%, var(--edge-strong) 50%);
}
@keyframes app-shop--grow-x {
  from {
    transform: scaleX(0);
  }
}
@keyframes app-shop--grow-y {
  from {
    transform: scaleY(0);
  }
}
app-shop .trail__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--edge-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
}
app-shop .trail__dot svg {
  width: 20px;
  height: 20px;
}
app-shop .is-done .trail__dot {
  border-color: var(--ok);
  background: var(--ok);
  color: #fff;
  animation: app-shop--pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: calc(0.1s + var(--n, 0) * 0.3s);
}
app-shop .is-now .trail__dot {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
  animation: app-shop--ring 1.8s ease-out infinite;
}
@keyframes app-shop--pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}
@keyframes app-shop--ring {
  from {
    box-shadow: 0 0 0 0 rgba(215, 26, 33, 0.38);
  }
  to {
    box-shadow: 0 0 0 12px rgba(215, 26, 33, 0);
  }
}
app-shop .trail__body strong {
  display: block;
  font-size: 14px;
}
app-shop .trail__step:not(.is-done):not(.is-now) .trail__body strong {
  color: var(--ink-soft);
}
app-shop .trail__body small {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}
app-shop .trail__body a {
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
}
app-shop .trail__tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--red);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}

/* cancelled: no way, a box that says so ; returned: a line under the way */
app-shop .track__stop {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
}
app-shop .track__stop svg {
  flex: none;
  width: 24px;
  height: 24px;
  color: var(--muted);
}
app-shop .track__stop strong,
app-shop .track__stop small {
  display: block;
}
app-shop .track__stop small {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}
app-shop .track__stop a,
app-shop .track__note a {
  font-weight: 700;
  color: var(--red);
}
app-shop .track__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
app-shop .track__note svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--red);
}

/* what the order holds ; who to call */
app-shop .track__found .mini__body a:hover strong {
  color: var(--red);
}
app-shop .track__where dt {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
app-shop .track__where dt svg {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 2px;
  color: var(--red);
}
app-shop .track__help p {
  font-size: 14px;
  color: var(--ink-soft);
}
app-shop .track__help-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
app-shop .track__help-actions .btn {
  width: 100%;
}
app-shop .track__help-actions .btn--outline svg {
  color: var(--red);
  transition: color 0.25s;
}
app-shop .track__help-actions .btn--outline:hover svg {
  color: currentColor;
}

/* tablet: the red panel under the form ; the journey and the help in two columns */
@media (max-width: 1060px) {
  app-shop .track__find {
    grid-template-columns: 1fr;
  }
  app-shop .track__how {
    display: grid;
    grid-template-columns: 1fr;
  }
  app-shop .how {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  app-shop .ask {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  app-shop .journey__steps {
    grid-template-columns: 1fr;
    gap: 0;
  }
  app-shop .journey__steps li {
    grid-template-columns: 54px minmax(0, 1fr);
    justify-items: start;
    column-gap: 14px;
    row-gap: 0;
    padding: 0 0 18px;
    text-align: left;
  }
  app-shop .journey__steps li:last-child {
    padding-bottom: 0;
  }
  app-shop .journey__icon {
    grid-row: 1 / span 3;
    width: 54px;
    height: 54px;
    margin: 0;
    border-radius: 17px;
  }
  app-shop .journey__icon svg {
    width: 24px;
    height: 24px;
  }
  app-shop .journey__steps li:not(:last-child)::after {
    top: 60px;
    bottom: 4px;
    left: 26px;
    right: auto;
    width: 2px;
    height: auto;
    background: repeating-linear-gradient(180deg, var(--edge-strong) 0 6px, transparent 6px 11px);
    animation-name: app-shop--march-y;
  }
}
@keyframes app-shop--march-y {
  to {
    background-position: 0 11px;
  }
}

@media (max-width: 760px) {
  app-shop .track__form {
    grid-template-columns: 1fr;
  }
  app-shop .track__go {
    width: 100%;
    margin-top: 4px;
  }
  app-shop .how {
    grid-template-columns: 1fr;
  }
  app-shop .track__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  app-shop .trail {
    grid-template-columns: 1fr;
    margin-top: 22px;
  }
  app-shop .trail__step {
    grid-template-columns: 44px minmax(0, 1fr);
    justify-items: start;
    gap: 14px;
    padding: 0 0 22px;
    text-align: left;
  }
  app-shop .trail__step:last-child {
    padding-bottom: 0;
  }
  app-shop .trail__step:not(:last-child)::after {
    top: 48px;
    bottom: 4px;
    left: 20.5px;
    right: auto;
    width: 3px;
    height: auto;
    transform-origin: top;
  }
  app-shop .trail__step.is-done::after {
    animation-name: app-shop--grow-y;
  }
  app-shop .trail__step.to-now::after {
    background: linear-gradient(180deg, var(--ok) 50%, var(--edge-strong) 50%);
  }
  app-shop .trail__body {
    padding-top: 11px;
  }
}
@media (max-width: 520px) {
  app-shop .ask {
    grid-template-columns: 1fr;
  }
  app-shop .track__facts {
    gap: 14px 10px;
    padding: 14px 12px;
  }
  app-shop .track__facts div {
    padding-left: 40px;
  }
  app-shop .track__fact-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  app-shop .track__fact-icon svg {
    width: 16px;
    height: 16px;
  }
}
@media (max-width: 420px) {
  app-shop .track__intro {
    align-items: flex-start;
  }
  app-shop .track__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }
  app-shop .track__icon svg {
    width: 23px;
    height: 23px;
  }
}
@media (prefers-reduced-motion: reduce) {
  app-shop .track *,
  app-shop .track *::before,
  app-shop .track *::after {
    animation: none !important;
  }
}

/* ════════ an order's invoice (pages/invoice.tsx, public/js/sections/invoice.js) ════════ */

app-shop .invoice {
  display: grid;
  /* (minmax : the table's own width scrolls inside the paper, never widens the page) */
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
}

/* the toolbar: back to the orders ; Print, Download PDF */
app-shop .invoice__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
app-shop .invoice__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
app-shop .invoice__back svg {
  width: 18px;
  height: 18px;
}
app-shop .invoice__back:hover {
  color: var(--red);
}
app-shop .invoice__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
app-shop .invoice__tools .btn--outline svg {
  color: var(--red);
}

/* the paper: white with dark ink in either theme, as it prints */
app-shop .paper {
  --paper-ink: #171312;
  --paper-muted: #6d6460;
  --paper-line: #e8e1dc;
  --paper-soft: #f7f3f0;
  --paper-red: #d71a21;
  --paper-ok: #1f8a44;
  padding: clamp(20px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: var(--paper-ink);
  font-size: 14px;
  box-shadow: 0 18px 40px -30px rgba(23, 19, 18, 0.3);
}
app-shop .paper__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px 32px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--paper-ink);
}
app-shop .paper__seller {
  display: grid;
  justify-items: start;
  gap: 2px;
  font-size: 13px;
  color: var(--paper-muted);
}
app-shop .paper__seller img {
  width: auto;
  height: 54px;
  margin-bottom: 10px;
}
app-shop .paper__seller strong {
  font-size: 14.5px;
  color: var(--paper-ink);
}
app-shop .paper__title {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 12px;
  text-align: right;
}
app-shop .paper__title h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  line-height: 1.1;
  color: var(--paper-red);
}
app-shop .paper__meta {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 13px;
}
app-shop .paper__meta div {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
app-shop .paper__meta dt {
  color: var(--paper-muted);
}
app-shop .paper__meta dd {
  min-width: 112px;
  margin: 0;
  font-weight: 700;
}

app-shop .paper__parties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 32px;
  padding: 22px 0;
}
app-shop .paper__parties section {
  display: grid;
  align-content: start;
  gap: 2px;
  font-size: 13.5px;
  color: var(--paper-muted);
}
app-shop .paper__parties h3 {
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-red);
}
app-shop .paper__parties strong {
  font-size: 14.5px;
  color: var(--paper-ink);
}

/* the chairs: a table that scrolls on its own on a narrow phone */
app-shop .paper__scroll {
  overflow-x: auto;
}
/* (separate, no spacing : collapsed cells print a hairline seam between the header's shaded cells) */
app-shop .paper__table {
  width: 100%;
  min-width: 480px;
  border-collapse: separate;
  border-spacing: 0;
}
app-shop .paper__table th {
  padding: 10px 12px;
  background: var(--paper-soft);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  color: var(--paper-muted);
}
app-shop .paper__table th:first-child {
  border-radius: 10px 0 0 10px;
}
app-shop .paper__table th:last-child {
  border-radius: 0 10px 10px 0;
}
app-shop .paper__table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--paper-line);
  vertical-align: top;
}
app-shop .paper__table td:first-child {
  width: 36px;
  color: var(--paper-muted);
}
app-shop .paper__table td strong,
app-shop .paper__table td small {
  display: block;
}
app-shop .paper__table td small {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--paper-muted);
}
app-shop .paper__table .num {
  text-align: right;
  white-space: nowrap;
}

/* the totals, on the right */
app-shop .paper__sums {
  display: grid;
  justify-items: end;
  gap: 8px;
  padding-top: 18px;
}
app-shop .paper__sums dl {
  display: grid;
  gap: 8px;
  width: min(320px, 100%);
  margin: 0;
}
app-shop .paper__sums dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
app-shop .paper__sums dt {
  color: var(--paper-muted);
}
app-shop .paper__sums dd {
  margin: 0;
  font-weight: 600;
}
app-shop .paper__sums .paper__total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 2px solid var(--paper-ink);
  font-size: 18px;
}
app-shop .paper__sums .paper__total dt,
app-shop .paper__sums .paper__total dd {
  font-weight: 700;
  color: var(--paper-ink);
}
app-shop .paper__words {
  max-width: 420px;
  font-size: 12.5px;
  font-style: italic;
  text-align: right;
  color: var(--paper-muted);
}
app-shop .paper__saved {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--paper-ok);
}
app-shop .paper__saved svg {
  width: 16px;
  height: 16px;
}

app-shop .paper__note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--paper-soft);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--paper-muted);
}
app-shop .paper__note svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--paper-red);
}
app-shop .paper__note strong {
  color: var(--paper-ink);
}
app-shop .paper__note a {
  font-weight: 700;
  color: var(--paper-red);
  white-space: nowrap;
}
app-shop .paper__foot {
  margin-top: 20px;
  font-size: 12px;
  text-align: center;
  color: var(--paper-muted);
}

@media (max-width: 640px) {
  app-shop .invoice__tools {
    width: 100%;
  }
  app-shop .invoice__tools .btn {
    flex: 1;
  }
  app-shop .paper__title {
    justify-items: start;
    text-align: left;
  }
  app-shop .paper__meta div {
    justify-content: flex-start;
  }
  app-shop .paper__meta dt {
    min-width: 84px;
  }
  app-shop .paper__parties {
    grid-template-columns: 1fr;
  }
}
/* a phone: the item, its quantity and amount (the printed page keeps # and Unit price) */
@media screen and (max-width: 560px) {
  app-shop .paper__table {
    min-width: 0;
  }
  app-shop .paper__table tr > :nth-child(1),
  app-shop .paper__table tr > :nth-child(4) {
    display: none;
  }
  app-shop .paper__table th:nth-child(2) {
    border-radius: 10px 0 0 10px;
  }
  app-shop .paper__table th,
  app-shop .paper__table td {
    padding-inline: 8px;
  }
}

/* printed (or saved as a PDF): the paper alone, on A4 */
@media print {
  @page {
    size: A4;
    margin: 12mm;
  }
  html,
  body {
    background: #fff !important;
  }
  body > :not(main),
  app-shop > app-page-banner,
  app-shop .invoice__bar {
    display: none !important;
  }
  /* (width too : .container is `100% - 2 gutters` wide, which left a blank strip on the right) */
  main,
  app-shop,
  app-shop .shop,
  app-shop .shop > .container {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  app-shop .invoice {
    max-width: none;
  }
  app-shop .paper {
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  app-shop .paper__scroll {
    overflow: visible;
  }
  app-shop .paper__table tr {
    break-inside: avoid;
  }
}
