.xcodee-sub-categories-slider {
  width: 100%;
  position: relative;
}

.xcodee-sub-category-item {
  height: 100%;
  display: flex;
  align-items: stretch;
}

/* Ensure Swiper wrapper displays as flex */
.xcodee-sub-categories-slider .swiper-wrapper {
  display: flex;
  align-items: stretch;
}

/* Ensure each slide stretches to full height */
.xcodee-sub-categories-slider .swiper-slide {
  height: auto;
  display: flex;
  align-items: stretch;
}

.xcodee-sub-category-item {
  width: 100%;
  display: flex;
  align-items: stretch;
  height: 100%;
}

.xcodee-sub-category-link {
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: inherit;
  width: 100%;
  height: 100%;
  max-height: 170px;
  transition: all 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.xcodee-sub-category-link:hover {
  transform: translateY(-5px);
  text-decoration: none;
}
/* Category Image Container - Fixed height */
/* Category Image Container - Fixed height */
.xcodee-sub-category-image {
  width: 100%;
  height: 100px;
  min-height: 100px;
  max-height: 100px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0071bd 0%, #f7f9fb 100%);
  display: flex;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  align-items: center;
  justify-content: center;
  padding: 10px;
  position: relative;
  overflow: hidden;
}

.xcodee-sub-category-image::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: translateX(-100%) translateY(-100%) rotate(45deg);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.xcodee-sub-category-link:hover .xcodee-sub-category-image {
  background: linear-gradient(300deg, #0071bd 0%, #f7f9fb 100%);
  box-shadow: 0 0 25px rgba(0, 113, 189, 0.5);
}

.xcodee-sub-category-link:hover .xcodee-sub-category-image::before {
  transform: translateX(100%) translateY(100%) rotate(45deg);
}

.xcodee-sub-category-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(1.05);
  position: relative;
  z-index: 1;
}

.xcodee-sub-category-link:hover .xcodee-sub-category-image img {
  transform: scale(1.1);
}

/* Category Content - Flexible height with overflow control */
.xcodee-sub-category-content {
  padding: 10px;
  text-align: center;
  background: #f7f9fb;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  max-height: 70px;
  overflow: hidden;
}

.xcodee-sub-category-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  transition: color 0.3s ease;
  word-wrap: break-word;
  overflow-wrap: break-word;
  /* Ellipsis for truncation */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.xcodee-sub-category-link:hover .xcodee-sub-category-title {
  color: #0071bd;
}

/* Navigation Buttons */
.xcodee-sub-categories-slider .swiper-button-next,
.xcodee-sub-categories-slider .swiper-button-prev {
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: #333;
  margin-top: -22px;
  transition: all 0.3s ease;
}

.xcodee-sub-categories-slider .swiper-button-next::after,
.xcodee-sub-categories-slider .swiper-button-prev::after {
  font-size: 18px;
  font-weight: 700;
}

.xcodee-sub-categories-slider .swiper-button-next:hover,
.xcodee-sub-categories-slider .swiper-button-prev:hover {
  background: #0071bd;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 113, 189, 0.3);
  transform: scale(1.1);
}

.xcodee-sub-categories-slider .swiper-button-prev {
  left: 0;
}

.xcodee-sub-categories-slider .swiper-button-next {
  right: 0;
}

/* Pagination */
.xcodee-sub-categories-slider .swiper-pagination {
  bottom: 0;
}

.xcodee-sub-categories-slider .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: #ccc;
  opacity: 1;
  transition: all 0.3s ease;
}

.xcodee-sub-categories-slider .swiper-pagination-bullet-active {
  background: #0071bd;
  width: 24px;
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  .xcodee-sub-category-image {
    height: 70px;
    min-height: 70px;
    padding: 2px;
  }

  .xcodee-sub-category-content {
    padding: 5px 10px;
    min-height: 40px;
  }

  .xcodee-sub-category-title {
    font-size: 11px;
  }

  .xcodee-sub-categories-slider .swiper-button-next,
  .xcodee-sub-categories-slider .swiper-button-prev {
    width: 36px;
    height: 36px;
    display: none;
    margin-top: -18px;
  }

  .xcodee-sub-categories-slider .swiper-button-next::after,
  .xcodee-sub-categories-slider .swiper-button-prev::after {
    font-size: 14px;
  }
}
