.wcs-back-to-top {
  position: fixed;
  right: clamp(16px, 2vw, 28px);
  bottom: calc(clamp(16px, 2vw, 28px) + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid #a70e25;
  border-radius: 4px;
  background: #c8102e;
  box-shadow: 0 8px 22px rgba(17, 19, 24, .2);
  color: #ffffff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease, background-color 160ms ease;
  visibility: hidden;
}

.wcs-back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.wcs-back-to-top:hover {
  background: #a70e25;
}

.wcs-back-to-top:focus-visible {
  outline: 3px solid rgba(200, 16, 46, .3);
  outline-offset: 3px;
}

.wcs-back-to-top span {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-1px);
}

body.store-page .wcs-back-to-top {
  right: auto;
  left: clamp(16px, 2vw, 28px);
}

@media (max-width: 640px) {
  .wcs-back-to-top {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: 44px;
    height: 44px;
  }

  body.store-page .wcs-back-to-top {
    right: auto;
    left: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wcs-back-to-top {
    transition: none;
  }
}

@media print {
  .wcs-back-to-top {
    display: none !important;
  }
}
