/* ============ BEFORE / AFTER PAIRS AND SLIDERS ============ */

.pair-feature {
  max-width: 1180px;
  margin: 0 auto 64px;
  padding: 0 24px;
}

.pair-feature h2 {
  text-align: center;
  margin: 0 0 10px;
}

.pair-feature p.pair-sub {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 26px;
  opacity: .85;
}

.pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.pair-grid figure {
  margin: 0;
}

.pair-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.pair-grid figcaption {
  margin-top: 8px;
  font-size: 13px;
  text-align: center;
  opacity: .7;
}

/* ---- drag slider ---- */

.compare {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}

.compare img {
  display: block;
  width: 100%;
  height: auto;
}

.compare .compare-after {
  position: absolute;
  inset: 0;
  overflow: hidden;
  width: 50%;
}

.compare .compare-after img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  max-width: none;
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  pointer-events: none;
}

.compare-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(0, 0, 0, .45);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}

.compare-label {
  position: absolute;
  top: 12px;
  padding: 4px 10px;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 4px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  pointer-events: none;
}

.compare-label.is-left { left: 12px; }
.compare-label.is-right { right: 12px; }

@media (max-width: 760px) {
  .pair-grid { grid-template-columns: 1fr; }
}
