/* Страница просмотра заказа (view-order) */

body.woocommerce-view-order section.pt-5 {
	padding-top: 0;
}

body.woocommerce-account .woocommerce-MyAccount-content {
	width: 100%;
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

.nh4-view-order {
	--nh4-fs-13: clamp(9px, 0.35vw + 10px, 13px);
	--nh4-fs-16: clamp(12px, 0.45vw + 12px, 16px);
	--nh4-fs-18: clamp(14px, 0.55vw + 13px, 18px);
	--nh4-fs-20: clamp(16px, 0.65vw + 14px, 20px);
	--nh4-fs-24: clamp(20px, 0.85vw + 16px, 24px);
	--nh4-fs-28: clamp(24px, 1vw + 18px, 28px);
	font-size: var(--nh4-fs-16);
	margin: 0 auto;
	padding-top: 120px;
	color: var(--text, #1a1a1a);
}

.nh4-view-order__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 44px;
	flex-wrap: wrap;
	font-size: var(--nh4-fs-18);
}

.nh4-view-order__back {
	color: #245890;
	text-decoration: none;
	font-weight: 600;
}

.nh4-view-order__back:hover {
	text-decoration: underline;
}

.nh4-view-order__breadcrumb {
	color: inherit;
	font-weight: 400;
}

.nh4-view-order__breadcrumb a {
	color: inherit;
	text-decoration: underline;
	font-weight: 600;
}

.nh4-view-order__breadcrumb a:hover {
	text-decoration: underline;
}

.nh4-view-order__layout {
	display: flex;
	align-items: stretch;
	gap: 22px;
}

.nh4-view-order__items {
	width: 49%;
	min-width: 0;
	/* 3 строки товара (130px превью + отступы + разделитель), дальше скролл */
	--nh4-view-order-item-height: calc(130px + 28px + 1px);
	max-height: calc(var(--nh4-view-order-item-height) * 3 - 14px);
	overflow-x: hidden;
	overflow-y: auto;
	padding-right: 10px;
	scrollbar-width: thin;
	scrollbar-color: #8f8f8f transparent;
}

.nh4-view-order__items::-webkit-scrollbar {
	width: 6px;
}

.nh4-view-order__items::-webkit-scrollbar-thumb {
	background: #8f8f8f;
	border-radius: 3px;
}

.nh4-view-order__items::-webkit-scrollbar-track {
	background: transparent;
}

.nh4-view-order__split {
	flex-shrink: 0;
	width: 1px;
	align-self: stretch;
	background: #8f8f8f;
}

.nh4-view-order__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid #8f8f8f;
}

.nh4-view-order__item:first-child {
	padding-top: 0;
}

.nh4-view-order__item:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.nh4-view-order__thumb {
	flex-shrink: 0;
	width: 130px;
	height: 130px;
	background: #f3f3f3;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nh4-view-order__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.nh4-view-order__item-main {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
}

.nh4-view-order__info {
	min-width: 0;
	max-width: 200px;
	flex: 1;
}

.nh4-view-order__name {
	margin: 0 0 10px;
	font-weight: 400;
	font-size: var(--nh4-fs-24);
	line-height: 1.22;
}

.nh4-view-order__attrs {
	margin: 0;
	padding: 0;
	list-style: none;
	color: #2A2A2A;
	font-size: var(--nh4-fs-13);
	line-height: 1.45;
}

.nh4-view-order__attrs li + li {
	margin-top: 4px;
}

.nh4-view-order__col-right {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 38px;
	padding-top: 0;
}

.nh4-view-order__price {
	font-weight: 700;
	font-size: var(--nh4-fs-28);
	line-height: 1.2;
	white-space: nowrap;
	text-align: right;
}

.nh4-view-order__price .woocommerce-Price-amount {
	font-weight: inherit;
}

.nh4-view-order__qty {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid #2a2a2a;
	background: #fff;
}

.nh4-view-order__qty span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 4px;
	font-size: var(--nh4-fs-20);
	color: #2A2A2A;
	user-select: none;
}

.nh4-view-order__qty-value {
	border-left: 1px solid #2a2a2a;
	border-right: 1px solid #2a2a2a;
	color: var(--text, #1a1a1a);
	font-weight: 500;
}

.nh4-view-order__sidebar {
	flex-grow: 1;
	min-height: 306px;
	margin-left: 0;
	background: var(--accent, #245890);
	color: #fff;
	padding: 20px 23px;
	box-sizing: border-box;
}

.nh4-view-order__sidebar-title {
	margin: 0 0 18px;
	font-size: var(--nh4-fs-28);
	font-weight: 700;
	line-height: 1.2;
}

.nh4-view-order__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 12px;
	font-size: var(--nh4-fs-20);
	font-weight: 700;
}

.nh4-view-order__total span:last-child {
	font-size: var(--nh4-fs-28);
}

.nh4-view-order__total .woocommerce-Price-amount {
	font-weight: inherit;
	color: #fff;
}

.nh4-view-order__divider {
	height: 1px;
	margin: 0 0 8px;
	border: 0;
	background-color: #fff;
}

.nh4-view-order__meta {
	margin: 0;
}

.nh4-view-order__meta-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 20px;
	padding: 4px 0;
	font-size: var(--nh4-fs-20);
	line-height: 1.4;
}

.nh4-view-order__meta-row dt {
	margin: 0;
	font-weight: 400;
}

.nh4-view-order__meta-row dd {
	margin: 0;
	font-weight:600;
	text-align: right;
}

.nh4-view-order__bonus {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
}

.nh4-view-order__again {
	display: block;
	width: 100%;
	margin-top: 70px;
	padding: 18px;
	background: #fff;
	color: var(--accent, #245890) !important;
	border: 0;
	border-radius: 4px;
	font-size: var(--nh4-fs-20);
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	box-sizing: border-box;
	transition: opacity 0.2s;
}

.nh4-view-order__again:hover {
	opacity: 0.9;
	color: var(--accent, #245890) !important;
}

@media (max-width: 991px) {
	.nh4-view-order {
		padding-top: 50px;
	}

	.nh4-view-order__layout {
		flex-direction: column;
	}

	.nh4-view-order__items {
		width: 100%;
		max-height: none;
		overflow: visible;
		padding-right: 0;
		border-bottom: 1px solid #d9d9d9;
		padding-bottom: 32px;
		margin-bottom: 32px;
	}

	.nh4-view-order__split {
		display: none;
	}

	.nh4-view-order__sidebar {
		width: 100%;
		margin-left: 0;
	}
}

@media (max-width: 450px) {
	.nh4-view-order__item {
		flex-direction: column;
	}
	.nh4-view-order__thumb {
		width: 150px;
		height: 150px;
		align-self: center;
	}
	.nh4-view-order__item-main{
		width: 100%;
		justify-content: space-between;
	}
}
