/* start:::滚动组件 */
.section-scroll-wrap {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}

.section-scroll-content {
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}

.section-scroll-content::-webkit-scrollbar {
  display: none;
}

.section-scroll-list {
  display: flex;
  list-style: none;
  margin: 0;
  justify-content: space-between;
  padding: 0 32px;
}

.section-scroll__item {
  flex-shrink: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

@media screen and (min-width: 825px) {
  .section-scroll__item:hover {
    transform: scale(1.05);
  }

  /* 桌面端：用“每页数量”平分容器宽度，而不是用 vw，保证宽屏不会太空且整体居中 */
  .section-scroll-list[data-items-per-page="8"] .section-scroll__item {
    flex: 0 0 calc((100% - 7 * 18px) / 8); /* 8 个小卡，7 个 gap */
    max-width: 160px;
    aspect-ratio: 1;
  }

  .section-scroll-list[data-items-per-page="6"] .section-scroll__item {
    flex: 0 0 calc((100% - 5 * 18px) / 6); /* 6 个大卡，5 个 gap */
    max-width: 230px;
    aspect-ratio: 1;
  }

  .section-scroll-list[data-items-per-page="6"] .section-scroll__item--large .item-cover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 55%;
    pointer-events: none;

    background: rgba(0, 0, 0, 0.06);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);

    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 90%);
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 90%);
  }
}


.section-scroll__item--small .item-cover {
  width: 100%;
  height: 100%;
}

.section-scroll__item--small .item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-scroll__item--large {
  /* 桌面端尺寸由 data-items-per-page 控制，这里不再使用 vw */
}

.section-scroll__item--large .item-cover {
  width: 100%;
  height: 100%;
  position: relative;
}

.section-scroll__item--large .item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-scroll__item .item-tag {
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translateX(-50%);
  background: #FFFFFF;
  color: #000;
  font-family: 'PingFang SC', 'SF Pro Display', -apple-system, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 22px;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 3;
}

.section-scroll-btn {
  position: static;
  transform: none;
  width: 40px;
  height: 40px;
  background: #323232;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.section-scroll-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.section-scroll-btn.next img {
  transform: rotate(180deg);
}

.section-scroll-btn:hover {
  opacity: 0.8;
}

.section-scroll-btn.prev {
}

.section-scroll-btn.next {
}

@media screen and (max-width: 824px) {
  .section-scroll-wrap {
    padding: 12px 0px;
    overflow: hidden;
    margin-bottom: 0 !important;
  }

  .section-scroll-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding: 0;
  }

  .section-scroll__item--small{
    width: 56px;
    height: 56px;
    border-radius: 0 !important;
  }

  .section-scroll-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, auto);
    grid-auto-rows: 0;
    grid-auto-flow: row;
    gap: 7px;
    padding: 8px 0;
  }

  .section-scroll__item:not(.section-scroll__item--small):not(.section-scroll__item--large) {
    width: 100%;
    aspect-ratio: 1;
    height: auto;
  }

  .section-scroll-btn {
    display: none;
  }

  .section-scroll__item--small {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    height: auto;
    background: transparent;
  }

  .section-scroll__item--small .item-cover {
    width: 56px;
    height: 56px;
    border-radius: 12px;
  }

  .section-scroll__item--small .item-cover img {
    width: 100%;
    height: 100%;
  }

  .section-scroll__item-title {
    display: block;
    margin-top: 6px;
    width: 56px;
    font-family: 'PingFang SC', 'SF Pro Display', -apple-system, sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 12px;
    line-height: 18px;
    letter-spacing: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .section-scroll__item--large {
    width: 82px;
    height: 82px;
  }

  .section-scroll__item--large .item-cover {
    width: 82px;
    height: 82px;
  }

  .section-scroll__item--large .item-cover img {
    width: 82px;
    height: 82px;
  }

  .section-scroll__item--large .item-tag {
    top: 70%;
    font-size: 11px;
    line-height: 14px;
    padding: 2px 4px;
    border-radius: 2px;
  }

  .section-scroll-list--grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 8px 0;
    width: 100%;
  }

  .section-scroll-list--grid .section-scroll__item--large {
    width: 100%;
    aspect-ratio: 1;
    height: auto;
  }

  .section-scroll-list--grid .section-scroll__item--large .item-cover {
    width: 100%;
    height: 100%;
  }

  .section-scroll-list--grid .section-scroll__item--large .item-cover img {
    width: 100%;
    height: 100%;
  }
}
/* end:::滚动组件 */

