/* ============================================
   ARSENAL — карточка товара и конструктор ланча
   ============================================ */
.single-product .breadcrumbs { margin: 28px 0 36px; }
.product-back { display: inline-block; margin: 0 0 28px; color: #777; font-size: 14px; }

/* Две колонки 50/50: слева фото, справа конструктор ланча или данные товара */
.product-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: start; }
.product-gallery { position: relative; overflow: hidden; background: #fff; }
@media (min-width: 1200px) {
	.product-gallery { position: sticky; top: 20px; }
}
.product-gallery img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.product-gallery--lunch img { aspect-ratio: 1 / 1.02; object-fit: cover; }
.product-badges { position: absolute; top: 16px; left: 16px; }
.product-main { min-width: 0; }
.product-main__title { margin: 0 0 22px; font-size: 34px; line-height: 1.08; }
.product-main__title span { color: #aaa; font-weight: 500; white-space: nowrap; }

/* Обычный товар */
.product-purchase { display: flex; align-items: center; gap: 26px; margin-bottom: 34px; }
.product-purchase__price { font-size: 32px; font-weight: 600; white-space: nowrap; }
.product-purchase__price del { color: #aaa; font-size: 18px; }
.product-purchase__price ins { text-decoration: none; }
.product-purchase form.cart { margin: 0 !important; }
.product-purchase .quantity,
.product-purchase .qty { display: none !important; }
.product-purchase .single_add_to_cart_button { min-height: 50px; min-width: 126px; border: 0 !important; border-radius: 999px !important; background: var(--c-accent) !important; color: #fff !important; }
.product-detail { margin-top: 24px; }
.product-detail h2 { margin: 0 0 10px; font-size: 16px; }
.product-detail p, .product-detail div { margin: 0; font-size: 14px; line-height: 1.35; }
.product-nutrition { display: flex; gap: 26px; flex-wrap: wrap; }
.product-nutrition span { display: flex; flex-direction: column; gap: 4px; }
.product-nutrition strong { font-size: 15px; }
.product-nutrition small { color: #777; font-size: 11px; }

/* Конструктор ланча */
.lunch-builder { min-width: 0; }
.lunch-builder h2 { margin: 0 0 30px; font-size: 18px; }
.lunch-builder fieldset { padding: 0; margin: 0 0 28px; border: 0; }
.lunch-builder legend { width: 100%; margin-bottom: 14px; font-size: 18px; font-weight: 600; }
.lunch-builder__options { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px 24px; }
.lunch-choice { display: grid; grid-template-columns: 72px 1fr; gap: 9px; align-items: start; min-width: 0; cursor: pointer; }
.lunch-choice img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; background: #eee; }
.lunch-choice__copy { display: flex; flex-direction: column; gap: 5px; font-size: 13px; line-height: 1.15; }
.lunch-choice__copy input { appearance: none; width: 13px; height: 13px; margin: 0 3px 0 0; border: 1.5px solid var(--c-accent); border-radius: 50%; vertical-align: -2px; }
.lunch-choice__copy input:checked { border: 4px solid var(--c-accent); }
.lunch-choice__copy small { color: #888; }
.lunch-choice:has(input:checked) img { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.lunch-builder__utensils label { margin-right: 28px; font-size: 14px; }
.lunch-builder__utensils input { accent-color: var(--c-accent); }
.lunch-builder__footer strong { display: block; margin-bottom: 14px; font-size: 32px; }
.lunch-builder__submit { min-width: 126px; border-radius: 999px; }
.lunch-builder__error { min-height: 20px; margin: 8px 0 0; color: #c93535; font-size: 13px; }
.lunch-builder__empty { padding: 22px; border-radius: 16px; background: #f6f6f6; color: #777; }

/* Рекомендации и отзывы */
.product-related-block { margin-top: 120px; }
.product-related-block > h2 { margin: 0 0 48px; text-align: center; font-size: 32px; }
.product-related-block .related { display: block !important; margin: 0; }
.product-related-block .related > h2 { display: none; }
.product-related-block .related ul.products { display: grid !important; width: 100% !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0 !important; }
.product-related-block .related ul.products::before,
.product-related-block .related ul.products::after { display: none !important; }
.single-product .home-reviews { margin-top: 120px; }

/*
 * Переключение desktop → mobile: на 1199px (см. tokens.css и header.css)
 * галерея встаёт над блоком с данными и занимает всю ширину.
 */
@media (max-width: 1199px) {
	.product-wrap { grid-template-columns: 1fr; gap: 28px; }
	.product-gallery, .product-gallery--lunch { position: static; grid-column: 1; width: 100%; max-width: none; }
	.product-main { grid-column: 1; }
	.product-gallery img, .product-gallery--lunch img { aspect-ratio: 16 / 10; object-fit: cover; }
	.product-related-block .related ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.single-product .breadcrumbs { margin-bottom: 24px; }
	.lunch-builder__options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.product-gallery img, .product-gallery--lunch img { aspect-ratio: 4 / 3; }
	.product-related-block .related ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.product-back { margin-bottom: 18px; }
	.product-main__title { font-size: 27px; }
	.product-purchase { display: block; margin-bottom: 24px; }
	.product-purchase .single_add_to_cart_button { margin-top: 14px; }
	.lunch-builder__options { grid-template-columns: 1fr; }
	.lunch-choice { grid-template-columns: 64px 1fr; }
	.lunch-choice img { width: 64px; height: 64px; }
	.product-gallery img, .product-gallery--lunch img { aspect-ratio: 1 / 1; }
	.product-related-block { margin-top: 72px; }
	.product-related-block > h2 { font-size: 27px; }
}
