/* ViewManager: slider odabranih artikala (Vrtuljak). CSS scroll-snap, 4 vidljiva (responsive). */
.vm-slider {
  position: relative;
}

.vm-slider__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.vm-slider__nav {
  display: flex;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.vm-slider__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  background: #fff;
  color: #212529;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.vm-slider__btn:hover {
  background: #212529;
  border-color: #212529;
  color: #fff;
}

.vm-slider__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}

.vm-slider__track::-webkit-scrollbar {
  display: none;
}

.vm-slider__item {
  scroll-snap-align: start;
  flex: 0 0 calc((100% - 3rem) / 4);
  min-width: calc((100% - 3rem) / 4);
}

@media (max-width: 1199.98px) {
  .vm-slider__item {
    flex-basis: calc((100% - 2rem) / 3);
    min-width: calc((100% - 2rem) / 3);
  }
}

@media (max-width: 767.98px) {
  .vm-slider__item {
    flex-basis: calc((100% - 1rem) / 2);
    min-width: calc((100% - 1rem) / 2);
  }
}

@media (max-width: 575.98px) {
  .vm-slider__item {
    flex-basis: 82%;
    min-width: 82%;
  }
}

/* Varijanta: navigacija ispod slika (gumbi + progress linija) */
.vm-slider__nav-below {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.vm-slider__progress {
  position: relative;
  flex: 0 1 66.66%;
  width: 100%;
  max-width: 66.66%;
  margin: 0 auto;
  height: 3px;
  background: #e3e3e3;
  border-radius: 2px;
}

.vm-slider__progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 30%;
  background: #111;
  border-radius: 2px;
  transition: left 0.25s ease, width 0.25s ease;
}

/* Custom scrollbar interakcija */
.vm-slider__progress {
  cursor: pointer;
  touch-action: none;
}

.vm-slider__progress-bar {
  cursor: grab;
}

.vm-slider__progress.is-dragging {
  cursor: grabbing;
}

.vm-slider__progress.is-dragging .vm-slider__progress-bar {
  cursor: grabbing;
  transition: none;
}

/* Bez naslova → strelice poravnaj desno */
.vm-slider__head--end {
  justify-content: flex-end;
}
