/* v1.8.4 - Correct compact text-box behavior.
   Requirement: text elements keep their chosen font size, with only 3-4px padding on each side,
   and the text centered inside the element. Do NOT force large pills/ovals or override manual geometry. */
html body .magazine-shell .product-card [data-nc-child]:not([data-nc-child="image"]){
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:var(--text-align, center)!important;
  line-height:1!important;
  padding:var(--pad, 4px)!important;
  overflow:hidden!important;
  white-space:normal!important;
  word-break:normal!important;
  overflow-wrap:anywhere!important;
  min-width:calc(1em + 8px)!important;
  min-height:calc(1em + 8px)!important;
}

/* Labels must be compact rectangles: text size + 3-4px padding, not oval stickers. */
html body .magazine-shell .product-card [data-nc-child="badge"],
html body .magazine-shell .product-card [data-nc-child="discount"]{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  white-space:nowrap!important;
  overflow:visible!important;
  width:var(--w, fit-content)!important;
  height:var(--h, calc(1em + 8px))!important;
  min-width:calc(1em + 8px)!important;
  min-height:calc(1em + 8px)!important;
  padding:var(--pad, 4px)!important;
  border-radius:var(--radius, 2px)!important;
  line-height:1!important;
}

html body .magazine-shell .product-card [data-nc-child="badge"]{
  background:var(--card-bg,#cf332a)!important;
  color:var(--text-color,#fff)!important;
  font-size:var(--font-size,12px)!important;
  font-weight:900!important;
  text-transform:uppercase!important;
}

html body .magazine-shell .product-card [data-nc-child="discount"]{
  background:var(--card-bg,#f6d044)!important;
  color:var(--text-color,#9e2019)!important;
  border-color:var(--border-color,#9e2019)!important;
  border-width:var(--border-width,1px)!important;
  border-style:var(--border-style,solid)!important;
  font-family:var(--font-family,Impact,'Arial Black','Arial Narrow',sans-serif)!important;
  font-size:var(--font-size,14px)!important;
  font-weight:900!important;
  transform:none!important;
}

html body .magazine-shell .product-card [data-nc-child="price"],
html body .magazine-shell .product-card [data-nc-child="old_price"]{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  white-space:nowrap!important;
  padding:var(--pad, 3px 4px)!important;
  width:var(--w, fit-content)!important;
  height:var(--h, calc(1em + 8px))!important;
  min-width:calc(1em + 8px)!important;
  min-height:calc(1em + 8px)!important;
}

/* Editor selection must not inflate the text box. */
body.nc-editor-page .magazine-shell .product-card [data-nc-child]:not([data-nc-child="image"]).is-editor-child-selected,
body.nc-editor-page .magazine-shell .product-card [data-nc-child]:not([data-nc-child="image"]).nc-selected{
  outline-offset:1px!important;
}
