/* v1.8.3 - Text-box fit and centered labels
   Goal: badge/reducere and text elements keep their own readable box: text size + 3-4px padding,
   content vertically centered, no raw text glued to borders. Loaded last in live and editor. */
.product-card [data-nc-child]:not([data-nc-child="image"]) {
  box-sizing: border-box !important;
  padding: var(--pad, 4px) !important;
  line-height: 1.08 !important;
  min-width: 1.8em;
  min-height: calc(1em + 8px);
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: var(--text-align, left) !important;
  overflow: hidden !important;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

.product-card [data-nc-child="badge"],
.product-card [data-nc-child="discount"] {
  padding: 4px 6px !important;
  min-width: max-content;
  min-height: calc(1em + 8px);
  width: auto !important;
  height: auto !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.product-card [data-nc-child="price"],
.product-card [data-nc-child="old_price"] {
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 3px 4px !important;
  white-space: nowrap !important;
}

.product-card [data-nc-child="title"] {
  align-items: center !important;
  padding: 4px !important;
}

.product-card [data-nc-child="description"],
.product-card [data-nc-child="merchant"] {
  align-items: center !important;
  padding: 4px !important;
}

/* Editor: selected text elements get a clear content-box, but not a large overlay. */
.nc-editor-page .product-card [data-nc-child]:not([data-nc-child="image"]).nc-selected,
.nc-editor-page .product-card [data-nc-child]:not([data-nc-child="image"]).is-selected {
  outline-offset: 1px;
}
