/* 베스트 섹션 */
/* 베스트 공통 헤더 영역 */
.best-area {
  max-width: 1160px;
  margin: 0 auto;
  position: relative;
}

.best-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.best-title-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 46px;
}

.best-title-area {
  display: flex;
  flex-direction: column;
}

.best-title {
  margin: 0;
  display: flex;
  align-items: center;
}

.best-title-link {
  font-size: 24px;
  font-weight: 800;
  color: inherit;
  text-decoration: none;
  line-height: 32px;
}

.best-description {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* 베스트 강의 */
.best-courses {
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  background-color: #fff;
  box-sizing: border-box;
  opacity: 1;
  visibility: visible;
  min-height: 100px;
}

/* 상품 목록 */
.best-courses-container {
  position: relative;
}

.best-courses-item {
  width: 275px;
  margin-right: 20px;
  transition: transform 0.3s ease;
}

.best-courses-item-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.best-courses-thumb {
  position: relative;
  width: 100%;
  height: 179px;
  overflow: hidden;
}

.best-courses-thumb img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* 강의 정보 영역 */
.best-courses-content {
  padding: 10px 0 0;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.best-courses-title {
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
}

.best-courses-item:hover .best-courses-title {
  color: #01a28a;
}

.best-courses-item:hover .best-courses-thumb {
  filter: brightness(0.8);
}

.best-courses-meta {
  font-size: 12px;
  color: #8f8f8f;
  line-height: 2em;
}

.separator {
  margin: 0 4px;
  color: #c2c2c2;
}

/* 가격 */
.best-courses-price {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  align-items: center;
}

.best-courses-original-price {
  color: #5c5c5c;
  text-decoration: line-through;
  font-size: 12px;
  font-weight: 700;
}

.best-courses-final-price {
  color: #01a28a;
  font-size: 14px;
  font-weight: 800;
}

.best-courses-free {
  color: #01a28a;
  font-size: 14px;
  font-weight: 800;
  margin-left: -1px;
}
.price-arrow {
  font-size: 14px;
  color: #c2c2c2;
}

.best-courses-container .lSAction > a {
  top: 20%;
}

/* // 베스트 강의 끝 */

/* 베스트셀러 */
.best-books {
  width: 1160px;
  margin: 0 auto;
  background-color: #fff;
  box-sizing: border-box;
  position: relative;
  opacity: 1;
  visibility: visible;
  min-height: 100px;
}

.best-books-container {
  position: relative;
  margin: 0 auto;
  min-height: 250px;
}

.best-books-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.best-books-item {
  width: 216px;
}

.book-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.book-image-wrapper {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  width: 100%;
}

.book-thumb {
  width: 100%;
  height:276px; 
  object-fit: fill;
  border-radius: 8px;
}

.book-thumb:hover {
  filter: brightness(0.8);
}

/* 책 정보 */
.book-info {
  display: flex;
  flex-direction: column;
}

.book-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
}

.book-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

/* 이미지나 제목 hover 시 제목 색상 변경 */
.book-title a:hover,
.book-image-wrapper:hover + .book-info .book-title a {
  color: #01a28a;
}

.book-author {
  font-size: 12px;
  font-weight: 700;
  color: #8f8f8f;
  margin: 4px 0 0 0;
}

/* lightSlider 네비게이션 버튼 위치 조정 */
.best-books-container .lSAction > a {
  top: 24%;
}
/* // 베스트셀러 끝 */

/* 순위 아이콘 스타일 추가 */
.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 30px;
  background-color: black;
  color: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  z-index: 1;
}

/* 스위치 버튼 */
.best-right-area {
  display: flex;
  align-items: center;
}

.best-switch {
  position: relative;
  display: inline-flex;
  border: 1px solid #C2C2C2;
  border-radius: 30px;
  padding: 0;
  min-width: 88px;
  height: 32px;
}

.best-switch::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 56%;
  height: 100%;
  background: #434343;
  border-radius: 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.best-switch .switch-btn {
  position: relative;
  z-index: 1;
  flex: 1;
  height: 100%;
  padding: 0 12px;
  border: none;
  background: none;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.best-switch .switch-btn.active {
  color: #fff;
}

/* 책 선택시 슬라이더 이동 */
.best-switch[data-active="books"]::after {
  transform: translateX(88%);
}

/* 스위치 버튼 활성시 책 슬라이더 높이 조정 */
.best-books .lSSlideWrapper {
    min-height: 400px;
}

