/* ColorProductItem renders the shared ProductCard sub-component. Sub-component
   CSS is not auto-bundled across a registered-component boundary (each
   registered component gets its own build scope), so this is a full inlined
   copy of the relevant ProductCard classes — kept in sync with
   sub-components/ProductCard/styles.css and the inlined copy in
   components/MultiTabProductSlider/styles.css. Only the root .product-card
   gains `width: 100%` here: in the manual/COMPONENT_LIST track the sizing
   (flex-basis per breakpoint) lives on the PARENT-owned slot wrapper div, not
   on this card directly (the parent cannot select into a child component's
   scoped classes), so the card just fills whatever width its slot gives it. */

.cc_xcxanevt_cOKcxGKPlt .product-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  text-decoration: none;
  color: inherit;
  width: 100%;
  min-width: 0;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-media {
  position: relative;
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  background-color: var(--color-surface-alt);
  min-width: 0;
}

.cc_xcxanevt_cOKcxGKPlt .product-card.is-portrait .product-card-media {
  aspect-ratio: 4 / 5;
}

.cc_xcxanevt_cOKcxGKPlt .product-card.is-square .product-card-media {
  aspect-ratio: 1 / 1;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Hand-picked cards: the media box is sized ONLY by its aspect ratio. The primary
   image is taken out of flow so its intrinsic dimensions (e.g. a cap photo)
   can never make the box taller than the T-shirt cards beside it. */
.cc_xcxanevt_cOKcxGKPlt .product-card-media {
  min-height: 0;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-image--primary {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-image--empty {
  background: linear-gradient(135deg, var(--color-surface-alt), var(--color-border));
}

.cc_xcxanevt_cOKcxGKPlt .product-card.has-hover-image .product-card-image--primary, .cc_xcxanevt_cOKcxGKPlt .product-card-image--hover {
  position: absolute;
  top: 0;
  left: 0;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-image--hover {
  opacity: 0;
  transition: opacity 220ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

@media (hover: hover) {
  .cc_xcxanevt_cOKcxGKPlt .product-card.has-hover-image:hover .product-card-image--hover {
    opacity: 1;
  }
}

.cc_xcxanevt_cOKcxGKPlt .product-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 2px;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-swatches {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  overflow: hidden;
  min-width: 0;
  margin-bottom: 2px;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-swatch {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  background-color: var(--color-surface-alt);
  background-size: cover;
  background-position: center;
  border: 1px solid #8f8f8f;
  box-shadow: none;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-swatch-count {
  flex: 0 0 auto;
  margin-left: 3px;
  font-family: var(--font-label);
  font-size: var(--text-label);
  line-height: 1;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-name {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 400;
  line-height: 1.4;
  color: var(--slider-text-color, var(--color-text-primary));
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  margin-bottom: 4px;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-body .rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  color: inherit;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-body .rating-stars {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-body .rating-star {
  position: relative;
  display: inline-block;
  width: 1em;
  height: 1em;
  color: var(--color-border);
}

.cc_xcxanevt_cOKcxGKPlt .product-card-body .rating-star-bg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-body .rating-star-fill {
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
  color: #f5b301;
  pointer-events: none;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-body .rating-star-fg {
  display: block;
  height: 100%;
  width: 1em;
  fill: currentColor;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-body .rating-count {
  font-family: var(--font-body);
  font-size: var(--text-small);
  color: var(--slider-text-color, var(--color-text-muted));
  white-space: nowrap;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-body .rating--sm {
  font-size: 13px;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-price {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.4;
  color: var(--slider-text-color, var(--color-text-primary));
  font-variant-numeric: tabular-nums;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-price--original {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text-muted);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

.cc_xcxanevt_cOKcxGKPlt .product-card .product-price--sm .product-price-final {
  font-size: 13px;
}
.cc_xcxanevt_cOKcxGKPlt .product-card .product-price--sm .product-price-original {
  font-size: 10px;
}
.cc_xcxanevt_cOKcxGKPlt .product-card .product-price-discount {
  font-size: 9px;
  padding: 2.4px 6.4px;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  padding: 4px 10px;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
  z-index: 1;
  border-radius: 0;
  pointer-events: none;
}

.cc_xcxanevt_cOKcxGKPlt .product-card-badge--sale {
  background: var(--slider-sale-bg, var(--discount-badge-bg, #d81f2a));
  color: var(--slider-sale-fg, var(--discount-badge-text, #ffffff));
}

.cc_xcxanevt_cOKcxGKPlt .product-card-badge--sold-out {
  background: var(--slider-soldout-bg, var(--color-error));
  color: var(--slider-soldout-fg, #ffffff);
}

.cc_xcxanevt_cOKcxGKPlt .product-card-savings {
  position: absolute;
  bottom: var(--space-sm);
  left: var(--space-sm);
  padding: 4px 10px;
  background: var(--slider-savings-bg, var(--color-accent-light));
  color: var(--slider-savings-fg, var(--color-text-primary));
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
  border-radius: 0;
  z-index: 1;
  pointer-events: none;
}

.cc_xcxanevt_cOKcxGKPlt .product-card:has(.product-card-badge--sold-out) .product-card-image--primary, .cc_xcxanevt_cOKcxGKPlt .product-card:has(.product-card-badge--sold-out) .product-card-image--empty {
  opacity: 0.55;
  filter: grayscale(0.2);
}

.cc_xcxanevt_cOKcxGKPlt .product-card:has(.product-card-badge--sold-out) .product-card-image--hover {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .cc_xcxanevt_cOKcxGKPlt .product-card-image {
    transition: transform 400ms ease-out, opacity 200ms ease;
  }

  .cc_xcxanevt_cOKcxGKPlt .product-card:hover .product-card-image {
    transform: scale(1.04);
  }

  .cc_xcxanevt_cOKcxGKPlt .product-card:has(.product-card-badge--sold-out):hover .product-card-image {
    transform: none;
  }
}

/* Edge-to-edge sliders: inset the text under each image so names / swatches /
   prices don't touch the screen edge. */
.cc_xcxanevt_cOKcxGKPlt .product-card-body {
  padding-left: 8px;
  padding-right: 8px;
}
