/* ═══════════════════════════════════════════════
   compare.css — Before / After Image Slider
   ═══════════════════════════════════════════════ */

.pv-compare-section {
  background: var(--pure-dark);
  padding-top: 80px;
}

.pv-compare-wrapper {
  width: 85%;
  margin: 0 auto;
}

.pv-compare {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.5;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: col-resize;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  user-select: none;
}

/* Before (dark/dirty car) */
.pv-compare-before {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.pv-compare-img--before {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      ellipse at 30% 60%,
      rgb(60 40 20 / 15%) 0%,
      transparent 60%
    ),
    linear-gradient(135deg, #1a141033 0%, #2a201836 40%, #1e1c153d 100%);
  position: relative;
}
/* Dirty car silhouette */
.pv-compare-img--before::after {
  content: "";
  position: absolute;
  bottom: 15%;
  left: 5%;
  right: 5%;
  height: 55%;
  background: radial-gradient(
    ellipse at 50% 40%,
    rgba(80, 65, 45, 0.13) 0%,
    transparent 60%
  );
  border-radius: 50% 50% 30% 30% / 40% 40% 60% 60%;
  filter: blur(2px);
}

/* After (clean/shiny car) */
.pv-compare-after {
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: inset(0 50% 0 0);
  transition: clip-path 0.05s ease;
}
.pv-compare-img--after {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      ellipse at 60% 40%,
      rgba(74, 124, 246, 0.18) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 30% 70%,
      rgba(74, 124, 246, 0.1) 0%,
      transparent 40%
    ),
    linear-gradient(135deg, #111318 0%, #1a1f2e 40%, #0f1219 100%);
  position: relative;
}
/* Clean car silhouette */
.pv-compare-img--after::after {
  content: "";
  position: absolute;
  bottom: 15%;
  left: 5%;
  right: 5%;
  height: 55%;
  background:
    radial-gradient(
      ellipse at 50% 30%,
      rgba(74, 124, 246, 0.25) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 50% 60%,
      rgba(255, 255, 255, 0.08) 0%,
      transparent 40%
    );
  border-radius: 50% 50% 30% 30% / 40% 40% 60% 60%;
  box-shadow:
    0 20px 60px rgba(74, 124, 246, 0.15),
    0 0 100px rgba(74, 124, 246, 0.08);
}

/* Labels */
.pv-compare-label {
  position: absolute;
  top: 20px;
  z-index: 10;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  color: var(--pv-white);
}
.pv-compare-label--before {
  right: 20px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.pv-compare-label--after {
  left: 20px;
  background: var(--pv-blue);
  box-shadow: 0 4px 16px rgba(74, 124, 246, 0.4);
}

/* Handle */
.pv-compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
}

.pv-compare-line {
  flex: 1;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--pv-white),
    transparent
  );
  opacity: 0.8;
}

.pv-compare-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: var(--pv-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--pv-white);
  font-size: 0.65rem;
  box-shadow:
    0 4px 20px rgba(74, 124, 246, 0.5),
    0 0 0 3px rgba(255, 255, 255, 0.15);
  cursor: col-resize;
  transition: box-shadow 0.2s;
}
.pv-compare-btn:hover {
  box-shadow:
    0 6px 28px rgba(74, 124, 246, 0.7),
    0 0 0 4px rgba(255, 255, 255, 0.2);
}

/* Hint */
.pv-compare-hint {
  text-align: center;
  margin-top: 20px;
  font-size: 1rem;
  color: var(--pv-text-dim);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .pv-compare {
    height: 280px;
  }
}
@media (max-width: 480px) {
  .pv-compare {
    height: 220px;
  }
}
.pv-compare-handle {
  touch-action: none;
}
.pv-compare-slider .owl-nav {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  pointer-events: none;
}

.pv-compare-slider .owl-nav button {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50% !important;

  background: rgba(10, 15, 25, 0.75) !important;
  backdrop-filter: blur(10px);

  border: 1px solid rgba(255, 255, 255, 0.12) !important;

  color: #fff !important;

  display: flex !important;
  align-items: center;
  justify-content: center;

  font-size: 15px !important;

  transition: all 0.35s ease;

  pointer-events: auto;

  overflow: hidden;
}

/* Left */
.pv-compare-slider .owl-nav .owl-prev {
  left: 30px;
}

/* Right */
.pv-compare-slider .owl-nav .owl-next {
  right: 30px;
}

/* Glow Effect */
.pv-compare-slider .owl-nav button::before {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    135deg,
    rgba(255, 0, 0, 0.5),
    rgba(255, 0, 0, 0.3)
  );

  opacity: 0;
  transition: 0.4s ease;
}

/* Hover */
.pv-compare-slider .owl-nav button:hover {
  transform: scale(1.08) translateY(-2px);

  border-color: rgba(255, 255, 255, 0.25) !important;

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(255, 0, 0, 0.35);

  color: #fff !important;
}

.pv-compare-slider .owl-nav button:hover::before {
  opacity: 1;
}

/* Icon */
.pv-compare-slider .owl-nav button i {
  position: relative;
  z-index: 2;
}

/* Hide default text */
.pv-compare-slider .owl-nav button span {
  display: none;
}

/* Mobile */
@media (max-width: 767px) {
  .pv-compare-slider .owl-nav button {
    width: 46px;
    height: 46px;
    font-size: 13px !important;
  }

  .pv-compare-slider .owl-nav .owl-prev {
    left: 12px;
  }

  .pv-compare-slider .owl-nav .owl-next {
    right: 12px;
  }
}
