/* Offline fixes for mirrored kalasy (yun300) site.
 *
 * Focus: "色彩体验" category bar (portalResProduct_category) should look like
 * a horizontal row of grey buttons with prev/next arrows, even if Swiper assets
 * fail to load.
 */

/* Generic container */
.c_portalResProduct_category-01001 .proCateDemo {
  position: relative;
  max-width: 1200px;
  margin: 24px auto 10px;
  padding: 0 56px; /* space for arrows */
  box-sizing: border-box;
}

/* Horizontal scroller */
.c_portalResProduct_category-01001 .wyz-cate-container {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}
.c_portalResProduct_category-01001 .wyz-cate-container::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Slides row */
.c_portalResProduct_category-01001 .wyz-cate-container .swiper-wrapper {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 14px;
  padding: 0;
  margin: 0;
}

/* Each slide */
.c_portalResProduct_category-01001 .wyz-cate-container .swiper-slide {
  flex: 0 0 calc((100% - 50px) / 6);
  min-width: 0; /* allow true 6-up layout */
  box-sizing: border-box;
  background: transparent !important; /* override template "active" backgrounds */
}

.c_portalResProduct_category-01001 .wyz-cate-container .swiper-slide .title {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 62px;
  padding: 0 12px;
  width: 100%;
  background: #6a6a6a !important;
  color: #ffffff;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.2px;
  border-radius: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c_portalResProduct_category-01001 .wyz-cate-container .swiper-slide.active .title,
.c_portalResProduct_category-01001 .wyz-cate-container .swiper-slide .title.active {
  background: #6a6a6a !important; /* match original: no blue active tab */
}

/* Arrow buttons */
.c_portalResProduct_category-01001 .swiper-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  background: transparent;
}
.c_portalResProduct_category-01001 .swiper-button.btn-prev {
  left: 0;
}
.c_portalResProduct_category-01001 .swiper-button.btn-next {
  right: 0;
}
/* Don't rely on iconfont being available offline; draw chevrons via CSS. */
.c_portalResProduct_category-01001 .swiper-button i {
  display: none;
}
.c_portalResProduct_category-01001 .swiper-button::before {
  content: "";
  width: 18px;
  height: 18px;
  border-top: 4px solid #6a6a6a;
  border-right: 4px solid #6a6a6a;
  transform: rotate(45deg); /* next */
  box-sizing: border-box;
}
.c_portalResProduct_category-01001 .swiper-button.btn-prev::before {
  transform: rotate(-135deg);
}
.c_portalResProduct_category-01001 .swiper-button.button-disabled {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1200px) {
  .c_portalResProduct_category-01001 .wyz-cate-container .swiper-slide {
    flex: 0 0 calc((100% - 30px) / 4);
  }
}

@media (max-width: 768px) {
  .c_portalResProduct_category-01001 .proCateDemo {
    padding: 0 44px;
  }
  .c_portalResProduct_category-01001 .wyz-cate-container .swiper-slide {
    flex: 0 0 calc((100% - 10px) / 2);
  }
  .c_portalResProduct_category-01001 .wyz-cate-container .swiper-slide .title {
    height: 54px;
    font-size: 16px;
  }
  .c_portalResProduct_category-01001 .swiper-button {
    width: 36px;
    height: 54px;
  }
  .c_portalResProduct_category-01001 .swiper-button::before {
    width: 16px;
    height: 16px;
    border-top-width: 3px;
    border-right-width: 3px;
  }
}

/* Make PhotoList_k1 cards feel clickable when upstream used lightGallery (href="javascript:;"). */
.PhotoList_k1 li[data-src] {
  cursor: pointer;
}
