/* v1.8.5 - true centered text boxes + selectable shapes.
   The element keeps the user's x/y/w/h. Only internal text alignment/padding and visual shape are handled here. */
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;          /* vertical center */
  justify-content:center!important;      /* horizontal center by default */
  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;
}

/* If user chooses left/right alignment in toolbar, keep vertical centering but move content horizontally. */
html body .magazine-shell .product-card [data-nc-child]:not([data-nc-child="image"])[style*="--text-align:left"]{
  justify-content:flex-start!important;
  text-align:left!important;
}
html body .magazine-shell .product-card [data-nc-child]:not([data-nc-child="image"])[style*="--text-align:right"]{
  justify-content:flex-end!important;
  text-align:right!important;
}

/* Badge / discount labels must be compact text boxes: text + 3-4px in all directions. */
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:hidden!important;
  padding:var(--pad,4px)!important;
  line-height:1!important;
  min-width:calc(1em + 8px)!important;
  min-height:calc(1em + 8px)!important;
}

/* Shape classes controlled from the editor toolbar. */
html body .magazine-shell .product-card .nc-shape-rect{border-radius:0!important;}
html body .magazine-shell .product-card .nc-shape-rounded{border-radius:6px!important;}
html body .magazine-shell .product-card .nc-shape-pill{border-radius:999px!important;}
html body .magazine-shell .product-card .nc-shape-circle{
  border-radius:50%!important;
  aspect-ratio:1/1!important;
  min-width:calc(1em + 12px)!important;
  min-height:calc(1em + 12px)!important;
}

html body .magazine-shell .product-card [data-nc-child="badge"]{
  background:var(--card-bg,#cf332a)!important;
  color:var(--text-color,#fff)!important;
  border-color:var(--border-color,transparent)!important;
  border-width:var(--border-width,0px)!important;
  border-style:var(--border-style,solid)!important;
  font-size:var(--font-size,12px)!important;
  font-weight:var(--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:var(--font-weight,900)!important;
  transform:none!important;
}

/* Price labels also stay centered inside their own box. */
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;
  min-width:calc(1em + 8px)!important;
  min-height:calc(1em + 8px)!important;
}

/* The blue/yellow editor selection must not change real box geometry. */
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;
}

/* Compact shape selector in the toolbar. */
.nc-element-toolbar select[data-tool="shape"]{max-width:104px;}
