/* ==========================================================
   HORIZONTAL PRODUCT SLIDER
========================================================== */

.vcom-product-slider {
  position: relative;
  margin-block: 40px;
  max-width: 100%;
  overflow: hidden;
}

/* Track som mask */
.vcom-product-slider__track {
  width: 100%;
  position: relative;
  display: block;
  isolation: isolate;
  contain: content;
}

/* Produkt-raden */
.vcom-product-slider .products {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  padding: 4px 0;

  width: 100%;
  box-sizing: border-box;

  will-change: transform;
  transform: translateZ(0);

  touch-action: pan-y;
  user-select: none;
  -webkit-user-drag: none;
}

.vcom-product-slider .products::-webkit-scrollbar {
  display: none;
}

.vcom-product-slider .products {
  transition: opacity 0.25s ease;
}

.vcom-product-slider .products.is-loading {
  opacity: 0;
}

.vcom-product-slider .products {
  min-height: 280px;
}

/* ============================
   RESPONSIV BREDD PER PRODUKT
============================ */

/* Mobil: 2 kort */
.vcom-product-slider .products li.product {
  flex: 0 0 calc((100% - 20px) / 2);
}

/* Tablet: 4 kort */
@media (min-width: 768px) {
  .vcom-product-slider .products li.product {
    flex: 0 0 calc((100% - (20px * 3)) / 4);
  }
}

/* Desktop: 5 kort */
@media (min-width: 1200px) {
  .vcom-product-slider .products li.product {
    flex: 0 0 calc((100% - (20px * 4)) / 5);
  }
}

/* ============================
   NAVIGATION ARROWS
============================ */

.vcom-product-slider__prev,
.vcom-product-slider__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  background: var(--vcom-bg);
  border: 1px solid var(--vcom-border);
  border-radius: 50%;

  font-size: 20px;
  color: var(--vcom-text);
  cursor: pointer;

  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  z-index: 5;
}

.vcom-product-slider__prev:hover,
.vcom-product-slider__next:hover {
  background: var(--vcom-bg-muted);
}

/* Pilar innanför containern */
.vcom-product-slider__prev { left: 4px; }
.vcom-product-slider__next { right: 4px; }