/* Keep the original product controls in a centered row below the product cards. */
.grh-product-carousel > .grh-carousel-arrows.grh-carousel-arrows--below {
  display: flex;
  position: static;
  inset: auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 18px 0 0;
  transform: none;
}

/* Keep the theme's category links and product filtering; add visible scroll controls. */
.grh-product-carousel .grh-category-navigation {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin-bottom: 12px;
}

.grh-product-carousel .grh-category-navigation .grh-carousel-categories {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 4px 2px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.grh-product-carousel .grh-category-navigation .grh-carousel-categories::-webkit-scrollbar {
  display: none;
}

.grh-product-carousel .grh-category-navigation .grh-carousel-categories a {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: max-content;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  text-overflow: clip;
}

.grh-product-carousel .grh-category-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #bf1c36;
  color: #fff;
  cursor: pointer;
  box-shadow: none;
}

.grh-product-carousel .grh-category-arrow svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.grh-product-carousel .grh-category-arrow:hover:not(:disabled) {
  background: #a81830;
}

.grh-product-carousel .grh-category-arrow:disabled {
  background: transparent;
  border-color: rgba(128, 128, 128, .35);
  color: var(--muted, #888);
  opacity: .5;
  cursor: default;
}

.grh-product-carousel .grh-category-arrow:focus-visible,
.grh-product-carousel .grh-category-navigation a:focus-visible {
  outline: 2px solid #e6536b;
  outline-offset: 2px;
}

.grh-product-carousel .grh-category-navigation[data-overflow="false"] {
  grid-template-columns: minmax(0, 1fr);
}

.grh-product-carousel .grh-category-navigation[data-overflow="false"] .grh-category-arrow {
  display: none;
}

@media (max-width: 600px) {
  .grh-product-carousel .grh-category-navigation {
    gap: 8px;
  }
}
