/* OFC Badge Manager badge.css */

.product-box,
.product-box .card-body,
.ofc-pdp-gallery-badge-wrap {
  position: relative;
}

/* Listing / PDP Stack */
.product-box .product-badges,
.ofc-product-badges-merged,
.ofc-product-badges-detail {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  pointer-events: none;
}

.product-box .product-badges {
  position: absolute;
  top: 5px;
  left: 0;
  margin-left: 10px;
  z-index: 7;
}

.ofc-product-badges-merged {
  position: absolute;
  top: 5px;
  left: 0;
  margin-left: 10px;
  z-index: 7;
}

.ofc-product-badges-detail {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 30;
}

.product-box .product-badges > *,
.ofc-product-badges-merged > *,
.ofc-product-badges-detail > * {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: max-content !important;
  line-height: 1 !important;
}

/* Alle Badges exakt gleich */
.badge-new,
.badge-topseller,
.badge-sale,
.ofc-product-badge-system,
.product-box .product-badges .badge,
.ofc-product-badges-detail .badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: top !important;
  margin: 0 !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 10px !important;
  border-radius: 4px !important;
  line-height: 1 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
  border: 0 !important;
  float: none !important;
  max-width: max-content !important;
}

/* alle Icons gleich */
.badge-new::before,
.badge-topseller::before,
.badge-sale::before,
.ofc-product-badge-system::before {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-right: 5px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

/* NEU */
.badge-new {
  background: #ffffff !important;
  color: #bb1f00 !important;
}

.badge-new::before {
  content: "🔥";
  font-size: 11px !important;
}

/* BELIEBT */
.badge-topseller {
  background: #bb1f00 !important;
  color: #ffffff !important;
}

.badge-topseller::before {
  content: "🏆";
  font-size: 11px !important;
}

/* SALE */
.badge-sale {
  background: #bb1f00 !important;
  color: #ffffff !important;
}

.badge-sale::before {
  content: "%";
  font-size: 11px !important;
  font-weight: 800 !important;
}

.badge-new.bg-danger,
.badge-topseller.bg-success,
.badge-sale.bg-danger {
  background-image: none !important;
}

/* generische Custom-Badges nur aus Plugin-Konfig */
.ofc-product-badge-system {
  background: var(--ofc-badge-bg, #bb1f00) !important;
  color: var(--ofc-badge-color, #ffffff) !important;
  border-color: var(--ofc-badge-bg, #bb1f00) !important;
  opacity: 0.95;
}

.ofc-product-badge-system[data-ofc-icon="custom"]::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 5px;
  background-color: var(--ofc-badge-icon-color, currentColor);
  -webkit-mask: var(--ofc-badge-icon) no-repeat center / contain;
  mask: var(--ofc-badge-icon) no-repeat center / contain;
}

@media (max-width: 768px) {
  .product-box .product-badges,
  .ofc-product-badges-merged,
  .ofc-product-badges-detail {
    gap: 6px !important;
  }

  .product-box .product-badges {
    top: 20px;
  }

  .ofc-product-badges-merged {
    top: 0 !important;
  }

  .badge-new,
  .badge-topseller,
  .badge-sale,
  .ofc-product-badge-system,
  .product-box .product-badges .badge,
  .ofc-product-badges-detail .badge {
    min-height: 24px !important;
    height: 24px !important;
    padding: 0 8px !important;
  }
}
