/* Minimal layout glue for s5 - relies 100% on Aspro Premier tokens & multi-warehouse.css (.mw-shipping / .mw-option) */

/* Checkout country is always Ukraine: no switcher. */
.change_city {
	display: none !important;
}

.s5-pdp-wh {
	margin: 0 0 16px;
}
/* Fixed product header is a single compact row. Warehouse cards belong on the page, not inside it. */
#headerfixed .s5-pdp-wh,
.detail-header .s5-pdp-wh {
	display: none !important;
}
.catalog-detail__buy-block .s5-pdp-wh {
	margin: 0;
}
.catalog-detail__buy-block .mw-shipping__options {
	grid-template-columns: 1fr;
	gap: 8px;
}
.s5-pdp-wh .mw-option {
	padding: 12px 36px 12px 38px;
}
.s5-pdp-wh .mw-option::before {
	left: 12px;
	top: 14px;
}
.s5-pdp-wh .mw-option__row {
	margin-bottom: 4px;
}
.s5-pdp-wh .mw-option__desc {
	margin: 0;
	font-size: 12px;
	line-height: 1.3;
	color: var(--secondary, #9a9aa2);
}
.s5-pdp-wh__hint {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 3;
}
.s5-pdp-wh__hint .hint__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 1px solid var(--theme-base-color, #ec008c);
	background: color-mix(in oklab, var(--theme-base-color, #ec008c) 14%, var(--card_bg_black, #fff));
	color: var(--theme-base-color, #ec008c);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}
.s5-pdp-wh__hint.is-open .hint__icon {
	background: var(--theme-base-color, #ec008c);
	color: #fff;
}
.s5-pdp-wh__hint .s5-pdp-wh__tip {
	display: none !important;
}
#s5-pdp-wh-tip {
	display: none;
	position: fixed;
	z-index: 1200;
	box-sizing: border-box;
	width: min(100vw - 16px, 100%);
	height: auto;
	max-height: none;
	overflow: hidden;
	padding: 8px 10px;
	border: 1px solid var(--stroke_black, #3a3a42);
	border-radius: var(--theme-button-border-radius, 8px);
	background: var(--card_bg_black, #2a2a2e);
	color: var(--white_text_black, #fff);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.35;
	text-align: left;
	white-space: normal;
	flex-direction: column;
	gap: 2px;
}
#s5-pdp-wh-tip.is-open {
	display: flex;
}
#s5-pdp-wh-tip .s5-pdp-wh__tip-title {
	font-weight: 700;
}
#s5-pdp-wh-tip .s5-pdp-wh__tip-line {
	color: var(--secondary, #c8c8ce);
}
@media (max-width: 767px) {
	.catalog-detail .s5-pdp-wh,
	.catalog-detail__buy-block .s5-pdp-wh {
		margin: 0 0 10px;
	}
	.s5-pdp-wh .mw-shipping__options {
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}
	.s5-pdp-wh .mw-option {
		height: auto;
		min-height: 0;
		padding: 10px 32px 10px 30px;
	}
	.s5-pdp-wh .mw-option__body,
	.s5-pdp-wh .mw-option__row,
	.s5-pdp-wh .mw-option__title {
		height: auto;
		flex: 0 0 auto;
		justify-content: flex-start;
	}
	.s5-pdp-wh .mw-option::before {
		left: 8px;
		top: 12px;
		width: 14px;
		height: 14px;
	}
	.s5-pdp-wh .mw-option__title,
	.s5-pdp-wh .mw-option__title-text {
		flex: 0 1 auto;
		width: 100%;
		min-width: 0;
	}
	.s5-pdp-wh .mw-option__title {
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
		font-size: 13px;
	}
	.s5-pdp-wh .mw-option__badge {
		display: none;
	}
}
.catalog-detail .vat,
.catalog-detail .price_txt {
	display: none !important;
}
.s5-pdp-wh .mw-option--disabled {
	opacity: 0.45;
	cursor: default;
	pointer-events: none;
}
.s5-pdp-wh .mw-option--disabled .s5-pdp-wh__hint {
	pointer-events: auto;
}

/* Hide internal Bitrix "Delayed" filter tab when s5 split-subcart isolation is active */
#s-cart[data-s5-split-isolated="Y"] [data-entity="basket-items-count"][data-filter="delayed"] {
	display: none !important;
}

/* Basket parcel switcher. Own layout, Aspro colors and radii. */
#s-cart .s5-basket-split {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0 0 24px;
	padding: 20px;
	border: 1px solid var(--stroke_black, #ebecef);
	border-radius: var(--theme-outer-border-radius, 12px);
	background: var(--card_bg_black, #fff);
}
#s-cart .s5-basket-split__one-meta {
	font-size: 14px;
	line-height: 1.4;
	color: var(--secondary, #9a9aa2);
}
#s-cart .s5-basket-split__title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--white_text_black, #222);
}
#s-cart .s5-basket-split__choices {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
#s-cart .s5-basket-split__choice {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 14px 16px;
	border: 1px solid var(--stroke_black, #ebecef);
	border-radius: var(--theme-button-border-radius, 8px);
	background: transparent;
	color: var(--white_text_black, #222);
	text-align: left;
	cursor: pointer;
}
#s-cart .s5-basket-split__choice.is-active {
	border-color: var(--theme-base-color, #ec008c);
	box-shadow: inset 0 0 0 1px var(--theme-base-color, #ec008c);
}
#s-cart .s5-basket-split__name {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}
#s-cart .s5-basket-split__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	margin-left: 6px;
	padding: 0 6px;
	border-radius: 999px;
	background: color-mix(in oklab, var(--white_text_black, #222) 8%, transparent);
	font-size: 12px;
	font-weight: 600;
}
#s-cart .s5-basket-split__sum {
	flex: 0 0 auto;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
#s-cart .s5-basket-split__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
#s-cart .s5-basket-split__actions .btn {
	margin: 0;
}
#s-cart .s5-basket-split__actions .btn-transparent-border {
	border-color: var(--stroke_black, #3a3a42);
	color: var(--white_text_black, #fff);
	background: transparent;
}
#s-cart #basket-root {
	margin-top: 0;
}
@media (max-width: 767px) {
	#s-cart .s5-basket-split {
		padding: 16px;
		gap: 12px;
	}
	#s-cart .s5-basket-split__choices {
		grid-template-columns: 1fr;
	}
}

/* Per-item warehouse switch: two equal segments, the chosen one is the raised pill. */
.s5-basket-item-switch {
	margin: 10px 0 0;
	max-width: 420px;
}
.s5-basket-item-switch__track {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2px;
	padding: 3px;
	border-radius: 12px;
	background: color-mix(in oklab, var(--white_text_black, #222) 8%, transparent);
}
button.s5-basket-item-switch__opt {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 8px 10px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	box-shadow: none;
	color: var(--white_text_black, #222);
	font-family: inherit;
	text-align: left;
	cursor: pointer;
	appearance: none;
}
button.s5-basket-item-switch__opt.is-current {
	background: var(--card_bg_black, #fff);
	box-shadow: 0 1px 2px color-mix(in oklab, var(--white_text_black, #222) 18%, transparent);
	cursor: default;
}
button.s5-basket-item-switch__opt:not(.is-current):hover {
	background: color-mix(in oklab, var(--card_bg_black, #fff) 60%, transparent);
}
.s5-basket-item-switch__mark {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-top: 1px;
	border: 2px solid color-mix(in oklab, var(--white_text_black, #222) 35%, transparent);
	border-radius: 50%;
	position: relative;
}
button.s5-basket-item-switch__opt.is-current .s5-basket-item-switch__mark {
	border-color: var(--theme-base-color, #ec008c);
}
button.s5-basket-item-switch__opt.is-current .s5-basket-item-switch__mark::after {
	content: "";
	position: absolute;
	inset: 2px;
	border-radius: 50%;
	background: var(--theme-base-color, #ec008c);
}
.s5-basket-item-switch__copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.notice-also-bought__warehouse {
	margin-left: 8px;
	color: var(--secondary, #9a9aa2);
}
.s5-basket-item-source {
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--white_text_black, #222);
}
.s5-basket-item-switch__name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
}
.s5-basket-item-switch__meta {
	font-size: 12px;
	font-weight: 500;
	line-height: 1.25;
	color: var(--secondary, #9a9aa2);
}
button.s5-basket-item-switch__opt.is-current .s5-basket-item-switch__name {
	color: var(--theme-base-color, #ec008c);
}

/* Notice above checkout when the other warehouse stays in the basket. */
.s5-order-parked {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 24px;
	padding: 16px 20px;
	border: 1px solid var(--stroke_black, #ebecef);
	border-radius: var(--theme-outer-border-radius, 12px);
	background: var(--card_bg_black, #fff);
	color: var(--white_text_black, #222);
}
.s5-order-parked__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}
.s5-order-parked .s5-pdp-wh__hint {
	position: static;
	flex: 0 0 auto;
}
.s5-order-parked__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--secondary, #9a9aa2);
}
.s5-order-parked__btn {
	margin: 0;
}

.sticker .s5-stock-badge {
	position: static;
	max-width: none;
}

/* GPSR is an EU seller disclosure. The Ukrainian storefront does not show it. */
a[href="#gpsr"],
li:has(> a[href="#gpsr"]),
#gpsr {
	display: none !important;
}

/* Streamlined /order/ checkout for Ukraine (single country UA, single person type #8):
   1) Hide redundant "Тип покупця та регіон доставки" block (#bx-soa-region) while keeping hidden inputs intact
   2) Hide raw text "Адреса доставки" (#216) when Nova Poshta branch widget (#205) is active in the form */
#bx-soa-region {
	display: none !important;
}
#bx-soa-properties:has([name="ORDER_PROP_205"]) [data-property-id-row="216"] {
	display: none !important;
}

.fs-progress--steps .fs-progress__nodes,
.fs-progress--skeleton .fs-progress__nodes {
	grid-template-columns: repeat(var(--s69-fs-cols, 1), minmax(0, 1fr)) !important;
}
.fs-progress--skeleton .fs-progress__node:nth-child(n + 2) {
	display: none !important;
}

#bx-soa-paysystem .bx-soa-pp-company-image,
#bx-soa-delivery .bx-soa-pp-company-image {
	height: 36px;
	max-width: 148px;
	margin-top: 8px;
	border-radius: 8px;
}
.product-shipping-info--payment .s5-pay-logo {
	display: block;
	height: 28px;
	width: auto;
	max-width: 116px;
	margin-bottom: 6px;
	border-radius: 6px;
}
