.product-card__icons-wrapper {
  display: block;
  position: relative;
  width: 100%;
  min-width: 0;
  contain: layout inline-size;
}

.product-card__icons-wrapper::before,
.product-card__icons-wrapper::after {
  content: "";
  position: absolute;
  inset-block: 1px;
  width: 40px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.product-card__icons-wrapper::before {
  inset-inline-start: 1px;
  background: linear-gradient(to var(--transform-origin-end), rgb(var(--color-background)), rgb(var(--color-background) / 0));
  opacity: var(--edge-start, 0);
}

.product-card__icons-wrapper::after {
  inset-inline-end: 1px;
  background: linear-gradient(to var(--transform-origin-start), rgb(var(--color-background)), rgb(var(--color-background) / 0));
  opacity: var(--edge-end, 0);
}

.product-card__icons {
  --icons-columns: 3;
  width: 100%;
  list-style: none;
}

.product-card__icons:empty {
  display: none;
}

.product-card__icons-icon {
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__icons-icon .icon {
  object-fit: contain;
}

.product-card__icons-text {
  min-width: 0;
}

.product-card__icons-value,
.product-card__icons-label {
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card__icons-value {
  font-size: 13px;
}

.product-card__icons-label {
  font-size: 10px;
}

.product-card__icons--grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid rgb(var(--color-border));
}

.product-card__icons--grid .product-card__icons-item {
  grid-column: span 2;
}

.product-card__icons--grid .product-card__icons-item:nth-child(3n+1):last-child {
  grid-column: span 6;
}

.product-card__icons--grid .product-card__icons-item:nth-child(3n+1):nth-last-child(2),
.product-card__icons--grid .product-card__icons-item:nth-child(3n+2):last-child {
  grid-column: span 3;
}

.product-card__icons--grid .product-card__icons-item {
  padding: 12px;
}

.product-card__icons--grid .product-card__icons-item {
  border-inline-start: 1px solid rgb(var(--color-border));
}

.product-card__icons--grid .product-card__icons-item:first-child {
  border-inline-start: 0;
}

@media (min-width: 960px) {
  .product-card__icons--grid:not(.product-card__icons--carousel) .product-card__icons-item:nth-child(4) {
    border-inline-start: 0;
  }

  .product-card__icons--grid:not(.product-card__icons--carousel) .product-card__icons-item:nth-child(4),
  .product-card__icons--grid:not(.product-card__icons--carousel) .product-card__icons-item:nth-child(5),
  .product-card__icons--grid:not(.product-card__icons--carousel) .product-card__icons-item:nth-child(6) {
    border-block-start: 1px solid rgb(var(--color-border));
  }
}

.product-card__icons--list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card__icons--list .product-card__icons-icon {
  display: none;
}

.product-card__icons--list .product-card__icons-text {
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  width: 100%;
}

.product-card__icons--list .product-card__icons-text::before {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background-image: repeating-linear-gradient(to right, rgb(var(--color-border)) 0 2px, transparent 2px 4px);
}

.product-card__icons--list .product-card__icons-label {
  order: -1;
  text-transform: uppercase;
}

.product-card__icons--list .product-card__icons-value {
  text-align: right;
}

.product-card__icons--carousel {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x;
}

.product-card__icons--carousel::-webkit-scrollbar {
  display: none;
}

.product-card__icons.is-scrollable {
  cursor: grab;
}

.product-card__icons.is-dragging {
  cursor: grabbing;
  user-select: none;
  scroll-snap-type: none !important;
}

.product-card__icons--carousel .product-card__icons-item {
  scroll-snap-align: start;
  flex: 0 0 calc(100% / var(--icons-columns));
  min-width: 40%;
}

@media (max-width: 959px) {
  /* Mobile: horizontal swipe with snap; ~2 items visible, swipe for the rest */
  .product-card__icons--grid,
  .product-card__icons--grid.product-card__icons--carousel {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }

  .product-card__icons--grid::-webkit-scrollbar {
    display: none;
  }

  .product-card__icons--grid .product-card__icons-item,
  .product-card__icons--grid.product-card__icons--carousel .product-card__icons-item {
    grid-column: unset !important;
    flex: 0 0 50%;
    min-width: 50%;
    max-width: 50%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding: 8px 4px;
    gap: 4px;
    justify-content: center;
  }

  .product-card__icons--grid .product-card__icons-item:first-child {
    border-inline-start: 0;
  }

  .product-card__icons-icon {
    flex: 0 0 14px;
    width: 14px;
  }

  .product-card__icons-icon .icon {
    width: 14px;
    height: 14px;
  }

  .product-card__icons-value {
    font-size: 11px;
    line-height: 1.2;
  }

  .product-card__icons-label {
    font-size: 9px;
    line-height: 1.2;
  }

  .product-card__icons-text {
    gap: 1px;
  }
}
