/* The online shop's shared layer (ADR 0017). Loaded after members/base.html's
   shell, and written in that shell's tokens only: no colour is typed here, so
   each gym's own ink, paper and accent come off its Gym row. Each gym's
   identity sits in its own file (shop-hold.css, shop-crux.css), and a page
   links only the file for the gym it belongs to. A gym with neither gets
   this neutral layer, which is still entirely its own tokens. */

.shop { --shop-display: var(--display), "Helvetica Neue", Helvetica, Arial, sans-serif;
        --shop-gap: 1rem; }
.shop h1, .shop h2, .shop h3, .shop .amount, .shop .cta, .shop button {
  font-family: var(--shop-display); }

/* The masthead. Full bleed without a 100vw width, which would add a
   horizontal scrollbar on a desktop that has a vertical one. */
.shop-mast { display: flex; align-items: center; gap: .8rem;
             margin: -1.5rem 0 2rem; padding: 1rem 0; }
.shop-mast .shop-mark { flex: 0 0 auto; display: block; background: currentColor;
                        -webkit-mask: var(--shop-mark) center / contain no-repeat;
                        mask: var(--shop-mark) center / contain no-repeat; }
.shop-mast .site { margin: 0; }

/* Focus is drawn in INK, never the accent alone: one of the two accents
   measures 2.23:1 on its own paper, under the 3:1 a focus ring needs. */
.shop a:focus-visible, .shop button:focus-visible, .shop input:focus-visible,
.shop textarea:focus-visible, .shop select:focus-visible, .shop .cta:focus-visible {
  outline: 3px solid var(--ink); outline-offset: 3px; }
.shop input[type=text]:focus, .shop input[type=email]:focus,
.shop input[type=date]:focus, .shop textarea:focus {
  border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.shop input[type=checkbox] { width: 1.25rem; height: 1.25rem; margin: .1rem 0 0;
                             accent-color: var(--ink); flex: 0 0 auto; }

.shop .cta, .shop button {
  display: inline-block; text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--on-accent); border: 2px solid var(--accent);
  border-radius: 2px; padding: .75rem 1.2rem; font-size: 1rem; line-height: 1.2;
  transition: background-color .15s ease, color .15s ease, transform .15s ease; }
.shop .cta:hover, .shop button:hover { background: var(--ink); color: var(--paper);
                                       border-color: var(--ink); }
.shop .cta:active, .shop button:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) {
  .shop .cta, .shop button { transition: none; }
}

.shop .back { font-size: .88rem; margin: 0 0 .8rem; }
.shop .lede { font-size: 1.05rem; }
.shop .variant { font-size: .9rem; color: var(--muted); margin: 0; }
.shop .amount { line-height: 1; margin: .4rem 0 .15rem; }
.shop .period { font-family: var(--body), system-ui, sans-serif; font-size: .9rem;
                color: var(--muted); }
.shop .gst { font-size: .78rem; color: var(--muted); margin: .15rem 0 0; }
.shop .save { display: inline-block; font-size: .78rem; font-weight: 700;
              padding: .12rem .5rem; border-radius: 2px; color: var(--on-accent);
              background: var(--accent); }
.shop .note { font-size: .88rem; margin: .7rem 0 0; padding: .55rem .7rem;
              border-left: .25rem solid var(--accent); background: var(--surface); }
.shop .desk, .shop .small, .shop .fee { font-size: .88rem; color: var(--muted); }
.shop .keep { font-size: .95rem; padding: .7rem .85rem;
              border-left: .3rem solid var(--accent); background: var(--surface); }
.shop .consent { font-size: .92rem; padding: .7rem .85rem;
                 border-left: .3rem solid var(--accent); background: var(--surface); }
.shop .notice { font-size: .9rem; }
.shop .helptext { display: block; font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.shop .empty { padding: 1.2rem; border: 1px dashed var(--rule); }

/* ---- the price list ---------------------------------------------------- */
.shop-prices .section { margin: 2.6rem 0 0; }
.shop-prices .section > h2 { font-size: 1.4rem; margin-bottom: .2rem; }
.shop-prices .section > .blurb { margin: 0 0 1rem; color: var(--muted); }
.shop-prices .cards { display: grid; gap: var(--shop-gap);
                      grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.shop-prices .item { display: flex; flex-direction: column; margin: 0;
                     background: var(--paper); border: 1px solid var(--rule);
                     border-radius: 3px; padding: 1.1rem 1.15rem; }
.shop-prices .item h3 { font-size: 1.1rem; margin: 0 0 .1rem; line-height: 1.15; }
.shop-prices .item .amount { font-size: 2rem; }
.shop-prices .compare { font-size: .88rem; margin: .65rem 0 0; }
.shop-prices .buy { margin: .9rem 0 0; }
.shop-prices .buy .cta { width: 100%; text-align: center; }
.shop-prices .item .fee { margin: .3rem 0 0; }
.shop-prices .more { margin-top: auto; padding-top: .9rem; font-size: .88rem; }
.shop-prices .pay { margin: 3rem 0 0; padding: 1.3rem 1.3rem 1.4rem;
                    background: var(--surface); border: 1px solid var(--rule); }
.shop-prices .pay h2 { font-size: 1.2rem; }
.shop-prices .pay p { margin: .5rem 0 0; max-width: 40rem; }
.shop-prices .pay .cta { margin-top: 1rem; }

/* ---- one product ------------------------------------------------------- */
.shop-product .hero { padding: 1.3rem 1.3rem 1.4rem; margin: 0 0 1.4rem;
                      border: 1px solid var(--rule); background: var(--surface); }
.shop-product .hero h1 { margin: 0; }
.shop-product .amount { font-size: 2.8rem; margin-top: .8rem; }
.shop-product h2 { font-size: 1.1rem; margin: 2rem 0 .6rem; }
.shop-product .compare { margin: 1rem 0 0; }
.shop-product ul.plain { list-style: none; margin: 0; padding: 0; }
.shop-product ul.plain li { position: relative; padding: .55rem 0 .55rem 1.4rem;
                            border-top: 1px solid var(--rule); }
.shop-product ul.plain li::before { content: ""; position: absolute; left: 0; top: 1rem;
                                    width: .55rem; height: .55rem; background: var(--accent); }
.shop-product .cta { margin-top: 1.8rem; font-size: 1.1rem; padding: .9rem 1.6rem; }

/* ---- the buy page ------------------------------------------------------ */
.shop-buy .amount { font-size: 2.4rem; }
.shop-buy .step { margin: 2rem 0 0; padding-top: 1.2rem; border-top: 2px solid var(--ink); }
.shop-buy .step h2 { font-size: 1.3rem; }
.shop-buy form button { width: 100%; }
.shop-buy .check, .shop-buy form p > label:has(input[type=checkbox]) {
  display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; }
.shop-buy .summary { padding: 1.2rem 1.3rem 1.3rem; border: 1px solid var(--rule);
                     background: var(--surface); margin: 0 0 1.5rem; }
.shop-buy .summary h1 { margin: 0; }
.shop-buy .summary .back { margin-bottom: .9rem; }
.shop-buy .summary .fee { margin: .5rem 0 0; }

@media (min-width: 56rem) {
  .wrap:has(.shop-buy) { max-width: 60rem; }
  .wrap:has(.shop-order) { max-width: 40rem; }
  .shop-buy { display: grid; grid-template-columns: 19rem minmax(0, 1fr); gap: 0 2.5rem;
              align-items: start; }
  .shop-buy .summary { position: sticky; top: 1.5rem; margin: 0; }
  .shop-buy .main > :first-child { margin-top: 0; }
}

/* ---- the gift card ----------------------------------------------------- */
.shop-order .card-list { display: grid; gap: 1.5rem; margin: 1.4rem 0; }
.giftcard { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto;
            max-width: 40rem; margin: 0; break-inside: avoid;
            border: 2px solid var(--ink); border-radius: 10px; overflow: hidden;
            background: var(--paper); color: var(--ink);
            -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.giftcard .face { position: relative; padding: 1.3rem 1.4rem 1.2rem; min-width: 0; }
.giftcard .stub { display: flex; flex-direction: column; align-items: center;
                  justify-content: center; gap: .5rem; padding: 1.1rem 1.2rem;
                  border-left: 2px dashed currentColor; }
.giftcard .kicker { font-family: var(--shop-display); font-size: .78rem;
                    letter-spacing: .18em; text-transform: uppercase; margin: 0; }
.giftcard .gym { font-family: var(--shop-display); font-size: 1.15rem; margin: .15rem 0 0;
                 line-height: 1.1; }
.giftcard .value { font-family: var(--shop-display); font-size: 3.4rem; line-height: 1;
                   margin: .8rem 0 .6rem; }
.giftcard .ref { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
                 font-size: 1.25rem; font-weight: 700; letter-spacing: .08em;
                 margin: 0; word-spacing: .15em; }
.giftcard .qr { background: var(--paper); padding: .35rem; border-radius: 4px; line-height: 0; }
.giftcard .qr svg { width: 8.5rem; height: 8.5rem; display: block; }
.giftcard .meta { font-size: .9rem; margin: .35rem 0 0; color: inherit; }
.giftcard .for { font-family: var(--shop-display); font-size: 1.1rem; margin-top: 1rem; }
.giftcard .msg { font-style: italic; font-size: 1rem; max-width: 26rem; }
.giftcard .expiry { font-weight: 700; margin-top: .8rem; }
.giftcard .cash { font-size: .82rem; margin-top: .8rem; padding-top: .7rem;
                  border-top: 1px solid currentColor; }
.shop-order .print { width: auto; margin-top: .5rem; padding-inline: 2rem; }

@media (max-width: 34rem) {
  .giftcard { grid-template-columns: 1fr; }
  .giftcard .stub { border-left: 0; border-top: 2px dashed currentColor;
                    flex-direction: row; justify-content: flex-start; gap: 1rem; }
  .giftcard .value { font-size: 2.8rem; }
  .giftcard .ref { font-size: 1.1rem; }
  .giftcard .qr svg { width: 7.5rem; height: 7.5rem; }
}

@media print {
  .shop-mast, .noprint, .powered { display: none !important; }
  body { background: none; }
  .wrap { max-width: none; padding: 0; }
  .shop-order .card-list { margin: 0; }
  .giftcard { max-width: 17cm; }
}
