/* Корзина, оформление заказа, страница заказа: две колонки — слева товары / форма, справа итог (липкий).
   Контейнер страницы из старой вёрстки — сетка, поэтому всё внутри одного блока .shop. */
.shop {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 24px;
	align-items: start;
	margin: 8px 0 48px;
	font-size: 15px;
	line-height: 1.4;
	color: #1f2328;
}
.shop__head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.shop__head .title { margin: 0; }
.shop__store { color: #6b7280; }
.shop__store b { color: #1f2328; }
.shop__main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.shop__aside { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }

.shop-card {
	background: #fff;
	border: 1px solid #e7e9ec;
	border-radius: 12px;
	padding: 18px 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}
.shop-card__title { margin: 0 0 12px; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.shop-card__step {
	display: inline-flex; align-items: center; justify-content: center;
	width: 26px; height: 26px; border-radius: 50%;
	background: var(--mainGreen, #4fd11b); color: #fff; font-size: 14px; font-weight: 700;
}

/* строки товаров */
.shop-items { list-style: none; margin: 0; padding: 0; }
.shop-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 110px 96px 110px 32px;
	gap: 12px;
	align-items: center;
	padding: 14px 0;
	border-bottom: 1px solid #f0f1f3;
}
.shop-item:last-child { border-bottom: 0; }
.shop-item__name { font-weight: 500; color: #1f2328; text-decoration: none; }
.shop-item__name:hover { text-decoration: underline; }
.shop-item__meta { margin-top: 4px; font-size: 13px; color: #6b7280; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.shop-item__price, .shop-item__sum { text-align: right; white-space: nowrap; }
.shop-item__sum { font-weight: 700; }
.shop-item__qty {
	width: 100%; height: 38px; padding: 0 8px; text-align: center;
	border: 1px solid #d0d4d9; border-radius: 8px; font: inherit;
}
.shop-item__remove {
	width: 32px; height: 32px; border: 0; border-radius: 8px; background: none;
	color: #9aa1a9; font-size: 16px; cursor: pointer;
}
.shop-item__remove:hover { background: #fdecec; color: #c62828; }
.shop-ok { color: #2e9e4f; }
.shop-warn { color: #b26a00; }
.shop-bad { color: #c62828; }
.shop-items__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; }

/* итог справа */
.shop-sum { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0; }
.shop-sum dt { color: #6b7280; }
.shop-sum dd { margin: 0; text-align: right; white-space: nowrap; }
.shop-sum__total { padding-top: 10px; border-top: 1px solid #eceef1; font-size: 22px; font-weight: 700; color: #1f2328 !important; }
.shop-hint { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: #eefbe8; color: #2b6e14; font-size: 14px; }
.shop-hint_warn { background: #fff6e5; color: #8a5300; }
.shop-mini { list-style: none; margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid #eceef1; max-height: 280px; overflow: auto; }
.shop-mini li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 6px 0; font-size: 14px; }
.shop-mini__name { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.shop-mini__qty { color: #6b7280; white-space: nowrap; }

.shop-btn {
	display: flex; align-items: center; justify-content: center; width: 100%;
	min-height: 50px; padding: 0 18px; border: 0; border-radius: 10px;
	background: var(--mainGreen, #4fd11b); color: #fff; font: inherit; font-size: 17px; font-weight: 700;
	text-decoration: none; cursor: pointer; box-shadow: 0 4px 10px rgba(79, 209, 27, .3);
}
.shop-btn:hover { filter: brightness(.95); }
.shop-btn[aria-disabled="true"] { background: #c9ced4; box-shadow: none; pointer-events: none; }
.shop-btn_light {
	min-height: 40px; background: #fff; color: #1f2328; border: 1px solid #d0d4d9; box-shadow: none;
	font-size: 15px; font-weight: 500;
}
.shop-link { color: #6b7280; text-align: center; font-size: 14px; }

/* форма оформления */
.shop-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.shop-field { display: flex; flex-direction: column; gap: 6px; }
.shop-field_wide { grid-column: 1 / -1; }
.shop-field[hidden] { display: none; }
.shop-field label { font-size: 14px; color: #4b5563; }
.shop-field input, .shop-field textarea {
	width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d0d4d9; border-radius: 8px;
	font: inherit; background: #fff;
}
.shop-field textarea { min-height: 72px; resize: vertical; }
.shop-field input:focus, .shop-field textarea:focus { outline: 2px solid rgba(79, 209, 27, .35); border-color: #4fd11b; }
.shop-field small { color: #6b7280; font-size: 13px; }
.shop-field_error input, .shop-field_error textarea { border-color: #c62828; }
.shop-error { color: #c62828; font-size: 14px; }
.shop-errors { padding: 12px 16px; border-radius: 10px; background: #fdecec; color: #b71c1c; }

.shop-options { display: grid; gap: 10px; }
.shop-option {
	display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start;
	padding: 12px 14px; border: 1px solid #d9dde2; border-radius: 10px; cursor: pointer; background: #fff;
}
.shop-option:hover { border-color: #a9d991; }
.shop-option:has(input:checked) { border-color: #4fd11b; background: #f4fdf0; box-shadow: 0 0 0 1px #4fd11b inset; }
.shop-option input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: #3cae10; }
.shop-option__title { font-weight: 700; }
.shop-option__note { display: block; margin-top: 2px; font-size: 13px; color: #6b7280; }
.shop-option__price { font-weight: 700; white-space: nowrap; }
.shop-option.is-off { opacity: .45; cursor: not-allowed; }
.shop-option.is-off input { pointer-events: none; }

.shop-consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; font-size: 13px; color: #4b5563; cursor: pointer; }
.shop-consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #3cae10; }
.shop-consent a { text-decoration: underline; color: inherit; }
.shop-consent_error { color: #c62828; }

/* страница заказа */
.shop-done {
	grid-column: 1 / -1; display: flex; gap: 16px; align-items: center;
	padding: 18px 20px; border-radius: 12px; background: #eefbe8; color: #1f4d0e;
}
.shop-done__icon {
	flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--mainGreen, #4fd11b); color: #fff;
	display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700;
}
.shop-done p { margin: 4px 0 0; }
.shop-status { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #eef2ff; color: #1d4ed8; font-size: 14px; font-weight: 700; }
.shop-status_ready { background: #eefbe8; color: #2b6e14; }
.shop-status_done { background: #f0f1f3; color: #4b5563; }
.shop-status_bad { background: #fdecec; color: #b71c1c; }
.shop-info { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 12px; margin: 0; }
.shop-info dt { color: #6b7280; }
.shop-info dd { margin: 0; }

.shop-empty { grid-column: 1 / -1; text-align: center; padding: 48px 16px; }
.shop-empty p { margin: 0 0 16px; font-size: 18px; color: #4b5563; }
.shop-empty .shop-btn { display: inline-flex; width: auto; }

@media (max-width: 960px) {
	.shop { grid-template-columns: 1fr; }
	.shop__aside { position: static; }
}
@media (max-width: 640px) {
	.shop-item { grid-template-columns: auto 80px minmax(0, 1fr) 32px; grid-template-areas: "name name name del" "price qty sum sum"; }
	.shop-item__info { grid-area: name; }
	.shop-item__price { grid-area: price; text-align: left; }
	.shop-item__qtybox { grid-area: qty; }
	.shop-item__sum { grid-area: sum; }
	.shop-item__del { grid-area: del; }
	.shop-fields { grid-template-columns: 1fr; }
	.shop-card { padding: 16px; }
	.shop-info { grid-template-columns: 1fr; gap: 2px; }
	.shop-info dd { margin-bottom: 8px; }
}
