/* ==========================================================================
   DRIVEON — Luxury Car Rental Platform
   Luxury Interactive Effects, Custom Cursor, Modals & Toast UI
   ========================================================================== */

/* ==========================================================================
   1. CUSTOM INTERACTIVE CURSOR
   ========================================================================== */
.custom-cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--gold-primary);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 100001;
  transform: translate(-50%, -50%);
  transition: transform 0.05s ease-out, opacity 0.2s ease;
}

.custom-cursor-follower {
  width: 42px;
  height: 42px;
  border: 1px solid var(--gold-border-bright);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 100000;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.15s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.cursor-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--bg-deep);
  text-transform: uppercase;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  user-select: none;
}

/* Cursor State Variations */
body.cursor-hover .custom-cursor-follower {
  width: 60px;
  height: 60px;
  background: rgba(198, 161, 91, 0.18);
  border-color: var(--gold-primary);
}

body.cursor-hover .custom-cursor-dot {
  opacity: 0;
}

body.cursor-mode-view .custom-cursor-follower,
body.cursor-mode-drag .custom-cursor-follower,
body.cursor-mode-explore .custom-cursor-follower,
body.cursor-mode-book .custom-cursor-follower {
  width: 84px;
  height: 84px;
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  box-shadow: 0 0 30px rgba(198, 161, 91, 0.5);
}

body.cursor-mode-view .cursor-text,
body.cursor-mode-drag .cursor-text,
body.cursor-mode-explore .cursor-text,
body.cursor-mode-book .cursor-text {
  opacity: 1;
  transform: scale(1);
}

body.cursor-mode-view .custom-cursor-dot,
body.cursor-mode-drag .custom-cursor-dot,
body.cursor-mode-explore .custom-cursor-dot,
body.cursor-mode-book .custom-cursor-dot {
  opacity: 0;
}

/* Hide on touch devices */
@media (hover: none) and (pointer: coarse) {
  .custom-cursor-dot,
  .custom-cursor-follower {
    display: none !important;
  }
}

/* ==========================================================================
   2. 3D TILT EFFECT CONTAINERS
   ========================================================================== */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  will-change: transform;
}

.tilt-inner {
  transform: translateZ(30px);
  transition: transform 0.3s ease-out;
}

/* ==========================================================================
   3. LUXURY MODAL & DRAWERS (WISHLIST & CART)
   ========================================================================== */
.luxury-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.luxury-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.luxury-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(520px, 100vw);
  height: 100vh;
  background: #080808;
  border-left: 1px solid var(--gold-border);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.9);
}

.luxury-drawer-backdrop.is-open .luxury-drawer {
  transform: translateX(0);
}

.drawer-header {
  padding: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--ivory);
  letter-spacing: 0.05em;
}

.drawer-close-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.drawer-close-btn:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  transform: rotate(90deg);
}

.drawer-body {
  padding: 2rem;
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.drawer-empty-state {
  margin: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.drawer-empty-icon {
  font-size: 3rem;
  color: var(--gold-border);
}

.drawer-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 1rem;
  position: relative;
  transition: border-color var(--transition-fast);
}

.drawer-item:hover {
  border-color: var(--gold-border);
}

.drawer-item-img {
  width: 90px;
  height: 65px;
  object-fit: cover;
  border-radius: var(--radius-xs);
}

.drawer-item-info h4 {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--ivory);
  margin-bottom: 0.25rem;
}

.drawer-item-info p {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold-primary);
}

.drawer-item-remove {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.5rem;
  transition: color var(--transition-fast);
}

.drawer-item-remove:hover {
  color: #ff5e5e;
}

.drawer-footer {
  padding: 2rem;
  border-top: 1px solid var(--border-subtle);
  background: #050505;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.drawer-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-subtotal-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.drawer-subtotal-val {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-light);
}

/* ==========================================================================
   4. TOAST NOTIFICATIONS
   ========================================================================== */
.luxury-toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100005;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.luxury-toast {
  pointer-events: all;
  background: rgba(14, 14, 14, 0.95);
  border: 1px solid var(--gold-border-bright);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.85), 0 0 20px var(--gold-glow);
  padding: 1rem 1.6rem;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--ivory);
  font-size: 0.9rem;
  min-width: 320px;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.luxury-toast.is-active {
  transform: translateX(0);
  opacity: 1;
}

.luxury-toast-icon {
  color: var(--gold-primary);
  font-size: 1.15rem;
}

.luxury-toast-message {
  flex-grow: 1;
  font-family: var(--font-sans);
}

/* ==========================================================================
   5. LIGHTBOX & MODAL
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 100010;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
}

.lightbox-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-xs);
  border: 1px solid var(--gold-border);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.95);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2.5rem;
  background: none;
  border: none;
  color: var(--ivory);
  font-size: 2rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.lightbox-close:hover {
  color: var(--gold-primary);
}

/* ==========================================================================
   6. RESERVATION CONFIRMATION & GOLD PARTICLES
   ========================================================================== */
.confirmation-card {
  background: #090909;
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-sm);
  padding: 4rem 3rem;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.95);
}

.check-circle-animated {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(198, 161, 91, 0.15);
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  color: var(--gold-primary);
  font-size: 2.5rem;
  animation: scaleBounce 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleBounce {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100020;
}
