/* OFC Badge Manager badge.css */

/* --------------------------------------------------
   Basis
-------------------------------------------------- */

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

/* gemeinsamer Badge-Stack */
.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;
}

/* Listing / Slider */
.product-box .product-badges,
.product-box .product-badges.ofc-product-badges-merged,
.card-body > .product-badges,
.card-body > .product-badges.ofc-product-badges-merged,
.ofc-product-badges-merged {
  position: absolute !important;
  top: 5px !important;
  left: 0 !important;
  margin-left: 10px !important;
  z-index: 7 !important;
}

/* PDP */
.ofc-product-badges-detail {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  z-index: 30 !important;
}

.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;
}

/* --------------------------------------------------
   Einheitliche Badge-Basis
-------------------------------------------------- */

.badge-new,
.badge-topseller,
.badge-sale,
.ofc-product-badge-system,
.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: 7px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

/* --------------------------------------------------
   System-Badges
-------------------------------------------------- */

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

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

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

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

.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;
}

/* --------------------------------------------------
   Custom-Badges 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;
}

/* SVG-/Mask-Icons */
.ofc-product-badge-system[data-ofc-icon="custom"]::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 7px;
  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;
}

/* Emoji-Icons */
.ofc-badge-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 11px;
  min-width: 11px;
  margin-right: 7px;
  line-height: 1;
  font-size: 11px;
}

/* --------------------------------------------------
   Mobile
-------------------------------------------------- */

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

  .ofc-product-badges-detail {
    left: 12px !important;
  }

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

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