/* Product Card Variants - Color Swatches */
.variant-swatches {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 4px;
  max-height: 44px;
  flex-wrap: nowrap;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

.variant-swatch {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  border: 0.5px solid #ddd;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.variant-swatch:hover {
  border-color: #666;
  transform: scale(1.15);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.variant-swatch.active {
  border-color: var(--primary-color, #333);
  border-width: 0.5px;
  box-shadow: 0 0 0 1px var(--primary-color, #333);
  transform: scale(1.1);
}

.variant-swatch img,
.variant-swatch-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.variant-swatch-label {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  color: #666;
  line-height: 1;
}

.variant-swatch-more {
  font-size: 11px;
  color: #888;
  font-weight: 500;
  white-space: nowrap;
  padding-left: 2px;
}

/* Ensure the swatches don't interfere with card click */
.variant-swatches * {
  pointer-events: auto;
}

/* Mobile / touch */
@media (max-width: 576px), (hover: none) and (pointer: coarse) {
  .variant-swatches {
    gap: 8px;
    padding: 8px 2px;
    max-height: 48px;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .variant-swatches::-webkit-scrollbar {
    display: none;
  }

  .variant-swatch {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }

  .variant-swatch:hover {
    transform: none;
    box-shadow: none;
  }

  .variant-swatch.active {
    transform: scale(1.05);
  }

  .variant-swatch-more {
    font-size: 10px;
    flex-shrink: 0;
  }
}
