/* MIGZ MERCH — page-specific layout
   Pathing rules: assets are ROOT-ABSOLUTE (/img, /media, /css, /js)
   Page path: /site/migz-merch.html
   MERCH now uses a fixed authored 1920×1080 stage to preserve composition.
*/

:root{
  --merch-base-w: 1920;
  --merch-base-h: 1080;
  --merch-panel-radius: 18px;
  --merch-card-radius: 16px;
  --merch-glow-blue: 0 0 18px rgba(24, 164, 255, .28);
  --merch-glow-mag:  0 0 18px rgba(255, 46, 159, .18);
  --merch-safe-top: env(safe-area-inset-top, 0px);
  --merch-safe-bottom: env(safe-area-inset-bottom, 0px);
  --merch-safe-vh: calc(100svh - var(--merch-safe-top) - var(--merch-safe-bottom));
}

html, body{
  height: 100%;
  margin: 0;
  background: #000;
}

body.merch-page{
  background: #000;
  overflow: hidden;
}

body.merch-page .merch-hero{
  position: relative;
  min-height: 100svh;
  display: block;
  padding: 0;
  overflow: hidden;
  background: #000;
}

body.merch-page .merch-stage-shell{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: var(--merch-safe-top);
  padding-bottom: var(--merch-safe-bottom);
  box-sizing: border-box;
  background: #000;
}

body.merch-page .merch-stage-frame{
  position: relative;
  width: min(100vw, calc(var(--merch-safe-vh) * 16 / 9));
  height: min(var(--merch-safe-vh), calc(100vw * 9 / 16));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px rgba(24,164,255,0.08);
}

body.merch-page .merch-hero__bg{
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(1100px 520px at 18% 18%, rgba(24,164,255,0.18), transparent 58%),
    radial-gradient(900px 520px at 76% 28%, rgba(255,46,159,0.10), transparent 60%),
    radial-gradient(1200px 820px at 50% 90%, rgba(0,0,0,0.85), rgba(0,0,0,0.98)),
    linear-gradient(180deg, #070a18 0%, #050611 60%, #000 100%);
  filter: saturate(1.15) contrast(1.05);
}

body.merch-page .merch-hero__bg::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:0.10;
  mix-blend-mode: screen;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.04) 0,
    rgba(255,255,255,0.04) 1px,
    transparent 3px,
    transparent 5px
  );
  animation: merch-scan 10s linear infinite;
}

@keyframes merch-scan{
  0%{ transform: translateY(-100%); }
  100%{ transform: translateY(100%); }
}

body.merch-page .authored-merch-layer{
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--merch-base-w) * 1px);
  height: calc(var(--merch-base-h) * 1px);
  transform-origin: top left;
  transform: scale(var(--stage-scale, 1));
  z-index: 10;
  pointer-events: none;
}

body.merch-page .merch-hero__inner,
body.merch-page .merch-stage,
body.merch-page #city-nav,
body.merch-page .merch-audio-toggle{
  pointer-events: auto;
}

/* ===== Authored placement ===== */
body.merch-page .merch-hero__inner{
  position: absolute;
  left: 360px;
  top: 34px;
  width: 1200px;
  z-index: 3;
}

body.merch-page .merch-brand{
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px 16px;
  border-radius: var(--merch-panel-radius);
  background: rgba(7, 10, 24, 0.34);
  backdrop-filter: blur(7px);
  border: 1px solid rgba(24, 164, 255, 0.28);
  outline: 1px solid rgba(255, 46, 159, 0.14);
  box-shadow: 0 18px 45px rgba(0,0,0,0.55);
}

body.merch-page .merch-brand__logo{
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(24,164,255,0.55));
}

body.merch-page .merch-brand__kicker{
  font-family: "Bebas Neue", system-ui, sans-serif;
  letter-spacing: 0.28em;
  opacity: 0.92;
  color: rgba(208, 228, 255, 0.92);
  font-size: 14px;
}

body.merch-page .merch-brand__title{
  font-family: "Bebas Neue", system-ui, sans-serif;
  letter-spacing: 0.18em;
  margin: 6px 0 6px;
  font-size: 72px;
  line-height: 1;
  text-transform: uppercase;
}

body.merch-page .merch-brand__sub{
  margin: 0;
  color: rgba(245, 247, 255, 0.86);
  max-width: 68ch;
  font-size: 18px;
}

body.merch-page .merch-controls{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

body.merch-page .merch-search{
  display:flex;
  align-items:center;
  justify-content:flex-start;
}

body.merch-page .merch-search__input{
  width: 520px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(24, 164, 255, 0.30);
  outline: 1px solid rgba(255, 46, 159, 0.14);
  background: rgba(5, 6, 17, 0.42);
  color: rgba(245,247,255,0.92);
  padding: 0 16px;
  box-shadow: var(--merch-glow-blue), var(--merch-glow-mag);
}

body.merch-page .merch-search__input::placeholder{
  color: rgba(167, 178, 216, 0.85);
}

body.merch-page .merch-search__input:focus-visible{
  outline: 2px solid rgba(208, 228, 255, 0.85);
  outline-offset: 2px;
}

body.merch-page .merch-filters{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.merch-page .merch-filter{
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(24, 164, 255, 0.42);
  background: rgba(7, 10, 24, 0.30);
  color: rgba(245,247,255,0.92);
  cursor: pointer;
  font-family: "Montserrat", system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
  box-shadow: 0 0 12px rgba(24,164,255,0.10);
}

body.merch-page .merch-filter:hover{
  filter: brightness(1.20);
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(24,164,255,0.20);
}

body.merch-page .merch-filter.is-active{
  border-color: rgba(255, 46, 159, 0.70);
  outline: 1px solid rgba(24, 164, 255, 0.35);
  box-shadow: 0 0 16px rgba(255, 46, 159, 0.16), 0 0 22px rgba(24,164,255,0.18);
}

body.merch-page .merch-stage{
  position: absolute;
  left: 360px;
  top: 248px;
  width: 1200px;
  height: 720px;
  z-index: 2;
}

body.merch-page .merch-grid-wrap{
  height: 100%;
  border-radius: var(--merch-panel-radius);
  background: rgba(7, 10, 24, 0.30);
  border: 1px solid rgba(24, 164, 255, 0.22);
  outline: 1px solid rgba(255, 46, 159, 0.12);
  box-shadow: 0 18px 45px rgba(0,0,0,0.45);
  backdrop-filter: blur(7px);
  padding: 14px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(24,164,255,0.55) rgba(5,6,17,0.45);
}

body.merch-page .merch-grid-wrap::-webkit-scrollbar{
  width: 10px;
}

body.merch-page .merch-grid-wrap::-webkit-scrollbar-track{
  background: rgba(5,6,17,0.45);
  border-radius: 999px;
}

body.merch-page .merch-grid-wrap::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(24,164,255,0.75), rgba(255,46,159,0.55));
  border-radius: 999px;
}

body.merch-page .merch-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body.merch-page .merch-card{
  position: relative;
  border-radius: var(--merch-card-radius);
  border: 1px solid rgba(24, 164, 255, 0.20);
  background: rgba(5, 6, 17, 0.46);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(24,164,255,0.10);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
  text-align: left;
}

body.merch-page .merch-card:hover{
  transform: translateY(-2px);
  filter: brightness(1.12);
  box-shadow: 0 0 20px rgba(24,164,255,0.18), 0 0 20px rgba(255,46,159,0.10);
}

body.merch-page .merch-card__img{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  filter: saturate(1.08) contrast(1.02);
}

body.merch-page .merch-card__body{
  padding: 12px 12px 14px;
}

body.merch-page .merch-card__title{
  margin: 0 0 6px;
  font-family: "Bebas Neue", system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 18px;
}

body.merch-page .merch-card__meta{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(208,228,255,0.86);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.merch-page .merch-pill{
  display:inline-flex;
  align-items:center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 46, 159, 0.35);
  background: rgba(255, 46, 159, 0.10);
  color: rgba(245,247,255,0.92);
}

body.merch-page .merch-card__price{
  font-family: "Montserrat", system-ui, sans-serif;
  color: rgba(245,247,255,0.92);
}

body.merch-page #city-nav.skyline{
  position: absolute !important;
  left: 54px;
  right: 54px;
  bottom: 26px;
  z-index: 11;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap !important;
  justify-content: center;
  gap: 18px;
  overflow: visible !important;
  pointer-events: none;
}

body.merch-page #city-nav.skyline .building,
body.merch-page #city-nav.skyline .marquee{
  flex: 0 0 auto;
  white-space: nowrap;
}

body.merch-page #city-nav.skyline .marquee{
  pointer-events: auto;
  min-width: 150px;
  padding: 0.55rem 1.4rem;
}

body.merch-page #city-nav.skyline .marquee span{
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  text-rendering:optimizeLegibility;
  white-space:nowrap;
}

body.merch-page .merch-audio-toggle,
body.merch-page .merch-audio-toggle.audio-toggle{
  position: absolute;
  left: 22px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  z-index: 12;
}

body.merch-page .audio-toggle{
  position: absolute;
}

/* ===== Modal ===== */
body.merch-page .merch-modal{
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

body.merch-page .merch-modal.is-open{ display:flex; }

body.merch-page .merch-modal__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(6px);
}

body.merch-page .merch-modal__inner{
  position: relative;
  z-index: 2;
  width: min(980px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(24, 164, 255, 0.35);
  outline: 1px solid rgba(255, 46, 159, 0.16);
  background: rgba(7,10,24,0.55);
  box-shadow: 0 22px 60px rgba(0,0,0,0.75);
  overflow: hidden;
}

body.merch-page .merch-modal__close{
  position:absolute;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(24, 164, 255, 0.50);
  background: rgba(5, 6, 17, 0.55);
  color: #e8f4ff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(24, 164, 255, 0.25);
  z-index: 5;
  display: grid;
  place-items: center;
  line-height: 1;
  pointer-events: auto;
}

body.merch-page .merch-modal__content{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

body.merch-page .merch-modal__media{
  background: rgba(0,0,0,0.30);
  border-right: 1px solid rgba(24,164,255,0.18);
}

body.merch-page .merch-modal__media img{
  width: 100%;
  height: 100%;
  display:block;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

body.merch-page .merch-modal__info{
  padding: 18px 18px 20px;
}

body.merch-page .merch-modal__kicker{
  font-family: "Bebas Neue", system-ui, sans-serif;
  letter-spacing: 0.22em;
  color: rgba(208,228,255,0.90);
  opacity: 0.92;
  font-size: 14px;
}

body.merch-page .merch-modal__title{
  margin: 6px 0 10px;
  font-family: "Bebas Neue", system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 34px;
}

body.merch-page .merch-modal__desc{
  margin: 0 0 14px;
  color: rgba(245,247,255,0.86);
}

body.merch-page .merch-modal__meta{
  border-top: 1px solid rgba(24,164,255,0.18);
  border-bottom: 1px solid rgba(24,164,255,0.18);
  padding: 12px 0;
  margin: 12px 0 14px;
}

body.merch-page .merch-meta__row{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

body.merch-page .merch-meta__label{
  color: rgba(167,178,216,0.92);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

body.merch-page .merch-meta__value{
  color: rgba(245,247,255,0.92);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

body.merch-page .merch-modal__cta{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

body.merch-page .merch-cta{
  height: 44px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(24,164,255,1), rgba(255,46,159,1));
  color: #fff;
  font-family: "Bebas Neue", system-ui, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(24,164,255,0.26), 0 0 18px rgba(255,46,159,0.18);
}

body.merch-page .merch-cta:hover{ filter: brightness(1.10); transform: translateY(-1px); }

body.merch-page .merch-cta__note{
  font-size: 12px;
  color: rgba(167,178,216,0.92);
}

body.merch-page .sr-only{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}


@supports not (height: 100svh){
  :root{
    --merch-safe-vh: calc(100vh - var(--merch-safe-top) - var(--merch-safe-bottom));
  }
}
