/* ---------------------------------------------------------------------------
 * Granzia — Out-of-stock (غير متوفر) states.
 * Product cards (fp-card), PDP (single-product) and search results.
 * Badge spec: background #E40045, white text.
 * ------------------------------------------------------------------------- */

/* --- Shared badge --- */
.fp-badge--oos,
.pdp-oos-badge,
.home-search__oos {
  background: #e40045;
  color: #fff;
}

/* --- Product cards --- */
.fp-card--oos .fp-media-img {
  opacity: 0.55;
  filter: saturate(0.85);
}

.fp-card--oos .fp-discount {
  display: none; /* a discount pill on a sold-out card is misleading */
}

/* Wishlist CTA that replaces "أضف للسلة" on sold-out cards. */
.fp-cta--wishlist {
  gap: 8px;
  background: #fff;
  color: #e40045;
  border: 1.5px solid #e40045;
}

.fp-cta--wishlist .g-icon {
  width: 18px;
  height: 18px;
}

.fp-cta--wishlist.is-active {
  background: #e40045;
  color: #fff;
}

/* --- PDP --- */
.pdp-oos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-width: 96px;
  height: 30px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  margin: 4px 0 8px;
}

/* Badge overlaid on the PDP gallery image. */
.pdp-image-badge.pdp-oos-badge {
  position: absolute;
  inset-inline-start: 16px;
  top: 16px;
  margin: 0;
  z-index: 3;
}

.pdp-purchase--oos {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.pdp-button--wishlist {
  gap: 10px;
  background: #fff;
  color: #e40045;
  border: 1.6px solid #e40045;
}

.pdp-button--wishlist.is-active {
  background: #e40045;
  color: #fff;
}

.pdp-button--wishlist img {
  width: 20px;
  height: 20px;
}

.pdp-oos-note {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

/* --- Search results --- */
.home-search__card {
  position: relative;
}

.home-search__oos {
  position: absolute;
  inset-inline-start: 8px;
  top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  z-index: 2;
}

.home-search__card--oos .home-search__photo img {
  opacity: 0.6;
}
