/* HUA.RS marketplace catalogue: image-led root discovery and independent scrolling. */
.home .hua-marketplace-intro { display: none; }
.home .hua-marketplace-directory { padding-top: 16px; padding-bottom: 22px; }
.home .hua-marketplace-category-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.home .hua-marketplace-category {
  min-height: 142px;
  border-color: transparent;
  border-radius: 14px;
  background: #eef5ff;
}
.home .hua-marketplace-category.hua-tone-red { background: #fff0f1; }
.home .hua-marketplace-category.hua-tone-orange { background: #fff5e8; }
.home .hua-marketplace-category.hua-tone-green { background: #edf9f3; }
.home .hua-marketplace-category.hua-tone-purple { background: #f3f0ff; }
.home .hua-marketplace-category-main {
  display: flex;
  min-height: 142px;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  padding: 8px 8px 12px;
  text-align: center;
}
.home .hua-marketplace-category-main > .hua-marketplace-category-art {
  display: grid;
  width: 100%;
  height: 94px;
  flex: 0 0 94px;
  place-items: center;
  border-radius: 0;
  color: var(--hua-marketplace-blue);
  background: transparent;
}
.home .hua-marketplace-category-main > .hua-marketplace-category-art img {
  display: block;
  width: 92px;
  height: 92px;
  object-fit: contain;
}
.home .hua-marketplace-category-main > .hua-marketplace-category-art .hua-icon {
  width: 46px;
  height: 46px;
}
.home .hua-marketplace-category-main > .hua-icon,
.home .hua-marketplace-category nav { display: none; }
.home .hua-marketplace-category-main strong {
  width: 100%;
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
}
.home .hua-marketplace-category:hover {
  border-color: #b8c8db;
  box-shadow: 0 10px 24px rgba(16, 40, 74, .09);
  transform: translateY(-2px);
}
.hua-category-browser-roots > button > span img,
.hua-category-browser-overview-grid button > span img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.hua-category-marketplace-icon.has-catalog-asset {
  overflow: hidden;
  padding: 3px;
  color: inherit;
  background: #eef5ff;
  box-shadow: none;
}
.hua-category-marketplace-icon.has-catalog-asset img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 980px) {
  .home .hua-marketplace-category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .home .hua-marketplace-directory {
    width: 100%;
    padding: 10px 0 14px 16px;
  }
  .home .hua-marketplace-category-grid {
    display: grid;
    width: 100%;
    grid-auto-columns: 88px;
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-template-rows: repeat(2, 104px);
    gap: 8px;
    overflow-x: auto;
    padding: 2px 16px 6px 0;
    scroll-padding-inline: 16px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
  .home .hua-marketplace-category-grid::-webkit-scrollbar { display: none; }
  .home .hua-marketplace-category {
    min-height: 104px;
    border-radius: 13px;
    scroll-snap-align: start;
  }
  .home .hua-marketplace-category-main {
    min-height: 104px;
    justify-content: center;
    gap: 2px;
    padding: 5px 4px 7px;
  }
  .home .hua-marketplace-category-main > .hua-marketplace-category-art {
    width: 100%;
    height: 56px;
    flex-basis: 56px;
  }
  .home .hua-marketplace-category-main > .hua-marketplace-category-art img {
    width: 54px;
    height: 54px;
  }
  .home .hua-marketplace-category-main > .hua-marketplace-category-art .hua-icon {
    width: 31px;
    height: 31px;
  }
  .home .hua-marketplace-category-main strong {
    display: -webkit-box;
    min-height: 28px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.25;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home .hua-marketplace-category { scroll-behavior: auto; transition: none; }
}
