/* Drive listings share the transaction pages' stock, ink and theme. */
.page-shop main{width:min(var(--wide),100% - 2*var(--gutter))}
.shop-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));align-items:start;gap:20px}
.shop-listing{display:grid;gap:14px;align-content:start;padding:22px;border:1px solid var(--line);border-radius:var(--r-card);background:var(--section)}
.shop-listing h2{font-size:20px;font-weight:600;line-height:1.3;margin:0}
.shop-listing p{margin:0}
.shop-photo{display:block;width:100%;aspect-ratio:4/3;object-fit:contain;border-radius:var(--r-cell);background:var(--card)}
.shop-photo-open{display:block;width:100%;padding:0;border:0;border-radius:var(--r-cell);background:none;cursor:zoom-in}
.shop-photo-open:focus-visible{outline:2px solid var(--green);outline-offset:3px}
/* The enlarged photo: the whole window in the page ground colour, photo fitted uncropped.
   Pinch zoom still works on phones; the page behind does not scroll while it is open. */
.shop-zoom{width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;
  background:var(--ground);color:var(--text)}
.shop-zoom[open]{display:grid;grid-template-rows:auto minmax(0,1fr);animation:shop-zoom-in .2s ease-out}
.shop-zoom::backdrop{background:transparent}
html:has(.shop-zoom[open]){overflow:hidden}
.shop-zoom-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px var(--gutter)}
.shop-zoom-count{font:500 12px/1.4 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
.shop-zoom-close,.shop-zoom-step{border:1px solid var(--line-strong);border-radius:var(--r-button);background:var(--card);color:var(--text);cursor:pointer}
.shop-zoom-close{padding:8px 14px;font:500 12px/1.4 var(--mono);letter-spacing:.14em;text-transform:uppercase}
.shop-zoom-close:hover,.shop-zoom-step:hover{border-color:var(--muted)}
.shop-zoom-stage{position:relative;display:flex;align-items:center;justify-content:center;min-height:0;padding:0 var(--gutter) var(--gutter)}
.shop-zoom-stage img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:var(--r-cell);background:var(--card)}
.shop-zoom-step{position:absolute;top:50%;width:44px;height:44px;margin-top:-22px;padding:0;font:400 26px/1 var(--sans)}
.shop-zoom-step.previous{left:max(8px,calc(var(--gutter) - 22px))}
.shop-zoom-step.next{right:max(8px,calc(var(--gutter) - 22px))}
/* Phones: previous and next sit under the photo instead of over its edges. */
@media (max-width:720px){
  .shop-zoom-stage{padding-bottom:76px}
  .shop-zoom-step{top:auto;bottom:16px;margin-top:0}
  .shop-zoom-step.previous{left:calc(50% - 52px)}
  .shop-zoom-step.next{right:calc(50% - 52px)}
}
@keyframes shop-zoom-in{from{opacity:0;transform:scale(.98)}}
@media (prefers-reduced-motion:reduce){.shop-zoom[open]{animation:none}}
.shop-thumbs{display:flex;flex-wrap:wrap;gap:8px}
.shop-thumbs button{padding:0;border:1px solid var(--line);border-radius:var(--r-badge);background:var(--card);cursor:pointer}
.shop-thumbs button[aria-pressed=true]{border-color:var(--green)}
.shop-thumbs img{display:block;width:56px;height:42px;object-fit:cover;border-radius:var(--r-badge)}
.shop-meta{font-size:.9375rem;color:var(--print-2)}
.shop-firmware{font-weight:600}
.shop-description{white-space:pre-line;font-size:.9375rem;line-height:1.55}
.shop-price{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.shop-price strong{font:600 1.75rem/1 var(--sans);font-variant-numeric:tabular-nums}
.shop-listing .check{margin-top:0}
.order-item{display:grid;grid-template-columns:max-content 1fr;gap:8px 20px;margin:0}
.order-item dt{color:var(--print-2)}
.order-item dd{margin:0;overflow-wrap:anywhere}
