/* Online store hero window: a cart paid by QRIS, then posted to stock, finance and two marketplaces.
   Shell and tokens (.app, .app__bar, .status, .mod) come from /style.css. Layout follows the width of
   .app__main itself (container queries), since that width does not track the viewport. */
.shop .app__main { gap: 10px; container: shop / inline-size; }
.shop-card { min-width: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.shop-card__head { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.shop-card__head b { font-weight: 600; white-space: nowrap; }
.shop-card__head span { min-width: 0; margin-left: auto; overflow: hidden; color: var(--muted-fg); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

/* Checkout: cart lines, then the QRIS box (beside them when there is room) */
.shop-lines, .shop-kv { display: grid; align-content: start; padding: 4px 0; font-variant-numeric: tabular-nums; }
.shop-lines li, .shop-kv li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; height: 30px; padding: 0 12px; }
.shop-lines span, .shop-kv span { min-width: 0; white-space: nowrap; }
.shop-lines small { color: var(--muted-fg); font-size: 12px; }
.shop-lines b { font-weight: 500; white-space: nowrap; }
.shop-lines .shop-total { margin-top: 2px; border-top: 1px solid var(--line); }
.shop-total span, .shop-lines .shop-total b { font-weight: 700; }

.shop-pay { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--sunk); }
.shop-qr { position: relative; flex: none; display: grid; place-items: center; width: 52px; height: 52px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.shop .shop-qr__code { width: 100%; height: 100%; fill: var(--fg); stroke: none; shape-rendering: crispEdges; opacity: .25; } /* dimmed: it has been paid */
.shop-qr__ok { position: absolute; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ok); color: #fff; box-shadow: 0 0 0 3px var(--bg); }
.shop .shop-qr__ok svg { width: 13px; height: 13px; stroke-width: 3; }
.shop-pay__txt { display: grid; gap: 1px; min-width: 0; line-height: 1.3; }
.shop-pay__txt b { font-weight: 700; }
.shop-pay__txt span { min-height: 1.3em; color: var(--muted-fg-2); font-size: 12px; white-space: nowrap; }

/* Stock and finance: label, value (and a sync tick per stock channel) */
.shop-row { display: grid; gap: 10px; }
.shop-kv span { color: var(--muted-fg-2); }
.shop-kv b { font-weight: 600; white-space: nowrap; }
.shop-stock li { grid-template-columns: minmax(0, 1fr) auto 14px; }
.shop .shop-tick { width: 14px; height: 14px; color: var(--ok); stroke-width: 3; }
.shop-kv .shop-paid { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border: 1px solid var(--ok-line); border-radius: 6px; background: var(--ok-bg); color: var(--ok); font-size: 11.5px; }
.shop .shop-paid svg { width: 11px; height: 11px; stroke-width: 3; }

@container shop (min-width: 340px) {
  .shop-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@container shop (min-width: 400px) {
  .shop-order { display: grid; grid-template-columns: minmax(0, 1fr) 148px; }
  .shop-lines li { height: 32px; }
  .shop-pay { flex-direction: column; justify-content: center; gap: 6px; padding: 8px 12px; border-top: 0; border-left: 1px solid var(--line); text-align: center; }
  .shop-qr { width: 54px; height: 54px; }
}

@media (max-width: 400px) {
  .shop-crumb, .shop .crumbs svg { display: none; } /* the order number alone leaves the status badge its room */
}
