/* ==========================================================================
   MAGNETIC MOUSE & MINI MOTORHOME CURSOR SYSTEM
   Custom Animated Vehicle Physics & Magnetic Snapping
   ========================================================================== */

/* Hide default cursor on desktop devices when custom cursor is active */
@media (hover: hover) and (pointer: fine) {
  body.custom-cursor-active {
    cursor: default;
  }
  
  body.custom-cursor-active a,
  body.custom-cursor-active button,
  body.custom-cursor-active .feature-card,
  body.custom-cursor-active .store-badge-btn {
    cursor: pointer;
  }
}

/* Cursor Master Container */
#motorhome-cursor-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  #motorhome-cursor-container {
    display: block;
  }
}

/* Mini Motorhome Vehicle */
.mini-motorhome-vehicle {
  position: absolute;
  top: 0;
  left: 0;
  width: 58px;
  height: 30px;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(0deg);
  transform-origin: center center;
  transition: width 0.3s ease, height 0.3s ease, filter 0.3s ease;
  will-change: transform, left, top;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.28));
}

.mini-motorhome-vehicle img,
.mini-motorhome-vehicle svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Headlight Beam Effect */
.motorhome-beam {
  position: absolute;
  top: 50%;
  left: 80%;
  transform: translateY(-50%);
  width: 90px;
  height: 50px;
  background: radial-gradient(ellipse at left, rgba(255, 245, 157, 0.45) 0%, rgba(255, 238, 88, 0.15) 50%, rgba(255, 238, 88, 0) 80%);
  clip-path: polygon(0% 35%, 100% 0%, 100% 100%, 0% 65%);
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

/* Particle Dust/Tire Trail */
.dust-particle {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(200, 220, 230, 0.6);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
  transform: translate(-50%, -50%);
  animation: dustFade 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes dustFade {
  0% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) scale(0.2);
  }
}

/* Magnetic Hover Active State */
.mini-motorhome-vehicle.is-hovering {
  filter: drop-shadow(0 8px 16px rgba(0, 162, 204, 0.45)) drop-shadow(0 0 10px rgba(76, 175, 80, 0.5));
  transform: translate(-50%, -50%) scale(1.15);
}

.mini-motorhome-vehicle.is-hovering .motorhome-beam {
  opacity: 1;
  width: 120px;
  height: 65px;
}

.mini-motorhome-vehicle.is-clicking {
  transform: translate(-50%, -50%) scale(0.9);
}

/* Elements with Magnetic Attraction */
[data-magnetic] {
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}
