/*
 * nk-catalog-fit-1.1.1.css — v1.1.1 (26.11.2026). v1.0.0 = /css/nk-catalog-fit.css (R1, published 25.11.2026), kept unchanged.
 * v1.1.0 (25.11.2026, approval PDF, never published) = sections 1-7.5 of this file; v1.1.1 adds 7.6 only.
 * Each version has its own file name: production serves /css/*.css with a 10-year cache, so replacing the content
 * at the same URL would leave visitors on the old or the new version regardless of the template (rollback included).
 * «Наша Кухня»: use of the screen width on the catalogue pages (/zakazat-obed*, banquet menu).
 * Scope: body.nk_new_menu only (set by rsv/modules/menu/views/frontend/menu/menu.php). Other pages are not affected.
 * Rules: no zoom / transform: scale; brand colours, fonts and real photos are kept; nothing is removed.
 * Rollback: menu.php back to /css/nk-catalog-fit.css (R1) or without the include — the theme CSS is untouched.
 *
 *  1. Width — the catalogue container grows up to 1600px instead of Bootstrap's fixed 1170px.
 *  2. Columns — fixed side panels (categories / cart) and a flexible centre instead of 25% / 50% / 25%.
 *  3. Cards (list view) — grid of cards, larger photo (thumbs are 260x173, never upscaled past that),
 *     no fixed heights that clip names and descriptions; complex lunches span the row.
 *  4. Cards (block view) — denser grid, 3:2 photos that follow the card width.
 *  5. Phones — the expanded complex fills the width (2 equal columns instead of 2 x 150px),
 *     larger photo in an expanded dish, the «back to top» button no longer covers prices and counters.
 *  6. Floating WhatsApp / Telegram no longer cover the cart (moved to the edge, a gutter is reserved).
 *  7. R1.1 — food photos first: larger composition photos of complex lunches / family sets (2-4 per row by card width),
 *     optional compact «В комплекте» row for bread and cutlery (template class nk-ci-aux), larger dish photos (up to the
 *     260 px thumbnail), full-width photos and real dishes instead of the package picture in block view, photos in the
 *     collapsed phone list. Sections 1-6 are unchanged.
 *  8. R1.1.1 — the name of a complex lunch / family set in list view reads as the heading of its card (7.6).
 */

/* ---------- 1. Width + 6. messengers gutter (tablet and desktop) ---------- */
@media (min-width: 768px) {
	body.nk_new_menu .container {
		width: auto;
		margin-left: 8px;
		margin-right: 32px;
	}
	body.nk_new_menu .container .container {
		margin-left: 0;
		margin-right: 0;
	}
	body.nk_new_menu .sc_wrap {
		right: 4px;
		width: 36px;
	}
	body.nk_new_menu .sc_wrap .sc_item {
		margin-bottom: 10px;
	}
	body.nk_new_menu .sc_wrap .sc_item img {
		display: block;
		width: 100%;
		height: auto;
	}
}
@media (min-width: 992px) {
	body.nk_new_menu .container {
		margin-left: 12px;
		margin-right: 40px;
	}
	body.nk_new_menu .sc_wrap {
		right: 6px;
		width: 40px;
	}
}
@media (min-width: 1200px) {
	body.nk_new_menu .container {
		max-width: 1600px;
		margin-left: 16px;
		margin-right: 52px;
	}
	body.nk_new_menu .sc_wrap {
		right: 8px;
		width: 44px;
	}
}
@media (min-width: 1704px) {
	/* 1600 + 2 x 52: symmetric from here on */
	body.nk_new_menu .container {
		margin-left: auto;
		margin-right: auto;
	}
}
body.nk_new_menu .container .container {
	max-width: none;
}

/* ---------- 2. Columns: categories | items | date + cart ---------- */
@media (min-width: 992px) {
	body.nk_new_menu .menu-wrap > .menu__items_row {
		display: flex;
		align-items: flex-start;
	}
	body.nk_new_menu .menu-wrap > .menu__items_row:before,
	body.nk_new_menu .menu-wrap > .menu__items_row:after {
		display: none;
	}
	body.nk_new_menu .menu-wrap .col-left {
		flex: 0 0 210px;
		width: 210px;
		float: none;
	}
	body.nk_new_menu .menu-wrap .col-right {
		flex: 0 0 260px;
		width: 260px;
		float: none;
	}
	body.nk_new_menu .menu-wrap .col-center {
		flex: 1 1 auto;
		width: auto;
		min-width: 0;
		float: none;
	}
}
@media (min-width: 1200px) {
	body.nk_new_menu .menu-wrap .col-left {
		flex-basis: 256px;
		width: 256px;
	}
	body.nk_new_menu .menu-wrap .col-right {
		flex-basis: 290px;
		width: 290px;
	}
}

/* ---------- 3/4. Item grid (tablet and desktop; phones keep their own list) ---------- */
@media (min-width: 768px) {
	body.nk_new_menu .menu-wrap .category_items_list {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
		gap: 16px;
		margin: 10px 0;
	}
	body.nk_new_menu .menu-wrap .category_items_list:before,
	body.nk_new_menu .menu-wrap .category_items_list:after {
		display: none;
		content: none;
	}
	body.nk_new_menu .menu-wrap .category_items_list > .menu_item {
		margin: 0;
		width: auto;
		min-width: 0;
		float: none;
	}
	/* a complex lunch shows its whole composition: it takes the full row */
	body.nk_new_menu .menu-wrap.list-view .category_items_list > .menu_item_complex {
		grid-column: 1 / -1;
	}
	/* block view («Блоками») */
	body.nk_new_menu .menu-wrap.block-view .category_items_list {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
		gap: 14px;
	}
	body.nk_new_menu .menu-wrap.block-view .category_items_list > .menu_item {
		padding: 0;
	}
	body.nk_new_menu .menu-wrap.block-view .menu_item .menu_item_inner {
		height: 100%;
	}
}
/* narrow centre column (tablet portrait): one card per row */
@media (min-width: 768px) and (max-width: 991px) {
	body.nk_new_menu .menu-wrap .category_items_list {
		grid-template-columns: minmax(0, 1fr);
	}
	body.nk_new_menu .menu-wrap.block-view .category_items_list {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	}
}

/* names and descriptions are no longer clipped by fixed heights */
@media (min-width: 768px) {
	body.nk_new_menu .menu-wrap .menu_item .menu_item_name,
	body.nk_new_menu .menu-wrap .menu_item_complex .menu_item_name {
		height: auto;
		min-height: 0;
	}
	body.nk_new_menu .menu-wrap .menu_item_complex .menu_item_name {
		width: auto;
		float: none;
		padding-right: 40px; /* room for the «favourite» star */
	}
	body.nk_new_menu .menu-wrap .menu_item .menu_item_description {
		height: auto;
	}
	/* long category names wrap instead of running under the arrow */
	body.nk_new_menu .nav-categories ul li a {
		white-space: normal;
	}
	/* the complex card content uses the whole card (it was a shrink-to-fit table cell) */
	body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .menu_item_info {
		display: block;
		width: 100%;
	}
}

/* list view, dish card: photo | text, nutrition + price under both (modern browsers; older ones keep the theme layout) */
@supports (display: grid) and (aspect-ratio: 1 / 1) {
	@media (min-width: 768px) {
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_inner {
			display: block;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_info {
			display: grid;
			grid-template-columns: clamp(120px, 40%, 210px) minmax(0, 1fr);
			grid-template-areas:
				"img top"
				"img mid"
				"img vote"
				"bot bot";
			grid-template-rows: auto auto 1fr auto;
			column-gap: 18px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_top {
			grid-area: top;
			padding-left: 0;
			display: flex;
			align-items: flex-start;
			gap: 8px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_top:before,
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_top:after,
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_info:before,
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_info:after {
			display: none;
			content: none;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_name {
			flex: 1 1 auto;
			width: auto;
			float: none;
			padding-left: 0;
			margin-left: 0;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_tags {
			flex: 0 0 auto;
			top: 0;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_middle {
			display: contents;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_img {
			grid-area: img;
			position: relative;
			left: auto;
			top: auto;
			width: 100%;
			min-width: 0;
			height: auto;
			aspect-ratio: 3 / 2;
			align-self: start;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_img .thumbnail {
			display: block;
			width: 100%;
			height: 100%;
			margin: 0;
			padding: 0;
			border: 0;
			overflow: hidden;
			border-radius: 10px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_img .open-image img.lazy,
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_img img {
			display: block;
			width: 100%;
			height: 100%;
			max-width: 100%;
			margin: 0;
			object-fit: cover;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_description {
			grid-area: mid;
			padding-left: 0;
			overflow: hidden;
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 5;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_vote {
			grid-area: vote;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_bottom {
			grid-area: bot;
			margin-top: 14px;
		}
		/* the nutrition row and the price/cart: the theme splits them 62% / 30% and they overlapped in narrow cards;
		   now they share the line when they fit and the price/cart moves under the nutrition row when they do not */
		body.nk_new_menu .menu-wrap.list-view .menu_item_bottom_inner {
			flex-wrap: wrap;
			column-gap: 12px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_bottom_inner .menu_item_params {
			flex: 0 1 auto;
			width: auto;
			max-width: none;
			float: none;
			justify-content: flex-start;
			column-gap: 18px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_bottom_inner .menu_item_gramm {
			max-width: 150px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_bottom_inner .menu_item_gramm b {
			white-space: nowrap;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_bottom_inner .menu_item_cart {
			flex: 0 0 auto;
			width: auto;
			float: none;
			margin-left: auto;
			gap: 14px;
		}
	}
	/* cards in a two-column grid get a slightly tighter padding */
	@media (min-width: 1200px) {
		body.nk_new_menu .menu-wrap.list-view .category_items_list > .menu_item_dish {
			padding: 24px 24px 18px;
		}
		body.nk_new_menu .menu-wrap.list-view .category_items_list > .menu_item_dish .menu_item_bottom {
			margin-left: -24px;
			margin-right: -24px;
		}
		body.nk_new_menu .menu-wrap.list-view .category_items_list > .menu_item_dish .menu_item_bottom_inner {
			padding-left: 24px;
			padding-right: 24px;
		}
	}

	/* list view, complex lunch: the dishes of the set fill the row */
	@media (min-width: 768px) {
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info {
			display: grid !important;
			grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
			gap: 12px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal-info-item {
			display: block;
			width: auto;
			padding: 0;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal-info-item .modal-info-img {
			width: 100%;
			height: auto;
			aspect-ratio: 3 / 2;
			border-radius: 8px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal-info-item .modal-info-img img {
			display: block;
			width: 100%;
			height: 100%;
			object-fit: cover;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal-info-item .modal-info-text {
			height: auto;
			padding-top: 6px;
			overflow: hidden;
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 4;
		}
	}

	/* block view: the photo follows the card width (3:2) instead of a fixed 90px */
	@media (min-width: 768px) {
		body.nk_new_menu .menu-wrap.block-view .menu_item_inner > .img-placeholder {
			height: auto;
			aspect-ratio: 3 / 2;
		}
		body.nk_new_menu .menu-wrap.block-view .menu_item_img {
			height: auto;
			aspect-ratio: 3 / 2;
			overflow: hidden;
			border-radius: 10px;
		}
		body.nk_new_menu .menu-wrap.block-view .menu_item_img .thumbnail {
			display: block;
			height: 100%;
			margin: 0;
			padding: 0;
			border: 0;
		}
		body.nk_new_menu .menu-wrap.block-view .menu_item_img .thumbnail img {
			width: 100%;
			height: 100%;
			object-fit: cover;
		}
	}

	/* ---------- 5. Phones ---------- */
	@media (max-width: 767px) {
		/* expanded complex: two equal columns over the full width (was 2 x 150px + an empty strip) */
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info {
			display: grid !important;
			grid-template-columns: repeat(2, minmax(0, 1fr));
			gap: 12px 10px;
		}
		body.nk_new_menu .menu-wrap .menu_item_complex_new .modal-info-item {
			display: block;
			width: auto;
			padding: 0;
		}
		body.nk_new_menu .menu-wrap .menu_item_complex_new .modal-info-item .modal-info-img {
			width: 100%;
			height: auto;
			aspect-ratio: 3 / 2;
			border-radius: 8px;
		}
		body.nk_new_menu .menu-wrap .menu_item_complex_new .modal-info-item .modal-info-img img {
			display: block;
			width: 100%;
			height: 100%;
			object-fit: cover;
		}
		body.nk_new_menu .menu-wrap .menu_item_complex_new .modal-info-item .modal-info-text {
			height: auto;
			padding-top: 4px;
		}
		/* expanded dish: a larger photo next to the description */
		body.nk_new_menu .menu-wrap .menu_item_dish .menu_item_img {
			flex: 0 0 42%;
			max-width: 180px;
			min-width: 0;
			aspect-ratio: 3 / 2;
			overflow: hidden;
			border-radius: 8px;
		}
		body.nk_new_menu .menu-wrap .menu_item_dish .menu_item_img .thumbnail {
			display: block;
			width: 100%;
			height: 100%;
			margin: 0;
			padding: 0;
			border: 0;
		}
		body.nk_new_menu .menu-wrap .menu_item_dish .menu_item_img .open-image img.lazy {
			width: 100%;
			height: 100%;
			object-fit: cover;
		}
	}
	@media (min-width: 480px) and (max-width: 767px) {
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info {
			grid-template-columns: repeat(3, minmax(0, 1fr));
		}
	}
}

/* phones: «back to top» sits centred above the bottom bar, not over the price and +/- controls */
@media (max-width: 767px) {
	body.nk_new_menu .back-to-top {
		right: auto;
		left: 50%;
		bottom: 56px;
		margin-left: -20px;
	}
}

/* ==========================================================================================================
 * 7. R1.1 (25.11.2026) — food photos first. Everything below overrides parts of 1–6; nothing above was changed.
 *    Photos never exceed the 260 px of the catalogue thumbnails (/images/catalog/thumbs/*, 260x173) — no upscaling.
 * ========================================================================================================== */

/* 7.1 Side columns at 1200–1599 px: 220 / 270 (R1: 256 / 290) — the centre gets 56 px for the cards. */
@media (min-width: 1200px) and (max-width: 1599px) {
	body.nk_new_menu .menu-wrap .col-left {
		flex-basis: 220px;
		width: 220px;
	}
	body.nk_new_menu .menu-wrap .col-right {
		flex-basis: 270px;
		width: 270px;
	}
}

/* 7.2 Complex lunches and family sets, list view (tablet / desktop).
 *     The composition grid follows the width of the card itself (container queries), so it also fits a catalogue
 *     embedded elsewhere. Browsers without container queries keep the R1 grid.
 *     A: every part of the set gets a large photo (2 / 3 / 4 per row).
 *     B: when the template marks bread and disposable cutlery (.nk-ci-aux, from the dish category), the dishes keep
 *        the large grid and those extras go to a compact «В комплекте» row. Nothing is hidden, nothing changes order
 *        among the dishes. */
@supports (container-type: inline-size) {
	@media (min-width: 768px) {
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .menu_item_img {
			container-type: inline-size;
			container-name: nk-set;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .menu_item_top {
			margin-bottom: 14px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .menu_item_only_name {
			font-size: 20px;
			line-height: 1.25;
			color: #111;
		}
		/* A: all parts, equal large photos */
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info {
			display: grid !important;
			grid-template-columns: repeat(2, minmax(0, 260px));
			gap: 18px 16px;
			justify-content: start;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal-info-item .modal-info-img {
			max-width: 260px;
			aspect-ratio: 3 / 2;
			border-radius: 10px;
			overflow: hidden;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal-info-item .modal-info-text {
			padding-top: 8px;
			font-size: 14px;
			line-height: 1.3;
			color: #333;
			-webkit-line-clamp: 3;
		}
		@container nk-set (min-width: 600px) {
			body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info {
				grid-template-columns: repeat(3, minmax(0, 260px));
			}
		}
		@container nk-set (min-width: 880px) {
			body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info {
				grid-template-columns: repeat(4, minmax(0, 260px));
			}
		}

		/* B: dishes large, bread / cutlery compact (only when the template marks them) */
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info:has(> .nk-ci-aux) {
			display: flex !important;
			flex-wrap: wrap;
			align-items: flex-start;
			gap: 18px 16px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info:has(> .nk-ci-aux) > .modal-info-item:not(.nk-ci-aux) {
			flex: 0 0 calc((100% - 16px) / 2);
			max-width: 260px;
		}
		@container nk-set (min-width: 560px) {
			body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info:has(> .nk-ci-aux) > .modal-info-item:not(.nk-ci-aux) {
				flex-basis: calc((100% - 32px) / 3);
			}
		}
		@container nk-set (min-width: 560px) and (max-width: 739.98px) {
			/* exactly four dishes: 2 x 2 at full size rather than 3 + 1 (browsers without «:nth-child(n of S)» keep 3 + 1) */
			body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info:has(> :nth-child(4 of .modal-info-item:not(.nk-ci-aux))):not(:has(> :nth-child(5 of .modal-info-item:not(.nk-ci-aux)))) > .modal-info-item:not(.nk-ci-aux) {
				flex-basis: calc((100% - 16px) / 2);
			}
		}
		@container nk-set (min-width: 740px) {
			body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info:has(> .nk-ci-aux) > .modal-info-item:not(.nk-ci-aux) {
				flex-basis: calc((100% - 48px) / 4);
			}
		}
		/* «В комплекте:» — a full-width line break before the extras */
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info:has(> .nk-ci-aux)::before {
			content: "\412  \43A \43E \43C \43F \43B \435 \43A \442 \435 :";
			order: 1;
			flex: 0 0 100%;
			margin: 2px 0 -10px;
			font-size: 13px;
			color: #8a8a8a;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info > .nk-ci-aux {
			order: 2;
			flex: 0 0 calc((100% - 16px) / 2);
			display: flex;
			align-items: center;
			gap: 10px;
			max-width: 340px;
		}
		@container nk-set (min-width: 700px) {
			body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info > .nk-ci-aux {
				flex-basis: calc((100% - 32px) / 3);
			}
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info > .nk-ci-aux .modal-info-img {
			flex: 0 0 66px;
			width: 66px;
			border-radius: 8px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .modal_info > .nk-ci-aux .modal-info-text {
			padding-top: 0;
			font-size: 13px;
			color: #555;
			-webkit-line-clamp: 3;
		}
		/* price of the set: a little larger, it is the main call to action of the card */
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .menu_item_price {
			font-size: 26px;
		}
	}
}

/* 7.3 Dish cards, list view (tablet / desktop): the photo column grows with the card up to the 260 px thumbnail
 *     (R1: up to 210 px). */
@supports (display: grid) and (aspect-ratio: 1 / 1) {
	@media (min-width: 768px) {
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_info {
			grid-template-columns: clamp(140px, 46%, 260px) minmax(0, 1fr);
			column-gap: 20px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_only_name {
			font-size: 17px;
			line-height: 1.3;
			color: #111;
		}
	}
}
/* a wide dish card (one per row, 1200–1599 px): nutrition, price and cart move under the description, next to the
 * photo, instead of a separate band under the whole card — the card is lower and the right half is no longer empty */
@supports (container-type: inline-size) and (aspect-ratio: 1 / 1) {
	@media (min-width: 768px) {
		body.nk_new_menu .menu-wrap.list-view .category_items_list > .menu_item_dish {
			container-type: inline-size;
			container-name: nk-dish;
		}
		@container nk-dish (min-width: 640px) {
			body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_info {
				grid-template-areas:
					"img top"
					"img mid"
					"img vote"
					"img bot";
				grid-template-rows: auto auto 1fr auto;
			}
			body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_bottom,
			body.nk_new_menu .menu-wrap.list-view .category_items_list > .menu_item_dish .menu_item_bottom {
				margin: 12px 0 0;
				align-self: end;
			}
			body.nk_new_menu .menu-wrap.list-view .menu_item_dish .menu_item_bottom_inner,
			body.nk_new_menu .menu-wrap.list-view .category_items_list > .menu_item_dish .menu_item_bottom_inner {
				padding-left: 0;
				padding-right: 0;
			}
		}
	}
}

/* 7.4 Block view («Блоками»): the photo spans the card (R1: inset by the 20 px card padding); complex lunches and
 *     family sets show their real dishes (2 x 2) instead of the generic «Обеды в офис» package picture. */
@supports (aspect-ratio: 1 / 1) {
	@media (min-width: 768px) {
		/* the photo spans the card up to the 260 px of the thumbnail; a wider card centres it */
		body.nk_new_menu .menu-wrap.block-view .menu_item_inner > .img-placeholder {
			width: min(calc(100% + 40px), 260px);
			height: auto;
			margin: -18px 0 12px -20px;
			aspect-ratio: 3 / 2;
		}
		body.nk_new_menu .menu-wrap.block-view .menu_item_img {
			left: 0;
			right: 0;
			top: 0;
			width: min(100%, 260px);
			margin: 0 auto;
			border-radius: 20px 20px 0 0;
		}
		body.nk_new_menu .menu-wrap.block-view .menu_item_complex_new .menu_item_img > .thumbnail > img {
			display: none;
		}
		@media (min-width: 992px) {
			body.nk_new_menu .menu-wrap.block-view .category_items_list {
				grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
			}
		}
		body.nk_new_menu .menu-wrap.block-view .menu_item_complex_new .modal_info {
			display: grid !important;
			grid-template-columns: repeat(2, minmax(0, 1fr));
			grid-template-rows: repeat(2, minmax(0, 1fr));
			gap: 2px;
			height: 100%;
		}
		body.nk_new_menu .menu-wrap.block-view .menu_item_complex_new .modal-info-item {
			display: block;
			width: auto;
			height: auto;
			min-height: 0;
			padding: 0;
		}
		body.nk_new_menu .menu-wrap.block-view .menu_item_complex_new .modal-info-item .modal-info-img {
			width: 100%;
			height: 100%;
		}
		body.nk_new_menu .menu-wrap.block-view .menu_item_complex_new .modal-info-item .modal-info-img img {
			display: block;
			width: 100%;
			height: 100%;
			object-fit: cover;
		}
		body.nk_new_menu .menu-wrap.block-view .menu_item_complex_new .modal-info-text,
		body.nk_new_menu .menu-wrap.block-view .menu_item_complex_new .modal-info-item.nk-ci-aux,
		body.nk_new_menu .menu-wrap.block-view .menu_item_complex_new .modal-info-item:nth-child(n+5) {
			display: none;
		}
	}
}

/* 7.5 Phones */
@supports (aspect-ratio: 1 / 1) {
	@media (max-width: 767px) {
		/* collapsed dish row: the photo is visible at once (84 x 56 at the left), «Подробнее» opens the large one */
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish:not(.open) .menu_item_middle {
			display: block;
			height: 0;
			padding: 0;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish:not(.open) .menu_item_middle > :not(.menu_item_img) {
			display: none;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish:not(.open) .menu_item_img {
			position: absolute;
			left: 15px;
			top: 14px;
			flex: none;
			width: 84px;
			max-width: none;
			min-width: 0;
			height: 56px;
			aspect-ratio: auto;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_dish:not(.open) .menu_item_top {
			padding-left: 96px;
			min-height: 60px;
		}
		/* collapsed complex / family set: a strip of its first dishes under the name */
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new:not(.open) .menu_item_middle {
			display: block;
			padding: 10px 0 0;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new:not(.open) .menu_item_middle > :not(.menu_item_img) {
			display: none;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new:not(.open) .menu_item_img {
			height: auto;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new:not(.open) .modal_info {
			display: grid !important;
			grid-template-columns: repeat(4, minmax(0, 1fr));
			gap: 6px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new:not(.open) .modal-info-item.nk-ci-aux,
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new:not(.open) .modal-info-item:nth-child(n+5) {
			display: none;
		}
		/* !important: theme.css sets «.modal-info-text { display: block !important }» at max-width 360px */
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new:not(.open) .modal-info-text {
			display: none !important;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new:not(.open) .modal-info-item .modal-info-img {
			border-radius: 6px;
		}
		/* expanded complex: readable captions; B: extras in a compact row */
		body.nk_new_menu .menu-wrap .menu_item_complex_new .modal-info-item .modal-info-text {
			font-size: 13px;
			line-height: 1.3;
			color: #333;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new.open .modal_info:has(> .nk-ci-aux) {
			display: flex !important;
			flex-wrap: wrap;
			gap: 12px 10px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new.open .modal_info:has(> .nk-ci-aux) > .modal-info-item:not(.nk-ci-aux) {
			flex: 0 0 calc((100% - 10px) / 2);
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new.open .modal_info:has(> .nk-ci-aux)::before {
			content: "\412  \43A \43E \43C \43F \43B \435 \43A \442 \435 :";
			order: 1;
			flex: 0 0 100%;
			margin-bottom: -6px;
			font-size: 12px;
			color: #8a8a8a;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new.open .modal_info > .nk-ci-aux {
			order: 2;
			flex: 0 0 100%;
			display: flex;
			align-items: center;
			gap: 10px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new.open .modal_info > .nk-ci-aux .modal-info-img {
			flex: 0 0 60px;
			width: 60px;
			border-radius: 6px;
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new.open .modal_info > .nk-ci-aux .modal-info-text {
			padding-top: 0;
		}
		/* «back to top»: R1 centred it above the bottom bar; with photos in the collapsed rows «Подробнее» now sits there,
		   so the button moves over the photo column on the left (it covers part of a photo, not a control) */
		body.nk_new_menu .back-to-top {
			left: 22px;
			right: auto;
			margin-left: 0;
		}
		/* expanded dish: a larger photo (R1: 42 % / max 180 px) */
		body.nk_new_menu .menu-wrap .menu_item_dish.open .menu_item_img {
			flex-basis: 48%;
			max-width: 210px;
		}
	}
	@media (min-width: 480px) and (max-width: 767px) {
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new.open .modal_info:has(> .nk-ci-aux) > .modal-info-item:not(.nk-ci-aux) {
			flex-basis: calc((100% - 20px) / 3);
		}
		body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new.open .modal_info > .nk-ci-aux {
			flex: 0 1 auto;
		}
	}
}

/* 7.6 R1.1.1 (26.11.2026) — list view: the name of a complex lunch / family set is the heading of its card.
 *     After the approval PDF: the name was lost above the long row of large photos. Larger, a real bold face
 *     (Museo Sans Cyrl 700 is loaded by the theme — no synthetic bold), black like the other headings, and a clear gap
 *     before the photos. Block view («Блоками»), dish cards, prices and controls are not changed. */
@media (min-width: 768px) {
	body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .menu_item_only_name {
		font-size: 22px;
		font-weight: 700;
		line-height: 1.2;
		color: #000;
	}
	body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .menu_item_top {
		margin-bottom: 24px;
	}
}
/* 26 px where the card is wide (1200+: four photos in a row); below, 22 px keeps the usual names on one line */
@media (min-width: 1200px) {
	body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .menu_item_only_name {
		font-size: 26px;
	}
}
/* phones: the same face, one step up from the 14 px of the dish names */
@media (max-width: 767px) {
	body.nk_new_menu .menu-wrap.list-view .menu_item_complex_new .menu_item_only_name {
		font-size: 16px;
		font-weight: 700;
		line-height: 1.25;
		color: #000;
	}
}
