/* Ценники A4 (21.09.2026). Координаты сняты с исходников заказчика: новый макет (и его ч/б вариант) — «Ценник.ai»
   дизайнера, старый — PDF ценника Автохаба (Times, цифры — Helvetica). Размеры в pt: лист 595×842.
   Начертания 400/500/600 объявлены в style.css; жирное для крупного кегля — здесь: вариант 28pt,
   у обычного Bold в Y ловушки краски, на 66 pt они смотрятся как дефект буквы. */
@font-face { font-family: "TikTok Sans"; font-weight: 700; src: url("fonts/TikTokSans_28pt-Bold.ttf") format("truetype"); font-display: block; }

.tag {
  position: relative; width: 595pt; height: 842pt; overflow: hidden; background: #fff;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}

/* ── Новый макет ── */
.tag-new { font-family: "TikTok Sans", sans-serif; color: #21351C; }
.tn-head { position: absolute; left: 0; top: 0; right: 0; height: 78pt; background: #21351C; }
.tn-logo { position: absolute; left: 30pt; top: 16.8pt; width: 165.3pt; height: 44.1pt; }
.tn-num { position: absolute; right: 30pt; top: 21pt; font-size: 24.3pt; line-height: 1.3; font-weight: 600; color: #fff; }
.tn-title { position: absolute; left: 27pt; right: 30pt; top: 110pt; height: 205pt; display: flex; align-items: center; }
.tn-title span { font-size: 66pt; line-height: 1.12; font-weight: 700; }
.tn-rows {
  position: absolute; left: 30pt; right: 30pt; top: 358pt;
  display: grid; grid-template-columns: 244pt 1fr; row-gap: 23pt; align-items: baseline;
}
.tn-l { font-size: 24.5pt; line-height: 1.3; font-weight: 400; }
.tn-v { font-size: 32.5pt; line-height: 1.08; font-weight: 600; }
.tn-rows .tn-v:nth-child(8) { margin-top: -15pt; }
.tn-price { position: absolute; left: 29pt; right: 20pt; top: 733pt; font-size: 49.1pt; line-height: 1.35; display: flex; gap: 30pt; align-items: baseline; white-space: nowrap; }
.tn-pl { font-weight: 400; }

/* Новый ч/б (22.09.2026): тот же макет без зелёной полосы, логотип «монохром чёрный» и текст в его цвет */
.tag-bw { color: #121212; }
.tag-bw .tn-head { background: none; }
.tag-bw .tn-num { color: #121212; }

/* Старая цена над новой (22.09.2026, правка сотрудницы: «глаз падает на зачёркнутую, а не на новую»):
   зачёркнутая — мельче и бледнее, «Новая цена:» отдельной строкой, сама цена — крупнее обычной.
   Размер зачёркнутой — вариант 3 из трёх показанных заказчику (42pt здесь, 52pt в старом макете) */
.tn-price.tn-was { top: 614pt; font-size: 42pt; gap: 16pt; opacity: .7; }
.tn-new { position: absolute; left: 29pt; right: 20pt; top: 680pt; white-space: nowrap; }
.tn-nl { font-size: 38pt; line-height: 1.2; font-weight: 600; }
.tn-new b { display: block; font-size: 66pt; line-height: 1.12; font-weight: 700; }
.tn-was s { position: relative; text-decoration: none; }
.tn-was s::after { content: ""; position: absolute; left: -2pt; right: -2pt; top: 52%; border-top: 3pt solid currentColor; }

/* ── Старый макет: как в Автохабе ── */
.tag-old { font-family: "Times New Roman", Times, serif; color: #000; text-align: center; }
.tag-old .sans { font-family: Helvetica, Arial, sans-serif; }
.to-num { position: absolute; left: 28pt; top: 40pt; font-size: 47.9pt; line-height: 1; text-align: left; }
.to-body { position: absolute; left: 20pt; right: 20pt; top: 110pt; }
.to-name { font-size: 83.7pt; line-height: 84pt; font-weight: 700; }
.to-year { font-size: 47.9pt; line-height: 48pt; font-weight: 700; margin-top: 18pt; }
.to-mil { font-size: 36.9pt; line-height: 44pt; margin-top: 25pt; white-space: nowrap; }
.to-mil .sans { font-size: 44.3pt; }
.to-h { font-size: 44.3pt; line-height: 44pt; font-weight: 700; margin-top: 27pt; text-decoration: underline; text-decoration-thickness: 4pt; text-underline-offset: 6pt; }
.to-s { font-size: 36.9pt; line-height: 37pt; margin-top: 31pt; }
.to-s2 { margin-top: 36.5pt; }
.to-price { position: absolute; left: 10pt; right: 10pt; top: 694pt; font-size: 57.4pt; line-height: 58pt; font-weight: 700; white-space: nowrap; }

/* Старая цена: как ценники салона — «Цена» перечёркнута наискось, «Новая цена» ниже; строки плотнее */
.to-strike .to-year { margin-top: 8pt; }
.to-strike .to-mil { margin-top: 10pt; }
.to-strike .to-h { margin-top: 12pt; }
.to-strike .to-s { margin-top: 14pt; }
.to-strike .to-s2 { margin-top: 16pt; }
.to-strike .to-price { top: 598pt; font-size: 52pt; line-height: 56pt; font-weight: 400; }
.to-was { position: relative; display: inline-block; }
.to-was::after { content: ""; position: absolute; left: -4pt; right: -14pt; top: 18%; bottom: 18%;
  background: linear-gradient(to bottom right, transparent calc(50% - 1.5pt), #000 calc(50% - 1.5pt), #000 calc(50% + 1.5pt), transparent calc(50% + 1.5pt)); }
/* новая цена — крупнее обычной (57,4pt), зачёркнутая выше — 52pt и не жирная */
.to-newp { position: absolute; left: 10pt; right: 10pt; top: 660pt; font-size: 70pt; line-height: 76pt; font-weight: 700; white-space: nowrap; }

/* ── Печать: только листы, по одному ценнику на A4, без полей и колонтитулов браузера ── */
/* на экране листы для печати собраны за краем окна: так браузер может их измерить (fit) */
#print-root { position: absolute; left: -10000px; top: 0; }
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; margin: 0; padding: 0; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { position: static; }
  #print-root .tag { break-after: page; page-break-after: always; }
  #print-root .tag:last-child { break-after: auto; page-break-after: auto; }
}
