@font-face {
  font-family: "Honey Script";
  src: url("../fonts/HoneyScript-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Honey Script";
  src: url("../fonts/HoneyScript-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

.label-card {
  box-sizing: border-box;
  border: 2px solid #000;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  font-family: "Times New Roman", Georgia, serif;
  color: #000;
  background: #fff;
}

.label-section { padding: 5px 6px; }

/* ------------------------------------------------- compact template ---- */
/* Used for label_types with template='compact' (e.g. the Faleza group):
   a short landscape label with no barcode and no company footer - just
   logo/brand, expiry, net quantity on the left, and product name +
   ingredients + allergens on the right. */
.label-card-compact {
  box-sizing: border-box;
  border: 2px solid #000;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100%;
  font-family: "Times New Roman", Georgia, serif;
  color: #000;
  background: #fff;
  padding: 5px 8px;
  gap: 8px;
}
.lc-left {
  flex: 0 0 30%;
  min-width: 0;
  position: relative;
}
.lc-logo-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.lc-logo-row img { width: 30px; height: auto; flex-shrink: 0; }
.lc-la-text {
  font-family: "Honey Script", "Brush Script MT", cursive, "Times New Roman", serif;
  font-weight: 600;
  font-size: 1.35em;
  line-height: 0.95;
  white-space: nowrap;
}
.lc-hr { border-top: 1.5px solid #000; margin: 4px 0; }
.lc-expira { font-weight: 700; font-size: 0.82em; }
.lc-qty-block { position: absolute; bottom: 0; right: 0; text-align: right; }
.lc-qty { font-weight: 700; font-size: 1.7em; line-height: 1; }
.lc-qty-caption { font-size: 0.6em; font-weight: 600; }

.lc-divider { border-left: 1.5px solid #000; flex: 0 0 auto; }

.lc-right {
  flex: 1;
  min-width: 0;
  padding-left: 4px;
  overflow: hidden;
}
.lc-title {
  font-weight: 700;
  text-align: center;
  text-decoration: underline;
  font-size: 1.05em;
  margin-bottom: 3px;
}
.lc-ingrediente, .lc-alergeni {
  font-size: 0.76em;
  line-height: 1.22;
  text-align: justify;
  margin-top: 3px;
}

.label-card-compact.lc-compact .lc-ingrediente,
.label-card-compact.lc-compact .lc-alergeni { font-size: 0.68em; line-height: 1.15; }
.label-card-compact.lc-compact .lc-title { font-size: 0.95em; }

.label-card-compact.lc-tight .lc-ingrediente,
.label-card-compact.lc-tight .lc-alergeni { font-size: 0.6em; line-height: 1.1; }
.label-card-compact.lc-tight .lc-title { font-size: 0.88em; }
.label-card-compact.lc-tight .lc-qty { font-size: 1.4em; }
.label-section + .label-section { border-top: 1.4px solid #000; }

.label-header { display: flex; gap: 8px; flex: 1 1 0; min-height: 0; overflow: hidden; }
.label-logo-col {
  width: 28%;
  flex-shrink: 0;
  position: relative;
}
.label-logo-inner {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  text-align: center;
}
.label-logo-col img { width: 92%; max-width: 105px; }
.la-text {
  font-family: "Honey Script", "Brush Script MT", cursive, "Times New Roman", serif;
  font-weight: 600;
  font-style: normal;
  font-size: 2.0em;
  line-height: 1.05;
  white-space: nowrap;
}
.produs-de-label { font-weight: 700; }
.la-text-sm { margin: 0 3px; }

.label-title-col { flex: 1; min-width: 0; }
.label-title { font-weight: 700; text-align: center; font-size: 1.05em; line-height: 1.1; }
.label-subtitle { font-weight: 700; text-align: center; font-size: 1.05em; line-height: 1.1; margin-bottom: 1px; }
.label-ingrediente, .label-alergeni { font-size: 0.78em; margin-top: 2px; text-align: justify; line-height: 1.25; }

.label-nutrition {
  font-size: 0.82em;
  line-height: 1.4;
  flex: 1 1 0;
  min-height: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
}
.label-alergeni-narrow {
  text-align: left;
  font-size: 0.9em;
  line-height: 1.22;
  min-height: 2.5em;
  margin-bottom: 4px;
}
.label-expira { margin-top: 4px; font-size: 1.15em; font-weight: 600; text-align: left; }
.expira-line { display: inline-block; width: 110px; border-bottom: 1.5px solid #000; vertical-align: middle; margin-left: 4px; }

/* auto-compact: labels with longer ingredient lists get smaller text so
   the footer (barcode included) never gets pushed off the fixed-size page */
.text-compact .label-ingrediente, .text-compact .label-alergeni { font-size: 0.72em; line-height: 1.18; }
.text-compact .label-nutrition { font-size: 0.76em; line-height: 1.22; }
.text-compact .label-title, .text-compact .label-subtitle { font-size: 0.96em; }

.text-tight .label-ingrediente, .text-tight .label-alergeni { font-size: 0.66em; line-height: 1.12; }
.text-tight .label-nutrition { font-size: 0.7em; line-height: 1.12; }
.text-tight .label-title, .text-tight .label-subtitle { font-size: 0.9em; }
.text-tight .la-text { font-size: 1.3em; }
.text-tight.label-narrow .la-text { font-size: 1.7em; }

.label-footer { font-size: 0.78em; line-height: 1.35; flex: 1 1 0; min-height: 0; overflow: hidden; position: relative; }
.label-footer-bottom-group { position: absolute; left: 0; right: 0; bottom: 0; }
.label-footer-top {
  font-size: 1.05em;
  margin-bottom: 2px;
  position: relative;
  min-height: 1.3em;
}
.label-footer-top .produs-de-line { white-space: nowrap; }
.label-footer-top .label-expira {
  position: absolute;
  left: 62%;
  top: 0;
  margin-top: 0;
  font-size: 0.85em;
  font-weight: 600;
  white-space: nowrap;
}
.label-company-block { }
.label-company { font-size: 0.95em; margin-left: 5px; }

.label-barcode-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding-left: 4px;
  padding-bottom: 3px;
}
.label-barcode { flex: 0 0 auto; }
.label-barcode svg { display: block; }
.label-recycle {
  flex: 0 0 auto;
  text-align: right;
}
.recycle-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 10px;
}
.recycle-symbol { font-size: 1.5em; font-weight: 700; white-space: nowrap; line-height: 1; }
.recycle-label { font-size: 0.5em; font-weight: 700; margin-left: 2px; vertical-align: middle; }
.label-net { font-size: 2.0em; font-weight: 700; white-space: nowrap; line-height: 1; }
.label-net-caption { font-size: 0.55em; text-align: left; margin-top: 2px; white-space: nowrap; }

.label-narrow .label-net { font-size: 1.2em; }
.label-narrow .label-barcode-row {
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  padding-left: 5px;
  padding-right: 5px;
  padding-bottom: 6px;
}
.label-narrow .label-barcode { order: 2; width: 100%; text-align: center; }
.label-narrow .label-barcode svg { margin: 0 auto; }
.label-narrow .label-recycle { order: 1; width: 100%; text-align: left; }
.label-narrow .recycle-row { justify-content: space-between; width: 100%; }
.label-narrow .label-net-caption { text-align: right; }

/* narrow (2-per-sheet) tweaks: center the nutrition/footer text like the original */
.label-narrow .label-nutrition { text-align: center; font-size: 0.76em; line-height: 1.22; gap: 1px; flex: 0.86 1 0; }
.label-narrow .label-footer { flex: 1.14 1 0; }
.label-narrow .label-footer-top { text-align: center; }
.label-narrow .label-company { text-align: left; line-height: 1.15; }
.label-narrow .label-header { flex-direction: column; align-items: center; }
.label-narrow .label-logo-col { width: 100%; padding: 0; }
.label-narrow .label-logo-inner {
  position: static;
  transform: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.label-narrow .label-logo-col img { display: block; width: auto; height: 36px; max-width: none; }
.text-compact.label-narrow .label-logo-col img { height: 30px; }
.text-tight.label-narrow .label-logo-col img { height: 26px; }
.label-narrow .la-text { font-size: 2.0em; }
.label-narrow .label-title-col { text-align: center; width: 100%; }
.label-narrow .label-title, .label-narrow .label-subtitle { text-align: center; }
