/* The shop: a paid design's buy panel, the collection bundle, the cart (/cart) and the library's
   order and membership panels. Quiet chrome on the house tokens; lime only for the action. */

/* the LED square (also in model.css), for pages that don't load it */
.led { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 2px; background: var(--lime); box-shadow: 0 0 10px var(--lime-glow); }

/* ---------- buy panel (model page, paid designs) ---------- */
.buy-actions { display: grid; gap: 10px; }
.buy-actions[hidden], .buy-card [hidden] { display: none !important; }
/* Buy now and Add to cart side by side; the membership picked: one Join button */
.buy-card .buy-actions { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.buy-card .buy-actions.is-join { grid-template-columns: minmax(0, 1fr); }
.buy-card .buy-actions.is-second .btn-lime { background: transparent; border-color: var(--line); box-shadow: none; color: var(--ink); }
.buy-card .buy-actions.is-second .btn-lime:hover { background: var(--bone); }
.buy-card .buy-actions .btn { width: 100%; --btn-h: 56px; padding-inline: 16px; }
.buy-card .buy-actions .dl-btn { padding-inline: 18px; }
.buy-join-note { margin-top: -2px; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.buy-join-note a, .buy-bundle a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #B9B5AA; }
.buy-bundle { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.buy-bundle a { font-weight: 650; }
.btn.is-busy { cursor: progress; opacity: .78; }
.btn-ghost.is-in { background: var(--lime-tint); border-color: rgba(75, 102, 0, .22); color: var(--lime-deep); }
.have-tag {
  display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 6px;
  background: var(--lime-tint); box-shadow: 0 0 0 1px rgba(75, 102, 0, .16) inset;
  color: var(--lime-deep); font: 600 11.5px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
}
.buy-note { font-size: 14px; font-weight: 500; color: var(--lime-deep); }
.buy-offer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px;
  border-radius: var(--r); background: var(--bone); box-shadow: 0 0 0 1px var(--line-2) inset;
  font-size: 14.5px; line-height: 1.4; color: var(--ink-2); text-decoration: none;
  transition: background-color .15s var(--ease), box-shadow .15s var(--ease);
}
.buy-offer strong { color: var(--ink); font-weight: 650; }
.buy-offer .ico { width: 16px; height: 16px; flex: none; color: var(--ink-3); transition: translate .2s var(--ease); }
.buy-offer:hover { background: var(--paper); box-shadow: 0 0 0 1px var(--line) inset; color: var(--ink); }
.buy-offer:hover .ico { translate: 3px 0; color: var(--ink); }
.buy-fine { font-size: 12.5px; line-height: 1.45; color: var(--ink-3); }

/* a design alone or with the part it needs (shop.js [data-buy-opts]): two rows to pick from, like
   the panels only or with the lantern frame. The picked row gets an ink ring; a part that's already
   theirs can't be picked and says so. */
.buy-opts { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.buy-opt {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r); background: var(--paper); box-shadow: 0 0 0 1px var(--line) inset; cursor: pointer;
  transition: box-shadow .15s var(--ease), background-color .15s var(--ease);
}
.buy-opt:hover { box-shadow: 0 0 0 1px #CFCBC0 inset; }
.buy-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); cursor: inherit; }
/* the picked row: a class from shop.js, so it also works in browsers without :has() */
.buy-opt.is-picked { background: var(--bone); box-shadow: 0 0 0 2px var(--ink) inset; }
.buy-opt:has(input:focus-visible) { box-shadow: 0 0 0 2px var(--ink) inset, var(--focus); }
.buy-opt-txt { display: grid; gap: 2px; min-width: 0; }
.buy-opt-name { font-size: 15.5px; font-weight: 650; line-height: 1.3; color: var(--ink); }
.buy-opt-sub { font-size: 13.5px; line-height: 1.35; color: var(--ink-3); }
.buy-opt-amt { font: 600 15px/1 var(--font-mono); color: var(--ink); white-space: nowrap; }
.buy-opt-amt small { margin-left: 1px; font-size: 11px; font-weight: 500; color: var(--ink-3); }
.buy-opt.is-have { cursor: default; opacity: .62; }
.buy-opt.is-have:hover { box-shadow: 0 0 0 1px var(--line) inset; }
.buy-opt.is-have .buy-opt-sub { color: var(--lime-deep); font-weight: 600; }
.buy-opt-note { margin-top: -4px; font-size: 13.5px; line-height: 1.45; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .buy-opt { transition: none; } }

/* ---------- the bundle (collection page) ---------- */
.bundle {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: clamp(20px, 4vw, 48px); align-items: center;
  padding: clamp(22px, 4vw, 40px); border-radius: var(--r-xl); background: var(--paper); box-shadow: 0 0 0 1px var(--line), var(--shadow);
}
.bundle h2 { margin-top: 8px; font-size: clamp(26px, 3.4vw, 38px); }
.bundle-copy > p:not(.eyebrow) { margin-top: 12px; max-width: 52ch; color: var(--ink-2); }
.bundle-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.bundle-thumbs li { width: 64px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: var(--graphite); box-shadow: 0 0 0 1px var(--line); }
.bundle-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.bundle-buy { display: grid; gap: 10px; padding: 20px; border-radius: var(--r-lg); background: var(--bone); box-shadow: 0 0 0 1px var(--line-2) inset; }
.bundle-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.bundle-amt { font-size: 40px; font-stretch: var(--wide); font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.bundle-was { font: 500 13px/1.4 var(--font-mono); color: var(--ink-3); }
.bundle-was s { text-decoration-thickness: 1px; }
.bundle-save { justify-self: start; }
.bundle-buy [hidden] { display: none !important; }
@media (max-width: 860px) { .bundle { grid-template-columns: minmax(0, 1fr); } }

/* ---------- the cart (/cart) ---------- */
.cart-main { padding-block: clamp(28px, 5vw, 56px) var(--section-y); }
.cart-head { display: grid; gap: 10px; margin-bottom: 28px; }
.cart-title { font-size: clamp(30px, 4vw, 44px); }
.cart-sum { font-size: 14.5px; color: var(--ink-3); }
.cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(20px, 3vw, 36px); align-items: start; }
.cart-items { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.cart-item {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 12px; border-radius: var(--r-lg); background: var(--paper); box-shadow: 0 0 0 1px var(--line);
}
.cart-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: var(--graphite); }
.cart-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { display: grid; gap: 4px; min-width: 0; }
.cart-kind { font: 500 11px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.cart-name { font-size: 18px; font-stretch: var(--semi); font-weight: 700; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
a.cart-name:hover { text-decoration: underline; text-decoration-color: var(--lime-deep); text-underline-offset: 3px; }
.cart-line { font-size: 14px; color: var(--ink-2); }
.cart-line.is-ok { color: var(--lime-deep); font-weight: 500; }
.cart-side { display: grid; justify-items: end; gap: 6px; padding-right: 6px; }
.cart-price { font: 600 16px/1 var(--font-mono); letter-spacing: -.01em; }
.cart-remove {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; border: 0; background: none;
  font-size: 13.5px; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #C9C5BA; cursor: pointer;
}
.cart-remove:hover { color: #B42318; }
.cart-suggest {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 14px; padding: 16px 18px;
  border-radius: var(--r-lg); background: var(--lime-tint); box-shadow: 0 0 0 1px rgba(75, 102, 0, .16) inset;
}
.cart-suggest p { font-size: 15px; color: var(--ink); }
.cart-suggest[hidden], .cart-empty[hidden], .cart-grid[hidden] { display: none; }
.cart-empty { display: grid; justify-items: start; gap: 14px; padding: clamp(24px, 4vw, 40px); border-radius: var(--r-xl); background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.cart-empty h2 { font-size: 24px; }
.cart-empty p { color: var(--ink-2); }

/* the order ticket: the page's one strong element, a slicer-style summary on graphite */
.cart-ticket {
  position: sticky; top: calc(var(--header-h) + 24px); overflow: hidden; display: grid; gap: 16px; padding: 22px;
  border-radius: var(--r-lg); background: var(--graphite); color: var(--on-dark); box-shadow: var(--shadow-lg);
}
.cart-ticket::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(243, 242, 237, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(243, 242, 237, .035) 1px, transparent 1px);
  background-size: 22px 22px;
}
.cart-ticket > * { position: relative; }
.ticket-k { display: flex; align-items: center; gap: 10px; font: 500 11.5px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-2); }
.ticket-rows { display: grid; margin: 0; }
.ticket-rows div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-dark); }
.ticket-rows dt { font: 500 11px/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-3); }
.ticket-rows dd { font: 600 15px/1.2 var(--font-mono); color: var(--on-dark); text-align: right; }
.ticket-rows .is-save dd { color: var(--lime); }
.ticket-rows .is-total { border-bottom: 0; padding-top: 14px; }
.ticket-rows .is-total dt { color: var(--on-dark-2); }
.ticket-rows .is-total dd { font-family: var(--font-sans); font-size: 30px; font-stretch: var(--wide); font-weight: 800; letter-spacing: -.035em; }
.ticket-rows [hidden] { display: none; }
.cart-ticket .btn { --btn-h: 54px; font-size: 16.5px; }
.cart-ticket .dl-msg { color: var(--on-dark-2); }
.cart-ticket .dl-msg.is-err { color: #FF8A80; }
.cart-ticket .dl-msg.is-ok { color: var(--lime); }
.cart-ticket .dl-msg a { color: var(--on-dark); text-decoration-color: rgba(243, 242, 237, .4); }
.ticket-fine { font-size: 12.5px; line-height: 1.5; color: var(--on-dark-3); }
.ticket-fine a { color: var(--on-dark-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(243, 242, 237, .3); }
@media (max-width: 900px) {
  .cart-grid { grid-template-columns: minmax(0, 1fr); }
  .cart-ticket { position: static; }
}
@media (max-width: 560px) {
  .cart-item { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; }
  .cart-side { grid-column: 2; justify-items: start; flex-direction: row; padding-right: 0; display: flex; gap: 14px; align-items: center; }
}

/* ---------- the library: the order just paid for, and the membership ---------- */
.lib-thanks {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: start; padding: 16px 18px;
  border-radius: var(--r-lg); background: var(--lime-tint); box-shadow: 0 0 0 1px rgba(75, 102, 0, .16) inset;
}
.lib-thanks[hidden] { display: none; }
.lib-thanks .ico { grid-row: span 2; width: 22px; height: 22px; margin-top: 2px; color: var(--lime-deep); }
.lib-thanks-h { font-size: 17px; font-stretch: var(--semi); font-weight: 700; }
.lib-thanks p { font-size: 15px; color: var(--ink-2); }
.lib-thanks.is-wait { background: var(--paper); box-shadow: 0 0 0 1px var(--line) inset; }
.lib-thanks.is-wait .ico { color: var(--ink-3); }
.lib-thanks.is-err { background: #FFF4F2; box-shadow: 0 0 0 1px rgba(180, 35, 24, .2) inset; }
.lib-thanks.is-err .ico { color: #B42318; }

.lib-member {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 18px 20px;
  border-radius: var(--r-lg); background: var(--paper); box-shadow: 0 0 0 1px var(--line);
}
.lib-member[hidden] { display: none; }
.lib-member-k { display: flex; align-items: center; gap: 10px; font: 500 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.lib-member-h { margin-top: 8px; font-size: 20px; line-height: 1.25; font-stretch: var(--semi); font-weight: 700; }
.lib-member-meta { margin-top: 4px; font-size: 14.5px; color: var(--ink-2); }
.lib-member-act { display: grid; justify-items: end; gap: 6px; }
.lib-member-act .dl-msg { text-align: right; }
.lib-member.is-off .led { background: var(--ink-3); box-shadow: none; }
@media (max-width: 560px) { .lib-member-act { justify-items: start; } .lib-member-act .dl-msg { text-align: left; } }
.lib-sec-note { font-size: 14px; color: var(--ink-3); }
.lib-member-act [hidden] { display: none; }
.lib-pitch .lib-member-meta { max-width: 52ch; }
.lib-pitch-alt { font-size: 13px; color: var(--ink-3); }
