/* =====================================================================
   SHOP PAGES — the cart in the approved Keycard prototype's look (components/cart-page.njk; behaviour:
   assets/pages-shop.js), and the reviews strip a page can carry (components/feedbacks.njk, on no page today).
   The cart: mock/store2/keycard/cart.html, its rules verbatim and in their order: shared/pages.css (cart),
   keycard/pages.css (the small engraved card) and the pieces of shared/cols.css and base.css it uses (the
   summary's total, the help line, the quantity). The frame, the head and the tokens are site.css (KEYCARD
   PAGES); the backdrop and its field kc-field.css / .js. Additions are marked "(theme)": the shop's real cart
   needs a few things the prototype's two fixed lines do not (an empty cart, deals, a refusal of the checkout,
   a long cart, phones).
   ===================================================================== */

.ps-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- the head and the lines (shared/pages.css) ---------- */
.pg-cart .pg-head { grid-row: 1; }
.pg-items { grid-column: 1 / 3; grid-row: 2; align-self: start; margin-top: 44px; border-bottom: 1px solid var(--line); }
.pg-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 110px 40px; align-items: center; gap: 0 28px; min-height: 128px; padding: 18px 0; border-top: 1px solid var(--line); }
.pg-it { display: grid; gap: 8px; min-width: 0; }
.pg-it b { font-size: 26px; line-height: 1.1; letter-spacing: -0.01em; }
.pg-what { font-size: 14px; }
.pg-amt { font-size: 18px; text-align: right; }
.pg-x { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--faint); }
.pg-x svg { width: 17px; height: 17px; }

/* ---------- each line's small card, engraved per group (keycard/pages.css) ---------- */
.kc-pg .pg-vis { position: relative; display: flex; flex-direction: column; justify-content: space-between; width: 160px; height: 101px; padding: 12px 13px; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); background: radial-gradient(70% 90% at 18% 0%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 60%), linear-gradient(140deg, #1f1f23 0%, #111113 46%, #0b0b0d 70%, #151518 100%); transform: perspective(700px) rotateX(10deg) rotateY(-12deg) rotateZ(2deg); }
.kc-pg .pg-vis::after { content: ''; position: absolute; inset: 0; clip-path: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); pointer-events: none; }
.kc-pg .pg-vis .pg-pat { position: absolute; inset: 0; width: 100%; height: 100%; }
.kc-pg .pg-vis img { position: relative; width: 14px; height: 14px; filter: brightness(1.7); }
/* (theme) the product's own picture where it has one (its first image in SellAuth, as in the store's list:
   cart-page.njk psPic), cover-cropped into the same card, under its edge, in place of the engraving and the logo;
   psFit draws it, shrunk smoothly, into a canvas of the card's own pixels, which then stands in its place. A picture
   that cannot be loaded goes, and they come back */
.kc-pg .pg-vis .pg-pic { position: absolute; inset: 0; }
.kc-pg .pg-vis .pg-pic > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: none; }
.kc-pg .pg-pic > canvas + img { visibility: hidden; }
.kc-pg .pg-pic ~ * { display: none; }

/* ---------- the quantity (shared/cols.css .xs-step on the site's stepper, whose field takes a typed number) ---------- */
.kc-pg .pg-step { grid-template-columns: 40px 52px 40px; height: 40px; border: 1px solid var(--line-2); background: none; }
.kc-pg .pg-step > button { font-size: 16px; line-height: 1; color: var(--dim); }
.kc-pg .pg-step > input { font-size: 16px; }

/* ---------- the summary, in the buy panel's column (shared/pages.css; cols.css .xs-fill, .xs-cost, .xs-help) ---------- */
.pg-sum { grid-column: 3; grid-row: 1 / 3; display: flex; flex-direction: column; min-height: 0; }
.pg-sum-h { display: flex; justify-content: space-between; }
.pg-sum-h b { color: var(--ink); }
.pg-dl { margin-top: 22px; border-bottom: 1px solid var(--line); }
.pg-dl > div { display: flex; justify-content: space-between; align-items: center; height: 46px; border-top: 1px solid var(--line); font-size: 15px; }
.pg-dl dt { color: var(--dim); }
.pg-tot { align-self: center; }
.pg-paywith { display: flex; justify-content: space-between; margin: -4px 0 16px; font-size: 13.5px; color: var(--faint); }
.pg-sum .xs-cost b { font-size: 42px; }
.pg-sum .sx-btn + .sx-btn { margin-top: 8px; }
.pg-sum .xs-cost { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.pg-sum .xs-fill { flex: 1 1 auto; min-height: 12px; }
.pg-sum .xs-cost b { line-height: 1; letter-spacing: -0.01em; }   /* cols.css .xs-cost b */
.pg-sum .xs-help { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--dim); }
.pg-sum .sx-pay { white-space: nowrap; }

/* (theme) the summary stays in view while a long cart scrolls: one screen high, as the prototype's summary is,
   held at the frame's top; its list of lines scrolls in itself before it would push Checkout away */
.pg-sum { position: sticky; top: calc(var(--bar) + 40px); height: calc(var(--screen-h) - 76px); align-self: start; }
.pg-dl { flex: 0 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.pg-dl > div { flex: none; gap: 16px; }
.pg-dl dt { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pg-dl dd { white-space: nowrap; }
/* (theme) the owner's help text, or "Questions?" (in the owner's preview the prototype's placeholder stands there) */
.pg-sum .xs-help > .sx-pht ~ .xs-help-q { display: none; }
.pg-sum .xs-help .sx-go { margin-left: auto; }
/* (theme) the buttons and the help line; a refusal of the checkout lies over the help line, so nothing moves */
.pg-act { position: relative; }
.ps-alert { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; min-height: 45px; margin: 0; padding: 12px 14px; border: 1px solid rgba(255, 196, 140, 0.45); background: #110d09; color: #f6e9da; font-size: 13.5px; line-height: 1.35; }
/* (theme) the automatic check works unseen; pages-shop.js shows its box only when it needs the buyer */
.ps-altcha { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ps-altcha.is-shown { position: static; width: auto; height: auto; margin-bottom: 12px; overflow: visible; clip-path: none; white-space: normal; }

/* ---------- (theme) what the shop's real cart adds to the prototype's two lines ---------- */
/* the name leads to the product */
.pg-it-n { justify-self: start; max-width: 100%; }
.pg-it-n b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* (art) the lines' product names in the store's display face, its caps and its white-to-silver fall (the owner's
   artistic edge, 2026-11-27: store.css .xs-title; site.css --sx-display, snippets/display-font.njk) */
.kc-pg .pg-it-n b {
  font-family: var(--sx-display);
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  font-size: 21px;
  line-height: 1.08;
  letter-spacing: 0;
  background: linear-gradient(180deg, #ffffff 30%, #c3c8d2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (max-width: 760px) { .kc-pg .pg-it-n b { font-size: 17px; } }
/* while the shop answers, and an empty cart: one line in the lines' place */
.pg-item--note { display: flex; }
.pg-item--note p { font-size: 26px; line-height: 1.1; letter-spacing: -0.01em; color: var(--dim); }
/* an empty cart: the way back into the store right beside the line that says so (phones: under it) */
.pg-item--note { flex-wrap: wrap; align-items: center; gap: 16px 32px; }
/* the owner's placeholder of what a line's price buys: only in the owner's preview (pages-shop.js: is-demo) */
.ps-demo-only { display: none; }
.is-demo .ps-demo-only { display: block; }
/* the shop's deals and add-ons under a line */
.pg-deal { font-size: 13px; line-height: 1.35; color: var(--ink); }
.pg-addons { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-addons > span { padding: 4px 8px; border: 1px solid var(--line-2); font-size: 12.5px; color: var(--dim); }
/* the shop's bundle offers (none today), under the lines */
.ps-offers { grid-column: 1 / 3; grid-row: 3; display: grid; gap: 6px; margin-top: 18px; }
.ps-offer { display: grid; gap: 10px; padding: 16px 20px; border: 1px solid var(--line-2); font-size: 14px; line-height: 1.35; color: var(--dim); }
.ps-offer-head { display: flex; justify-content: space-between; gap: 12px; color: var(--ink); }
.ps-offer li { display: flex; justify-content: space-between; gap: 12px; }
.ps-offer a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- lower windows (shared/pages.css; cols.css for the help line) ---------- */
@media (max-height: 860px) {
  .pg-items { margin-top: 28px; }
  .pg-item { min-height: 104px; padding: 12px 0; }
}
@media (max-height: 860px) and (min-width: 761px) {
  .pg-sum .xs-help { margin-top: 12px; padding-top: 12px; }
}

/* ---------- (theme) phones and tablets: the head, the lines, the summary, one under the other ---------- */
@media (max-width: 1099px) {
  /* one column: the head and the lines as wide as the page (on wide windows they keep to their grid cells' tops) */
  .pg-head, .pg-items { align-self: stretch; }
  .pg > .sx-demo-tag { margin-bottom: 20px; }
  .pg-items { margin-top: 32px; }
  .pg-sum { position: static; height: auto; margin-top: 36px; }
  .pg-sum .xs-fill { display: none; }
  .pg-act { margin-top: 26px; }
  .ps-offers { margin-top: 16px; }
}
@media (max-width: 1099px) and (min-width: 761px) {
  .pg-sum { align-self: flex-end; width: min(100%, 440px); }
}
@media (max-width: 760px) {
  .pg-items { margin-top: 24px; }
  .pg-item { grid-template-columns: 96px minmax(0, 1fr) auto 40px; grid-template-areas: 'vis it it it' 'step step amt x'; gap: 16px 14px; min-height: 0; padding: 18px 0 14px; }
  .pg-step { justify-self: start; }
  .kc-pg .pg-vis { grid-area: vis; width: 96px; height: 61px; padding: 8px 9px; }
  .kc-pg .pg-vis img { width: 11px; height: 11px; }
  .pg-it { grid-area: it; gap: 6px; }
  .pg-it b { font-size: 22px; }
  .pg-step { grid-area: step; }
  .pg-amt { grid-area: amt; }
  .pg-x { grid-area: x; }
  .pg-item--note p { font-size: 22px; }
  .pg-item--note .sx-btn { width: 100%; }
  .pg-sum { align-self: stretch; margin-top: 32px; }
}

/* =====================================================================
   REVIEWS STRIP (components/feedbacks.njk; on no page today): the shop's latest real reviews as cards
   (snippets/feedback-card.njk). It links site.css and this file itself (the landing page loads neither)
   ===================================================================== */
.ps-root { position: relative; }
.ps-root > .builder-toolbar { top: calc(var(--sx-bar) + 16px); z-index: 95; }
html.sx-tab .ps-root > .builder-toolbar { display: none !important; }
.ps-strip-in { padding: 72px var(--sx-gut); }
.ps-strip-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.ps-strip-head .sx-head { gap: 12px; }
.ps-strip-title { font-size: clamp(36px, 4vw, 56px); line-height: 1; letter-spacing: -0.02em; color: #fff; }
.ps-reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; margin-top: 26px; }
.ps-rv { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 24px 26px 20px; background: rgba(255, 255, 255, 0.045); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); }
.ps-rv-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ps-rv-date { font-size: 12.5px; line-height: 1; color: var(--sx-faint); white-space: nowrap; }
.ps-rv-text { font-size: 15.5px; line-height: 1.55; color: var(--sx-ink); white-space: pre-line; overflow-wrap: anywhere; }
.ps-rv-img { max-width: 100%; max-height: 200px; width: auto; height: auto; border: 1px solid var(--sx-line-2); }
.ps-rv-reply { display: grid; gap: 6px; padding-left: 16px; border-left: 1px solid var(--sx-line-3); font-size: 14px; line-height: 1.5; color: var(--sx-dim); overflow-wrap: anywhere; }
.ps-rv-reply > p + p { white-space: pre-line; }
.ps-rv-reply .sx-micro { font-size: 11px; white-space: normal; }
.ps-rv-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--sx-line); font-size: var(--sx-t-s); line-height: 1.35; color: var(--sx-dim); }
.ps-stars { display: inline-flex; gap: 3px; color: #fff; }
.ps-stars svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.ps-stars svg.is-off { fill: none; stroke: var(--sx-line-3); stroke-width: 1.5; }
@media (max-width: 760px) {
  .ps-reviews { grid-template-columns: minmax(0, 1fr); }
  .ps-rv { padding: 20px 18px 18px; }
  .ps-strip-in { padding: 52px var(--sx-gut); }
}