.palvea-product-card__media-frame > .qpalvea-product-label {
  position: absolute;
  z-index: 4;
  top: 8px;
  right: 8px;
  max-width: calc(100% - 16px);
  box-sizing: border-box;
  padding: 4px clamp(4px, 2.6%, 9px);
  border: 1px solid #a77b35;
  border-radius: 999px;
  background: #f0d296 linear-gradient(125deg, #dcb76b 0%, #fff2ca 35%, #f2d897 58%, #e1bc73 100%);
  box-shadow: inset 0 1px 0 #fff7df, 0 1px 3px rgb(62 41 9 / 20%);
  color: #3b260d;
  font: 700 clamp(10px, .82vw, 12px)/1.25 system-ui, sans-serif;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.palvea-product-card__media-frame > .qpalvea-product-label--beside-sale {
  /* Leave the theme's upper-left Sale flag its own space on two-column phones. */
  max-width: calc(100% - 72px);
}

.palvea-product-card__media-frame > .qpalvea-product-label--below-stock {
  /* The stock plugin anchors Sold out .65rem from the top, with a 22px pill. */
  top: calc(.65rem + 34px);
  right: .65rem;
  max-width: calc(100% - 1.3rem);
}

@media (max-width: 360px) {
  .palvea-product-card__media-frame > .qpalvea-product-label--beside-sale {
    /* Keep Premium on one line even on a 126px card. */
    padding-left: 2px;
    padding-right: 2px;
  }
}
