/* ── merch shop ────────────────────────────────────────────────────────────────
   Loaded after style.css on shop.html only. The page reuses the site's own
   parts — the deck card's notched double frame, the HUD card head, the
   "[ NO SIGNAL ]" placeholder over ascii static — so the shop reads as another
   panel of the same instrument. Only the grid and the product furniture are
   new. */

.site-nav a[aria-current="page"] { color: var(--blue); }

.shop {
  padding: 120px 6vw 100px;
  background: var(--bg);
}

.shop-head { margin-bottom: 44px; }
.shop-head h1 {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
}
.shop-head p { margin: 0; max-width: 66ch; color: var(--text-dim); font-size: 0.9rem; }

.shop-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.shop-grid > li { display: flex; }

/* The deck card is sticky, hidden until scrolled in, and sized by the deck's
   viewport-height type. None of that applies in a grid. */
.deck-card.shop-card {
  position: relative;
  top: auto;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: none;
}
.shop-card .card-name { font-size: clamp(0.9rem, 1.3vw, 1.15rem); }

/* Product photo slot: the site's no-signal placeholder, square, inside the
   card's inner frame. */
.shop-media {
  position: relative;
  aspect-ratio: 1 / 1;
  margin: 0 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.shop-media .signal-box { padding: 16px 22px; text-align: center; }
/* a real product photo fills the slot; the mockups are portrait, and the
   product sits in the middle of the frame */
.shop-media.has-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}
.shop-media .placeholder-label { font-size: 0.95rem; }

/* Gallery: stacked slides, one visible; numbered buttons in the corner. */
.shop-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.shop-slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.25s ease; }
/* the hand shots hold the sticker high in the frame */
.shop-gallery .shop-slide--hand img { object-position: 50% 30%; }
.shop-slide--video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

.shop-dots {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  display: flex;
  gap: 4px;
}
.shop-dots button {
  padding: 4px 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  background: rgba(3, 3, 4, 0.72);
  border: 1px solid var(--border-strong);
  cursor: pointer;
}
.shop-dots button:hover,
.shop-dots button:focus-visible { color: var(--text); border-color: var(--blue-dim); }
.shop-dots button[aria-pressed="true"] { color: var(--bg); background: var(--blue); border-color: var(--blue); }

.shop-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 24px;
}
.shop-name {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
.shop-card p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-dim);
}

.shop-options {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.shop-options li {
  padding: 5px 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
}

/* Price and button sit on the card's floor whatever the copy above runs to. */
.shop-buy {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.shop-price {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
}
.shop-cta {
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  background: transparent;
  border: 1px solid var(--blue-dim);
}
.shop-cta:disabled { cursor: not-allowed; opacity: 0.6; }
a.shop-cta { text-decoration: none; }
a.shop-cta:hover, a.shop-cta:focus-visible { color: var(--bg); background: var(--blue); border-color: var(--blue); }

/* Shopify Buy Button (js/shop-buy.js) renders its add-to-cart inline here;
   dress it as a .shop-cta. */
.shop-cta-mount .shopify-buy__product,
.shop-cta-mount .shopify-buy__btn-wrapper { margin: 0; }
.shop-cta-mount .shopify-buy__btn {
  padding: 9px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  background: transparent;
  border: 1px solid var(--blue-dim);
  border-radius: 0;
  cursor: pointer;
}
.shop-cta-mount .shopify-buy__btn:hover,
.shop-cta-mount .shopify-buy__btn:focus-visible { color: var(--bg); background: var(--blue); border-color: var(--blue); }
.shop-cta-mount .shopify-buy__btn.shopify-buy__btn--disabled { cursor: not-allowed; opacity: 0.6; }

.shop-note {
  margin: 40px 0 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.shop-note a { color: var(--blue); text-decoration: none; }
.shop-note a:hover, .shop-note a:focus-visible { text-decoration: underline; }

@media (max-width: 1080px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .shop { padding: 96px 6vw 72px; }
  .shop-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}

/* Add-to-cart feedback (js/shop-buy.js celebrate): the button flashes, sparks
   burst off it, and "thank you!" floats up and fades. */
.shop-cta-mount { position: relative; }
.shop-cta-mount .shopify-buy__btn.is-sparkling { animation: shop-btn-flash 0.7s ease-out; }
@keyframes shop-btn-flash {
  0%   { color: var(--bg); background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.7); }
  100% { box-shadow: 0 0 0 14px rgba(0, 229, 255, 0); }
}
.shop-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 2;
}
.shop-burst i {
  position: absolute;
  left: -3px;
  top: -3px;
  width: 6px;
  height: 6px;
  background: var(--blue);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0;
  animation: shop-spark 0.75s ease-out forwards;
}
.shop-burst i:nth-child(3n)   { background: var(--text); }
.shop-burst i:nth-child(3n+1) { background: var(--red); }
@keyframes shop-spark {
  0%   { opacity: 1; transform: translate(0, 0) scale(0.4) rotate(0deg); }
  60%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.3) rotate(90deg); }
}
.shop-thanks {
  position: absolute;
  left: 0;
  bottom: 14px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--blue);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
  animation: shop-thanks 1.5s ease-out forwards;
}
@keyframes shop-thanks {
  0%   { opacity: 0; transform: translate(-50%, 6px); }
  15%  { opacity: 1; transform: translate(-50%, 0); }
  65%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -22px); filter: blur(2px); }
}

/* Keep the floating cart tab on screen even with an empty cart; Shopify only
   shows it once something is added. */
body .shopify-buy-frame--toggle.is-sticky { display: block; }
