/* ============================================================
   Sve za stampu helper functions — Styles
   - Unified swatch size (2rem)
   - Borders (#9ca3af) for spans and images
   - Archive SKU styling
   - YITH chips/swatches tweaks
   ============================================================ */

/* Swatch base — applies to both <span> and <img> with class "color-swatch" */
.color-swatch,
img.color-swatch {
  display: inline-block;
  width: 2rem;          /* unified size */
  height: 2rem;         /* unified size */
  border: 1px solid #9ca3af; /* requested border */
  margin-right: .375rem;
  vertical-align: middle;
  object-fit: cover;    /* keeps images nicely contained */
  border-radius: 9999px;
}

/* If any size variants appear in markup, keep them the same size */
.color-swatch.swatch--sm,
.color-swatch.swatch--lg,
img.color-swatch.swatch--sm,
img.color-swatch.swatch--lg {
  width: 2rem;
  height: 2rem;
}

/* Archive bottom container (swatches under the card) */
.product-color-swatches-archive-bottom {
  margin-top: .5rem;
}

/* SKU style (archives + search) */
.archive-sku {
  display: block;
  margin: 4px;
  font-size: 1em;
  line-height: 1.2;
  text-decoration: none !important;
  color: #292929;
  cursor: default;
}

/* Make YITH color swatches look consistent */
.yith-wcan-filters .color-swatch,
.yith-wcan-filters img.color-swatch {
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.1);
  border-color: #9ca3af;
}

/* Optional: small gap fix for inline groups */
.product-color-swatches,
.product-color-swatches-archive-bottom {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .375rem;
}


/* === SZS Product Labels === */

/* Ensure a positioning context on archive tiles */
.woocommerce ul.products li.product,
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
  position: relative;
}

/* Container for multiple badges: top-right row */
.woocommerce ul.products li.product .szs-badges {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  flex-direction: row;      /* row layout */
  gap: 6px;
  pointer-events: none;     /* clicks pass to product link */
}

/* Individual badge wrappers inside the archive row */
.woocommerce ul.products li.product .szs-badges .szs-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Force archive badge images to 35px width */
.woocommerce ul.products li.product .szs-badge img,
.woocommerce ul.products li.product .szs-badge-img {
  width: 35px !important;
  height: auto !important;
  display: block;
  border-radius: 8px;
}

/* Shortcode output remains inline (no absolute positioning) */
.szs-labels-wrap .szs-badge {
  position: static;
  display: inline-block;
  pointer-events: auto;
}

/* Shortcode image width */
.szs-labels-wrap .szs-label-img {
  width: 35px;
  height: auto;
  display: inline-block;
  border-radius: 8px;
}