.ly_beforeAfter {
  padding: 80px 20px;
}

.bl_beforeAfterCont {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-bottom: 40px;
}

.bl_beforeAfterItem {
  background: #f8f5e9;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bl_beforeAfter_slider {
  aspect-ratio: 360 / 475;
  position: relative;
  overflow: hidden;
  width: 800px;
  max-width: 100%;
  margin: 0 auto;
  touch-action: none;
  user-select: none;
}

.beer-slider > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

.beer-reveal {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
  z-index: 2;
}

.beer-reveal > img {
  width: var(--slider-width, 800px);
  max-width: none;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  left: 0;
  top: 0;
}

.beer-reveal[data-beer-label]::after {
  content: attr(data-beer-label);
  position: absolute;
  z-index: 3;
  color: #df6d14;
  font-size: 20px;
  background: #f8f5e9;
  top: 0;
  left: 0;
  padding: 12px 20px;
  font-weight: 700;
}

.beer-slider[data-beer-label]::after {
  content: attr(data-beer-label);
  position: absolute;
  z-index: 1;
  color: #df6d14;
  font-size: 20px;
  background: #f8f5e9;
  bottom: 0;
  right: 0;
  padding: 12px 20px;
  font-weight: 700;
}

.beer-handle {
  position: absolute;
  top: 50%;
  left: var(--beer-position, 50%);
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  touch-action: none;
  pointer-events: auto;
}

.beer-handle::before,
.beer-handle::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.beer-handle::before {
  border-right: 10px solid #333;
  margin-right: 6px;
}

.beer-handle::after {
  border-left: 10px solid #333;
  margin-left: 6px;
}

.beer-slider::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--beer-position, 50%);
  width: 2px;
  background: #ffffff;
  z-index: 5;
  transform: translateX(-50%);
  pointer-events: none;
}

@media screen and (min-width: 768px) {
  .ly_beforeAfter {
    padding-inline: 20px;
    overflow: hidden;
  }

  .bl_beforeAfterCont {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-items: center;
    max-width: 1280px;
    margin: 0 auto;
    overflow-x: clip;
    padding-bottom: 80px;
  }

  .bl_beforeAfterCont .bl_swiperNavigation {
    margin-right: 20px;
  }

  .bl_beforeAfterItem {
    max-width: min(400px, 45vw);
  }

  .bl_swiperNavigation {
    position: absolute;
    top: 0;
    right: 0;
    transform: translateY(calc(-100% - 80px));
  }

  .bl_beforeAfterItem h3 {
    text-align: center;
  }

  .bl_beforeAfter_slider .el_before::before {
    width: 45px;
    height: 45px;
  }
}

@media screen and (min-width: 1280px) {
  .bl_beforeAfterCont {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .bl_beforeAfterCont .bl_swiperNavigation {
    margin-right: 0px;
  }
}
