/* STORE (top menu > STORE): a grid of store squares that animate in. Each square links to a store. */
.st-page {
  position: fixed;
  z-index: 16;
  top: 110px;
  right: 26px;
  bottom: 76px;
  left: 26px;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.st-page.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.st-inner {
  box-sizing: border-box;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 22px 28px;
  background: linear-gradient(rgba(8, 8, 10, 0.94), rgba(8, 8, 10, 0.94)), url("assets/images/member-medallions.jpg") center / cover no-repeat;
  border: 1px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  font-family: Arial, sans-serif;
  color: #f0e6c8;
}

.st-kicker {
  font-family: "Cinzel", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: #5fc8ff;
  margin-bottom: 18px;
  text-align: center;
}

/* Squares fill the full width of the page (the page keeps its side padding) */
.st-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

/* The wrapper animates in on load; the tile underneath handles hover */
.st-cell {
  min-width: 0;
  opacity: 0;
}

.st-grid.is-entering .st-cell {
  animation: stIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes stIn {
  from { opacity: 0; transform: translateY(24px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.st-tile {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: #0b0d14;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.st-img {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat #111a2e;
  transition: transform 0.8s ease, filter 0.5s ease;
}

.st-tile.is-plain .st-img {
  background: radial-gradient(circle at 50% 40%, rgba(60, 120, 220, 0.35), transparent 65%), #0b0d14;
}

.st-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 6, 12, 0.92) 0%, rgba(4, 6, 12, 0.35) 55%, rgba(4, 6, 12, 0.1) 100%);
}

.st-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  transition: transform 0.45s ease;
}

.st-text h3 {
  margin: 0 0 4px;
  font-family: "Cinzel", Arial, sans-serif;
  font-size: 17px;
  letter-spacing: 0.12em;
  color: #fff3cc;
  text-shadow: 0 2px 8px #000;
}

.st-text p {
  margin: 0 0 10px;
  font-size: 13px;
  color: #d6e4ff;
  opacity: 0.85;
}

.st-cta {
  display: inline-block;
  font-family: "Cinzel", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #7fd6ff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease 0.05s, transform 0.35s ease 0.05s;
}

/* Hover: the square lifts, glows, the image zooms, the label rises and a light sweep crosses it */
.st-tile:hover,
.st-tile:focus-visible {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.6), 0 0 22px rgba(95, 200, 255, 0.45);
  border-color: #f3d77a;
  outline: none;
}

.st-tile:hover .st-img,
.st-tile:focus-visible .st-img {
  transform: scale(1.1);
  filter: brightness(1.12) saturate(1.1);
}

.st-tile:hover .st-text,
.st-tile:focus-visible .st-text {
  transform: translateY(-6px);
}

.st-tile:hover .st-cta,
.st-tile:focus-visible .st-cta {
  opacity: 1;
  transform: translateY(0);
}

.st-tile::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 240, 190, 0.35), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.st-tile:hover::after {
  animation: stShine 0.9s ease;
}

@keyframes stShine {
  from { left: -75%; }
  to   { left: 125%; }
}

/* Squares with no link yet: dimmed, no lift */
.st-tile.is-empty {
  cursor: default;
  opacity: 0.55;
  filter: grayscale(0.6);
}

.st-tile.is-empty:hover {
  transform: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  border-color: rgba(212, 175, 55, 0.45);
}

.st-tile.is-empty:hover .st-img {
  transform: none;
  filter: none;
}

/* Veil Merch panel: opens from the merch square and holds the Shopify product grid */
.mp-page {
  position: fixed;
  z-index: 17;
  top: 110px;
  right: 26px;
  bottom: 76px;
  left: 26px;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.mp-page.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.mp-inner {
  box-sizing: border-box;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 22px 28px;
  background: linear-gradient(rgba(8, 8, 10, 0.94), rgba(8, 8, 10, 0.94)), url("assets/images/member-medallions.jpg") center / cover no-repeat;
  border: 1px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  font-family: Arial, sans-serif;
  color: #f0e6c8;
}

.mp-inner::-webkit-scrollbar { display: none; }

.mp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.mp-title {
  margin: 0;
  font-family: "Cinzel", Arial, sans-serif;
  font-size: 18px;
  letter-spacing: 0.14em;
  color: #fff3cc;
}

.mp-back {
  font-family: "Cinzel", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #f7e7b4;
  background: linear-gradient(180deg, #1d2a44, #0c1322);
  border: 1px solid #c9a24a;
  padding: 7px 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mp-back:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(255, 210, 110, 0.55);
}

.mp-loading {
  font-size: 14px;
  color: #c9d6ea;
  text-align: center;
}

/* Shopify product grid sits on the page, left-aligned with the title */
.mp-grid { min-height: 200px; }

/* Brighter, easier-to-read product text and option labels inside the Shopify grid */
#merchGrid .shopify-buy__product-title,
#merchGrid .shopify-buy__product-title a { color: #fff3cc !important; opacity: 1 !important; }
#merchGrid .shopify-buy__product-price { color: #f3d77a !important; opacity: 1 !important; }
#merchGrid .shopify-buy__option-select-label,
#merchGrid label { color: #f0e6c8 !important; opacity: 1 !important; }
#merchGrid .shopify-buy__product-img-wrapper,
#merchGrid .shopify-buy__product-img { max-height: 200px; }

/* Hide the scrollbar on the store box (the squares still scroll if there are more of them) */
.st-inner::-webkit-scrollbar {
  display: none;
}

/* Narrower screens: four squares per row */
@media (max-width: 1400px) {
  .st-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .st-grid.is-entering .st-cell { animation: none; opacity: 1; }
  .st-tile:hover::after { animation: none; }
}
