/* Additions on top of the Tailwind (CDN) styles generated by Stitch. */

html.nl-lock,
html.nl-lock body {
  overflow: hidden;
}

:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

[id] {
  scroll-margin-top: 8rem;
}

.nl-toast {
  animation: nl-toast-in 0.2s ease-out;
  transition: opacity 0.3s, transform 0.3s;
}
.nl-toast-out {
  opacity: 0;
  transform: translateY(8px);
}
@keyframes nl-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Home hero ---------- */
.nl-reveal {
  animation: nl-fade-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--d, 0ms);
}
@keyframes nl-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.nl-rotator {
  display: grid;
  justify-items: start;
}
.nl-rotator > span {
  grid-area: 1 / 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(0.3em);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  background: linear-gradient(90deg, #4cd7f6, #b4c5ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nl-rotator > span.is-active {
  opacity: 1;
  transform: none;
}

.nl-search-box:focus-within {
  box-shadow: 0 0 0 4px rgba(76, 215, 246, 0.25), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.nl-chip {
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #eef0ff;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.nl-chip:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(76, 215, 246, 0.5);
  transform: translateY(-1px);
}

.nl-tilt {
  transition: transform 0.25s ease-out;
  will-change: transform;
}

.nl-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.7s ease, transform 1.4s ease;
}
.nl-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.nl-dot {
  flex: 1;
  padding: 6px 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.nl-dot > span {
  display: block;
  position: relative;
  height: 3px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.nl-dot > span::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  background: #4cd7f6;
}
.nl-dot.is-active > span::after {
  animation: nl-progress 5s linear forwards;
}
.is-paused .nl-dot.is-active > span::after {
  animation-play-state: paused;
}
@keyframes nl-progress {
  to { width: 100%; }
}

.nl-bounce {
  animation: nl-bounce 1.8s ease-in-out infinite;
}
@keyframes nl-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

@media (prefers-reduced-motion: reduce) {
  .nl-reveal,
  .nl-bounce {
    animation: none;
  }
  .nl-dot.is-active > span::after {
    animation: none;
    width: 100%;
  }
}

@media (max-width: 639px) {
  .nl-hide-mobile {
    display: none !important;
  }
}

/* Catalogue filter sidebar collapses to its header row on small screens. */
@media (max-width: 1023px) {
  .nl-filter-panel {
    position: static !important;
  }
  .nl-filter-panel.nl-collapsed > :not(:first-child) {
    display: none !important;
  }
  .nl-filter-panel.nl-collapsed > :first-child {
    padding-bottom: 0;
    border-bottom: 0;
  }
}

@media print {
  header,
  footer,
  aside,
  #compareDrawer,
  #floating-rfq-tray,
  a[href^="https://wa.me"] {
    display: none !important;
  }
  main {
    padding-top: 0 !important;
  }
}
