#shopOverlay[hidden] { display: none !important; }
.shop-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow: auto;
  background: rgba(2, 6, 23, 0.94);
  backdrop-filter: blur(8px);
}
.shop-shell {
  width: min(960px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  padding: clamp(16px, 3vw, 30px);
  border: 1px solid rgba(245, 158, 11, 0.55);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.99), rgba(6, 9, 17, 0.99));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.65), inset 0 1px rgba(255, 255, 255, 0.04);
}
.shop-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(71, 85, 105, 0.65);
}
.shop-eyebrow {
  margin: 0 0 5px;
  color: #fbbf24;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}
.shop-header h2 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 950;
}
.shop-close-btn, .shop-refresh-btn {
  border: 1px solid #475569;
  border-radius: 10px;
  background: #111827;
  color: #e2e8f0;
  padding: 9px 12px;
  font-weight: 800;
}
.shop-close-btn:hover, .shop-refresh-btn:hover { border-color: #f59e0b; color: #fde68a; }
.shop-notice {
  margin: 14px 0 16px;
  border-left: 3px solid #f59e0b;
  padding: 10px 12px;
  background: rgba(120, 53, 15, 0.2);
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.6;
}
.shop-status {
  min-height: 20px;
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 12px;
}
.shop-status.is-error { color: #fda4af; }
.shop-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.shop-product {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #334155;
  border-radius: 15px;
  background: rgba(2, 6, 23, 0.82);
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.shop-product:hover { transform: translateY(-2px); border-color: rgba(245, 158, 11, 0.7); }
.shop-product-image, .shop-product-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 1.35 / 1;
  object-fit: cover;
  background: #0f172a;
}
.shop-product-placeholder {
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}
.shop-product-body { padding: 14px; }
.shop-product-body h3 {
  margin: 0 0 7px;
  color: #f8fafc;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
}
.shop-product-body p {
  min-height: 39px;
  margin: 0 0 10px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.55;
}
.shop-product-body strong { display: block; margin-bottom: 11px; color: #fcd34d; font-size: 16px; }
.shop-add-btn, .shop-checkout-btn {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid #b45309;
  border-radius: 10px;
  background: linear-gradient(135deg, #d97706, #92400e);
  color: #fff7ed;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.shop-add-btn:hover, .shop-checkout-btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.shop-add-btn:disabled, .shop-checkout-btn[aria-disabled="true"] {
  cursor: not-allowed;
  filter: grayscale(0.8);
  opacity: 0.55;
  transform: none;
}
.shop-cart {
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid rgba(71, 85, 105, 0.65);
}
.shop-cart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.shop-cart-heading h3 { margin: 0; color: #f8fafc; font-size: 16px; font-weight: 900; }
.shop-cart-count { color: #fbbf24; font-size: 12px; font-weight: 800; }
.shop-cart-lines { display: grid; gap: 8px; }
.shop-cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.55);
}
.shop-cart-name { color: #e2e8f0; font-size: 12px; font-weight: 800; }
.shop-cart-quantity { color: #94a3b8; font-size: 11px; white-space: nowrap; }
.shop-cart-line strong { color: #fcd34d; font-size: 12px; white-space: nowrap; }
.shop-cart-controls { display: flex; align-items: center; gap: 5px; }
.shop-cart-controls button {
  min-width: 29px;
  min-height: 29px;
  border: 1px solid #475569;
  border-radius: 7px;
  background: #111827;
  color: #e2e8f0;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
}
.shop-cart-controls button:hover { border-color: #f59e0b; }
.shop-cart-controls .shop-remove-btn { padding: 0 7px; color: #fda4af; font-size: 10px; }
.shop-cart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 13px;
}
.shop-cart-total { color: #cbd5e1; font-size: 12px; }
.shop-cart-total strong { margin-left: 7px; color: #fcd34d; font-size: 17px; }
.shop-checkout-btn { width: auto; min-width: 220px; padding: 0 18px; }
.shop-empty { margin: 10px 0; color: #64748b; font-size: 12px; }
.shop-toast {
  position: sticky;
  bottom: 0;
  margin: 12px auto 0;
  padding: 11px 14px;
  border: 1px solid rgba(245, 158, 11, 0.7);
  border-radius: 10px;
  background: #111827;
  color: #fde68a;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}
.shop-launch-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(245, 158, 11, 0.52);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.92);
  color: #fcd34d;
  font-size: 13px;
  font-weight: 900;
}
.shop-launch-btn:hover { background: #1e293b; border-color: #f59e0b; }
@media (max-width: 620px) {
  .shop-overlay { align-items: flex-start; padding: 8px; }
  .shop-shell { max-height: 96vh; padding: 14px; border-radius: 14px; }
  .shop-products { gap: 9px; }
  .shop-product-body { padding: 10px; }
  .shop-product-body h3 { font-size: 13px; }
  .shop-product-body p { font-size: 10px; }
  .shop-product-body strong { font-size: 14px; }
  .shop-cart-line { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .shop-cart-line strong { justify-self: end; }
  .shop-cart-controls { grid-column: 2; justify-self: end; }
  .shop-cart-footer { align-items: stretch; flex-direction: column; }
  .shop-checkout-btn { width: 100%; min-width: 0; }
}
@media (max-width: 360px) {
  .shop-products { grid-template-columns: 1fr; }
}
