/* =====================================================================
   Cart + checkout, Kanon pass (18.11.2026).
   The checkout markup and its JS stay as on prod; this layer only re-skins it
   on top of legacy-keep.css: left-aligned page head, hairline rows instead of
   boxed cards, numbered steps (CSS counter, so a collapsed step 2 is skipped),
   square controls, no red hover, one sticky summary.
   ===================================================================== */

.checkout-page {
	--ck-pad: clamp(20px, 2.4vw, 32px);
	--ck-label: 11px;
	color: var(--ink);
}

/* ---------- head ---------- */
.checkout-page .checkout-hero { text-align: left !important; margin: 0 0 var(--space-6) !important; padding: 0 !important; }
.checkout-page .checkout-hero .checkout-eyebrow {
	display: block !important; margin: 0 0 var(--space-3) !important; padding: 0 !important; background: none !important;
	font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.checkout-page .checkout-page__title {
	margin: 0 !important; font-family: var(--font-display); font-weight: 400 !important; text-align: left !important;
	font-size: clamp(2.4rem, 1.6rem + 2.6vw, 4rem) !important; line-height: 1 !important;
}
.checkout-page .checkout-page__lead { margin: var(--space-4) 0 0 !important; padding: 0 !important; max-width: 52ch; text-align: left !important; color: var(--ink-2); font-size: 16px; }

/* ---------- cart lines ---------- */
.checkout-page .checkout-card--cart { padding: 0 !important; border: 0 !important; background: none !important; margin: 0 0 var(--space-7) !important; width: auto !important; max-width: none !important; }
.checkout-page .checkout-table-wrap { overflow: visible; }
.checkout-page table#order_block { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line-strong); }
.checkout-page table#order_block thead { display: none; }
.checkout-page table#order_block tbody { display: block; }
.checkout-page table#order_block tr.checkout-item {
	display: grid !important; grid-template-columns: 96px minmax(0, 1fr) auto 140px 44px; align-items: center; column-gap: var(--space-5);
	padding: var(--space-4) 0 !important; margin: 0 !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; background: none !important; box-shadow: none !important;
	transition: opacity var(--dur) var(--ease);
}
.checkout-page table#order_block tr.checkout-item > td { display: block; padding: 0 !important; border: 0 !important; background: none !important; text-align: left; }
.checkout-page .checkout-mobile-label { display: none !important; }
.checkout-page .checkout-item__image { display: block; width: 96px; height: 96px; background: var(--tile, var(--paper-2)); }
.checkout-page .checkout-item__image img { width: 100% !important; height: 100% !important; object-fit: contain; padding: 8%; mix-blend-mode: var(--tile-blend, multiply); }
.checkout-page .checkout-item__title {
	color: var(--ink) !important; text-decoration: none; font-size: 16px; line-height: 1.4; font-weight: 400 !important;
	/* two layers: [0] hover underline at the bottom, [1] removal strike through the middle.
	   Inline + box-decoration-break: clone paints both on every line fragment, so 1, 2 or 3 lines all work. */
	background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
	background-repeat: no-repeat; background-position: left bottom, left 56%; background-size: 0 1px, 0 1px;
	-webkit-box-decoration-break: clone; box-decoration-break: clone;
	transition: background-size var(--dur) var(--ease);
}
@media (hover: hover) { .checkout-page .checkout-item__title:hover { background-size: 100% 1px, 0 1px; } }
.checkout-page .checkout-item.is-removing .checkout-item__title,
.checkout-page .checkout-item.is-removing .checkout-item__title:hover { background-size: 0 1px, 100% 1px; }
.checkout-page .checkout-item__total { text-align: right !important; }
.checkout-page .checkout-item__value--total { font-size: 17px; font-weight: 500 !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.checkout-page .checkout-item__remove { text-align: right !important; }

/* stepper: same square language as the cards */
.checkout-page .checkout-qty {
	display: inline-grid !important; grid-template-columns: 40px 44px 40px; height: 40px; padding: 0 !important; gap: 0 !important;
	border: 1px solid var(--line-strong) !important; background: var(--paper) !important; box-shadow: none !important;
}
.checkout-page .checkout-qty__btn {
	width: 40px !important; height: 38px !important; padding: 0; border: 0 !important; background: none !important; color: var(--ink) !important;
	font-size: 18px; line-height: 1; cursor: pointer; transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.checkout-page .checkout-qty__btn::before, .checkout-page .checkout-qty__btn::after { display: none !important; }
@media (hover: hover) { .checkout-page .checkout-qty__btn:hover { background: var(--ink) !important; color: var(--paper) !important; } }
.checkout-page .checkout-qty__btn:disabled { color: var(--ink-3) !important; background: none !important; cursor: default; }
.checkout-page .checkout-qty__value { display: block; border-left: 1px solid var(--line) !important; border-right: 1px solid var(--line) !important; }
.checkout-page .checkout-qty__value input {
	width: 100% !important; height: 38px !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important;
	text-align: center; font: 500 15px/1 var(--font-ui); color: var(--ink); font-variant-numeric: tabular-nums;
}

/* remove: a quiet ×, inverts like every other square control — no red */
.checkout-page table#order_block a.delete, .checkout-page .checkout-item__delete {
	width: 44px !important; height: 44px !important; border: 1px solid transparent !important; background: none !important;
	color: var(--ink-3) !important; font-size: 22px !important; font-weight: 300; text-decoration: none;
}
@media (hover: hover) {
	.checkout-page table#order_block a.delete:hover, .checkout-page .checkout-item__delete:hover {
		border-color: var(--ink) !important; background: var(--ink) !important; color: var(--paper) !important;
	}
}
/* removal with undo (one rule for the whole cart): the × opens out leftwards into «↺ Вернуть» (clip from the right edge,
   where the × was), the qty and price step back, and the time left runs as an ink line along the row's bottom rule,
   shrinking right to left. No digits: the button says what can be done, the line says for how long. The length comes
   from the script (--undo = checkoutUndoDelay), so there is one number. */
.checkout-page table#order_block tr.checkout-item { position: relative; }
.checkout-page .checkout-item__remove, .checkout-page .checkout-remove-slot { position: static !important; }
.checkout-page .checkout-remove-slot { display: block; width: 44px; height: 44px; margin-left: auto; }
.checkout-page .checkout-remove-slot > .checkout-item__delete { position: relative !important; inset: auto !important; display: grid !important; place-items: center; transition: opacity var(--dur) var(--ease), border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease) !important; transform: none !important; }
.checkout-page .checkout-item.is-removing .checkout-remove-slot > .checkout-item__delete { opacity: 0; visibility: hidden; transition: opacity var(--dur-fast) var(--ease), visibility 0s linear var(--dur-fast) !important; }
.checkout-page .checkout-undo {
	position: absolute !important; z-index: 2; right: 0; top: 50%; left: auto !important; bottom: auto !important; width: auto !important; height: 44px !important;
	display: inline-flex !important; align-items: center; gap: 8px; padding: 0 16px 0 14px !important; margin-top: -22px;
	border: 1px solid var(--ink) !important; background: var(--paper) !important; color: var(--ink) !important; cursor: pointer;
	font: 500 12px/1 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
	opacity: 0; visibility: hidden; transform: none !important; clip-path: inset(0 0 0 calc(100% - 44px));
	transition: clip-path var(--dur) var(--ease), opacity var(--dur-fast) var(--ease), visibility 0s linear var(--dur),
		background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease) !important;
}
.checkout-page .checkout-item.is-removing .checkout-undo { opacity: 1; visibility: visible; clip-path: inset(0); transition: clip-path var(--dur) var(--ease), opacity var(--dur-fast) var(--ease), visibility 0s, background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease) !important; }
@media (hover: hover) { .checkout-page .checkout-undo:hover { background: var(--ink) !important; color: var(--paper) !important; } }
.checkout-page .checkout-undo:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.checkout-page .checkout-undo__icon { position: static !important; display: block !important; width: 16px !important; height: 16px !important; opacity: 1 !important; transform: none !important; flex: none; }
.checkout-page .checkout-undo__ring, .checkout-page .checkout-undo__count { display: none !important; }
/* what is being removed steps back */
.checkout-page .checkout-item.is-removing :is(.checkout-item__photo, .checkout-item__name) { opacity: .4 !important; }
/* the counter and the price go away while the item is on its way out; «Вернуть» brings them back the same way */
.checkout-page .checkout-item.is-removing :is(.checkout-item__qty, .checkout-item__total) { opacity: 0 !important; visibility: hidden; transition: opacity var(--dur) var(--ease), visibility 0s linear var(--dur) !important; }
.checkout-page .checkout-item :is(.checkout-item__photo, .checkout-item__name, .checkout-item__qty, .checkout-item__total) { transition: opacity var(--dur) var(--ease), visibility 0s !important; }
/* the time line: on the row's bottom rule, full width, runs out right to left */
.checkout-page table#order_block tr.checkout-item::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink);
	transform: scaleX(0); transform-origin: left center; pointer-events: none;
}
.checkout-page table#order_block tr.checkout-item.is-removing::after { animation: k-undo-run var(--undo, 5s) linear forwards; }
@keyframes k-undo-run { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* gone for good: the row fades before it leaves */
.checkout-page table#order_block tr.checkout-item.is-gone { opacity: 0; transition: opacity var(--dur) var(--ease); }
.checkout-page table#order_block tr.checkout-item.is-gone::after { animation: none; }
@media (prefers-reduced-motion: reduce) {
	.checkout-page .checkout-undo { clip-path: none; }
}

/* the in-cart totals box duplicated the summary on the right: the summary stays, this one goes
   (its .checkout-js-* nodes are still updated by the script, just not shown) */
.checkout-page .checkout-cart-summary { display: none !important; }

/* ---------- layout ---------- */
.checkout-page .checkout-layout { grid-template-columns: minmax(0, 1fr) 360px !important; gap: var(--space-7) !important; }
.checkout-page .checkout-layout__main { counter-reset: ck-step; display: flex; flex-direction: column; gap: 0; }

/* ---------- steps ---------- */
.checkout-page .checkout-section {
	position: relative; padding: var(--space-6) 0 var(--space-6) !important; margin: 0 !important; width: auto !important; max-width: none !important;
	border: 0 !important; border-top: 1px solid var(--line-strong) !important; background: none !important; box-shadow: none !important;
}
.checkout-page .checkout-step2-reveal { margin: 0 !important; }
.checkout-page .checkout-step2-reveal .checkout-section { border-top-color: var(--line-strong) !important; }
/* step 1 sits right under the cart table, which already ends on a strong line: no second rule above it (28.11.2026) */
.checkout-page .checkout-section--delivery { border-top: 0 !important; }
.checkout-page .checkout-layout__main .checkout-section { counter-increment: ck-step; }
.checkout-page .checkout-step2-reveal.is-collapsed .checkout-section { counter-increment: none; }
.checkout-page .checkout-section__head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 var(--space-5) !important; text-align: left !important; }
.checkout-page .checkout-section__eyebrow {
	display: flex !important; align-items: baseline; gap: 14px; margin: 0 !important; padding: 0 !important; background: none !important; border-radius: 0 !important;
	font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + .8vw, 1.9rem); line-height: 1.1; letter-spacing: 0; text-transform: none; color: var(--ink);
}
.checkout-page .checkout-section__eyebrow::before {
	content: counter(ck-step, decimal-leading-zero); flex: none; font-family: var(--font-ui); font-size: 12px; font-weight: 500;
	letter-spacing: .12em; color: var(--ink-3); transform: translateY(-.35em);
}

/* options (delivery / payment / pickup points): hairline cards, ink when chosen */
.checkout-page .checkout-options { display: grid; gap: 8px; margin: 0; padding: 0; }
.checkout-page .checkout-options--delivery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.checkout-page .checkout-option { position: relative; margin: 0 !important; }
.checkout-page .checkout-option label {
	display: flex !important; flex-direction: column; gap: 4px; height: 100%; margin: 0 !important; padding: 16px 18px 16px 50px !important;
	border: 1px solid var(--line-strong) !important; background: var(--paper) !important; box-shadow: none !important; cursor: pointer;
	transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
@media (hover: hover) { .checkout-page .checkout-option label:hover { border-color: var(--ink) !important; } }
.checkout-page .checkout-option input:checked + label { border-color: var(--ink) !important; background: var(--paper-2) !important; box-shadow: inset 0 0 0 1px var(--ink) !important; }
.checkout-page .checkout-option__title { font-size: 15px !important; font-weight: 500 !important; line-height: 1.35; color: var(--ink); }
.checkout-page .checkout-option__meta { font-size: 13px !important; color: var(--ink-2) !important; }
.checkout-page .checkout-option input[type="radio"] { top: 17px !important; left: 18px !important; margin: 0 !important; }

/* fields */
/* contacts: name | phone, then e-mail and comment full width */
.checkout-page .checkout-form .checkout-personal-table { display: block !important; width: 100% !important; border-spacing: 0 !important; }
.checkout-page .checkout-form .checkout-personal-table tbody { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }
.checkout-page .checkout-form .checkout-personal-table tr { display: block !important; margin: 0 !important; min-width: 0; }
.checkout-page .checkout-form .checkout-personal-table tr:nth-child(n+3) { grid-column: 1 / -1; }
.checkout-page .checkout-form .checkout-personal-table td { display: block !important; width: auto !important; padding: 0 !important; border: 0 !important; }
.checkout-page .checkout-form .checkout-personal-fields .checkout-field { margin: 0 !important; }
.checkout-page .checkout-field input, .checkout-page .checkout-field textarea, .checkout-page .checkout-section input[type="text"], .checkout-page .checkout-section textarea {
	border: 1px solid var(--line-strong) !important; border-radius: 0 !important; background: var(--paper) !important; box-shadow: none !important; font-size: 16px !important;
	transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.checkout-page .checkout-field input:focus, .checkout-page .checkout-field textarea:focus, .checkout-page .checkout-section input[type="text"]:focus, .checkout-page .checkout-section textarea:focus {
	outline: none; border-color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--ink) !important;
}
.checkout-page .is-invalid input, .checkout-page input.is-invalid, .checkout-page textarea.is-invalid { border-color: var(--danger, #b3261e) !important; box-shadow: inset 0 0 0 1px var(--danger, #b3261e) !important; }
.checkout-page .checkout-inline-message { border-radius: 0 !important; border: 0 !important; border-left: 2px solid var(--danger, #b3261e) !important; background: var(--paper-2) !important; color: var(--ink) !important; padding: 12px 16px !important; margin: 0 0 var(--space-4) !important; font-size: 14px; }
.checkout-page .checkout-helper-link {
	display: inline-block !important; width: auto !important; text-align: left !important; border: 0 !important; margin-top: var(--space-3); font-size: 14px; color: var(--ink-2) !important; text-decoration: none;
	background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat; padding-bottom: 2px; transition: color var(--dur-fast) var(--ease);
}
.checkout-page .checkout-helper-link:hover { color: var(--ink) !important; }

/* consents: plain lines under the contacts, no boxes */
.checkout-page .checkout-agree {
	display: flex; gap: 12px; align-items: flex-start; width: auto !important; max-width: 62ch !important; margin: 0 0 var(--space-3) !important; padding: 0 !important;
	border: 0 !important; background: none !important; box-shadow: none !important; font-size: 13px; line-height: 1.5; color: var(--ink-2);
}
.checkout-page .checkout-layout__main > .checkout-agree:not(.checkout-agree--optional) { padding-top: var(--space-5) !important; border-top: 1px solid var(--line) !important; max-width: none !important; }
.checkout-page .checkout-agree label { margin: 0 !important; padding: 0 !important; color: inherit; }
.checkout-page .checkout-agree a { color: var(--ink) !important; }
.checkout-page .checkout-layout__main { display: flex; flex-direction: column; }
.checkout-page .checkout-layout__main > .checkout-agree:not(.checkout-agree--optional) { order: 10; }
.checkout-page .checkout-layout__main > .checkout-agree--optional { order: 11; }

/* ---------- summary ---------- */
.checkout-page .checkout-card--sticky {
	position: sticky; top: calc(var(--header-h) + 24px) !important; width: auto !important; max-width: none !important; margin: 0 !important;
	padding: var(--ck-pad) !important; border: 1px solid var(--line-strong) !important; background: var(--paper) !important; box-shadow: none !important;
}
.checkout-page .checkout-card--sticky .checkout-eyebrow {
	display: block !important; margin: 0 0 var(--space-4) !important; padding: 0 !important; background: none !important;
	font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.checkout-page .checkout-order-meta__row {
	display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); margin: 0 !important; padding: 10px 0 !important;
	border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); text-transform: none; letter-spacing: 0;
}
.checkout-page .checkout-order-meta__row strong { color: var(--ink); font-weight: 500 !important; font-variant-numeric: tabular-nums; }
.checkout-page .checkout-order-meta__row--total { border-bottom: 0; padding: var(--space-4) 0 var(--space-5) !important; align-items: baseline; }
.checkout-page .checkout-order-meta__row--total span { color: var(--ink); font-weight: 400 !important; }
.checkout-page .checkout-order-meta__row--total strong { font-family: var(--font-display); font-weight: 400 !important; font-size: 2rem; line-height: 1; }
.checkout-page .checkout-button {
	width: 100%; min-height: 56px; margin: 0 !important; border: 1px solid var(--ink) !important; background: var(--ink) !important; color: var(--paper) !important;
	font: 500 13px/1 var(--font-ui) !important; letter-spacing: .12em !important; text-transform: uppercase; cursor: pointer; box-shadow: none !important;
	transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease) !important;
}
@media (hover: hover) { .checkout-page .checkout-button:hover { background: var(--paper) !important; color: var(--ink) !important; box-shadow: none !important; } }
.checkout-page .checkout-order-offer { margin: var(--space-3) 0 0 !important; text-align: left !important; font-size: 12px; line-height: 1.5; color: var(--ink-3); }
.checkout-page .checkout-order-offer a { color: var(--ink-2) !important; }
.checkout-page .checkout-card--sticky .checkout-agree { margin: 0 0 var(--space-4) !important; max-width: none !important; }

/* ---------- empty cart ---------- */
.x-cart-empty { padding: var(--space-5) 0 var(--space-4); }
.x-cart-empty__k { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 var(--space-3); }
.x-cart-empty__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 1.6rem + 3.4vw, 5rem); line-height: .95; margin: 0; }
.x-cart-empty__lead { margin: var(--space-5) 0 0; max-width: 46ch; color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.x-cart-empty__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); margin-top: var(--space-6); }
.x-cart-empty__actions .x-btn { min-width: 240px; }
.x-cart-empty__actions .x-link { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; color: var(--ink); }
.x-qcats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: var(--space-8); border-top: 1px solid var(--line-strong); }
.x-qcats__item {
	position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: var(--space-4); min-height: 220px; padding: var(--space-5) var(--space-5) var(--space-4);
	color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line);
	transition: background-color var(--dur-slow) var(--ease), color var(--dur-slow) var(--ease);
}
.x-qcats__item + .x-qcats__item { border-left: 1px solid var(--line); }
.x-qcats__num { font-size: 11px; letter-spacing: .12em; color: var(--ink-3); font-variant-numeric: tabular-nums; transition: color var(--dur-slow) var(--ease); }
/* engravings (images/icons-a, built by tools/balance_icons.py): the 320 canvas keeps air around the drawing, so the box is larger than the old pictograms */
.x-qcats__icon { width: 104px; height: 104px; align-self: center; background: currentColor; -webkit-mask: var(--icon) no-repeat center / contain; mask: var(--icon) no-repeat center / contain; transition: transform var(--dur-slow) var(--ease); }
.x-qcats__name { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); font-family: var(--font-display); font-size: 1.35rem; line-height: 1.15; }
.x-qcats__name i { flex: none; position: relative; width: 18px; height: 1px; background: currentColor; transform: translateY(-.3em); transition: width var(--dur) var(--ease); }
.x-qcats__name i::after { content: ""; position: absolute; right: 0; top: -3.5px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
@media (hover: hover) {
	/* light hover, no inversion: on black the engraving would turn into a negative (black caviar reads as white pearls) */
	.x-qcats__item:hover { background: var(--paper-2); }
	.x-qcats__item:hover .x-qcats__num { color: var(--ink); }
	.x-qcats__item:hover .x-qcats__icon { transform: translateY(-6px); }
	.x-qcats__item:hover .x-qcats__name i { width: 30px; }
}
.x-qcats__item:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
	.checkout-page .checkout-layout { grid-template-columns: minmax(0, 1fr) !important; gap: var(--space-5) !important; }
	.checkout-page .checkout-card--sticky { position: static; }
	.x-qcats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.x-qcats__item:nth-child(3) { border-left: 0; }
}
@media (max-width: 768px) {
	/* legacy phone rules boxed every block at calc(100% - 24px) and centred the headings */
	.checkout-page { padding: 0 !important; }
	.checkout-page .checkout-hero, .checkout-page .checkout-page__lead { padding: 0 !important; text-align: left !important; margin-left: 0 !important; margin-right: 0 !important; }
	.checkout-page .checkout-section__eyebrow, .checkout-page .checkout-eyebrow { margin-left: 0 !important; margin-right: 0 !important; }
	.checkout-page .checkout-card, .checkout-page .checkout-section, .checkout-page .checkout-agree, .checkout-page .checkout-card--sticky { width: auto !important; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
	.checkout-page .checkout-order-meta__row { margin: 0 !important; }
	.checkout-page table#order_block tr.checkout-item {
		grid-template-columns: 80px minmax(0, 1fr) auto 38px !important;
		grid-template-areas: "photo name name remove" "photo qty total total" !important; row-gap: 12px !important; column-gap: 14px !important;
		align-items: start !important;
	}
	.checkout-page table#order_block tbody td.checkout-item__qty { align-self: end !important; }
	.checkout-page table#order_block tbody td.checkout-item__total { align-self: end !important; justify-self: end; text-align: right !important; padding-bottom: 9px !important; }
	.checkout-page table#order_block tbody td.checkout-item__remove { align-self: start !important; justify-self: end; margin: -8px 0 0 0; }
	.checkout-page .checkout-undo { top: auto !important; bottom: 16px !important; margin-top: 0; }
	.checkout-page table#order_block td.photo { width: 80px !important; }
	.checkout-page .checkout-remove-slot { width: 38px; height: 38px; margin-right: 0; }
	.checkout-page table#order_block a.delete, .checkout-page .checkout-item__delete { width: 38px !important; height: 38px !important; }
	.checkout-page .checkout-qty { grid-template-columns: 36px 40px 36px; }
	.checkout-page .checkout-qty__btn { width: 36px !important; }
	.checkout-page .checkout-item__image { width: 80px; height: 80px; }
	.checkout-page .checkout-item__title { font-size: 15px; }
	.checkout-page .checkout-options--delivery { grid-template-columns: minmax(0, 1fr); }
	.checkout-page .checkout-card--sticky { padding: var(--space-5) var(--space-4) !important; }
	.checkout-page .checkout-form .checkout-personal-table tbody { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
	.x-cart-empty__actions { flex-direction: column; align-items: stretch; gap: var(--space-4); }
	.x-cart-empty__actions .x-btn { min-width: 0; }
	.x-cart-empty__actions .x-link { align-self: center; }
	.x-qcats__item { min-height: 172px; padding: var(--space-4) var(--space-4) var(--space-3); }
	.x-qcats__icon { width: 80px; height: 80px; }
	.x-qcats__name { font-size: 1.1rem; }
}

/* the empty cart renders inside the page prose: hide the page h1 (the block has its own) and the prose link styling */
.x-inner:has(.x-cart-empty) > .x-h1 { display: none; }
.x-inner .x-prose:has(.x-cart-empty) { max-width: none; }
.x-prose .x-cart-empty a { text-decoration: none; }
.x-prose .x-cart-empty .x-btn--action { color: var(--action-ink, #fff); }

/* fixes after the first pass */
.checkout-page table#order_block td.photo, .checkout-page table#order_block td.photo a, .checkout-page .checkout-item__image { margin: 0 !important; padding: 0 !important; }
.checkout-page .checkout-qty__value { padding: 0 !important; display: flex !important; align-items: center; }
.checkout-page .checkout-qty__value input { line-height: 38px !important; }

/* step 2, courier: address = street full width, then entrance / floor / flat in one row */
.checkout-page .checkout-options--address { display: block; }
.checkout-page .checkout-address-form { list-style: none; }
.checkout-page .checkout-form .checkout-address-form__body { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
.checkout-page .checkout-form table.adress { display: block !important; width: 100% !important; border-spacing: 0 !important; }
.checkout-page .checkout-form table.adress tbody { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.checkout-page .checkout-form table.adress tr { display: block !important; margin: 0 !important; min-width: 0; }
.checkout-page .checkout-form table.adress tr:first-child { grid-column: 1 / -1; }
/* the comment spans the whole row too (hotfix 28.11.2026: it sat in the first of three columns) */
.checkout-page .checkout-form table.adress tr:has(textarea), .checkout-page .checkout-form table.adress tr:nth-child(5) { grid-column: 1 / -1; }
.checkout-page .checkout-form table.adress td { display: block !important; width: auto !important; padding: 0 !important; border: 0 !important; }
.checkout-page .checkout-form .checkout-address-form__body .checkout-field { margin: 0 !important; }

/* step 2, pickup: address left, map pin as an attached square */
.checkout-page .checkout-options--pickup { gap: 8px; }
.checkout-page .checkout-option--pickup { display: grid !important; grid-template-columns: minmax(0, 1fr) 56px; gap: 0 !important; }
.checkout-page .checkout-option--pickup label { justify-content: center; align-items: flex-start !important; text-align: left !important; min-height: 56px; }
.checkout-page .checkout-option--pickup .checkout-option__title { text-align: left !important; }
.checkout-page .checkout-pickup-map {
	display: grid !important; place-items: center; width: auto !important; height: auto !important; margin: 0 !important; border: 1px solid var(--line-strong) !important; border-left: 0 !important;
	border-radius: 0 !important; background: var(--paper) !important; color: var(--ink) !important; box-shadow: none !important;
	transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.checkout-page .checkout-pickup-map svg { width: 20px; height: 20px; }
@media (hover: hover) { .checkout-page .checkout-pickup-map:hover { background: var(--ink) !important; color: var(--paper) !important; } }
.checkout-page .checkout-option--pickup input:checked ~ .checkout-pickup-map { border-color: var(--ink) !important; box-shadow: inset -1px 0 0 0 var(--ink), inset 0 1px 0 0 var(--ink), inset 0 -1px 0 0 var(--ink) !important; }
@media (max-width: 640px) {
	.checkout-page .checkout-form table.adress tbody { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* =====================================================================
   404 (content/not_found/default.tpl): "4 [tin] 4", copy, actions, the same quick-category tiles as the empty cart.
   ===================================================================== */
.x-inner:has(.x-nf) > .x-h1 { display: none; }
.x-inner .x-prose:has(.x-nf) { max-width: none; }
.x-prose .x-nf a { text-decoration: none; }
.x-prose .x-nf .x-btn--action { color: var(--action-ink, #fff); }
.x-nf { --nf-size: clamp(150px, 24vw, 340px); padding: var(--space-4) 0 0; }
.x-nf__code { display: flex; align-items: center; justify-content: center; gap: calc(var(--nf-size) * .06); margin: 0 auto var(--space-7); }
.x-nf__digit { font-family: var(--font-display); font-weight: 400; font-size: calc(var(--nf-size) * 1.36); line-height: .74; letter-spacing: 0; color: var(--ink); padding-top: .04em; }
.x-nf__zero { flex: none; width: var(--nf-size); aspect-ratio: 1; border-radius: 50%; transform: rotate(var(--nf-lean, 0deg)); }
.x-nf__zero img { display: block; width: 100%; height: 100%; max-width: none; border-radius: 50%; box-shadow: 0 calc(var(--nf-size) * .05) calc(var(--nf-size) * .12) -.04em rgba(20, 20, 20, .28); }
.x-nf__zero.is-rolling img { animation: x-nf-roll calc(var(--dur-slow) * 2.4) var(--ease) both; }
@keyframes x-nf-roll {
	from { transform: translateX(-60vw) rotate(-300deg); opacity: 0; }
	30% { opacity: 1; }
	to { transform: none; opacity: 1; }
}
.x-nf__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4) var(--space-7); align-items: end; padding-top: var(--space-6); border-top: 1px solid var(--line-strong); }
.x-nf__k { grid-column: 1 / -1; margin: 0; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.x-nf__title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 1.4rem + 2vw, 3.4rem); line-height: 1.04; text-wrap: balance; }
.x-nf__text { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.55; max-width: 48ch; }
.x-nf__actions { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); margin-top: var(--space-3); }
.x-nf__actions .x-btn { min-width: 240px; }
.x-nf__actions .x-link { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 2px; color: var(--ink); }
.x-nf .x-qcats { margin-top: var(--space-8); }
@media (max-width: 1023px) {
	.x-nf__body { grid-template-columns: minmax(0, 1fr); }
	.x-nf__actions { grid-column: 1; }
}
@media (max-width: 640px) {
	.x-nf { --nf-size: 31vw; }
	.x-nf__code { margin-bottom: var(--space-6); }
	.x-nf__actions { flex-direction: column; align-items: stretch; gap: var(--space-4); }
	.x-nf__actions .x-btn { min-width: 0; }
	.x-nf__actions .x-link { align-self: center; }
}
@media (prefers-reduced-motion: reduce) { .x-nf__zero.is-rolling img { animation: none; } }

/* =====================================================================
   18.11.2026, round 2
   ===================================================================== */
/* cart stepper = the card stepper (.x-step): one 44px box, full-height hairlines around the number,
   drawn − / +, the same faint hover. The legacy half-height ticks (::before/::after) were the "double lines". */
.checkout-page .checkout-qty { grid-template-columns: 44px 52px 44px !important; height: 44px !important; border-color: var(--line-strong) !important; overflow: hidden; }
.checkout-page .checkout-qty__value { border: 0 !important; border-inline: 1px solid var(--line) !important; justify-content: center; }
.checkout-page .checkout-qty__value::before, .checkout-page .checkout-qty__value::after { content: none !important; display: none !important; }
.checkout-page .checkout-qty__value input, .checkout-page table#order_block input.value_tovar { width: 100% !important; height: 42px !important; line-height: 42px !important; font: 500 15px/42px var(--font-ui) !important; color: var(--ink) !important; }
.checkout-page .checkout-qty__btn { position: relative; width: 44px !important; height: 42px !important; font-size: 0 !important; color: var(--ink) !important; }
.checkout-page .checkout-qty__btn::before, .checkout-page .checkout-qty__btn[data-qty-step="1"]::after {
	content: "" !important; display: block !important; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%);
}
.checkout-page .checkout-qty__btn[data-qty-step="1"]::after { transform: translate(-50%, -50%) rotate(90deg); }
@media (hover: hover) { .checkout-page .checkout-qty__btn:hover { background: color-mix(in srgb, var(--ink) 7%, transparent) !important; color: var(--ink) !important; } }
.checkout-page .checkout-qty__btn:disabled { color: var(--ink-3) !important; }
.checkout-page .checkout-qty__btn:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
@media (max-width: 768px) {
	.checkout-page .checkout-qty { grid-template-columns: 44px 48px 44px !important; }
	.checkout-page .checkout-qty__btn { width: 44px !important; }
	.checkout-page table#order_block tbody td.checkout-item__total { padding-bottom: 11px !important; }
}

/* consents live in the summary now, right above the button */
.checkout-page .checkout-card--sticky .checkout-agree { margin: 0 0 var(--space-3) !important; }
.checkout-page .checkout-card--sticky .checkout-agree:not(.checkout-agree--optional) { margin-bottom: var(--space-4) !important; padding-top: 0 !important; border-top: 0 !important; }

/* product page: the related block sits inside .x-prose, whose h2 top margin stacked on the section padding */
.x-product__addons .x-h2 { margin: 0; }
.checkout-page .checkout-page__title { color: var(--ink) !important; }

/* the list is framed top and bottom by the same strong rule; only the dividers between items are pale */
.checkout-page table#order_block tbody tr.checkout-item:last-child { border-bottom-color: var(--line-strong) !important; }

/* ---------- «Цена от» in the cart (cena_ot, ported from prod 27.11.2026) ----------
   The notes and the «от» before the sums show only while the cart holds a flagged line that is not being removed. */
.checkout-page p.checkout-price-from-note {
	display: none; max-width: none !important; width: auto !important; margin: var(--space-4) 0 0 !important; padding: 12px 16px !important;
	border-left: 2px solid var(--ink); background: var(--paper-2); color: var(--ink-2);
	font: 400 14px/1.45 var(--font-ui) !important; text-align: left !important;
}
.checkout-page p.checkout-price-from-note--aside { margin: var(--space-3) 0 0 !important; }
body:has(.checkout-item.is-price-from:not(.is-removing)) .checkout-page p.checkout-price-from-note,
.checkout-page:has(.checkout-item.is-price-from:not(.is-removing)) p.checkout-price-from-note { display: block; }
.checkout-item.is-price-from .checkout-item__value--total::before,
body:has(.checkout-item.is-price-from:not(.is-removing)) :is(.checkout-js-cart-total, .checkout-js-subtotal, .checkout-js-total)::before {
	content: "от\00a0"; font-weight: 400; font-size: .8em; color: var(--ink-3);
}
