/* Storefront. Loaded only by /gear/. Follows the same dark palette and radius
   language as the recipe pages so the store does not read as a bolted-on
   third-party checkout. */

/* The [hidden] attribute only sets display:none through the UA stylesheet, so
   any class carrying an explicit display beats it. .gear-badge is
   inline-block, which meant the "Opening soon" chip stayed on screen after the
   store went live. This makes hidden mean hidden. */
[hidden] { display: none !important; }

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  margin: 0 0 40px;
}

.shop-card {
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.shop-card.sold-out { opacity: 0.55; }

.shop-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #0d0d0d;
}

.shop-card-noimg { background: linear-gradient(150deg, #1a1a1a, #0d0d0d); }

.shop-card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.shop-card-body h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 21px;
  margin: 0 0 6px;
  line-height: 1.25;
}

/* Fit is a spec buyers scan for, so it gets the accent colour on its own line
   rather than being buried in the description. */
.shop-card-fit {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c9972a;
  margin: 0 0 10px;
}

.shop-card-desc {
  font-size: 14px;
  line-height: 1.55;
  color: #8a8580;
  margin: 0 0 14px;
}

.shop-card-price {
  font-size: 20px;
  font-weight: 600;
  margin: auto 0 14px;
}

.shop-add {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: #c9972a;
  color: #0d0d0d;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.shop-add:hover { filter: brightness(1.08); }
.shop-add:active { transform: scale(0.97); }

.shop-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(201, 151, 42, 0.4);
  border-radius: 10px;
  padding: 5px 8px;
}

.shop-qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: rgba(201, 151, 42, 0.14);
  color: #c9972a;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

.shop-qty-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.shop-qty-n { font-size: 16px; font-weight: 600; }

.shop-low {
  margin: 10px 0 0;
  font-size: 13px;
  color: #c9972a;
}

.shop-sold {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8580;
}

/* Sticky cart bar. Fixed to the bottom because on a phone the add-to-cart
   button and the checkout button are otherwise a full scroll apart. */
.shop-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: none;
  align-items: center;
  gap: 16px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: rgba(13, 13, 13, 0.96);
  border-top: 1px solid rgba(201, 151, 42, 0.35);
  backdrop-filter: blur(10px);
}

.shop-bar.show { display: flex; }

.shop-bar-info { flex: 1; min-width: 0; }
.shop-bar-count { display: block; font-size: 13px; color: #8a8580; }
.shop-bar-total { font-size: 20px; font-weight: 700; }

.shop-bar-btn {
  padding: 13px 26px;
  border: none;
  border-radius: 10px;
  background: #c9972a;
  color: #0d0d0d;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.shop-bar-btn:disabled { opacity: 0.6; cursor: wait; }

.shop-error {
  display: none;
  margin: 0 0 20px;
  padding: 14px 16px;
  border-left: 3px solid #d9534f;
  background: rgba(217, 83, 79, 0.09);
  color: #e0b3b1;
  font-size: 15px;
  line-height: 1.5;
}

.shop-error.show { display: block; }

.shop-note {
  font-size: 14px;
  color: #8a8580;
  line-height: 1.6;
  margin: 0 0 34px;
}

/* Keeps the last row of cards clear of the fixed bar. */
.shop-pad { height: 90px; }

@media (max-width: 520px) {
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .shop-card-body { padding: 14px 14px 16px; }
  .shop-card-body h3 { font-size: 18px; }
  .shop-card-price { font-size: 18px; }
}

/* Local pickup code. Understated on purpose — it is for the handful of people
   who have been given a code, not a discount box to tempt everyone else into
   hunting for one. */
.shop-pickup {
  margin: 0 0 26px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.shop-pickup label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a8580;
  margin-bottom: 8px;
}
.shop-pickup-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0d0d0d;
  color: #f8f8f8;
  font-size: 16px; /* 16px stops iOS zooming the page on focus */
  letter-spacing: 0.06em;
}
.shop-pickup-input:focus {
  outline: none;
  border-color: #c9972a;
}
.shop-pickup-note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #8a8580;
}

/* Extra product angles. The whole image is the tap target — on a phone that is
   a far bigger and more obvious control than any arrow we could draw on it. The
   dots below are the affordance that says "there is more than one". */
.shop-card-img[data-act="photo"] { cursor: pointer; }

.shop-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 2px;
}

.shop-dot {
  /* 22px tap target around an 8px dot. The visible size is what it should look
     like; the padded size is what a thumb actually needs. */
  width: 22px;
  height: 22px;
  padding: 7px;
  border: none;
  background: none;
  cursor: pointer;
  line-height: 0;
}

.shop-dot::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.shop-dot.on::before { background: #c9972a; }
