.bas-slider,
.bas-slider * {
  box-sizing: border-box;
}

.bas-slider {
  --bas-position: 50%;
  --bas-handle: #ffffff;
  --bas-accent: #111827;
  --bas-label-bg: transparent;
  --bas-label-color: inherit;
  --bas-radius: 0px;
  --bas-border-width: 0px;
  --bas-border-style: solid;
  --bas-border-color: transparent;
  --bas-title-color: inherit;
  --bas-title-family: inherit;
  --bas-title-size: clamp(18px, 2vw, 24px);
  --bas-title-weight: 700;
  --bas-label-family: inherit;
  --bas-label-size: 13px;
  --bas-label-weight: 700;
  --bas-label-radius: 0px;
  --bas-handle-size: 48px;
  --bas-line-width: 3px;
  --bas-bar-color: var(--bas-handle);
  --bas-arrow-color: var(--bas-accent);
  --bas-max-width: 100%;
  --bas-min-height: 0px;
  width: 100%;
  max-width: var(--bas-max-width);
  margin: 0;
  position: relative;
  isolation: isolate;
  font-family: inherit;
}

.bas-title {
  margin: 0 0 14px;
  color: var(--bas-title-color, inherit);
  font-family: var(--bas-title-family);
  font-size: var(--bas-title-size);
  font-weight: var(--bas-title-weight);
  line-height: 1.2;
}

.bas-image-area {
  position: relative;
  display: block;
  line-height: 0;
  overflow: hidden;
  width: 100%;
  min-height: var(--bas-min-height);
  background: transparent;
  border: var(--bas-border-width) var(--bas-border-style) var(--bas-border-color);
  user-select: none;
  touch-action: pan-y;
  border-radius: inherit;
}

.bas-rounded .bas-image-area {
  border-radius: var(--bas-radius);
}

.bas-square .bas-image-area {
  border-radius: 0;
}

.bas-shadow .bas-image-area {
  box-shadow: none;
}

.bas-no-shadow .bas-image-area {
  box-shadow: none;
}

.bas-image {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.bas-image-after {
  position: relative;
  inset: auto;
  z-index: 1;
}

.bas-image-before {
  position: absolute;
  inset: 0;
  z-index: 2;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  clip-path: inset(0 calc(100% - var(--bas-position)) 0 0);
}

.bas-label {
  position: absolute;
  top: 18px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 13px;
  border-radius: var(--bas-label-radius);
  background: var(--bas-label-bg);
  color: var(--bas-label-color);
  font-family: var(--bas-label-family);
  font-size: var(--bas-label-size);
  font-weight: var(--bas-label-weight);
  line-height: 1;
  letter-spacing: .02em;
}

.bas-label-before {
  left: 18px;
}

.bas-label-after {
  right: 18px;
}

.bas-handle {
  position: absolute;
  inset: 0 auto 0 var(--bas-position);
  z-index: 6;
  width: var(--bas-handle-size);
  padding: 0;
  margin: 0 0 0 calc(var(--bas-handle-size) / -2);
  border: 0;
  background: transparent;
  color: var(--bas-handle);
  cursor: ew-resize;
  appearance: none;
  -webkit-appearance: none;
  touch-action: none;
}

.bas-handle:hover,
.bas-handle:focus {
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
}

.bas-handle::before,
.bas-handle::after {
  content: none;
}

.bas-handle:focus-visible .bas-handle-circle {
  outline: 3px solid color-mix(in srgb, var(--bas-accent) 55%, transparent);
  outline-offset: 4px;
}

.bas-handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: var(--bas-line-width);
  transform: translateX(-50%);
  background: var(--bas-bar-color);
  box-shadow: none;
}

.bas-handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--bas-handle-size);
  height: var(--bas-handle-size);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: var(--bas-handle);
  color: var(--bas-arrow-color);
  box-shadow: none;
}

.bas-arrow {
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.bas-arrow-left {
  transform: rotate(-45deg);
}

.bas-arrow-right {
  transform: rotate(135deg);
}

.bas-gallery {
  display: grid;
  gap: clamp(18px, 3vw, 32px);
  width: 100%;
}

.bas-gallery-columns-1 { grid-template-columns: 1fr; }
.bas-gallery-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bas-gallery-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bas-gallery-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.bas-gallery-item {
  min-width: 0;
}

.bas-carousel-wrap {
  position: relative;
  width: 100%;
}

.bas-carousel-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 4px 18px;
}

.bas-carousel-track::-webkit-scrollbar {
  display: none;
}

.bas-carousel-slide {
  flex: 0 0 min(88%, 820px);
  scroll-snap-align: start;
}

.bas-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.bas-carousel-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--bas-carousel-arrow-bg, #111827);
  color: var(--bas-carousel-arrow-color, #fff);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  transition: transform .2s ease, opacity .2s ease;
}

.bas-carousel-button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.bas-admin-warning {
  padding: 14px 16px;
  border-left: 4px solid #d63638;
  background: #fff2f2;
  color: #7f1d1d;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .bas-gallery-columns-3,
  .bas-gallery-columns-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .bas-gallery,
  .bas-gallery-columns-2,
  .bas-gallery-columns-3,
  .bas-gallery-columns-4 {
    grid-template-columns: 1fr;
  }

  .bas-label {
    top: 12px;
    min-height: 28px;
    padding: 6px 10px;
    font-size: var(--bas-label-size);
  }

  .bas-label-before { left: 12px; }
  .bas-label-after { right: 12px; }

  .bas-carousel-slide {
    flex-basis: 92%;
  }
}

