/* -------------------------------------------------------------------------
   Переопределения WooCommerce
-------------------------------------------------------------------------- */

/* Временно скрываем правый сайдбар WooCommerce до решения по контенту/фильтрам. */
aside#secondary.featured-sidebar.wc-sidebar-wrapper.widget-area {
	display: none !important;
}

/* Если сайдбар WooCommerce скрыт, контент должен занимать всю ширину. */
.woocommerce-page .featured-content,
.woocommerce .featured-content,
.post-type-archive-product .featured-content,
.tax-product_cat .featured-content,
.tax-product_brand .featured-content {
	width: 100% !important;
	max-width: 100% !important;
	margin-right: 0 !important;
	float: none !important;
}

/* Глобальный цвет фона кнопок-действий (каталог, корзина, чекаут — НЕ product page). */
.button,
a.button,
.woocommerce a.button,
.woocommerce a.button.alt,
.woocommerce button.button,
.woocommerce button.button.alt,
.woocommerce input.button,
.woocommerce-page a.button,
.woocommerce-page button.button,
.woocommerce-page button.button.alt,
.woocommerce-page input.button,
input[type="submit"] {
	background: #1b253e;
	border-color: #1b253e;
	color: #fff;
	font-weight: 400;
}

/* Кнопки в нотисах WooCommerce (тост «Просмотр корзины» и т.п.).
   Родительская тема на :hover делает шрифт жирным (font-weight 400→700), из-за чего
   кнопка «прыгает» и разрастается. Фиксируем стабильный вид на обычном состоянии и hover. */
.woocommerce-message a.button,
.woocommerce-message a.button:hover,
.woocommerce-message a.wc-forward,
.woocommerce-message a.wc-forward:hover,
.woocommerce-message a.added_to_cart,
.woocommerce-message a.added_to_cart:hover,
.woocommerce-info a.button,
.woocommerce-info a.button:hover,
.woocommerce-error a.button,
.woocommerce-error a.button:hover {
	font-size: 12px !important;
	font-weight: 600 !important;
	padding: 7px 14px !important;
	line-height: 1.4 !important;
	transform: none !important;
	transition: none !important;
}

/* Кнопки +/- количества в корзине (блочная корзина WooCommerce). */
.wc-block-components-quantity-selector button.wc-block-components-quantity-selector__button {
	color: #000 !important;
	background: transparent !important;
	border: 0 !important;
}

/* WooCommerce Blocks использует U+FF0B (Fullwidth Plus) — его нет в западных шрифтах. */
.wc-block-components-quantity-selector__button--plus {
	font-size: 0 !important;
}
.wc-block-components-quantity-selector__button--plus::after {
	content: "+";
	font-size: 1rem;
	line-height: 1;
	color: #000;
}

/* Кнопка WooCommerce в карточках каталога: иконка + текст. */
.woocommerce a.button.add_to_cart_button .enclave-loop-cart-icon {
	display: inline-block;
	width: 0.95rem;
	height: 0.95rem;
	margin-right: 0.4rem;
	vertical-align: -0.12rem;
	background: currentColor;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.9353 20.0337L20.7493 8.51772C20.7003 8.0402 20.2981 7.67725 19.8181 7.67725H4.21338C3.73464 7.67725 3.33264 8.03898 3.28239 8.51523L2.06458 20.0368C1.96408 21.0424 2.29928 22.0529 2.98399 22.8097C3.66874 23.566 4.63999 24.0001 5.64897 24.0001H18.3827C19.387 24.0001 20.3492 23.5747 21.0214 22.8322C21.7031 22.081 22.0361 21.0623 21.9353 20.0337ZM19.6348 21.5748C19.3115 21.9312 18.8668 22.1275 18.3827 22.1275H5.6493C5.16836 22.1275 4.70303 21.9181 4.37252 21.553C4.042 21.1878 3.88005 20.7031 3.92749 20.2284L5.056 9.55014H18.9732L20.0724 20.2216C20.1223 20.7281 19.9666 21.2087 19.6348 21.5748Z'/%3E%3Cpath d='M12.1717 0C9.21181 0 6.80365 2.40811 6.80365 5.36803V8.6138H8.67622V5.36803C8.67622 3.44053 10.2442 1.87256 12.1717 1.87256C14.0992 1.87256 15.6674 3.44053 15.6674 5.36803V8.6138H17.5397V5.36803C17.5397 2.40811 15.1316 0 12.1717 0Z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.9353 20.0337L20.7493 8.51772C20.7003 8.0402 20.2981 7.67725 19.8181 7.67725H4.21338C3.73464 7.67725 3.33264 8.03898 3.28239 8.51523L2.06458 20.0368C1.96408 21.0424 2.29928 22.0529 2.98399 22.8097C3.66874 23.566 4.63999 24.0001 5.64897 24.0001H18.3827C19.387 24.0001 20.3492 23.5747 21.0214 22.8322C21.7031 22.081 22.0361 21.0623 21.9353 20.0337ZM19.6348 21.5748C19.3115 21.9312 18.8668 22.1275 18.3827 22.1275H5.6493C5.16836 22.1275 4.70303 21.9181 4.37252 21.553C4.042 21.1878 3.88005 20.7031 3.92749 20.2284L5.056 9.55014H18.9732L20.0724 20.2216C20.1223 20.7281 19.9666 21.2087 19.6348 21.5748Z'/%3E%3Cpath d='M12.1717 0C9.21181 0 6.80365 2.40811 6.80365 5.36803V8.6138H8.67622V5.36803C8.67622 3.44053 10.2442 1.87256 12.1717 1.87256C14.0992 1.87256 15.6674 3.44053 15.6674 5.36803V8.6138H17.5397V5.36803C17.5397 2.40811 15.1316 0 12.1717 0Z'/%3E%3C/svg%3E");
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
}

/* Скрыть поле выбора страны в форме заказа (блочная корзина) */
.wc-block-components-address-form__country {
	display: none !important;
}

/* Убрать border-radius у checkout-инпутов при фокусе */
body .wc-block-components-text-input input:focus,
body .wc-block-components-text-input input:focus-visible,
body .wc-block-components-text-input.is-active input,
body .wc-block-components-textarea textarea:focus,
body .wc-block-components-textarea textarea:focus-visible,
body .wc-block-components-textarea.is-active textarea {
	border-radius: 0 !important;
	outline: 1px solid var(--k) !important;
	outline-offset: -1px !important;
	box-shadow: none !important;
}

/* Убрать border-radius у textarea всегда (не только на фокусе) */
body .wc-block-components-textarea {
	border-radius: 0 !important;
}

/* Мобилка: общие горизонтальные отступы контента */
@media (max-width: 782px) {
	#content.site-content > .content-wrap,
	#content.site-content > .content-none {
		padding-left: 1.25rem !important;
		padding-right: 1.25rem !important;
		box-sizing: border-box;
	}

	body.woocommerce-page #primary.content-area,
	body.woocommerce #primary.content-area {
		padding-left: 1.25rem !important;
		padding-right: 1.25rem !important;
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
	}

	#content.site-content > .content-wrap #primary.content-area,
	#content.site-content > .content-none #primary.content-area {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	/* Секции Enclave сами дают 1.5rem по бокам — суммируется с inset .content-wrap */
	#content.site-content > .content-wrap .enclave-section,
	#content.site-content > .content-none .enclave-section {
		padding-left: 4px !important;
		padding-right: 4px !important;
	}

	/* Слайдер / одиночный слайд / fallback: на всю ширину колонки без бокового inset */
	#content.site-content > .content-wrap .enclave-slider,
	#content.site-content > .content-wrap .enclave-single-slide,
	#content.site-content > .content-wrap .enclave-slider-fallback,
	#content.site-content > .content-none .enclave-slider,
	#content.site-content > .content-none .enclave-single-slide,
	#content.site-content > .content-none .enclave-slider-fallback {
		margin-left: -1.25rem !important;
		margin-right: -1.25rem !important;
		width: calc(100% + 2.5rem) !important;
		max-width: none !important;
		box-sizing: border-box;
	}

	body.woocommerce-page #main.site-main,
	body.woocommerce #main.site-main {
		box-sizing: border-box;
	}

	body.woocommerce-page .woocommerce div.product,
	body.woocommerce .woocommerce div.product {
		box-sizing: border-box;
	}
}

/* Плитки на мобилке: формат ~1.7:1 */
@media (max-width: 782px) {
	.enclave-section--tile-grid .enclave-tiles > .enclave-tile,
	.enclave-section--tile-grid .enclave-tiles > .enclave-simplified-card {
		aspect-ratio: 1.7 / 1;
		min-height: unset !important;
	}
}
