.bb-sg {
  --bb-sg-columns: 3;
  --bb-sg-gap: 12px;
  --bb-sg-radius: 8px;
  --bb-sg-ratio: 4 / 3;
  --bb-sg-duration: 0.5s;
  --bb-sg-arrow: #5c6570;
  position: relative;
}

.bb-sg[data-columns="2"] {
  --bb-sg-columns: 2;
}

.bb-sg[data-columns="3"] {
  --bb-sg-columns: 3;
}

.bb-sg.is-static {
  --bb-sg-columns: 1;
}

.bb-sg-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 24px;
  border: 1px dashed #c9cfd6;
  border-radius: 8px;
  background: #f7f8fa;
  color: #5c6570;
  text-align: center;
}

.bb-sg-empty p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.bb-sg-viewport {
  overflow: hidden;
  width: 100%;
  touch-action: pan-y;
}

.bb-sg-track {
  display: flex;
  gap: var(--bb-sg-gap);
  will-change: transform;
  transition: transform var(--bb-sg-duration) ease;
}

.bb-sg-track.is-jumping {
  transition: none;
}

.bb-sg-slide {
  box-sizing: border-box;
  flex: 0 0 calc((100% - (var(--bb-sg-columns) - 1) * var(--bb-sg-gap)) / var(--bb-sg-columns));
  min-width: 0;
  aspect-ratio: var(--bb-sg-ratio);
  overflow: hidden;
  border-radius: var(--bb-sg-radius);
  background: #eceff2;
}

.bb-sg-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.bb-sg-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--bb-sg-arrow);
  box-shadow: 0 1px 6px rgba(20, 24, 30, 0.08);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.bb-sg-nav:hover,
.bb-sg-nav:focus-visible {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 10px rgba(20, 24, 30, 0.12);
  outline: none;
}

.bb-sg-nav svg {
  width: 18px;
  height: 18px;
  display: block;
}

.bb-sg-prev {
  left: 10px;
}

.bb-sg-next {
  right: 10px;
}

.bb-sg.is-static .bb-sg-nav {
  display: none;
}

@media (max-width: 767px) {
  .bb-sg,
  .bb-sg[data-columns="2"],
  .bb-sg[data-columns="3"],
  .bb-sg.is-static {
    --bb-sg-columns: 1;
  }

  .bb-sg-nav {
    width: 32px;
    height: 32px;
  }

  .bb-sg-prev {
    left: 8px;
  }

  .bb-sg-next {
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-sg-track {
    transition-duration: 0.01ms;
  }
}
