/* ============================================================
   80 mm narx yorlig'i. index.html (#printArea) va label.html ikkalasi ishlatadi.
   Bitta yorliq = bitta sahifa (printer har yorliqdan keyin kesadi).
   ============================================================ */

@page { margin: 0; size: 80mm auto; }

.label{
  box-sizing: border-box;
  width: 80mm;
  padding: 4mm 3mm 3mm;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 3mm;
  background: #fff;
  color: #000;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.15;
  -webkit-print-color-adjust: exact;
          print-color-adjust: exact;
  break-inside: avoid;
  break-after: page;
  page-break-after: always;
}
.label:last-child{ break-after: auto; page-break-after: auto; }
.label *{ box-sizing: border-box; margin: 0; max-width: 100%; }

/* padding/chiziq tashqi o'ramda: line-clamp'li elementda padding bo'lsa
   4-qator shu padding ichidan ko'rinib qoladi */
.label .name-wrap{
  padding: 2mm 0;
  border-bottom: 1px solid #ddd;
  margin-bottom: 2mm;
}

.label .product-name{
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
          line-clamp: 3;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.label .price-section{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3mm;
}
/* Optom narxi yo'q do'kon/tovar: bitta katta narx */
.label .price-section.single{ grid-template-columns: 1fr; }

.label .price-box{
  min-width: 0;
  border: 2.5px solid #000;
  border-radius: 2mm;
  padding: 4mm 2mm;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.label .price-type{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .3px;
  margin-bottom: 2mm;
}

.label .price-amount{
  width: 100%;
  font-size: 32px;          /* label.js sig'maganda kichraytiradi */
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.label .price-section.single .price-amount{ font-size: 54px; }

.label .label-foot{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 3mm;
  font-size: 11px;
  font-weight: 600;
  color: #000;
}
.label .label-foot .bc{ letter-spacing: .4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.label .label-foot .date{ white-space: nowrap; }
