.merch {
  padding: 60px 0 30px;
  position: relative;
  z-index: 2;
}

.merch__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(18px, 2vw, 28px);
}

.merch__item { display: block; }

.merch__card {
  position: relative;            /* containing block for the taproom overlay */
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.merch__card:hover { transform: translateY(-6px); }
.merch__card:focus-visible { outline: 3px solid var(--p3); outline-offset: 4px; border-radius: 12px; }

/* Transparent stage — no card chrome. The glow does the heavy lifting. */
.merch__art {
  position: relative;
  aspect-ratio: 4 / 5;
  background: transparent;
  border: 0;
  overflow: visible;
}

/* Soft accent glow behind the merch art, sibling to the hero halo. */
.merch__glow {
  position: absolute;
  inset: 6%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 55%, var(--p3) 0%, transparent 62%);
  opacity: .55;
  filter: blur(34px);
  transition: background var(--fade) var(--ease), opacity .35s ease, transform .5s cubic-bezier(.2,.7,.2,1);
}
.merch__card:hover .merch__glow {
  opacity: .8;
  transform: scale(1.06);
}

.merch__img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  transition: opacity .4s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}
.merch__img--front { opacity: 1; }
.merch__img--back  { opacity: 0; transform: scale(1.04); }

.merch__card.has-back:hover .merch__img--front { opacity: 0; transform: scale(.98); }
.merch__card.has-back:hover .merch__img--back  { opacity: 1; transform: scale(1); }

/* Taproom-only items: no link. The "Exclusively available in the taproom!"
   message overlays only the name/price strip on hover so the artwork
   (and any front/back hover swap) stays visible. */
.merch__card--taproom-only { cursor: default; }

.merch__overlay {
  position: absolute;
  /* Cover the meta strip only (name + price). Sits at the bottom of the
   * card; doesn't touch the artwork above. */
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 12px;
  background: var(--p1);
  color: var(--on-p1);
  border-radius: 8px;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition:
    opacity .22s ease,
    transform .22s ease,
    background-color var(--fade) var(--ease);
}
.merch__overlay-text {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(13px, 1.2vw, 15px);
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: center;
}
.merch__card--taproom-only:hover .merch__overlay,
.merch__card--taproom-only:focus-visible .merch__overlay {
  opacity: 1;
  transform: translateY(0);
}

.merch__badge {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  background: var(--p1);
  color: var(--on-p1);
  font-family: var(--display);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  transition:
    background-color var(--fade) var(--ease),
    color var(--fade) var(--ease);
}

.merch__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 0 4px;
}
.merch__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(16px, 1.5vw, 19px);
  text-transform: uppercase;
  letter-spacing: -.005em;
  margin: 0;
  line-height: 1.1;
}
.merch__price {
  font-family: var(--display);
  font-weight: 800;
  /* Same size as the name so the meta line reads as one unit. */
  font-size: clamp(16px, 1.5vw, 19px);
  letter-spacing: -.005em;
  text-transform: uppercase;
  color: var(--p1);
  transition: color var(--fade) var(--ease);
  white-space: nowrap;
}
