/* --- Slider Layout --- */
.myCoursesSlider {
  padding: 20px 0;
}

.swiper-slide {
  display: flex;
  justify-content: center;
  height: auto;
}

/* --- Course Card --- */
.course-card {
  background: #fff;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  text-align: left;
  overflow: hidden;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
}

.course-card:hover {
  transform: translateY(-3px);
}

/* --- Thumbnail --- */
.course-thumb {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
}
.course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px 6px 0 0;
}

/* --- Discount Badge --- */
.discount-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ef4444;
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  font-weight: 600;
}

.course-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  padding: 0 10px;
  margin-bottom: 6px;

  display: -webkit-box;
  -webkit-line-clamp: 2; /* limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 44px; /* keep card height consistent */
  line-height: 1.3em; /* adjust line spacing */
}

/* --- Category, Title, and Text --- */
.course-category {
  font-size: 13px;
  color: #6b7280;
  margin: 10px 0 4px 0;
  padding: 0 10px;
  min-height: 20px;
}

/* --- Divider --- */
.course-divider {
  width: 90%;
  height: 1px;
  background-color: #e5e7eb;
  margin: 8px auto;
}

/* --- Rating --- */
.course-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  margin-bottom: 6px;
}
.course-rating .stars {
  color: #d1d5db;
  font-size: 14px;
  letter-spacing: 1px;
}
.course-rating .rating-value {
  font-size: 14px;
  color: #6b7280;
}

.course-price {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.old-price {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 14px;
}

.sale-price {
  color: #000000;
  font-size: 16px;
  font-weight: 600;
}

.course-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px 10px;
}

/* Smaller Swiper Navigation Buttons */
.swiper-button-next,
.swiper-button-prev {
  width: 24px;
  height: 24px;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 50%;
}

/* Position outside slider */
.swiper-button-next {
  right: -10px;
}

.swiper-button-prev {
  left: -10px;
}

/* Smaller arrows */
.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 18px !important;
  font-weight: bold;
}
