/* Compact, keyboard-accessible back-to-top control for customer product/catalog pages. */
.kg-scroll-top {
  position: fixed;
  inset-inline-end: max(14px, env(safe-area-inset-right));
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 35;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--kg-border-soft, #f1cad8);
  border-radius: 14px;
  background: var(--color-kg-surface, #fffdfc);
  color: var(--color-kg-rose-700, #963f5c);
  box-shadow: 0 8px 24px rgb(52 42 49 / 0.14);
  cursor: pointer;
}
.kg-scroll-top[hidden] { display: none !important; }
.kg-scroll-top svg { width: 20px; height: 20px; }
.kg-scroll-top:focus-visible {
  outline: 3px solid var(--ring, #df809b);
  outline-offset: 3px;
}
/* The mobile Buy Now bar remains fully visible; the scroll control sits above it. */
body.mlbb-has-sticky-buy .kg-scroll-top {
  bottom: calc(86px + env(safe-area-inset-bottom));
}
@media (min-width: 1024px) {
  body.mlbb-has-sticky-buy .kg-scroll-top {
    bottom: calc(14px + env(safe-area-inset-bottom));
  }
}

/* Loaded after catalog CSS: keep the fixed Buy Now bar above pinned filters. */
body.mlbb-has-sticky-buy .mlbb-category-wrap { z-index: 30; }
