/* Cart, checkout and order status (/store/cart/, /store/checkout/, /store/order/…), v6 layout, all-blue palette.
   Loaded after site-pages.css (main.page column + gutters) on top of landing.css tokens and buttons.
   Form blocks are divs, never bare <section>s: landing.css pads every `section` 96px 80px. */

.st-section { padding-block: 56px 112px; }
.st-narrow { max-width: 640px; }

/* ── Page head ── */
.st-head {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding-bottom: 28px; margin-bottom: 36px; border-bottom: 0.5px solid var(--border);
}
.st-title {
  font-family: 'EB Garamond', Georgia, serif; font-weight: 400;
  font-size: clamp(34px, 4vw, 46px); line-height: 1.08; color: var(--text); margin-top: 6px;
}
.st-back { font-size: 13px; letter-spacing: 0.04em; color: var(--text-soft); text-decoration: none; }
.st-back:hover { color: var(--text); }

.st-currency { display: inline-flex; border: 0.5px solid var(--border-strong); }
.st-currency-btn {
  background: none; border: 0; padding: 9px 16px; cursor: pointer;
  font-size: 12px; letter-spacing: 0.12em; color: var(--text-mid);
}
.st-currency-btn.is-on { background: var(--brand-deep); color: #fff; }

/* ── Messages (pages/store/_messages.html) ── */
.store-messages { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.store-message { padding: 12px 18px; font-size: 14px; background: var(--brand-tint); color: var(--text); }
.store-message-success { background: var(--ok-tint); color: var(--ok); }
.store-message-error { background: rgba(196, 60, 60, 0.12); color: #a13c3c; }

/* ── Two columns: content + summary ── */
.st-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; align-items: start;
}

/* ── Cart lines ── */
.st-lines { list-style: none; margin: 0; padding: 0; border-top: 0.5px solid var(--border); }
.st-line {
  display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 24px; align-items: start;
  padding: 24px 0; border-bottom: 0.5px solid var(--border);
}
.st-line-cover {
  width: 88px; aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center;
  background: var(--brand-tint); text-decoration: none; overflow: hidden;
}
.st-line-cover img { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--bg); }
.st-line-cover span { font-family: 'EB Garamond', Georgia, serif; font-size: 30px; color: var(--text-mid); }
.st-line-title {
  font-family: 'EB Garamond', Georgia, serif; font-size: 22px; line-height: 1.2;
  color: var(--text); text-decoration: none;
}
.st-line-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.st-line-meta { margin-top: 6px; font-size: 13px; color: var(--text-soft); }
.st-line-actions { margin-top: 16px; display: flex; align-items: center; gap: 20px; }
.st-line-total { font-size: 16px; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }

.st-qty { display: inline-flex; align-items: center; border: 0.5px solid var(--border-strong); }
.st-qty-btn {
  width: 34px; height: 34px; background: none; border: 0; cursor: pointer;
  font-size: 16px; color: var(--text);
}
.st-qty-btn:hover:not(:disabled) { background: var(--brand-tint); }
.st-qty-btn:disabled { color: var(--grey-300); cursor: default; }
.st-qty-n { min-width: 28px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }

.st-link {
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 13px;
  color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px;
}
.st-link:hover { color: var(--text); }

/* ── Summary card ── */
.st-summary {
  position: sticky; top: 96px;
  background: var(--surface); border: 0.5px solid var(--border); padding: 28px;
  display: flex; flex-direction: column; gap: 12px;
}
.st-summary-flat { position: static; margin: 32px 0; }
.st-summary-title {
  font-family: 'EB Garamond', Georgia, serif; font-weight: 400; font-size: 24px; color: var(--text);
  margin-bottom: 6px;
}
.st-row {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums;
}
.st-row-soft { color: var(--text-soft); }
.st-row-total { padding-top: 14px; margin-top: 4px; border-top: 0.5px solid var(--border-strong); font-size: 18px; }
.st-cta { margin-top: 12px; text-align: center; cursor: pointer; width: 100%; }
.st-continue { align-self: center; margin-top: 4px; }
.st-note { font-size: 13px; line-height: 1.55; color: var(--text-soft); }
.st-note em, .st-field em, .st-pay-option em { font-style: normal; color: var(--text-soft); }

.st-mini-lines {
  list-style: none; margin: 0 0 6px; padding: 0 0 14px; border-bottom: 0.5px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}
.st-mini-lines li { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--text); }
.st-mini-title { color: var(--text-mid); }
.st-mini-lines li > span:last-child, .st-row > span:last-child { white-space: nowrap; }

/* ── Checkout form ── */
.st-form { display: flex; flex-direction: column; gap: 40px; }
.st-block-title {
  font-family: 'EB Garamond', Georgia, serif; font-weight: 400; font-size: 24px; color: var(--text);
  margin-bottom: 8px;
}
.st-block > .st-note { margin-bottom: 16px; }
.st-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-top: 12px; }
.st-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-mid); }
.st-span { grid-column: 1 / -1; }
.st-field input {
  padding: 12px 14px; border: 0.5px solid var(--border-strong); background: var(--surface);
  font: inherit; font-size: 15px; color: var(--text);
}
.st-field input:focus { outline: 2px solid var(--brand-active); outline-offset: 0; border-color: var(--brand-deep); }

.st-pay-options { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.st-pay-option {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer;
  border: 0.5px solid var(--border-strong); background: var(--surface); font-size: 15px; color: var(--text);
}
.st-pay-option:has(input:checked) { border-color: var(--brand-deep); box-shadow: inset 0 0 0 1px var(--brand-deep); }
.st-pay-option.is-off { color: var(--text-soft); cursor: default; }

.st-referral { margin-bottom: 28px; font-size: 14px; color: var(--text-mid); }

/* ── Order status ── */
.st-banner { padding: 14px 18px; margin-bottom: 28px; background: var(--ok-tint); color: var(--ok); font-size: 14px; }
.st-address { margin-top: 8px; font-size: 15px; line-height: 1.7; color: var(--text); }
.st-narrow .st-block { margin-bottom: 32px; }

/* ── Empty cart ── */
.st-empty { padding: 48px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.st-empty p { font-family: 'EB Garamond', Georgia, serif; font-size: 24px; color: var(--text-mid); }

@media (max-width: 900px) {
  .st-layout { grid-template-columns: 1fr; gap: 40px; }
  .st-summary { position: static; }
}
@media (max-width: 560px) {
  .st-section { padding-block: 40px 80px; }
  .st-line { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; }
  .st-line-cover { width: 64px; }
  .st-line-total { grid-column: 2; }
  .st-fields { grid-template-columns: 1fr; }
  .st-summary { padding: 22px; }
}
