/* ImageCompareSlider — before/after images split by a draggable divider.
 *
 * Both images occupy the SAME full-size box and are cropped with object-fit.
 * Only the top layer's clip-path changes while dragging, so neither image is
 * ever resized — that is what keeps them from stretching mid-drag.
 */

.cc_9mq44h5t_2cCPVwgTny .image-compare-slider {
  width: 100%;
  background-color: var(--color-bg, #FAF8F5);
  padding: var(--space-lg, 40px) clamp(16px, 3vw, 32px);
}

@media (min-width: 768px) {
  .cc_9mq44h5t_2cCPVwgTny .image-compare-slider {
    padding: var(--space-xl, 64px) clamp(24px, 3vw, 40px);
  }
}

.cc_9mq44h5t_2cCPVwgTny .image-compare-slider__title {
  margin: 0 0 var(--space-md, 24px);
  text-align: center;
  font-family: var(--font-display, Georgia, serif);
  font-size: var(--text-h2, 2.25rem);
  font-weight: 700;
  color: inherit;
}

.cc_9mq44h5t_2cCPVwgTny .image-compare-slider__frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: var(--color-surface-alt, #F2EDE8);
  cursor: ew-resize;
  /* Stop the browser from panning/scrolling the page mid-drag on touch. */
  touch-action: none;
  /* A drag across the frame shouldn't select the labels. */
  user-select: none;
  -webkit-user-select: none;
}

.cc_9mq44h5t_2cCPVwgTny .image-compare-slider__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Images must not intercept the pointer or they swallow the drag. */
  pointer-events: none;
  -webkit-user-drag: none;
}

.cc_9mq44h5t_2cCPVwgTny .image-compare-slider__before-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* clip-path animates cheaply; no transition so it tracks the finger 1:1. */
  will-change: clip-path;
}

/* ─── Labels ───────────────────────────────────────────────────── */

.cc_9mq44h5t_2cCPVwgTny .image-compare-slider__label {
  position: absolute;
  bottom: var(--space-sm, 16px);
  z-index: 2;
  padding: 6px 12px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: var(--font-label, sans-serif);
  font-size: var(--text-label, 0.75rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

.cc_9mq44h5t_2cCPVwgTny .image-compare-slider__label--before {
  left: var(--space-sm, 16px);
}

.cc_9mq44h5t_2cCPVwgTny .image-compare-slider__label--after {
  right: var(--space-sm, 16px);
}

/* ─── Divider + handle ─────────────────────────────────────────── */

.cc_9mq44h5t_2cCPVwgTny .image-compare-slider__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 2px;
  /* `left` is set inline; shift by half the width so the line sits on it. */
  transform: translateX(-1px);
  background: var(--color-surface, #FFFFFF);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.cc_9mq44h5t_2cCPVwgTny .image-compare-slider__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 2px solid var(--color-surface, #FFFFFF);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: var(--color-surface, #FFFFFF);
  cursor: ew-resize;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  /* Re-enable input on the handle itself for keyboard focus. */
  pointer-events: auto;
}

.cc_9mq44h5t_2cCPVwgTny .image-compare-slider__handle:focus-visible {
  outline: 2px solid var(--color-accent, #C9A882);
  outline-offset: 3px;
}

.cc_9mq44h5t_2cCPVwgTny .image-compare-slider__frame.is-dragging .image-compare-slider__handle {
  background: rgba(0, 0, 0, 0.65);
}

@media (min-width: 768px) {
  .cc_9mq44h5t_2cCPVwgTny .image-compare-slider__handle {
    width: 3.5rem;
    height: 3.5rem;
  }
}
