/*
 * Shain Store v1.0.92
 * Compact WooCommerce sale label. Prevents the "onsale" label from becoming a full-width strip.
 * Scoped to product images/cards; unrelated labels and form notices are untouched.
 */
html body.single-product div.product,
html body.single-product .woocommerce-product-gallery,
html body.single-product .woocommerce-product-gallery__wrapper,
html body.woocommerce ul.products li.product,
html body.woocommerce ul.products li.product .product-thumb,
html body.woocommerce ul.products li.product .product-image-link,
html body .pt-product-card .product-thumb,
html body .pt-product-card .product-image-link,
html body .ss-product-card .product-thumb,
html body .ss-product-card .product-image-link {
  position: relative;
}

html body.single-product div.product > .onsale,
html body.single-product div.product > span.onsale,
html body.single-product .woocommerce-product-gallery .onsale,
html body.single-product div.product .woocommerce-product-gallery span.onsale,
html body.woocommerce ul.products li.product span.onsale,
html body.woocommerce-page ul.products li.product span.onsale,
html body .pt-product-card span.onsale,
html body .ss-product-card span.onsale,
html body .related.products span.onsale,
html body .up-sells.upsells span.onsale,
html body .cross-sells span.onsale {
  position: absolute !important;
  top: 12px !important;
  right: 10px !important;
  left: auto !important;
  inset-inline-start: auto !important;
  inset-inline-end: auto !important;
  bottom: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  float: none !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: calc(100% - 20px) !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 4px 9px !important;
  box-sizing: border-box !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: #b5122a !important;
  color: #fff !important;
  font-family: 'Vazirmatn', 'Noto Sans Arabic', Tahoma, sans-serif !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 1.5 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  transform: none !important;
  box-shadow: 0 2px 8px rgba(181, 18, 42, .16) !important;
  z-index: 25 !important;
}

@media (max-width: 760px) {
  html body.single-product div.product > .onsale,
  html body.single-product div.product > span.onsale,
  html body.single-product .woocommerce-product-gallery .onsale,
  html body.single-product div.product .woocommerce-product-gallery span.onsale,
  html body.woocommerce ul.products li.product span.onsale,
  html body.woocommerce-page ul.products li.product span.onsale,
  html body .pt-product-card span.onsale,
  html body .ss-product-card span.onsale,
  html body .related.products span.onsale,
  html body .up-sells.upsells span.onsale,
  html body .cross-sells span.onsale {
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    inset-inline-start: auto !important;
    inset-inline-end: auto !important;
    width: max-content !important;
    max-width: calc(100% - 16px) !important;
    padding: 3px 7px !important;
    font-size: 10px !important;
    border-radius: 7px !important;
  }
}


/* v1.0.93 final override: compact sale flash in RTL single-product layout. */
html body.single-product div.product > .onsale,
html body.single-product div.product > span.onsale {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  inset-inline-start: auto !important;
  inset-inline-end: auto !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: calc(100% - 20px) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 4px 9px !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  align-self: flex-start !important;
  z-index: 40 !important;
}

@media (max-width: 760px) {
  html body.single-product div.product > .onsale,
  html body.single-product div.product > span.onsale {
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    inset-inline-start: auto !important;
    inset-inline-end: auto !important;
    width: max-content !important;
    max-width: calc(100% - 20px) !important;
    padding: 3px 8px !important;
    font-size: 10px !important;
  }
}
