* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f4f4f4;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* --- Carousel Container --- */
.carousel {
  display: flex;
  flex-direction: row;
  max-width: 1000px;
  width: 100%;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

/* --- Main Image --- */
.carousel-main {
  position: relative;
  flex: 3;
  overflow: hidden;
}

.carousel-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.carousel-main img.active {
  opacity: 1;
}

.badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #0078ff;
  color: white;
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 6px;
}

.fly-label {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
}

.counter {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
}

/* --- Navigation Buttons --- */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 30px;
  padding: 8px 14px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
  z-index: 10;
}

.nav-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.prev {
  left: 15px;
}

.next {
  right: 15px;
}

/* --- Thumbnails --- */
.carousel-thumbs {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fafafa;
}

.thumb {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s, background 0.3s;
}

.thumb img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.thumb span {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
}

.thumb.active {
  border-left: 4px solid #0078ff;
  background: rgba(0, 120, 255, 0.1);
}

.thumb:hover img {
  transform: scale(1.05);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .carousel {
    flex-direction: column;
  }

  .carousel-thumbs {
    flex-direction: row;
    overflow-x: auto;
  }

  .thumb {
    flex: 1;
  }

  .thumb img {
    height: 100px;
  }

  .thumb.active {
    border-left: none;
    border-bottom: 4px solid #0078ff;
  }
}
