/*
 * Вкладки карточки товара в стиле fabrikasna.by.
 * Разметку шаблона не меняет: панель вкладок строит pm-product-tabs.js из штатных секций-аккордеонов ultrastore.
 * ПК — панель на сером фоне; мобильные — панель прокручивается вбок и прилипает под шапкой.
 */

/* Панель вкладок */
.pm-tabs {
	position: relative;
	margin: 30px 0 25px;
	background: #f5f5f5;
	border-radius: 4px;
}
.pm-tabs-scroll {
	display: flex;
	position: relative;
	padding: 0 15px;
	overflow-x: auto;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.pm-tabs-scroll::-webkit-scrollbar {
	display: none;
}
.pm-tabs-link {
	position: relative;
	flex: 0 0 auto;
	margin-right: 30px;
	padding: 14px 0;
	border: 0;
	background: none;
	color: #202334;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
	white-space: nowrap;
	cursor: pointer;
	outline: none;
	transition: color .25s ease;
}
.pm-tabs-link:last-of-type {
	margin-right: 15px;
}
.pm-tabs-link:hover,
.pm-tabs-link.is-active {
	color: #0353b4;
}
.pm-tabs-link:focus-visible {
	box-shadow: 0 0 0 2px rgba(3, 83, 180, .35);
	border-radius: 2px;
}
.pm-tabs-count {
	display: inline-block;
	min-width: 18px;
	margin-left: 7px;
	padding: 0 5px;
	border-radius: 2px;
	background: #e2e2e2;
	color: #555;
	font-size: 11px;
	font-weight: 600;
	line-height: 16px;
	text-align: center;
	vertical-align: 1px;
}

/* Подчёркивание активной вкладки — плавно переезжает между вкладками */
.pm-tabs-ink {
	position: absolute;
	left: 0;
	bottom: 11px;
	width: 0;
	height: 2px;
	background: #0353b4;
	pointer-events: none;
}
.pm-tabs.pm-ink-ready .pm-tabs-ink {
	transition: transform .35s cubic-bezier(.4, 0, .2, 1), width .35s cubic-bezier(.4, 0, .2, 1);
}

/* Стрелка «›», если вкладки не помещаются */
.pm-tabs-arrow {
	display: none;
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 56px;
	padding: 0 6px 0 0;
	border: 0;
	background: linear-gradient(to right, rgba(245, 245, 245, 0), #f5f5f5 45%);
	color: #202334;
	text-align: right;
	cursor: pointer;
	outline: none;
}
.pm-tabs-arrow:before {
	content: '';
	display: inline-block;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='12' viewBox='0 0 8 12'%3E%3Cpath d='M1.5 1l5 5-5 5' fill='none' stroke='%23202334' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat 55% 50%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
	vertical-align: middle;
}
.pm-tabs.pm-has-more .pm-tabs-arrow {
	display: block;
}

/* Содержимое вкладок */
.pm-tabs-ready.pm-animating {
	overflow: hidden;
	transition: height .35s cubic-bezier(.4, 0, .2, 1);
}
.pm-tabs-ready > .us-accordion-section {
	display: none;
	transition: opacity .15s ease;
}
.pm-tabs-ready > .us-accordion-section.pm-active {
	display: block;
	animation: pmTabIn .4s ease backwards;
}
.pm-tabs-ready > .us-accordion-section.pm-leaving {
	opacity: 0;
}
.pm-tabs-ready .us-accordion-toggle {
	display: none !important;
}
.pm-tabs-ready .us-accordion-body.us-collapsed {
	display: block;
}
.pm-tabs-ready .us-reviews-top {
	justify-content: flex-end !important;
}

/* Характеристики: серые блоки, название — пунктир — значение */
.pm-tabs-ready .us-product-attributes-cont {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-gap: 10px 50px;
	width: auto;
	padding: 25px;
	background: #f7f7f7;
	border-radius: 6px;
}
.pm-tabs-ready .us-product-attributes-cont:not(:last-child) {
	margin-bottom: 25px;
}
.pm-tabs-ready .us-product-attributes-title {
	grid-column: 1 / -1;
	margin-bottom: 5px;
}
.pm-tabs-ready .us-product-attr-item {
	display: grid !important;
	grid-template-columns: 1fr 1fr;
	align-items: end;
	margin: 0 !important;
	color: #333;
	font-size: 14px;
	line-height: 20px;
}
.pm-tabs-ready .us-product-attr-item:after {
	display: none;
}
.pm-tabs-ready .us-product-attr-item span {
	background: transparent;
}
.pm-tabs-ready .us-product-attr-item span:first-child {
	display: flex;
	align-items: baseline;
	padding-right: 0;
	color: #202334;
	font-weight: 600;
}
.pm-tabs-ready .us-product-attr-item span:first-child:after {
	content: '';
	flex: 1 1 auto;
	min-width: 15px;
	margin: 0 12px;
	border-bottom: 1px dotted #bababa;
}
.pm-tabs-ready .us-product-attr-item span:last-child {
	max-width: none;
	padding-left: 0;
	text-align: left;
	font-weight: 400;
}

@media (max-width: 991px) {
	.pm-tabs {
		position: -webkit-sticky;
		position: sticky;
		top: var(--pm-tabs-top, 0px);
		z-index: 90;
		margin: 20px -15px 20px;
		border-radius: 0;
	}
	.pm-tabs-scroll {
		padding: 0 15px;
	}
	.pm-tabs-link {
		margin-right: 28px;
		font-size: 15px;
	}
	.pm-tabs-ready .us-product-attributes-cont {
		grid-template-columns: 1fr;
		padding: 20px;
	}
	.pm-tabs-ready .us-product-attr-item {
		grid-template-columns: 50% 50%;
	}
	.pm-tabs-ready .us-product-attr-item span:first-child {
		font-weight: 400;
	}
	.pm-tabs-ready .us-product-attr-item span:first-child:after {
		min-width: 10px;
		margin: 0 8px;
	}
}

@keyframes pmTabIn {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.pm-tabs-ready > .us-accordion-section.pm-active {
		animation: none;
	}
	.pm-tabs-scroll {
		scroll-behavior: auto;
	}
}
