/* IGWC Brands Badge — Ignavo */

/* 1) Karty produktów (grid/list/widget) */
.product .product-thumbnail .product-badge {
  /* Ignavo ma pointer-events:none — zostawiamy, ale umożliwiamy hover tylko na badge */
  pointer-events: none;
}

.product .product-thumbnail .product-badge .igwc-brand-badge {
  pointer-events: auto;
}

.igwc-brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgb(255 255 255 / 84%);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.10);
  line-height: 1;
  position: relative;
}

.igwc-brand-badge__img {
  display: block;
  display: block;
  max-width: 120px;
  height: auto;
  object-fit: contain;
}

.igwc-brand-badge--text {
  font-size: 12px;
  font-weight: 600;
  color: #111;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2) Tooltip (czysty CSS, bardzo lekki) */
.igwc-brand-badge::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  background: rgba(17,17,17,.94);
  color: #fff;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .12s ease, transform .12s ease;
  pointer-events: none;
  z-index: 9999;
}

.igwc-brand-badge::before {
  content: "";
  position: absolute;
  left: 14px;
  top: calc(100% + 2px);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid rgba(17,17,17,.94);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .12s ease, transform .12s ease;
  pointer-events: none;
  z-index: 9999;
}

.igwc-brand-badge:hover::after,
.igwc-brand-badge:hover::before {
  opacity: 1;
  transform: translateY(0);
}

/* 3) Single product gallery: brak stylu w Ignavo, ustawiamy pozycjonowanie */
.woocommerce-product-gallery {
  position: relative;
}

.woocommerce-product-gallery .product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  display: inline-flex;
  gap: 8px;
  pointer-events: none;
}

.woocommerce-product-gallery .product-badge .igwc-brand-badge {
  pointer-events: auto;
}

/* 4) Gdyby gdzieś został pusty wrapper */
.product .product-thumbnail .product-badge:empty,
.woocommerce-product-gallery .product-badge:empty {
  display: none;
}
