/* ==========================================================================
   Walter Blair: the buying pages (order pages, cart, checkout). 2026-11-01.
   Made by notes/build/shop_pages.py (it copies this file to assets/css/shop.css).

   The order pages keep the look of the purchase sample Walter liked ("nice and clean and strong",
   golive/wblair-purchase-sample, purchase.css of Oct 29-30 2026), inside the site's own header and footer.
   This file loads only on the buying pages, after styles.css, and every class in it starts with "shop-",
   so nothing here reaches the rest of the site. Type is larger than the site's, on purpose: readability first.
   Card payment is switched off (see assets/js/cart.js): the pay button is disabled and nothing is sent.
   ========================================================================== */

.shop {
  /* the sample's slightly brighter text on night, and the order card's ink-on-paper colours */
  --text: #ebe9f3;
  --muted: #bfc3d9;
  --line: rgba(251, 247, 239, 0.12);
  --line-strong: rgba(251, 247, 239, 0.3);
  --ink: #14152a;
  --ink-soft: #4b4759;
  --card-line: #dcd3c1;
  --card-pick: #fff4cf;
  /* Walter's 10% off: the site's red, one shade deeper for text on paper, and a red wash */
  --red-ink: #b3132b;
  --red-wash: #fdecef;
  --ok-ink: #12704c;
  color: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
}
.shop .nowrap { white-space: nowrap; }
/* a hidden part stays hidden whatever its layout (the order card's 10% rows, the cart's empty state...) */
.shop [hidden] { display: none !important; }
.shop .crumbs ol { margin-bottom: 22px; font-size: 0.95rem; }

/* ---------------------------------------------------------------- the label line ("About the book") */
.shop-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.3;
  text-transform: uppercase;
}
.shop-label::before {
  content: "";
  flex: none;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

/* ---------------------------------------------------------------- buttons */
.shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 62px;
  padding: 0 28px;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 1.22rem;
  font-weight: 750;
  letter-spacing: 0.005em;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background-color 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.shop-btn svg { flex: none; width: 24px; height: 24px; }
.shop-btn--block { width: 100%; }
.shop-btn--gold {
  border-color: #e3ab1d;
  background: var(--gold);
  color: #140f02;
  box-shadow: 0 14px 28px -16px rgba(200, 144, 13, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.shop-btn--gold:hover { background: var(--gold-hot); transform: translateY(-1px); }
.shop-btn--ink { background: var(--ink); color: var(--paper); }
.shop-btn--ink:hover { background: #272a4d; transform: translateY(-1px); }
.shop-btn--line { border-color: var(--ink); background: #fff; color: var(--ink); }
.shop-btn--line:hover { background: var(--card-pick); }
.shop-btn:disabled,
.shop-btn:disabled:hover {
  border-color: #d7cfbe;
  background: #ebe5d8;
  box-shadow: none;
  color: #5e5869;
  cursor: not-allowed;
  transform: none;
}
.shop-btn:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 3px; border-radius: 999px; }

.shop-link {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(200, 144, 13, 0.85);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.shop-link:hover { color: var(--gold-deep); }

/* ==========================================================================
   1. The order page: one per book (the sample's layout)
   ========================================================================== */
.shop-buy {
  position: relative;
  isolation: isolate;
  padding: clamp(22px, 3vw, 40px) 0 clamp(56px, 7vw, 100px);
  /* the cover's colours at the top, settling into night, so text always sits on dark */
  background:
    radial-gradient(44% 52% at 16% 22%, color-mix(in srgb, var(--glow) 30%, transparent), transparent 72%),
    radial-gradient(38% 46% at 90% 8%, color-mix(in srgb, var(--b3) 32%, transparent), transparent 70%),
    linear-gradient(172deg, var(--b2) 0%, var(--b1) 44%, var(--night) 100%);
}
.shop-buy::before {
  /* the site's film grain */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.28;
}

/* three blocks: a = the cover; b = the title and the order card; c = the description and details.
   Phone: a, b, c stacked. Tablet: a over c on the left, b on the right. Desktop: a | title + c | card. */
.shop-buy__grid { display: grid; gap: 30px; }
.shop-buy__a,
.shop-buy__b,
.shop-buy__c { min-width: 0; }
.shop-buy__b { display: grid; align-content: start; gap: 30px; }
.shop-buy__head { min-width: 0; }
.shop-buy__cover { width: min(60vw, 260px); margin: 0 auto; }
.shop-buy__cover img {
  width: 100%;
  border-radius: 4px;
  box-shadow:
    0 40px 70px -30px rgba(0, 0, 0, 0.85),
    0 14px 28px -14px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.07);
}

/* the title block */
.shop-buy__meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.shop-tag {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 15px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.15;
  text-transform: uppercase;
}
.shop-tag--red { background: var(--red); color: #fff; }
.shop-tag--gold { background: var(--gold); color: #140f02; }
.shop-tag--line {
  border: 1.5px solid rgba(255, 255, 255, 0.42);
  background: rgba(0, 0, 0, 0.22);
  color: var(--paper);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}
.shop-buy__title {
  color: #fff;
  font-family: var(--display);
  font-size: clamp(3.2rem, 6.4vw, 4.75rem);
  font-weight: 900;
  letter-spacing: 0.003em;
  line-height: 0.9;
  text-transform: uppercase;
  text-wrap: balance;
}
.shop-buy__edition {
  margin: 12px 0 0;
  color: var(--gold);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.shop-buy__by {
  margin: 14px 0 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.2vw, 1.8rem);
  font-style: italic;
  line-height: 1.2;
}
.shop-buy__format { margin: 10px 0 0; color: var(--paper); font-size: 1.2rem; font-weight: 650; }
.shop-buy__format-label { color: var(--muted); font-weight: 500; }
.shop-buy__tagline {
  max-width: 30ch;
  margin: 22px 0 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-style: italic;
  line-height: 1.3;
}

/* the description and the details */
.shop-desc {
  max-width: 62ch;
  color: var(--paper);
  font-size: clamp(1.18rem, 1.5vw, 1.27rem);
  line-height: 1.7;
}
.shop-desc p { margin: 0 0 1em; }
.shop-desc p:last-child { margin-bottom: 0; }
/* COVID's "About the book" leads with Walter's own synopsis; the giving line sits under it, set apart */
.shop-desc .shop-desc__giving { margin-top: 1.5em; padding-top: 1.25em; border-top: 1px solid var(--line); }
.shop-more-link { margin: 22px 0 0; font-size: 1.12rem; }
.shop-more-link a {
  color: var(--paper);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(255, 197, 49, 0.75);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.shop-more-link a:hover { color: var(--gold); }

.shop-facts-block { margin-top: 36px; }
/* two by two; his imprint (Publisher) takes a whole row, so his name never has to squeeze into a tile */
.shop-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.shop-fact--wide { grid-column: 1 / -1; }
.shop-fact {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  padding: 18px 12px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(11, 11, 26, 0.5);
  text-align: center;
}
.shop-fact__icon { width: 30px; height: 30px; color: var(--accent); }
.shop-fact__mark { width: auto; height: 28px; }
.shop-fact__label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}
.shop-fact__value { color: var(--paper); font-size: 1.16rem; font-weight: 650; line-height: 1.3; }
.shop-fact__value .imprint__name { font-size: 1.02rem; letter-spacing: 0.06em; }

/* ---------------------------------------------------------------- the order card (top right) */
.shop-order {
  position: relative;
  align-self: start;
  min-width: 0;
  padding: 30px 26px 26px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 44px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.shop-order::before,
.shop-panel::before {
  /* the site's neon tube, on the card's top edge */
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 5px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(90deg, var(--gold), var(--coral) 45%, var(--teal));
}
.shop-order__title {
  color: var(--ink);
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: uppercase;
}
.shop-order__status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  font-size: 1.08rem;
  font-weight: 700;
}
.shop-order__status::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #18865d;
  box-shadow: 0 0 0 4px rgba(24, 134, 93, 0.16);
}
.shop-order__status--soon::before { background: var(--red); box-shadow: 0 0 0 4px rgba(217, 31, 55, 0.14); }

.shop-order__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 16px 0 0;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--card-line);
}
.shop-order__amount {
  font-family: var(--display);
  font-size: 3.7rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 0.9;
}
.shop-order__amount--soon { font-size: 3rem; }
.shop-order__cur { font-size: 1.2rem; font-weight: 800; letter-spacing: 0.06em; }
.shop-order__alt { margin-left: auto; color: var(--ink-soft); font-size: 1.2rem; font-weight: 750; }

.shop-formats { min-width: 0; margin: 18px 0 0; padding: 0; border: 0; }
.shop-order__q {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
}
.shop-fmt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 16px;
  border: 2px solid var(--card-line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.shop-fmt + .shop-fmt { margin-top: 9px; }
.shop-fmt:hover { border-color: #b9ad94; }
.shop-fmt input {
  display: grid;
  place-content: center;
  width: 26px;
  height: 26px;
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.shop-fmt input::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  transform: scale(0);
  transition: transform 0.15s var(--ease);
}
.shop-fmt input:checked::before { transform: scale(1); }
.shop-fmt input:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 3px; }
.shop-fmt.is-on { border-color: var(--ink); background: var(--card-pick); box-shadow: 0 0 0 1px var(--ink); }
.shop-fmt__name { font-size: 1.18rem; font-weight: 750; line-height: 1.2; }
.shop-fmt__price { font-size: 1.18rem; font-weight: 800; line-height: 1.2; text-align: right; white-space: nowrap; }
.shop-fmt__price small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 0.92rem; font-weight: 700; }
.shop-fmt--off { grid-template-columns: auto 1fr; border-style: dashed; background: transparent; color: var(--ink-soft); cursor: default; }
.shop-fmt--off:hover { border-color: var(--card-line); }
.shop-fmt--off input { border-color: #a69e8e; cursor: default; }
.shop-fmt__name small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 1rem; font-weight: 650; }

.shop-qty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--card-line);
}
.shop-qty .shop-order__q { max-width: 9ch; margin: 0; line-height: 1.2; }

/* the quantity stepper (order card and cart) */
.shop-stepper {
  display: inline-grid;
  grid-template-columns: 58px 80px 58px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #fff;
}
.shop-stepper__btn {
  height: 58px;
  padding: 0;
  border: 0;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1;
}
.shop-stepper__btn:hover { background: var(--card-pick); }
.shop-stepper__btn:disabled { background: #fff; color: #b3ab99; cursor: default; }
.shop-stepper__btn:focus-visible,
.shop-stepper__input:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: -5px; border-radius: 10px; }
.shop-stepper__input {
  width: 100%;
  height: 58px;
  border: 0;
  border-inline: 2px solid var(--card-line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.shop-stepper__input::-webkit-outer-spin-button,
.shop-stepper__input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }

/* the discount rows: shown only when 2 or more books are on the card */
.shop-order__line,
.shop-sum__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
}
.shop-order__line + .shop-order__line { margin-top: 10px; }
.shop-order__line-label,
.shop-sum__label { min-width: 0; }
.shop-order__line-value,
.shop-sum__value { flex: none; font-weight: 800; text-align: right; white-space: nowrap; }
.shop-order__line small,
.shop-sum__row small { display: block; margin-top: 3px; font-size: 0.94rem; font-weight: 700; }
.shop-order__line-value small,
.shop-sum__value small { color: var(--ink-soft); }
.shop-order__line--off,
.shop-sum__row--off {
  margin-inline: -12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--red-wash);
  box-shadow: inset 0 0 0 1.5px rgba(217, 31, 55, 0.4);
  color: var(--red-ink);
  font-size: 1.18rem;
  font-weight: 800;
}
.shop-order__line--off small,
.shop-order__line--off .shop-order__line-value small,
.shop-sum__row--off small,
.shop-sum__row--off .shop-sum__value small { color: var(--red-ink); }

.shop-order__total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 16px 0 0;
}
.shop-order.has-deal .shop-order__total { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--card-line); }
.shop-order__total-label { font-size: 1.12rem; font-weight: 700; line-height: 1.2; }
.shop-order__total-value { font-size: 1.55rem; font-weight: 850; line-height: 1.1; white-space: nowrap; }
.shop-order__total-alt { margin: 6px 0 0; color: var(--ink-soft); font-size: 1.08rem; font-weight: 700; text-align: right; }
.shop-order__actions { display: grid; gap: 12px; margin: 18px 0 0; }
.shop-order__note { margin: 18px 0 0; color: var(--ink-soft); font-size: 1.08rem; line-height: 1.5; }
.shop-order__notify { margin: 18px 0 0; }

/* "Added to your cart" (in the card, after Add to cart) */
.shop-added:empty { display: none; }
.shop-added {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1.5px solid #8fcfb2;
  border-radius: 14px;
  background: #e9f7f0;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.4;
}
.shop-added__head { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-weight: 800; }
.shop-added__head svg { flex: none; width: 24px; height: 24px; margin-top: 1px; color: var(--ok-ink); }
.shop-added__links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0 0 34px; }

/* Walter's 10% off for 2 or more books: the red note under the price (order card, cart, checkout, Books page) */
.shop-deal {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1.5px solid rgba(217, 31, 55, 0.55);
  border-radius: 14px;
  background: var(--red-wash);
  color: var(--red-ink);
  line-height: 1.3;
}
.shop-deal__icon { flex: none; width: 30px; height: 30px; }
.shop-deal__text { min-width: 0; }
.shop-deal__head { display: block; font-size: 1.22rem; font-weight: 800; text-wrap: balance; }
.shop-deal__sub { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 1.04rem; font-weight: 650; }
.shop-deal__cart { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(217, 31, 55, 0.25); color: var(--red-ink); font-size: 1.04rem; font-weight: 750; }
.shop-deal__cart[hidden] { display: none; }

/* ---------------------------------------------------------------- more books (the rotation) */
.shop-more {
  padding: clamp(52px, 7vw, 96px) 0 clamp(60px, 8vw, 108px);
  border-top: 1px solid var(--line);
  background: var(--night);
}
.shop-more__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 28px;
  margin-bottom: clamp(26px, 3vw, 40px);
}
.shop-more__head .shop-label { margin-bottom: 10px; }
.shop-more__title {
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(2.2rem, 3.8vw, 3.2rem);
  font-weight: 900;
  line-height: 0.95;
  text-transform: uppercase;
  text-wrap: balance;
}
.shop-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  font-size: 1.12rem;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(255, 197, 49, 0.75);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: color 0.2s;
}
.shop-next:hover { color: var(--gold); }

.shop-shelf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.shop-shelf > li { min-width: 0; }
.shop-book {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 20px 10px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--night-2);
  text-align: center;
  text-decoration: none;
  transition: transform 0.25s var(--ease), border-color 0.2s, background-color 0.2s;
}
.shop-book:hover { border-color: rgba(255, 197, 49, 0.65); background: var(--night-3); transform: translateY(-4px); }
.shop-book__cover { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 180px; }
.shop-book__cover img {
  width: auto;
  height: 100%;
  border-radius: 3px;
  box-shadow: 0 20px 30px -16px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.shop-book__title {
  margin-top: 16px;
  color: var(--paper);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 850;
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: uppercase;
  text-wrap: balance;
  transition: color 0.2s;
}
.shop-book:hover .shop-book__title { color: var(--gold); }
.shop-book__status {
  margin-top: 9px;
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.3;
  text-transform: uppercase;
}
.shop-book__edition {
  margin-top: 6px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.08rem;
  font-style: italic;
  line-height: 1.2;
}
.shop-book__price { margin-top: 6px; color: var(--text); font-size: 1.06rem; font-weight: 600; line-height: 1.35; }

@media (min-width: 720px) {
  .shop-shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
  .shop-book { padding: 24px 14px 26px; }
  .shop-book__cover { height: clamp(200px, 21vw, 270px); }
  .shop-book__title { font-size: clamp(1.3rem, 1.7vw, 1.6rem); }
}

/* the smallest phones: a format's price sits under its name, and a long title word (CONSEQUENCES) fits the screen */
@media (max-width: 359px) {
  .shop-buy__title { font-size: 14vw; }
  .shop-fmt { grid-template-columns: auto 1fr; }
  .shop-fmt__price { grid-column: 2; text-align: left; }
  .shop-fmt__price small { display: inline; margin: 0 0 0 6px; }
}

/* narrower cards (phone + tablet) */
@media (max-width: 1239px) {
  .shop-order__alt { flex-basis: 100%; margin-left: 0; }
  .shop-order .shop-stepper { grid-template-columns: 52px 66px 52px; }
  .shop-order .shop-stepper__btn,
  .shop-order .shop-stepper__input { height: 54px; }
}

/* tablet: the cover and the story left, title + order card right */
@media (min-width: 720px) {
  .shop-buy__grid {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "a b"
      "c b";
    align-items: start;
    gap: 36px clamp(28px, 4vw, 48px);
  }
  .shop-buy__a { grid-area: a; }
  .shop-buy__b { grid-area: b; }
  .shop-buy__c { grid-area: c; }
  .shop-buy__cover { width: 100%; max-width: 380px; }
}

/* desktop: cover | the book | order card */
@media (min-width: 1240px) {
  .shop-buy__grid {
    grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.25fr) minmax(350px, 400px);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "a head order"
      "a c order";
    gap: 0 44px;
  }
  .shop-buy__b { display: contents; }
  .shop-buy__head { grid-area: head; }
  .shop-order { grid-area: order; padding: 28px 28px 26px; }
  .shop-buy__c { margin-top: 30px; }
  .shop-buy__cover { max-width: none; }
}

/* ==========================================================================
   2. The cart and the checkout: ink on paper, big and plain
   ========================================================================== */
.shop-page {
  position: relative;
  isolation: isolate;
  padding: clamp(22px, 3vw, 40px) 0 clamp(64px, 8vw, 110px);
  background:
    radial-gradient(48% 40% at 12% 0%, rgba(255, 197, 49, 0.13), transparent 70%),
    radial-gradient(40% 36% at 92% 4%, rgba(46, 230, 214, 0.1), transparent 70%),
    var(--night);
}
.shop-page__title {
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(3rem, 6vw, 4.6rem);
  font-weight: 900;
  letter-spacing: 0.005em;
  line-height: 0.92;
  text-transform: uppercase;
}
.shop-page__lead { max-width: 52ch; margin: 14px 0 0; color: var(--text); font-size: 1.22rem; line-height: 1.5; }
.shop-page__body { margin-top: clamp(24px, 3vw, 36px); }
.shop-nojs {
  max-width: 640px;
  margin: 24px 0 0;
  padding: 18px 20px;
  border: 1.5px solid var(--gold);
  border-radius: 14px;
  background: var(--night-2);
  color: var(--paper);
  font-size: 1.15rem;
}

/* the two-column layout: the list (or the form) and the summary card */
.shop-cols { display: grid; gap: 26px; align-items: start; }
@media (min-width: 1000px) {
  .shop-cols { grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); gap: 32px; }
  .shop-cols--checkout { grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); }
  .shop-cols__side { position: sticky; top: calc(var(--header-h) + 20px); }
  .shop-cols--checkout .shop-cols__side { grid-column: 2; grid-row: 1; }
  .shop-cols--checkout .shop-cols__main { grid-column: 1; grid-row: 1; }
}

.shop-panel {
  position: relative;
  min-width: 0;
  padding: 28px 24px 26px;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 44px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.shop-panel__title {
  margin: 0 0 6px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: uppercase;
}
.shop-panel__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.shop-panel__head a { font-size: 1.05rem; }

/* cart lines */
.shop-lines { margin: 0; padding: 0; list-style: none; }
.shop-line {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-areas:
    "cover info"
    "qty qty"
    "remove total";
  align-items: center;
  gap: 14px 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--card-line);
}
.shop-line:first-child { padding-top: 10px; }
.shop-line__cover { grid-area: cover; align-self: start; }
.shop-line__cover img { width: 76px; height: auto; border-radius: 3px; box-shadow: 0 10px 18px -10px rgba(0, 0, 0, 0.6); }
.shop-line__info { grid-area: info; min-width: 0; }
.shop-line__title { margin: 0; font-family: var(--display); font-size: 1.55rem; font-weight: 900; line-height: 1; text-transform: uppercase; }
.shop-line__title a { color: inherit; text-decoration: none; }
.shop-line__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.shop-line__format { margin: 6px 0 0; font-size: 1.12rem; font-weight: 750; }
.shop-line__status { margin: 4px 0 0; color: var(--red-ink); font-size: 1rem; font-weight: 700; }
.shop-line__unit { margin: 4px 0 0; color: var(--ink-soft); font-size: 1.05rem; font-weight: 650; }
.shop-line__qty { grid-area: qty; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.shop-line__qty-label { font-size: 1.08rem; font-weight: 800; }
.shop-line .shop-stepper { grid-template-columns: 52px 62px 52px; }
.shop-line .shop-stepper__btn,
.shop-line .shop-stepper__input { height: 50px; }
.shop-line .shop-stepper__input { font-size: 1.35rem; }
.shop-line__total { grid-area: total; margin: 0; font-size: 1.3rem; font-weight: 850; text-align: right; white-space: nowrap; }
.shop-line__total small { display: block; color: var(--ink-soft); font-size: 0.95rem; font-weight: 700; }
.shop-line__remove {
  grid-area: remove;
  justify-self: start;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--red-ink);
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.shop-line__remove:hover { color: #8a0f21; }
.shop-line__remove:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 2px; border-radius: 6px; }
@media (min-width: 640px) {
  .shop-line {
    grid-template-columns: 84px minmax(0, 1fr) auto auto;
    grid-template-areas:
      "cover info qty total"
      "cover remove remove remove";
    gap: 10px 22px;
  }
  .shop-line__cover img { width: 84px; }
  .shop-line__qty { flex-direction: column; align-items: flex-start; gap: 6px; }
  .shop-line__qty-label { font-size: 0.95rem; }
  .shop-line__total { min-width: 7.5ch; }
}

/* the cart is empty */
.shop-empty { padding: 6px 0 4px; }
.shop-empty__title { margin: 0; font-family: var(--display); font-size: 2rem; font-weight: 900; line-height: 1; text-transform: uppercase; }
.shop-empty p { margin: 10px 0 0; font-size: 1.15rem; }
.shop-empty .shop-btn { margin-top: 18px; }

/* the summary card (cart and checkout) */
.shop-sum { margin: 0; }
.shop-sum__row { margin-top: 14px; }
.shop-sum__row--ship .shop-sum__value { color: var(--ink-soft); font-weight: 750; white-space: normal; text-align: right; }
.shop-sum__total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
}
.shop-sum__total-label { font-size: 1.25rem; font-weight: 850; }
.shop-sum__total-value { font-family: var(--display); font-size: 2.6rem; font-weight: 900; line-height: 0.95; white-space: nowrap; }
.shop-sum__total-alt,
.shop-sum__fine { margin: 8px 0 0; color: var(--ink-soft); font-size: 1rem; font-weight: 650; line-height: 1.4; }
.shop-sum__total-alt { text-align: right; }
.shop-sum__actions { display: grid; gap: 14px; justify-items: center; margin: 22px 0 0; }

/* the checkout's read-only lines */
.shop-mini { margin: 14px 0 0; padding: 0; list-style: none; }
.shop-mini li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--card-line);
}
.shop-mini img { width: 48px; height: auto; border-radius: 2px; box-shadow: 0 6px 12px -6px rgba(0, 0, 0, 0.6); }
.shop-mini__name { min-width: 0; font-size: 1.05rem; font-weight: 800; line-height: 1.25; }
.shop-mini__name small { display: block; color: var(--ink-soft); font-size: 0.95rem; font-weight: 650; }
.shop-mini__name .shop-mini__soon { color: var(--red-ink); }
.shop-mini__price { font-size: 1.08rem; font-weight: 800; text-align: right; white-space: nowrap; }

/* ---------------------------------------------------------------- the checkout form */
.shop-form { display: grid; gap: 22px; margin: 0; counter-reset: shop-step; }
.shop-step {
  min-width: 0;
  margin: 0;
  padding: 26px 22px 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 44px 90px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
  counter-increment: shop-step;
}
.shop-step[hidden] { display: none; }
.shop-step__title {
  display: flex;
  align-items: center;
  gap: 14px;
  float: left;      /* lets a fieldset's legend sit inside the padding like a heading */
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}
.shop-step__title + * { clear: both; }
.shop-step__title > span { min-width: 0; }
.shop-step__title::before {
  content: counter(shop-step);
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 800;
}
.shop-step__opt { color: var(--ink-soft); font-family: var(--sans); font-size: 1.02rem; font-weight: 650; text-transform: none; }
.shop-step__intro { margin: 0 0 16px; color: var(--ink-soft); font-size: 1.08rem; }

.shop-fields { display: grid; gap: 18px; }
@media (min-width: 640px) {
  .shop-fields--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-field--wide { grid-column: 1 / -1; }
}
.shop-field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.shop-field__label { color: var(--ink); font-size: 1.12rem; font-weight: 800; line-height: 1.25; }
.shop-field__opt { color: var(--ink-soft); font-weight: 600; }
.shop-field__hint { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.4; }
.shop-field input,
.shop-field select,
.shop-field textarea {
  width: 100%;
  min-height: 56px;
  padding: 12px 15px;
  border: 2px solid #b9ad94;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.3;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.shop-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 46px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 24px) 50%, calc(100% - 17px) 50%;
  background-size: 7px 7px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.shop-field textarea { min-height: 120px; resize: vertical; }
.shop-field input:hover,
.shop-field select:hover,
.shop-field textarea:hover { border-color: #8f8470; }
.shop-field input:focus,
.shop-field select:focus,
.shop-field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(200, 144, 13, 0.35); }
.shop-field.is-bad input,
.shop-field.is-bad select,
.shop-field.is-bad textarea { border-color: var(--red-ink); background: #fffafa; }
.shop-field__error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: var(--red-ink);
  font-size: 1.04rem;
  font-weight: 750;
  line-height: 1.35;
}
.shop-field__error[hidden] { display: none; }
.shop-field__error::before {
  content: "!";
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--red-ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
}
.shop-count { margin: 0; color: var(--ink-soft); font-size: 0.98rem; text-align: right; }

.shop-ebook-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 1.5px solid #9cc3e6;
  border-radius: 14px;
  background: #edf5fc;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.4;
}
.shop-ebook-note[hidden] { display: none; }
.shop-ebook-note svg { flex: none; width: 24px; height: 24px; margin-top: 1px; color: #1d5f99; }
.shop-step .shop-ebook-note { margin-top: 16px; }

/* the payment step: visible, switched off */
.shop-ready {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f3eee3;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.45;
}
.shop-ready strong { font-weight: 850; }
.shop-ready.is-ready { background: #e9f7f0; color: var(--ok-ink); font-weight: 800; }
.shop-pay__btn { width: 100%; }
.shop-pay__note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1.5px solid #e6bd52;
  border-radius: 14px;
  background: #fff4d6;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 650;
  line-height: 1.45;
}
.shop-pay__note svg { flex: none; width: 24px; height: 24px; margin-top: 2px; color: #8a6206; }
.shop-pay__note strong { font-weight: 850; }
.shop-pay__fine { margin: 12px 0 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.45; }

/* phones: a little less padding in the cards */
@media (max-width: 479px) {
  .shop-panel,
  .shop-step { padding: 24px 16px 22px; }
  .shop-order { padding: 26px 18px 22px; }
  .shop-step__title { font-size: 1.55rem; gap: 12px; }
  .shop-step__title::before { width: 36px; height: 36px; font-size: 1.1rem; }
  .shop-sum__total-value { font-size: 2.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  .shop *,
  .shop *::before,
  .shop *::after { transition: none !important; }
  .shop-book:hover,
  .shop-btn:hover { transform: none; }
}

/* ---------------------------------------------------------------- 2026-11-05 (round 13): Maisha M.'s book
   Its order page (order-it-will-be-great.html) is the same page as Walter's, in its own warm colours, with the title and
   "by Maisha M." big and in the children's section's rounded type (Walter: the writing looked small). The font is
   defined in styles.css ("2026-11-05 round13" block), which loads first. In the cart and the checkout her lines say
   "by Maisha M." under the title (cart.js adds it for a book that has an author of its own). */
.shop-buy--kids .shop-buy__title {
  font-family: var(--kids-display);
  font-size: clamp(3.4rem, 7vw, 5.4rem);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 0.95;
  text-transform: none;
}
.shop-buy__by--kids {
  margin-top: 16px;
  color: #fff;
  font-family: var(--kids-display);
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  font-style: normal;
  font-weight: 500;
  line-height: 1.15;
}
.shop-buy__by--kids strong { color: var(--accent); font-weight: 700; }
.shop-line__by { margin: 6px 0 0; color: var(--ink); font-size: 1.12rem; font-weight: 750; }
.shop-mini__name .shop-mini__by { color: var(--ink); font-weight: 750; }
