:root {
  --catalog-fixed-footer-offset: 0px;
}

@media (min-width: 769px) {
  .sidebar.catalog-sidebar-sticky-ready {
    position: sticky;
    top: 16px;
    z-index: 20;
  }
}

.catalog-back-to-top {
  position: fixed;
  right: 20px;
  bottom: calc(20px + var(--catalog-fixed-footer-offset));
  z-index: 950;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  min-width: 50px;
  height: 50px;
  min-height: 50px;
  padding: 0;
  border: 1px solid rgba(208, 190, 96, 0.9);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 16px rgba(0, 42, 65, 0.13);
  color: #002a41;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease, bottom 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

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

.catalog-back-to-top:hover {
  border-color: #d0be60;
  background: #002a41;
  box-shadow: 0 5px 18px rgba(0, 42, 65, 0.2);
  color: #fff;
}

.catalog-back-to-top:focus-visible {
  outline: 2px solid #d0be60;
  outline-offset: 3px;
}

.catalog-back-to-top-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.mobile-filter-open .catalog-back-to-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 768px) {
  .mobile-filter-trigger {
    position: fixed;
    right: 14px;
    bottom: calc(14px + var(--catalog-fixed-footer-offset));
    z-index: 960;
    min-width: 112px;
    min-height: 50px;
    padding: 10px 14px;
    border-color: #3498db;
    border-radius: 999px;
    background: #3498db;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    color: #fff;
    transition: opacity 0.18s ease, visibility 0.18s ease, bottom 0.18s ease, transform 0.18s ease;
  }

  .mobile-filter-trigger:hover {
    background: #2980b9;
  }

  .mobile-filter-trigger .mobile-filter-count {
    background: #fff;
    color: #2474a6;
  }

  .mobile-filter-open .mobile-filter-trigger {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
  }

  .catalog-back-to-top {
    right: 14px;
    bottom: calc(74px + var(--catalog-fixed-footer-offset));
  }

  .catalog-back-to-top-icon {
    width: 22px;
    height: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-back-to-top,
  .mobile-filter-trigger {
    transition: none;
  }
}

@media print {
  .catalog-back-to-top,
  .mobile-filter-trigger {
    display: none !important;
  }
}
