.category-circles {
  /* background-color: rgba(0 , 0, 0, 0.1); */
  
  overflow: visible;
  padding: 0px 0;
  padding-bottom: 36px;
}

.category-circles__container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow: visible;
}

.category-circles__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-circles__toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.category-circles__toggle-btn .icon {
  width: 16px;
  height: 16px;
  color: rgb(var(--color-primary-button-background));
}

.category-circles__toggle-btn--expanded {
  transform: rotate(180deg);
}

.category-circles__title {
  margin: 0;
  font-size: var(--title3-font-size);
  font-weight: 600;
  color: rgb(var(--color-primary-button-background));
}

.category-circles__list-wrapper {
  display: flex;
  align-items: center;
  gap: 0;
  overflow: visible;
  /* padding-top: 8px;
  padding-bottom: 8px; */
}
.category-circles__item {
  transform: translateY(-4px);
}
.category-circles__item:hover {
  margin-top: -4px;
  /* transform: translateY(-4px); */
}
.category-circles__item-inner {
  border-radius: 50%;
  border: 2px solid transparent;
}
.category-circles__item:hover  .category-circles__item-inner{
  /* margin-top: -4px; */
  border-color: #C68635;
  /* transform: translateY(-4px); */
}


.category-circles__item:hover .category-circles__image-wrapper,
.category-circles__item.active .category-circles__image-wrapper {
  border-color: #fff;

}
.category-circles__item:hover .category-circles__name {
  font-weight: bold;
}

.category-circles__list {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-padding-left: 0;
  scroll-padding-right: 0;
  flex: 1;
  min-width: 0;
  margin-left: 20px;
  margin-right: 20px;
}

.category-circles__list::-webkit-scrollbar {
  display: none;
}

.category-circles__list .category-circles__item {
  scroll-snap-align: start;
  flex-shrink: 0;

}
@media (max-width: 959px) {
  .category-circles {
    padding-bottom: 6px;
  }
  .category-circles__toggle-btn--mobile {
    display: none !important;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }

  .category-circles__list-wrapper {
    flex-direction: column;
    gap: 0;
    position: relative;
    overflow: hidden;
  }

  .category-circles__list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0px;
    overflow-x: visible;
    overflow-y: visible;
    margin-left: 0;
    margin-right: 0;
    justify-items: center;
  }

  .category-circles__list .category-circles__item {
    scroll-snap-align: unset;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: fit-content;
  }

  .category-circles__nav-btn {
    display: none !important;
  }
}

.category-circles__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
  padding-top: 8px;
  width: 100%;
  max-width: fit-content;
}

.category-circles__image-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
}

.category-circles__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 0;
}

.category-circles__image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(var(--color-text), 0.08) 0%,
    rgba(var(--color-text), 0.15) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--color-text));
  position: relative;
  transition: all 0.2s ease;
  z-index: 0;
}

/* hover 时在 image-wrapper 上添加白灰色蒙层（适用于真实图片和 placeholder） */
.category-circles__item:hover .category-circles__image-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

/* 确保 placeholder 内的内容在蒙层之上 */
.category-circles__image-placeholder > * {
  position: relative;
  z-index: 2;
}

.category-circles__name {
  font-size: var(--body3-font-size);
  font-weight: 500;
  color: rgb(var(--color-text));
  text-align: center;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 导航按钮样式 - 棕色方形，46x46，白色箭头 */
.category-circles__nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 0;
  cursor: pointer;
  background-color: #fff;
  transition: all 0.2s ease;
  flex-shrink: 0;
  color: #666;
  margin-bottom: 38px;
  border-radius: 8px;
}

.category-circles__nav-btn:hover {
  background-color: #B8772A;
  color: #fff;
  transform: scale(1.05);
  
}
.category-circles__nav-btn:hover .icon {
  color: #fff;
}


.category-circles__nav-btn .icon {
  width: 20px;
  height: 20px;
  color: #666;
  transition: color 0.2s ease;
}


 @media (max-width: 959px) {
  .category-circles__image-wrapper {
    width: 74px;
    height: 74px;
    margin: 0 auto;
  }

  .category-circles__name {
    font-size: var(--body4-font-size);
    max-width: 100px;
    white-space: normal;
    overflow: visible;
    word-wrap: break-word;
    line-height: 1.4;
    text-align: center;
    margin: 0 auto;
  }

  .category-circles__container {
    gap: 20px;
  }

  .category-circles__nav-btn {
    width: 36px;
    height: 36px;
  }

  .category-circles__nav-btn .icon {
    width: 16px;
    height: 16px;
  }
 .category-circles__item {
    gap: 6px;
  }
}
