/* Стили корзины для заявки внутри штатного дровера Astra. */
.astra-cart-drawer .woocommerce-mini-cart__buttons {
	display: none;
}

/* Внешний дровер не прокручивается: высоту делят шапка, панели и подвал. */
.astra-cart-drawer[id] {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100dvh;
	min-height: 0;
	overflow: hidden;
	overscroll-behavior: none;
}

.astra-cart-drawer[id] .astra-cart-drawer-header {
	flex: 0 0 auto;
}

.astra-cart-drawer[id] .astra-cart-drawer-content {
	box-sizing: border-box;
	display: flex;
	flex: 1 1 0%;
	flex-direction: column;
	height: auto;
	min-height: 0;
	overflow: hidden;
	padding-top: 16px;
}

/* Штатная обёртка виджета тоже должна сжиматься до свободной высоты. */
.astra-cart-drawer[id] .astra-cart-drawer-content .widget_shopping_cart {
	display: flex;
	flex: 1 1 0%;
	flex-direction: column;
	height: auto;
	min-height: 0;
	margin: 0;
	overflow: hidden;
}

.astra-cart-drawer[id] .astra-cart-drawer-content .widget_shopping_cart_content {
	box-sizing: border-box;
	display: flex;
	flex: 1 1 0%;
	flex-direction: column;
	/* Astra может задать родительскому виджету inline display: block. */
	height: 100%;
	min-height: 0;
	overflow: hidden;
}

.astra-cart-drawer[id] .altyn-cart-drawer-layout {
	display: flex;
	flex-direction: column;
	flex: 1 1 0%;
	min-height: 0;
	overflow: hidden;
}

.astra-cart-drawer[id] .altyn-cart-drawer-viewport {
	flex: 1 1 0%;
	min-height: 0;
	overflow: hidden;
}

.astra-cart-drawer[id] .altyn-cart-drawer-track {
	display: flex;
	height: 100%;
	width: 200%;
	transform: translateX(0);
	transition: transform 320ms ease;
}

.astra-cart-drawer[id] .altyn-cart-drawer-layout--form .altyn-cart-drawer-track {
	transform: translateX(-50%);
}

.astra-cart-drawer[id] .altyn-cart-drawer-panel {
	box-sizing: border-box;
	flex: 0 0 50%;
	min-width: 0;
	height: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;
}

.astra-cart-drawer[id] .altyn-cart-drawer-panel--products {
	display: flex;
	flex-direction: column;
}

.astra-cart-drawer[id] .altyn-cart-drawer-panel--form {
	padding-bottom: 1rem;
}

.astra-cart-drawer[id] .astra-cart-drawer-content .woocommerce-mini-cart__total {
	flex: 0 0 auto;
	position: relative;
	z-index: 2;
	margin-top: auto;
	margin-bottom: 0;
	background: #fff;
	flex-direction: column;
	box-sizing: border-box;
	width: 100%;
}

.astra-cart-drawer[id] .woocommerce-mini-cart__total {
	display: grid;
	gap: 16px;
	padding: 16px 24px 24px;
	border-top: 1px solid #e8e9ea;
}

.astra-cart-drawer[id] .altyn-cart-drawer-total-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px;
}

.astra-cart-drawer[id] .altyn-cart-drawer-total-row strong {
	font-weight: 600;
}

.astra-cart-drawer[id] .altyn-cart-drawer-next,
.astra-cart-drawer[id] .altyn-cart-drawer-submit {
	width: 100%;
	margin: 0;
	transition: opacity 180ms ease, background-color 180ms ease;
}

.astra-cart-drawer[id] .altyn-cart-drawer-back {
	width: 100%;
	margin: -4px 0 0;
	border: 0;
	background: #E8E9EA;
	box-shadow: none;
	color: #171F2C;
	text-decoration: none;
	border-radius: 4px;
	transition: all 180ms ease-in-out;
}

.astra-cart-drawer[id] .altyn-cart-drawer-back:hover,
.astra-cart-drawer[id] .altyn-cart-drawer-back:focus-visible {
	background: #F3F4F4;
	color: #171F2C;
	box-shadow: none;
}

.astra-cart-drawer[id] .altyn-cart-drawer-next[hidden],
.astra-cart-drawer[id] .altyn-cart-drawer-submit[hidden],
.astra-cart-drawer[id] .altyn-cart-drawer-back[hidden] {
	display: none;
}

.astra-cart-drawer[id] .astra-cart-drawer-content .widget_shopping_cart_content .woocommerce-mini-cart {
	flex: none;
	max-height: none;
	overflow: visible;
}

.astra-cart-drawer .altyn-mini-purchase-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 0.35em;
}

.astra-cart-drawer .altyn-mini-item-price {
	display: inline-block;
	margin: 0;
	line-height: 18px;
}

.astra-cart-drawer .altyn-mini-quantity {
	display: inline-flex;
	align-items: center;
	border: 1px solid #d7dbe0;
	border-radius: 4px;
	overflow: hidden;
}

.astra-cart-drawer .altyn-mini-quantity button {
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: #f5f6f7;
	color: #171f2c;
}

.astra-cart-drawer .altyn-mini-quantity button:not(:disabled) {
	cursor: pointer;
}

.astra-cart-drawer .altyn-mini-quantity button:disabled {
	cursor: wait;
}

.astra-cart-drawer .altyn-mini-quantity input {
	width: 45px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 0;
	text-align: center;
	-moz-appearance: textfield;
}

.woocommerce .widget_shopping_cart .cart_list li a.remove,
.woocommerce.widget_shopping_cart .cart_list li a.remove {
	top: 4px;
}

.astra-cart-drawer .altyn-mini-quantity input::-webkit-inner-spin-button,
.astra-cart-drawer .altyn-mini-quantity input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.astra-cart-drawer .altyn-item-comment-control {
	margin-top: 8px;
}

.astra-cart-drawer .altyn-item-comment-toggle {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 28px;
	padding: 2px 0;
	border: 0;
	background: transparent;
	color: #8B8F95;
	font-size: 14px;
	line-height: 1.3;
	box-shadow: none;
	transition: all 180ms ease;
}

.astra-cart-drawer .altyn-item-comment-toggle:hover,
.astra-cart-drawer .altyn-item-comment-toggle:focus-visible {
	background: transparent;
	opacity: .72;
	box-shadow: none;
}

.astra-cart-drawer .altyn-item-comment-icon {
	position: relative;
	display: block;
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	background: url("../Icons/Communication.svg") center / contain no-repeat;
}

.astra-cart-drawer .altyn-item-comment-indicator {
	display: none;
	position: absolute;
	top: -1px;
	right: -1px;
	z-index: 1;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #F47F2D;
}

.astra-cart-drawer .altyn-item-comment-toggle.has-comment .altyn-item-comment-icon .altyn-item-comment-indicator {
	display: block;
}

.astra-cart-drawer .altyn-item-comment {
	max-height: 0;
	margin-top: 0;
	padding: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-height 240ms ease, margin-top 240ms ease, padding 240ms ease, opacity 180ms ease;
}

.astra-cart-drawer .altyn-item-comment.is-expanded {
	max-height: 120px;
	margin-top: 4px;
	padding: 2px;
	opacity: 1;
}

.astra-cart-drawer .altyn-request-field.altyn-item-comment-field input {
	margin: 0;
}

.astra-cart-drawer .altyn-request-field.altyn-item-comment-field input:focus,
.astra-cart-drawer .altyn-request-field.altyn-item-comment-field input:focus-visible {
	border-color: #171f2c;
	box-shadow: 0 0 0 1px #171f2c;
	outline: none;
}

.astra-cart-drawer .altyn-request-form {
	display: grid;
	gap: 0;
	margin: 0 0 1rem;
	padding: 8px 24px 24px 24px;
}

.astra-cart-drawer .altyn-request-form p {
	margin: 8px 0 0 0;
}

.astra-cart-drawer .altyn-request-form h3 {
	font-size: 24px;
	line-height: 1.4;
	margin: 0;
}

/* Общие поля, загрузка, согласие и состояния — в forms.css. */

.astra-cart-drawer .altyn-request-form .altyn-honeypot {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	top: -10000px;
	margin: 0;
	opacity: 0;
}

.astra-cart-drawer .altyn-request-hint {
	color: #8B8F95;
	font-size: 16px;
}

.astra-cart-drawer .altyn-request-message {
	min-height: 0;
	margin: 8px 0 0 0;
	color: #454C56;
}

.astra-cart-drawer .altyn-request-message.is-loading {
	color: #171F2C;
	background: linear-gradient(110deg, #171F2C 20%, #8B8F95 50%, #171F2C 80%);
	background-size: 200% 100%;
	background-position: 200% 0;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: altyn-request-message-loading 1.8s ease-in-out infinite;
}

@keyframes altyn-request-message-loading {
	0% {
		background-position: 200% 0;
	}

	100% {
		background-position: -200% 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.astra-cart-drawer .altyn-request-message.is-loading {
		animation: none;
		background-position: 50% 0;
	}
}

.astra-cart-drawer .altyn-request-message:empty {
	display: none;
}

.astra-cart-drawer .altyn-request-form button[type="submit"] {
	display: none;
}

.astra-cart-drawer .altyn-cart-success {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 32px 24px;
	background: transparent;
	color: #171f2c;
	text-align: center;
	overflow-y: auto;
}

.astra-cart-drawer .altyn-success-check {
	display: block;
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	max-width: 48px;
	max-height: 48px;
	margin: 0 0 16px;
	overflow: visible;
	object-fit: contain;
}

.astra-cart-drawer .altyn-cart-success h3 {
	margin: 0;
	font-size: 20px;
	line-height: 1.4;
	color: #171F2C;
}

.astra-cart-drawer .altyn-cart-success p {
	max-width: 440px;
	margin: 4px 0 0;
	color: #454C56;
	font-size: 16px;
	line-height: 1.45;
}

.astra-cart-drawer .altyn-cart-success-close {
	width: auto;
	margin-top: 24px !important;
	background-color: #E9F9EB !important;
	color: #26BF36 !important;
	transition: all 180ms ease-in-out;
}

.astra-cart-drawer .altyn-cart-success-close:hover {
	background-color: #D4F2D7 !important;
}

.altyn-mobile-cart-button {
	display: none;
}

.astra-cart-drawer .astra-cart-drawer-header {
	position: relative;
	box-sizing: border-box;
	border-bottom: 1px solid var(--ast-border-color);
	padding: 16px 68px 16px 24px;
	font-size: clamp(14px, 1.25vw, 16px);
	line-height: 1.3;
	white-space: normal;
	overflow-wrap: anywhere;
	height: auto;
	min-height: 0;
	max-height: none;
	overflow: visible;
	z-index: 1;
}

.astra-cart-drawer {
	border-radius: 4px 0 0 4px;
	border: none;
}

.astra-cart-drawer .astra-cart-drawer-close {
	position: absolute;
	top: 0.5em;
	right: 24px;
	border: none;
	padding: 8px;
	color: var(--ast-global-color-2);
	background-color: transparent;
	box-shadow: none;
}

.ast-mobile-cart-active .astra-mobile-cart-overlay {
	backdrop-filter: blur(8px);
}

.astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart {
	padding: 0 24px 16px 24px;
}

.woocommerce-js ul.product_list_widget li img {
	border-radius: 4px;
	border: 1px solid #E8E9EA;
}

.woocommerce .widget_shopping_cart .cart_list li,
.woocommerce.widget_shopping_cart .cart_list li {
	padding: 0 16px 16px 80px;
	margin-bottom: 6px;
}

.woocommerce-js ul.product_list_widget li img {
	position: absolute;
	left: 0;
	width: 64px;
	height: 64px;
	padding: 4px;
	margin: 8px 0 0 0;
	top: 0;
	transform: none;
	object-fit: cover;
}

.woocommerce-js ul.cart_list li>a,
.woocommerce-js ul.product_list_widget li>a {
	margin: 4px 8px 8px 0;
}

@media (max-width: 480px) {
	.altyn-mobile-cart-button {
		position: fixed;
		right: 16px;
		bottom: calc(16px + env(safe-area-inset-bottom));
		z-index: 9997;
		display: grid;
		width: 56px;
		min-width: 56px;
		min-height: 56px;
		padding: 0;
		place-items: center;
		border: 0;
		border-radius: 50%;
		background: rgba(245, 245, 245, .72);
		backdrop-filter: blur(16px);
		color: #171F2C;
		font-size: 0;
		box-shadow: 0 1px 24px rgba(23, 31, 44, 0.12), 0 1px 8px rgba(23, 31, 44, 0.05);
		transition: box-shadow 180ms ease, transform 180ms ease;
	}

	.altyn-mobile-cart-button:hover,
	.altyn-mobile-cart-button:focus-visible {
		background: rgba(245, 245, 245, .8) !important;
		color: #171F2C;
		box-shadow: 0 1px 24px rgba(23, 31, 44, 0.16), 0 1px 8px rgba(23, 31, 44, 0.08);
		transform: translateY(-1px);
	}

	.altyn-mobile-cart-button:focus {
		background: rgba(245, 245, 245, .8);
		color: #171F2C
	}

	.single-product .altyn-mobile-cart-button {
		bottom: calc(16px + env(safe-area-inset-bottom) + var(--altyn-product-sticky-offset, 0px));
	}

	.altyn-mobile-cart-button::before {
		content: "";
		position: absolute;
		top: 16px;
		left: 16px;
		display: block;
		width: 24px;
		height: 24px;
		background-color: currentColor;
		-webkit-mask: url("../Icons/Shopping_Cart.svg") center / contain no-repeat;
		mask: url("../Icons/Shopping_Cart.svg") center / contain no-repeat;
	}

	.altyn-mobile-cart-count {
		position: absolute;
		top: 6px;
		right: 7px;
		display: grid;
		min-width: 18px;
		height: 18px;
		padding: 0 4px;
		place-items: center;
		border-radius: 999px;
		background-color: #f47f2d;
		color: #fff;
		font-size: 11px;
		font-weight: 500;
		line-height: 1;
	}

	.ast-site-header-cart {
		display: none !important;
	}

	html.ast-mobile-cart-active .altyn-mobile-cart-button {
		display: none;
	}
}

@media screen and (max-width: 768px) {
	.dgwt-wcas-search-wrapp {
		margin: 0;
	}
}

@media screen and (max-width: 568px) {
	header .custom-logo-link img {
		width: 96px;
	}

	.ast-desktop .ast-primary-header-bar.main-header-bar,
	.ast-header-break-point #masthead .ast-primary-header-bar.main-header-bar {
		padding-left: 12px;
		padding-right: 12px;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link {
		padding: 12px 12px !important;
		gap: 4px !important;
	}

	.ast-header-break-point .ast-header-woo-cart {
		display: none;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link::after {
		flex: 0 0 16px;
		width: 16px;
		height: 16px;
	}

	#mega-menu-wrap-secondary_menu #mega-menu-secondary_menu>li#mega-menu-item-151>a.mega-menu-link::before {
		right: 12px;
		width: 16px;
		height: 16px;
	}

	.site-header-section>* {
		padding: 0 4px;
	}

	.ast-button-wrap .menu-toggle.main-header-menu-toggle {
		padding: 4px 0 4px 4px;
	}

	[data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg {
		fill: #171F2C;
	}

	.header-contacts .hot-tel,
	.header-contacts .tel-caption,
	.ast-header-button-1[data-section*="section-hb-button-"] .ast-builder-button-wrap .ast-custom-button {
		font-size: 12px;
	}

	.astra-cart-drawer .altyn-request-hint {
		font-size: 14px;
		line-height: 20px;
	}

	.woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__total strong {
		width: auto;
	}

	.astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__total {
		text-align: left;
	}

	.astra-cart-drawer .altyn-request-form h3 {
		font-size: 20px;
	}

	.astra-cart-drawer .altyn-request-form {
		display: grid;
		gap: 0;
		margin: 0 0 16px;
		padding: 0px 16px 16px 16px;
	}

	.astra-cart-drawer[id] .astra-cart-drawer-content {
		padding-top: 16px;
	}

	.woocommerce .widget_shopping_cart .cart_list li a.remove,
	.woocommerce.widget_shopping_cart .cart_list li a.remove {
		top: 0px;
		right: -8px;
	}

	.astra-cart-drawer .astra-cart-drawer-header {
		padding: 16px 52px 16px 12px;
		z-index: 1;
	}

	.astra-cart-drawer .astra-cart-drawer-close {
		position: absolute;
		top: 6px;
		right: 8px;
	}

	.astra-cart-drawer .altyn-success-check {
		flex: 0 0 40px;
		width: 40px;
		height: 40px;
		max-width: 40px;
		max-height: 40px;
		margin: 0 0 16px;
	}

	.astra-cart-drawer .altyn-cart-success p {
		font-size: 14px;
	}

	.astra-cart-drawer .altyn-cart-success-close {
		font-size: 14px;
		margin-top: 16px !important;
	}

	.woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__total {
		padding: 16px 12px;
	}
}