/* =============================================================
   SMOOTH SCROLLING (Lenis Engine + Luxury Experience)
   Scoped optimizations for buttery-smooth inertia scrolling.
   ============================================================= */

/* Lenis core layout requirements */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden !important;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Luxury custom scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: #10B981 #091F18;
}

html::-webkit-scrollbar {
  width: 9px;
}

html::-webkit-scrollbar-track {
  background: #091F18;
}

html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #10B981, #059669);
  border-radius: 9999px;
  border: 2px solid #091F18;
}

html::-webkit-scrollbar-thumb:hover {
  background: #34D399;
}

/* Floating smooth scroll-to-top button */
.scroll-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4), 0 0 1px 1px rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease, box-shadow 0.25s ease;
}

.scroll-to-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-to-top-btn:hover {
  transform: translateY(-3px) scale(1.06);
  background: linear-gradient(135deg, #34D399, #10B981);
  box-shadow: 0 14px 30px -4px rgba(16, 185, 129, 0.55);
}

.scroll-to-top-btn:active {
  transform: translateY(0) scale(0.96);
}

@media (max-width: 576px) {
  .scroll-to-top-btn {
    bottom: 1.25rem;
    right: 0.75rem;
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
    z-index: 990;
  }
}

body:has(#ptFloatingCart.is-visible) .scroll-to-top-btn {
  bottom: 5.5rem !important;
}
