/* Container */
.slider-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem 3rem;
  position: relative;
}

.slider-container h2 {
  font-weight: 800;
  font-size: 32px;
  color: #111;
  margin-bottom: 2rem;
  text-align: center;
}

/* Slider */
.listing-slider {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
  scrollbar-width: none;
}

/* Slide */
.listing-slide {
  flex: 0 0 calc((100% - 3rem) / 3);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  scroll-snap-align: start;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Image */
.listing-image-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: 4px;
}

.listing-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.listing-slide:hover .listing-image {
  transform: scale(1.1);
}

/* Overlay content - always visible */
.listing-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  color: #fff;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* content at bottom */
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
  border-radius: 4px;
}

/* Title, category, description */
.listing-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.listing-category {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.85;
  margin-bottom: 0.2rem;
  text-transform: capitalize;
}

.listing-description {
  font-size: 0.8rem;
  opacity: 0.9;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* shows exactly 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis; /* optional: adds "..." at the end if truncated */
}

/* Badges */
.badge {
  position: absolute;
  top: 12px;
  padding: 0.35rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  border-radius: 4px;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.badge.premium {
  background: linear-gradient(135deg, #f2994a, #f2c94c);
}

.badge.verified {
  background: linear-gradient(135deg, #56ab2f, #a8e063);
  right: 12px;
  left: auto;
}

.bloglistingdivide {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
}

/* Rating */
.listing-rating {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
}

.listing-rating .star {
  margin-right: 2px;
  color: #ccc;
}

.listing-rating .star.filled {
  color: orange;
}

.listing-rating .rating-number {
  margin-left: 5px;
  font-size: 1rem;
}

/* Scroll buttons */
.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  width: 50px;
  height: 50px;
  color: orange;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.5s ease;
  font-size: 1.8rem;
  border: solid 1px orange;
}

.scroll-btn:hover {
  background: #0678b1;
  box-shadow: 0 6px 16px #0678b1;
  color: #fff;
}

.scroll-btn.left {
  left: 10px;
}
.scroll-btn.right {
  right: 10px;
}

.scroll-btn i {
  font-size: 20px;
}

/* Responsive */
@media (max-width: 900px) {
  .listing-slide {
    flex: 0 0 calc((100% - 1.5rem) / 2);
  }
}
@media (max-width: 600px) {
  .listing-slide {
    flex: 0 0 90%;
  }
}
