/* 金币商城 /activity/mall
   PC 帧 39432:61087 / H5 帧 39310:136158 */

.page-main.activity-mall {
  padding: 30px 0;
  font-family: PingFang SC, sans-serif;
}

/* 卡片区块统一放壳内:layout-section 的左右 padding 才能落在卡片外侧,
   否则 hero/balance 的背景直接画在 layout-section 上会贴视口边缘 */
.activity-mall__shell {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* ---------- 面包屑 ---------- */

.activity-mall__breadcrumb {
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.activity-mall__breadcrumb a {
  color: var(--text-primary);
  transition: color 0.2s;
}

.activity-mall__breadcrumb a:hover {
  color: var(--text-secondary);
}

.activity-mall__breadcrumb-sep {
  margin: 0 4px;
}

.activity-mall__breadcrumb-current {
  color: var(--text-secondary);
}

/* ---------- 我的金币横幅 ---------- */

.activity-mall-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 16px;
  border: 1px solid #fce3ad;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #fdf6de 100%);
}

.activity-mall-balance__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.activity-mall-balance__title {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
  font-weight: 500;
  color: var(--text-primary);
}

.activity-mall-balance__em,
.activity-mall-card__em {
  font-style: normal;
  color: #ff2d55;
}

.activity-mall-balance__note {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary);
}

.activity-mall-balance__coin {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 62px;
}

.activity-mall-balance__coin img {
  display: block;
  width: 100%;
  height: 100%;
}

.activity-mall-balance__coin::after {
  content: "";
  position: absolute;
  left: 13px;
  bottom: -3px;
  width: 39px;
  height: 3px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0) 100%);
  filter: blur(1px);
}

/* ---------- 兑换商品网格 ---------- */

.activity-mall-goods {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.activity-mall-card {
  position: relative;
  transition: transform 0.2s;
}

.activity-mall-card:hover {
  transform: translateY(-2px);
}

.activity-mall-card__body {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.05);
  /* 由上到下:顶部白色高光 / 顶部紫 / 左下长春花蓝 / 底部浅蓝光斑 / 主体粉 / 白底 */
  background:
    radial-gradient(110% 70% at 50% -10%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, rgba(205, 118, 252, 0.95) 0%, rgba(205, 118, 252, 0) 60%),
    linear-gradient(67deg, rgba(161, 162, 252, 0.9) 1%, rgba(161, 162, 252, 0) 60%),
    radial-gradient(34% 28% at 57% 103%, rgba(175, 232, 252, 1) 40%, rgba(175, 232, 252, 0) 100%),
    linear-gradient(293deg, #fc7faa 70%, rgba(252, 127, 170, 0) 100%),
    #fff;
  transition: box-shadow 0.2s;
}

.activity-mall-card:hover .activity-mall-card__body {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.activity-mall-card__decor {
  position: absolute;
  width: 124px;
  height: 124px;
  filter: blur(3px);
  pointer-events: none;
}

.activity-mall-card__decor--left {
  left: -23px;
  top: -44px;
  transform: scaleY(-1) rotate(-23deg);
}

.activity-mall-card__decor--right {
  left: 52px;
  top: -19px;
  transform: rotate(9.6deg);
}

.activity-mall-card__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 168px;
}

.activity-mall-card__icon {
  position: relative;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
}

.activity-mall-card__icon--clip {
  overflow: hidden;
}

.activity-mall-card__icon-img {
  position: absolute;
  display: block;
}

/* 观影券:两张叠加票(合成图含出血),外框 80 内叶 102x98 */
.activity-mall-card__icon-img--film {
  width: 102px;
  height: 98px;
  left: -7px;
  top: -9px;
}

.activity-mall-card__icon-img--draw,
.activity-mall-card__icon-img--jd {
  width: 80px;
  height: 80px;
  left: 0;
  top: 0;
}

.activity-mall-card__icon-img--vip {
  width: 93px;
  height: 67px;
  left: -7px;
  top: 8px;
  filter: drop-shadow(0 0 13px rgba(76, 63, 237, 0.5));
}

.activity-mall-card__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.activity-mall-card__name {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

.activity-mall-card__desc {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-neutral-600);
  white-space: nowrap;
}

.activity-mall-card__btn {
  width: 100%;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: var(--color-primary-500);
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-primary);
  cursor: pointer;
  transition: filter 0.2s;
}

.activity-mall-card__btn:hover {
  filter: brightness(0.95);
}

.activity-mall-card__btn--disabled,
.activity-mall-card__btn--disabled:hover {
  background: rgba(0, 0, 0, 0.22);
  color: var(--text-secondary);
  cursor: default;
  filter: none;
}

.activity-mall-card__badge {
  position: absolute;
  top: -5px;
  right: 0;
  z-index: 1;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 18px;
  color: #fff;
  white-space: nowrap;
}

.activity-mall-card__badge--hot {
  background: #ff2d55;
}

.activity-mall-card__badge--sold {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* ---------- 已售罄卡:整卡不可交互 ---------- */

.activity-mall-card--sold,
.activity-mall-card--sold:hover {
  transform: none;
  cursor: default;
}

.activity-mall-card--sold:hover .activity-mall-card__body {
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.05);
}

/* ---------- 兑换确认弹窗 ---------- */

body.activity-mall-layer-open {
  overflow: hidden;
}

.activity-mall__layer {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.activity-mall__layer--open {
  display: flex;
}

.activity-mall__layer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.activity-mall__layer-panel {
  position: relative;
  z-index: 1;
  width: 360px;
  max-width: calc(100vw - 32px);
  padding: 28px 24px 24px;
  border-radius: 20px;
  border: 1px solid var(--color-black-alpha-20);
  background: var(--surface-foreground);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.activity-mall__layer-title {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.activity-mall__layer-desc {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
  color: var(--text-secondary);
  text-align: center;
}

.activity-mall__layer-em {
  font-style: normal;
  font-weight: 600;
  color: #ff2d55;
}

.activity-mall__layer-goods {
  font-weight: 500;
  color: var(--text-primary);
}

.activity-mall__layer-actions {
  width: 100%;
  margin-top: 8px;
  display: flex;
  gap: 12px;
}

.activity-mall__layer-btn {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  line-height: 22px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.activity-mall__layer-btn:hover {
  opacity: 0.9;
}

.activity-mall__layer-btn--cancel {
  background: var(--color-neutral-200);
  color: var(--text-primary);
}

.activity-mall__layer-btn--confirm {
  background: var(--color-primary-500);
  color: rgba(0, 0, 0, 0.9);
  font-weight: 500;
}

/* ---------- 中间宽度:商品 3 列 ---------- */

@media (min-width: 769px) and (max-width: 1100px) {
  .activity-mall-goods {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- H5 ---------- */

@media (max-width: 768px) {
  .page-main.activity-mall {
    padding: 12px 0 32px;
  }

  .activity-mall__shell {
    gap: 18px;
  }

  .activity-mall__breadcrumb {
    font-size: 12px;
    line-height: 18px;
    font-weight: 400;
  }

  .activity-mall-balance {
    gap: 12px;
    padding: 12px;
  }

  .activity-mall-balance__info {
    gap: 2px;
  }

  .activity-mall-balance__title {
    font-size: 14px;
    line-height: 20px;
  }

  .activity-mall-balance__note {
    font-size: 12px;
    line-height: 18px;
  }

  .activity-mall-balance__coin {
    width: 56px;
    height: 44px;
  }

  .activity-mall-balance__coin img {
    position: absolute;
    width: 62px;
    height: 60px;
    left: -1px;
    top: -8px;
  }

  .activity-mall-balance__coin::after {
    left: 15px;
    bottom: -2px;
    width: 27px;
    height: 2px;
  }

  .activity-mall-goods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 10px;
  }

  .activity-mall-card__body {
    padding: 8px;
  }

  .activity-mall-card__content {
    height: auto;
    padding: 4px 0;
  }

  .activity-mall-card__name {
    font-size: 14px;
    line-height: 20px;
  }

  .activity-mall-card__desc {
    font-size: 12px;
    line-height: 18px;
  }

  .activity-mall-card__badge {
    font-size: 10px;
    line-height: 16px;
  }
}
