#slider-b {
  padding: 2rem;
  background-color: var(--offwhite);
}
.slider {
  position: relative;
}

.slider__container {
  cursor: grab;
  display: flex;
  overflow: hidden;
  scroll-behavior: smooth;
}

.slider__container.dragging {
  scroll-behavior: auto;
  cursor: grabbing;
}

.slider__item {
  padding: 1rem 0.2rem;
  flex: 0 0 auto;
  /* dividing number represents the number of slides onscreen */
  width: calc(100% / 3);
  position: relative;
  
}

.slider__container[data-step="4"] .slider__item {
  width: calc(100% / 3);
}

.slider__container[data-step="3"] .slider__item {
  width: calc(100% / 3);
}

.slider__container[data-step="2"] .slider__item {
  width: calc(100% / 2) !important;
}

.slider__container[data-step="1"] .slider__item {
  width: calc(100% / 1) !important;
}

@media screen and (max-width: 1024px) {
  .slider__item,
  .slider__container[data-step="4"] .slider__item {
    width: calc(100% / 2);
  }
}

@media screen and (max-width: 768px) {
  .slider__item,
  .slider__container[data-step="4"] .slider__item,
  .slider__container[data-step="3"] .slider__item {
    width: calc(100% / 2);
  }
}
@media screen and (max-width: 500px) {
  .slider__item,
  .slider__container[data-step="4"] .slider__item,
  .slider__container[data-step="3"] .slider__item,
  .slider__container[data-step="2"] .slider__item {
    width: calc(100% / 1);
  }
}

.slider__control {
  font-size: 16px;
  border: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #000;
  background: #ececec;
  cursor: pointer;
  transition: all 0.3s;
}

.slider__control.prev {
  left: 16px;
}

.slider__control.next {
  right: 16px;
}

.slider__control:hover {
  opacity: 1;
  background-color: white;
  transform: translateY(-50%) scale(1.4);
}

.slider__item img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-select: none;
  border-radius: 5px;
}
.slider__item .caption {
  padding: 1rem;
  background-color:var(--primary);
  color: white;
  font-weight: 600;
  font-family: Poppins;
  opacity: 0;
  text-transform: uppercase;
  width: fit-content;
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-size: 1rem;
  letter-spacing: 1px;
}
.slider__item:hover .caption{
  opacity: 1;
  transition: 0.3s ease-in-out;
}
.extras {
  padding: 1rem;
  display: flex;
}
.extra-item {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  margin: 0.3rem;
  font-family: Poppins;
  font-weight: 600;
  background-color: rgb(42, 162, 242);
}
