

.merchPage {
  padding: .4rem 0 1.2rem;
  background: url(../images/merch-bg.jpg) center top;
  background-size: 100% auto;
}


.merchTitle {
  margin-top: .42rem;
  text-align: center;
}

.merchTitle h1 {
  color: #fff;
  font-size: .58rem;
  font-weight: 700;
  line-height: 1;
}

.merchTitle p {
  margin-top: .15rem;
  color: rgba(255, 255, 255, .72);
  font-size: .14rem;
  line-height: .21rem;
}

.merchTabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 2rem);
  justify-content: center;
  width: 16rem;
  height: 1.26rem;
  margin: .58rem auto 0;
  border-top: .01rem solid rgba(255, 255, 255, .22);
}

.merchTab {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: .24rem;
  background: transparent;
}

.merchTab::before {
  position: absolute;
  top: -.02rem;
  left: 0;
  width: 100%;
  height: .01rem;
  background: rgba(255, 255, 255, .28);
  content: '';
}

.merchTab.active::before {
  height: .02rem;
  background: var(--yellow);
}

.merchTabIcon {
  display: grid;
  width: .6rem;
  height: .6rem;
  place-items: center;
}

.merchTabIcon img {
  display: block;
  width: .6rem;
  height: .6rem;
  object-fit: contain;
  transition: filter .2s ease, opacity .2s ease;
}

.merchTabIconHat img {
  width: .48rem;
  height: .33rem;
  margin-top: .14rem;
}

.merchTab:not(.active) .merchTabIcon img {
  filter: grayscale(1) brightness(0) invert(1);
}

.merchTab b {
  margin-top: .12rem;
  color: #fff;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  font-size: clamp(12px, .2rem, 20px);
}

.merchTab.active b,
.merchTab:hover b {
  color: var(--yellow);
}

.merchTab:hover .merchTabIcon img {
  filter: none;
}

.merchSearch {
  display: grid;
  grid-template-columns: 9.45rem 1.6rem;
  justify-content: center;
  gap: .27rem;
  width: 16rem;
  height: 1.43rem;
  margin: .35rem auto 0;
  padding-top: .41rem;
  border-radius: .12rem;
  background: #101010;
}

.merchSearch label {
  display: block;
}

.merchSearch label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.merchSearch input {
  width: 100%;
  height: .6rem;
  padding: 0 .19rem;
  border: .01rem solid #585858;
  border-radius: .04rem;
  background: #262525;
  color: #fff;
  font-size: clamp(14px, .16rem, 16px);
}

.merchSearch input::placeholder {
  color: #fff;
  opacity: 1;
}

.merchSearch input:focus {
  border-color: var(--yellow);
}

.merchSearch button {
  height: .6rem;
  border-radius: .04rem;
  background: var(--yellow);
  color: #111;
  font-weight: 700;
  transition: background .25s ease;
  font-size: clamp(14px, .18rem, 18px);
}

.merchSearch button img {
  width: .2rem;
  height: .2rem;
  margin-right: .08rem;
  vertical-align: -.03rem;
  filter: brightness(0);
}

.merchSearch button:hover {
  background: #fff;
}

.merchGrid {
  display: grid;
  grid-template-columns: repeat(4, 3.7rem);
  justify-content: space-between;
  gap: .38rem 0;
  width: 16rem;
  margin: .66rem auto 0;
}

.merchCard {
  position: relative;
  width: 3.7rem;
  height: 5.08rem;
  padding: .11rem .12rem 0;
  border-radius: .08rem;
  background: #000;
}

/* 收藏心形图标：与产品列表卡片保持一致，位于标题行右侧 */
.merchCard .productFavorite {
  float: right;
  width: .3rem;
  height: .3rem;
  margin-top: .26rem;
  margin-right: .04rem;
  border: .01rem solid #fff;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.merchCard .productFavorite img {
  width: 100%;
  height: 100%;
  filter: brightness(0) invert(1);
}

.merchCard .productFavorite.active img,
.merchCard .productFavorite.is-favorite img {
  filter: none;
}

.merchCard .productFavorite.is-favorite {
  border-color: var(--yellow);
  background: var(--yellow);
}

.merchImage {
  display: grid;
  width: 3.45rem;
  height: 3.45rem;
  place-items: center;
  overflow: hidden;
  border-radius: .08rem;
  background: #404040;
}

.merchImage img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  transition: transform .3s ease;
}

.merchCard:hover .merchImage img {
  transform: scale(1.04);
}

.merchCard h2 {
  height: auto;
  margin-top: .26rem;
  padding-left: .13rem;
  overflow: hidden;
  color: #fff;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: clamp(16px, .2rem, 20px);
}

.merchCard p {
  margin-top: .1rem;
  padding-left: .13rem;
  color: rgba(255, 255, 255, .8);
  line-height: 1.5;
  text-transform: uppercase;
  font-size: clamp(14px, .18rem, 18px);
}

.merchCard strong {
  display: block;
  margin-top: .1rem;
  padding-left: .13rem;
  color: #ff2d2d;
  font-weight: 700;
  line-height: 1.5;
  font-size: clamp(18px, .2rem, 20px);
}

.merchEmpty {
  display: none;
  width: 16rem;
  margin: .66rem auto 0;
  padding: .5rem .2rem;
  border-radius: .08rem;
  background: #101010;
  color: rgba(255, 255, 255, .76);
  font-size: .2rem;
  text-align: center;
}







@media (max-width: 1200px) {
  .merchHeroStage {
    transform: translateX(-50%) scale(.82);
    transform-origin: top center;
  }

  .merchTabs,
  .merchSearch,
  .merchGrid,
  .merchEmpty {
    width: 100%;
  }

  .merchGrid {
    grid-template-columns: repeat(3, 3.7rem);
    justify-content: center;
    gap: .3rem;
  }
}

@media (max-width: 768px) {
  .merchHero {
    height: 5.7rem;
  }

  .merchHeroStage {
    top: 1.46rem;
    transform: translateX(-50%) scale(.68);
  }

  .merchHeroArrow {
    top: 3.65rem;
  }

  .merchHeroPrev {
    left: .2rem;
  }

  .merchHeroNext {
    right: .2rem;
  }

  .merchHeroPager {
    top: 5.34rem;
  }

  .merchPage {
    padding-top: .36rem;
  }

  .merchTitle h1 {
    font-size: .42rem;
  }

  .merchTabs {
    grid-template-columns: repeat(4, 1fr);
    height: auto;
    row-gap: .2rem;
  }

  .merchTab {
    padding-top: .16rem;
  }

  .merchSearch {
    grid-template-columns: 1fr;
    height: auto;
    gap: .15rem;
    padding: .2rem;
  }

  .merchGrid {
    grid-template-columns: repeat(2, 1fr);
    gap: .16rem;
    margin-top: .4rem;
  }

  .merchCard {
    width: 100%;
    height: auto;
    padding: .1rem .1rem 0.3rem;
  }

  .merchImage {
    width: 100%;
    height: auto;
    aspect-ratio: 7 / 6;
  }

  .merchCard h2 {
    margin-top: .16rem;
    padding-left: .06rem;
  }

  .merchCard p,
  .merchCard strong {
    padding-left: .06rem;
  }

  .merchCard .productFavorite {
    margin-top: .16rem;
    margin-right: .02rem;
  }


}

@media (max-width: 480px) {
  .merchGrid {
    grid-template-columns: 1fr;
  }
}
