/* ============================================================
   SHOP — /shop.html
   Design system: matches the site (Anton display + Barlow Condensed
   body, deep blue #0a1128 background, brass #c9a24a accents,
   crimson #b8272e CTAs). Same eyebrow/rules language as tickets/community.
   ============================================================ */

:root {
  --shop-bg: #0a1128;
  --shop-bg-2: #0d1735;
  --shop-card: #0f1a3d;
  --shop-card-hover: #142250;
  --shop-line: rgba(255, 255, 255, 0.08);
  --shop-line-strong: rgba(255, 255, 255, 0.18);
  --shop-ink: #f2ede1;
  --shop-ink-muted: rgba(242, 237, 225, 0.62);
  --shop-brass: #c9a24a;
  --shop-crimson: #b8272e;
  --shop-crimson-hover: #d4353c;
  --shop-oos: #6a6c78;
}

/* ---------- Hero ---------- */
.shop-hero {
  background: linear-gradient(180deg, #050813 0%, var(--shop-bg) 100%);
  padding: clamp(48px, 8vw, 96px) 24px clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--shop-line);
}
.shop-hero__inner { max-width: 1240px; margin: 0 auto; }
.shop-hero__eyebrow {
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  font-size: 13px; color: var(--shop-brass);
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.shop-hero__eyebrow::before,
.shop-hero__eyebrow::after { content: ''; flex: 0 0 40px; height: 1px; background: var(--shop-brass); opacity: 0.6; }
.shop-hero__eyebrow::after { flex: 1 1 auto; }
.shop-hero__title {
  font-family: 'Anton', 'Oswald', sans-serif; font-weight: 400;
  font-size: clamp(48px, 8vw, 108px); line-height: 0.92;
  letter-spacing: 0.005em; color: var(--shop-ink);
  margin: 0 0 20px; text-transform: uppercase;
}
.shop-hero__title em { font-style: normal; color: var(--shop-brass); font-family: 'Fraunces', serif; font-weight: 400; font-size: 0.72em; letter-spacing: 0; }
.shop-hero__lede {
  font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 400;
  font-size: clamp(18px, 2vw, 22px); line-height: 1.5;
  color: var(--shop-ink); max-width: 640px; margin: 0;
}

/* ---------- Filter bar ---------- */
.shop-filter {
  background: var(--shop-bg);
  border-bottom: 1px solid var(--shop-line);
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.shop-filter__inner {
  max-width: 1240px; margin: 0 auto;
  padding: 16px 24px;
  display: flex; align-items: center; gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.shop-filter__inner::-webkit-scrollbar { display: none; }
.shop-filter__btn {
  font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px;
  padding: 9px 16px; border-radius: 999px;
  background: transparent; color: var(--shop-ink-muted);
  border: 1px solid var(--shop-line-strong);
  cursor: pointer; white-space: nowrap;
  transition: all 0.15s ease;
}
.shop-filter__btn:hover { color: var(--shop-ink); border-color: var(--shop-ink-muted); }
.shop-filter__btn.is-active {
  background: var(--shop-brass); color: #0a1128;
  border-color: var(--shop-brass);
}
.shop-filter__count {
  margin-left: auto; padding-left: 16px;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--shop-ink-muted); white-space: nowrap;
}

/* ---------- Product grid ---------- */
.shop-grid {
  max-width: 1240px; margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) 24px 96px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.shop-card {
  background: var(--shop-card);
  border: 1px solid var(--shop-line);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.22s ease;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  position: relative;
}
.shop-card:hover {
  transform: translateY(-3px);
  border-color: var(--shop-brass);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  background: var(--shop-card-hover);
}
.shop-card.is-oos { opacity: 0.55; cursor: not-allowed; }
.shop-card.is-oos:hover { transform: none; }

.shop-card__badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 5px 10px; border-radius: 3px;
  font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; font-size: 10px;
}
.shop-card__badge--featured { background: var(--shop-brass); color: #0a1128; }
.shop-card__badge--oos { background: var(--shop-oos); color: #fff; top: auto; bottom: 12px; }

.shop-card__media {
  aspect-ratio: 1 / 1;
  background: #050813;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
}
.shop-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.shop-card:hover .shop-card__media img { transform: scale(1.04); }
.shop-card__placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Anton', sans-serif; font-size: 44px; line-height: 1;
  letter-spacing: 0.02em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-align: center; padding: 12px;
  background: linear-gradient(135deg, var(--tc, #b8272e) 0%, #0a1128 100%);
}

.shop-card__body {
  padding: 18px 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.shop-card__category {
  font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; font-size: 11px;
  color: var(--shop-brass);
}
.shop-card__name {
  font-family: 'Oswald', sans-serif; font-weight: 500;
  font-size: 18px; line-height: 1.2;
  color: var(--shop-ink);
}
.shop-card__price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px; font-weight: 500;
  color: var(--shop-ink); margin-top: 4px;
}
.shop-card__price s { color: var(--shop-ink-muted); font-weight: 400; }

/* ---------- Empty state ---------- */
.shop-empty {
  grid-column: 1 / -1;
  padding: 60px 20px; text-align: center;
  color: var(--shop-ink-muted);
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-size: 18px;
}

/* ---------- Product detail modal ---------- */
.pd-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 5, 12, 0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 4vh 16px;
  overflow-y: auto;
}
.pd-overlay.is-open { display: flex; }

.pd-modal {
  background: var(--shop-bg-2);
  border: 1px solid var(--shop-line-strong);
  border-radius: 8px;
  max-width: 1040px; width: 100%;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
  display: grid; grid-template-columns: 1.1fr 1fr;
  position: relative;
  animation: pdIn 0.28s ease;
}
@keyframes pdIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 820px) {
  .pd-modal { grid-template-columns: 1fr; }
}

.pd-close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); color: #fff;
  border: 1px solid var(--shop-line-strong);
  cursor: pointer; font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s ease;
}
.pd-close:hover { background: var(--shop-crimson); border-color: var(--shop-crimson); }

.pd-media {
  aspect-ratio: 1 / 1;
  background: #050813;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.pd-media img { width: 100%; height: 100%; object-fit: cover; }

.pd-info {
  padding: clamp(24px, 3vw, 40px);
  display: flex; flex-direction: column; gap: 18px;
  max-height: 92vh;
  overflow-y: auto;
}
.pd-info__eyebrow {
  font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; font-size: 11px;
  color: var(--shop-brass);
}
.pd-info__title {
  font-family: 'Anton', sans-serif; font-weight: 400;
  font-size: clamp(26px, 3.4vw, 40px); line-height: 1.05;
  color: var(--shop-ink); text-transform: uppercase;
  letter-spacing: 0.005em; margin: 0;
}
.pd-info__price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px; font-weight: 500; color: var(--shop-brass);
}
.pd-info__desc {
  font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 400;
  font-size: 17px; line-height: 1.55; color: var(--shop-ink);
}

.pd-field { display: flex; flex-direction: column; gap: 10px; }
.pd-field__label {
  font-family: 'Barlow Condensed', system-ui, sans-serif; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px;
  color: var(--shop-ink-muted);
}
.pd-field__select,
.pd-field__qty input {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--shop-line-strong);
  color: var(--shop-ink);
  font-family: 'Barlow Condensed', system-ui, sans-serif; font-size: 15px;
  padding: 12px 14px; border-radius: 4px;
  width: 100%;
}
.pd-field__select:focus,
.pd-field__qty input:focus { outline: none; border-color: var(--shop-brass); }

.pd-field__qty { display: grid; grid-template-columns: 44px 1fr 44px; gap: 8px; max-width: 180px; }
.pd-field__qty button {
  background: rgba(0, 0, 0, 0.35); color: var(--shop-ink);
  border: 1px solid var(--shop-line-strong); border-radius: 4px;
  font-family: 'Oswald', sans-serif; font-size: 20px; font-weight: 500;
  cursor: pointer; transition: all 0.15s ease;
}
.pd-field__qty button:hover { background: var(--shop-crimson); border-color: var(--shop-crimson); }
.pd-field__qty input { text-align: center; font-family: 'JetBrains Mono', monospace; }

.pd-total {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 0; border-top: 1px solid var(--shop-line);
  font-family: 'Barlow Condensed', system-ui, sans-serif;
}
.pd-total__label { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--shop-ink-muted); }
.pd-total__value { font-family: 'JetBrains Mono', monospace; font-size: 26px; font-weight: 500; color: var(--shop-ink); }

.pd-cta {
  background: var(--shop-crimson); color: #fff;
  font-family: 'Oswald', sans-serif; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; font-size: 15px;
  padding: 16px 20px; border: none; border-radius: 4px;
  cursor: pointer; transition: all 0.15s ease;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.pd-cta:hover { background: var(--shop-crimson-hover); transform: translateY(-1px); }
.pd-cta:disabled { background: var(--shop-oos); cursor: not-allowed; transform: none; }
.pd-cta__spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: #fff;
  animation: pdSpin 0.9s linear infinite;
  display: none;
}
.pd-cta.is-loading .pd-cta__spinner { display: block; }
.pd-cta.is-loading .pd-cta__label { opacity: 0.7; }
@keyframes pdSpin { to { transform: rotate(360deg); } }

.pd-note {
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-size: 13px; color: var(--shop-ink-muted); line-height: 1.5;
  padding: 12px 14px; background: rgba(0, 0, 0, 0.25);
  border-left: 2px solid var(--shop-brass); border-radius: 3px;
}
.pd-note.is-error { border-left-color: var(--shop-crimson); color: #ffb2b6; }

/* ---------- Success banner ---------- */
.shop-success {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  background: #12351e; border: 1px solid #2f7a4a; color: #d3f0dc;
  padding: 16px 20px; border-radius: 6px; z-index: 200;
  max-width: 480px; font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-size: 15px; line-height: 1.5;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  animation: pdIn 0.4s ease;
}
.shop-success button {
  background: transparent; border: none; color: inherit;
  margin-left: 12px; font-size: 20px; cursor: pointer; opacity: 0.7;
}
.shop-success button:hover { opacity: 1; }
