/* FeatherScroll core layout. Keep this tiny — effects bring their own CSS. */

.fs {
  position: relative;
  --fs-nav-size: 40px;
  --fs-dot-size: 10px;
  --fs-accent: currentColor;
}

.fs__viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.fs__track {
  position: relative;
  display: flex;
  /* GPU compositing hint; the engine toggles this on interaction. */
  backface-visibility: hidden;
}

.fs__slide {
  position: relative;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-drag: none;
}

.fs__slide img {
  pointer-events: none;
  max-width: 100%;
}

/* ── Navigation ───────────────────────────────────────────── */
.fs__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: var(--fs-nav-size);
  height: var(--fs-nav-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.fs__nav:hover {
  background: rgba(0, 0, 0, 0.7);
}
.fs__nav.is-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.fs__nav--prev {
  left: 8px;
}
.fs__nav--next {
  right: 8px;
}

/* ── Dots ─────────────────────────────────────────────────── */
.fs__dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}
.fs__dot {
  width: var(--fs-dot-size);
  height: var(--fs-dot-size);
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.fs__dot.is-active {
  background: var(--fs-accent);
  transform: scale(1.3);
}

/* ── Edge fade (product shelves) ──────────────────────────── */
/* Add class `fs--fade-edges` to the root to hint "more to scroll". */
.fs--fade-edges .fs__viewport {
  --fs-fade: 32px;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 var(--fs-fade),
    #000 calc(100% - var(--fs-fade)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 var(--fs-fade),
    #000 calc(100% - var(--fs-fade)),
    transparent 100%
  );
}
.fs--fade-edges.fs--vertical .fs__viewport {
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 var(--fs-fade),
    #000 calc(100% - var(--fs-fade)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 var(--fs-fade),
    #000 calc(100% - var(--fs-fade)),
    transparent 100%
  );
}

/* ── Scrollbar plugin ─────────────────────────────────────── */
.fs__scrollbar {
  position: relative;
  height: 6px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.1);
  cursor: pointer;
  touch-action: none;
}
.fs__scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  min-width: 24px;
  border-radius: 999px;
  background: var(--fs-accent);
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.fs__scrollbar-thumb:hover,
.fs__scrollbar.is-dragging .fs__scrollbar-thumb {
  opacity: 0.85;
}
.fs--vertical .fs__scrollbar {
  width: 6px;
  height: auto;
  margin-top: 0;
  margin-left: 12px;
}
.fs--vertical .fs__scrollbar-thumb {
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 24px;
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .fs__track,
  .fs__slide {
    transition: none !important;
  }
}

/* ── Native scroll-snap fallback (renderMode: 'native') ───── */
.fs--native .fs__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.fs--native .fs__viewport::-webkit-scrollbar {
  display: none;
}
.fs--native .fs__slide {
  scroll-snap-align: center;
}
