.product-back-to-top {
  --back-to-top-color: #ffb07a;
  position: fixed;
  z-index: 83;
  right: max(1.5rem, env(safe-area-inset-right));
  bottom: calc(1.5rem + env(safe-area-inset-bottom));
  display: inline-flex;
  min-height: 50px;
  padding: 0.72rem 1rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid color-mix(in srgb, var(--back-to-top-color) 62%, rgba(255, 255, 255, 0.3));
  border-radius: 999px;
  background: rgba(4, 8, 7, 0.92);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.42), 0 0 22px color-mix(in srgb, var(--back-to-top-color) 16%, transparent);
  color: #f7f8fa;
  font-size: 0.78rem;
  font-weight: 820;
  line-height: 1;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease, border-color 160ms ease, background 160ms ease;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.product-back-to-top.is-core {
  --back-to-top-color: #d8bd72;
}

.product-back-to-top.is-craft {
  --back-to-top-color: #ffb07a;
}

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

.product-back-to-top:hover,
.product-back-to-top:focus-visible {
  border-color: var(--back-to-top-color);
  outline: none;
  background: color-mix(in srgb, var(--back-to-top-color) 15%, rgba(4, 8, 7, 0.96));
}

.product-back-to-top:focus-visible {
  box-shadow: 0 0 0 3px rgba(247, 248, 250, 0.92), 0 0 0 6px color-mix(in srgb, var(--back-to-top-color) 75%, transparent);
}

.product-back-to-top-arrow {
  font-size: 1.05rem;
  line-height: 0.8;
}

@media (max-width: 1179px) {
  .product-back-to-top {
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: calc(4.75rem + env(safe-area-inset-bottom));
    min-height: 48px;
    padding-inline: 0.88rem;
  }
}

@media (max-width: 720px) and (orientation: portrait) {
  .product-back-to-top {
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    width: 42px;
    min-height: 42px;
    padding: 0;
    border-color: color-mix(in srgb, var(--back-to-top-color) 40%, rgba(255, 255, 255, 0.2));
    background: rgba(4, 8, 7, 0.86);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .product-back-to-top > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .product-back-to-top-arrow {
    font-size: 1.15rem;
  }

  .product-back-to-top.is-scrolling,
  .product-back-to-top.is-content-obscured {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(8px) !important;
  }
}

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

.dw-motion-paused .product-back-to-top {
  transition: none;
}
