/* uhl_cart 0.6.12 — аркуш «Друк / PDF» кошика (класи uhcr-ps*). Один вигляд для двох місць: окремий аркуш (sheet.twig, стилі для
   всіх носіїв) і друк сторінки кошика Ctrl+P (на сторінці файл підключено лише для друку). Вигляд — як аркуш картки (uhl_card
   sheet.css): Arial, таблиці замість сіток, тексти #16222f / #16243a / #3c4859, лінії #dde3eb. Голова таблиці повторюється на кожній
   сторінці (thead), рядок товару й підсумок не рвуться. */
@page { size: A4 portrait; margin: 12mm 12mm 13mm; }
.uhcr-ps { font: 9.5pt/1.35 Arial, "Helvetica Neue", Helvetica, sans-serif; color: #16222f; background: #fff; text-align: left;
	-webkit-print-color-adjust: exact; print-color-adjust: exact; }
.uhcr-ps * { box-sizing: border-box; }
.uhcr-ps table { display: table; width: 100%; border-collapse: collapse; }
/* тема сайту робить усім таблицям tbody { display: grid } і tbody tr { display: flex } — повертаємо таблицям їхню розкладку */
.uhcr-ps thead { display: table-header-group; }
.uhcr-ps tbody { display: table-row-group; }
.uhcr-ps tr, .uhcr-ps tbody tr { display: table-row; width: auto; margin: 0; }
.uhcr-ps th, .uhcr-ps td { display: table-cell; float: none; }
.uhcr-ps colgroup { display: table-column-group; }
.uhcr-ps col { display: table-column; }
.uhcr-ps th, .uhcr-ps td { text-align: left; vertical-align: top; }
.uhcr-ps img { border: 0; }
.uhcr-ps__nw { white-space: nowrap; }
.uhcr-ps__mut { color: #3c4859; }
/* шапка: логотип | телефони, сайт, дата */
.uhcr-ps__hd { margin: 0 0 4mm; border-bottom: 0.5mm solid #16243a; }
.uhcr-ps__hd td { padding: 0 0 2.5mm; vertical-align: bottom; }
.uhcr-ps__logo img { display: block; max-height: 12mm; max-width: 60mm; width: auto; height: auto; }
.uhcr-ps__logo b { font-size: 14pt; color: #16243a; }
.uhcr-ps__ct { text-align: right !important; font-size: 9pt; line-height: 1.45; color: #3c4859; }
.uhcr-ps__ct b { color: #16243a; font-size: 10pt; }
.uhcr-ps__h1 { margin: 0 0 3mm; font-size: 14pt; line-height: 1.25; font-weight: 700; color: #16243a; }
.uhcr-ps__h1 span { font-size: 10pt; font-weight: 400; color: #3c4859; }
/* товари */
.uhcr-ps__t { table-layout: fixed; }
.uhcr-ps__cn { width: 8mm; }
.uhcr-ps__ci { width: 17mm; }
.uhcr-ps__cq { width: 17mm; }
.uhcr-ps__cp { width: 25mm; }
.uhcr-ps__cs { width: 27mm; }
.uhcr-ps__t thead { display: table-header-group; }
.uhcr-ps__t th { padding: 1.5mm 1.5mm 1.5mm 0; border-bottom: 0.4mm solid #16243a; font-size: 8pt; font-weight: 700; color: #3c4859; text-transform: uppercase; letter-spacing: 0.02em; }
.uhcr-ps__t td { padding: 2mm 1.5mm 2mm 0; border-bottom: 0.2mm solid #dde3eb; overflow-wrap: anywhere; }
.uhcr-ps__t tr { break-inside: avoid; page-break-inside: avoid; }
.uhcr-ps__t th:last-child, .uhcr-ps__t td:last-child { padding-right: 0; }
.uhcr-ps .uhcr-ps__r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; overflow-wrap: normal; }
.uhcr-ps__n { color: #3c4859; }
.uhcr-ps__img img { display: block; width: 14mm; height: 14mm; object-fit: contain; }
.uhcr-ps__nm { display: block; font-weight: 700; color: #16243a; }
.uhcr-ps__sub { display: block; margin-top: 0.5mm; font-size: 8.5pt; font-weight: 400; color: #3c4859; }
.uhcr-ps__r s { display: block; font-size: 8.5pt; color: #6d7785; }
.uhcr-ps__r b { color: #16243a; }
/* підсумок — праворуч під таблицею, цілим блоком */
.uhcr-ps__sum { width: 100mm !important; max-width: 100%; margin: 3mm 0 0 auto; break-inside: avoid; page-break-inside: avoid; }
.uhcr-ps__sum th { padding: 1mm 4mm 1mm 0; font-weight: 400; color: #3c4859; }
.uhcr-ps__sum td { padding: 1mm 0; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: #16243a; }
.uhcr-ps__sum td.uhcr-ps__txt { white-space: normal; }
.uhcr-ps__tot th, .uhcr-ps__tot td { padding-top: 2mm; border-top: 0.4mm solid #16243a; font-size: 12pt; font-weight: 700; color: #16243a; }
.uhcr-ps__tot th span { font-size: 9pt; font-weight: 400; color: #3c4859; }
.uhcr-ps__save { margin: 1.5mm 0 0; text-align: right; font-size: 9pt; color: #1d7a4a; }
.uhcr-ps__empty { margin: 6mm 0; font-size: 11pt; }
/* низ: дата цін і посилання на кошик */
.uhcr-ps__ft { margin: 5mm 0 0; padding-top: 2.5mm; border-top: 0.3mm solid #16243a; font-size: 9pt; color: #3c4859; break-inside: avoid; page-break-inside: avoid; }
.uhcr-ps__url { word-break: break-all; }

/* окремий аркуш на екрані: A4 на сірому тлі, кнопка «Друкувати» зверху (як аркуш картки) */
body.uhcr-sheet { margin: 0; background: #fff; }
.uhcr-sheet__bar { display: none; }
@media screen {
	html:has(body.uhcr-sheet) { background: #e9edf2; }
	body.uhcr-sheet { max-width: 210mm; margin: 16px auto 32px; padding: 0 12mm 12mm; box-shadow: 0 2px 12px rgba(16, 24, 40, 0.18); }
	.uhcr-sheet__bar { display: block; position: sticky; top: 0; z-index: 1; margin: 0 -12mm 6mm; padding: 10px 16px; background: #16243a; text-align: center; }
	.uhcr-sheet__bar button { min-height: 40px; padding: 0 22px; border: 0; border-radius: 8px; background: #fdd226; color: #16243a; font: 700 15px/1 Arial, sans-serif; cursor: pointer; }
	.uhcr-sheet__bar button:hover { background: #f0c40f; }
	.uhcr-sheet__bar button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
}
@media screen and (max-width: 820px) {
	body.uhcr-sheet { margin: 0; padding: 0 16px 16px; box-shadow: none; }
	.uhcr-sheet__bar { margin: 0 -16px 16px; }
}
/* телефон, лише екран: рядок товару — фото ліворуч, назва зверху, кількість · ціна · сума під нею (друк — та сама таблиця A4) */
@media screen and (max-width: 600px) {
	.uhcr-ps .uhcr-ps__t, .uhcr-ps .uhcr-ps__t tbody { display: block; }
	.uhcr-ps .uhcr-ps__t thead { display: none; }
	.uhcr-ps .uhcr-ps__t tr { display: grid; grid-template-columns: 48px 1fr 1fr 1fr; column-gap: 8px; row-gap: 4px; padding: 10px 0; border-bottom: 1px solid #dde3eb; }
	.uhcr-ps .uhcr-ps__t td { display: block; padding: 0; border: 0; }
	.uhcr-ps .uhcr-ps__t td.uhcr-ps__n { display: none; }
	.uhcr-ps .uhcr-ps__t td.uhcr-ps__img { grid-row: 1 / span 2; }
	.uhcr-ps__img img { width: 48px; height: 48px; }
	.uhcr-ps .uhcr-ps__t td:nth-child(3) { grid-column: 2 / 5; }
	.uhcr-ps .uhcr-ps__t td:nth-child(4) { grid-column: 2; text-align: left; }
	.uhcr-ps .uhcr-ps__t td:nth-child(5) { grid-column: 3; }
	.uhcr-ps .uhcr-ps__t td:nth-child(6) { grid-column: 4; }
	.uhcr-ps__sum { width: 100% !important; }
	.uhcr-ps__ct { font-size: 8.5pt; }
	.uhcr-ps__logo img { max-width: 32vw; }
}

/* сторінка кошика, Ctrl+P: друкується лише аркуш (#uhcr-print). Решта сторінки — шапка й підвал сайту, форма оформлення, кнопки,
   міні-кошик, плаваючі кнопки й вікна — не друкується; предки аркуша — без своїх відступів, тла й позиціювання. */
@media print {
	html:has(#uhcr-print), body:has(#uhcr-print) { margin: 0 !important; padding: 0 !important; background: #fff !important; height: auto !important; min-height: 0 !important; overflow: visible !important; }
	body:has(#uhcr-print) *:not(:has(#uhcr-print)):not(#uhcr-print):not(#uhcr-print *) { display: none !important; }
	body:has(#uhcr-print) *:has(#uhcr-print) { display: block !important; position: static !important; float: none !important; margin: 0 !important; padding: 0 !important;
		border: 0 !important; background: none !important; box-shadow: none !important; transform: none !important; filter: none !important;
		width: auto !important; max-width: none !important; height: auto !important; min-height: 0 !important; overflow: visible !important; }
	#uhcr-print { display: block !important; }
}
