/* ==========================================================================
   PLASTSERVIS - CATALOG.ELEMENT (Product Detail Page)
   Corporate Minimalist Style (0px border-radius, Navy #121D2D, Cyan #05AEE9)
   ========================================================================== */

:root {
	--ps-dark: #121D2D;
	--ps-accent: #05AEE9;
	--ps-accent-hover: #121D2D;
	--ps-border: #E5E7EB;
	--ps-border-hover: #05AEE9;
	--ps-bg-card: #FFFFFF;
	--ps-bg-light: #F8FAFC;
	--ps-text-main: #1A202C;
	--ps-text-muted: #6B7280;
	--ps-discount: #E11D48;
	--ps-font-main: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
	--ps-font-heading: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 1. Общий контейнер детальной страницы */
.catalog-element-wrapper.container,
.global__wrapper .catalog-element-wrapper {
	max-width: 1320px;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 15px !important;
	padding-right: 15px !important;
}

.bx-catalog-element {
	font-family: var(--ps-font-main);
	color: var(--ps-text-main);
	margin-bottom: 40px;
}

.bx-catalog-element h1 {
	font-family: var(--ps-font-heading) !important;
	font-size: 28px !important;
	font-weight: 700 !important;
	color: var(--ps-dark) !important;
	letter-spacing: -0.3px;
	line-height: 1.3;
	margin-bottom: 24px !important;
}

/* 2. Галерея и слайдер изображений товара */
.product-item-detail-slider-container {
	position: relative;
	background: #FFFFFF !important;
	border: 1px solid var(--ps-border) !important;
	border-radius: 0px !important;
	padding: 16px !important;
	box-shadow: 0 2px 8px rgba(18, 29, 45, 0.04) !important;
	margin-bottom: 24px;
}

.product-item-detail-slider-block {
	position: relative;
	box-sizing: border-box;
	padding-top: 75%; /* 4:3 соотношение */
	height: 0;
	background: var(--ps-bg-light);
	border-radius: 0px !important;
	overflow: hidden;
}

.product-item-detail-slider-block.product-item-detail-slider-block-square {
	padding-top: 100%;
}

.product-item-detail-slider-images-container {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.product-item-detail-slider-image {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	text-align: center;
	opacity: 0;
	transition: opacity 300ms ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.product-item-detail-slider-image.active {
	z-index: 10;
	opacity: 1;
}

.product-item-detail-slider-image img {
	max-width: 92%;
	max-height: 92%;
	width: auto;
	height: auto;
	object-fit: contain;
	position: relative;
	top: auto;
	left: auto;
	transform: none;
	transition: transform 0.35s ease;
}

.product-item-detail-slider-image:hover img {
	transform: scale(1.04);
}

.product-item-detail-slider-progress-bar {
	position: absolute;
	bottom: 0;
	left: 0;
	z-index: 20;
	height: 3px;
	background-color: var(--ps-accent);
}

/* Стрелки слайдера */
.product-item-detail-slider-left,
.product-item-detail-slider-right {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 25;
	width: 42px;
	height: 42px;
	background-color: rgba(18, 29, 45, 0.6) !important;
	border-radius: 0px !important;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.product-item-detail-slider-left {
	left: 12px;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"></polyline></svg>') !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
}

.product-item-detail-slider-right {
	right: 12px;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>') !important;
	background-repeat: no-repeat !important;
	background-position: center !important;
}

.product-item-detail-slider-left:hover,
.product-item-detail-slider-right:hover {
	background-color: var(--ps-accent) !important;
}

/* Миниатюры фото (Thumbnails) */
.product-item-detail-slider-controls-block {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 16px 0 0 0;
	justify-content: flex-start;
}

.product-item-detail-slider-controls-image {
	width: 68px;
	height: 68px;
	border: 1px solid var(--ps-border) !important;
	border-radius: 0px !important;
	background-color: #FFFFFF;
	cursor: pointer;
	position: relative;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4px;
	outline: none !important;
}

.product-item-detail-slider-controls-image:hover {
	border-color: var(--ps-accent) !important;
}

.product-item-detail-slider-controls-image.active {
	border: 2px solid var(--ps-accent) !important;
	box-shadow: 0 2px 6px rgba(5, 174, 233, 0.25);
}

.product-item-detail-slider-controls-image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	position: static;
	transform: none;
}

/* Шильдик скидки и стикеры на детальной */
.product-item-label-ring {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 30;
	background-color: var(--ps-discount) !important;
	color: #FFFFFF !important;
	font-family: var(--ps-font-heading) !important;
	font-weight: 700 !important;
	font-size: 13px !important;
	padding: 4px 10px !important;
	border-radius: 0px !important;
	width: auto !important;
	height: auto !important;
	line-height: normal !important;
	box-shadow: 0 2px 6px rgba(225, 29, 72, 0.35);
}

.product-item-label-ring span {
	background: transparent !important;
	color: #FFFFFF !important;
}

.product-item-label-text {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 30;
}

.product-item-label-text span {
	display: inline-block;
	background-color: var(--ps-dark) !important;
	color: #FFFFFF !important;
	font-family: var(--ps-font-heading) !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 4px 10px !important;
	border-radius: 0px !important;
	margin-bottom: 4px;
	box-shadow: 0 2px 6px rgba(18, 29, 45, 0.25);
}

/* 3. Торговые предложения (SKU) */
.product-item-scu-container-title {
	font-family: var(--ps-font-heading) !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px;
	color: var(--ps-dark) !important;
	margin-bottom: 8px;
}

.product-item-scu-item-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0;
	margin: 0 0 16px 0;
	list-style: none;
}

.product-item-scu-item-color-container,
.product-item-scu-item-text-container {
	padding: 0 !important;
	display: inline-block;
}

.product-item-scu-item-color-block {
	width: 38px;
	height: 38px;
	border: 1px solid var(--ps-border) !important;
	border-radius: 0px !important;
	outline: none !important;
	padding: 2px;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
}

.product-item-scu-item-color-block:hover {
	border-color: var(--ps-accent) !important;
}

.product-item-scu-item-color-container.selected .product-item-scu-item-color-block {
	border-color: var(--ps-accent) !important;
	outline: 2px solid var(--ps-accent) !important;
	outline-offset: 1px;
}

.product-item-scu-item-color {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	position: static;
}

.product-item-scu-item-text-block {
	min-width: 44px;
	height: 36px;
	padding: 0 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #FFFFFF;
	border: 1px solid var(--ps-border) !important;
	border-radius: 0px !important;
	outline: none !important;
	cursor: pointer;
	transition: all 0.2s ease;
}

.product-item-scu-item-text {
	font-family: var(--ps-font-heading);
	font-size: 13px;
	font-weight: 600;
	color: var(--ps-dark);
}

.product-item-scu-item-text-block:hover {
	border-color: var(--ps-accent) !important;
	color: var(--ps-accent) !important;
}

.product-item-scu-item-text-container.selected .product-item-scu-item-text-block {
	background: var(--ps-accent) !important;
	border-color: var(--ps-accent) !important;
}

.product-item-scu-item-text-container.selected .product-item-scu-item-text {
	color: #FFFFFF !important;
}

/* 4. Блок характеристик в карточке (Краткие свойства) */
.product-item-detail-properties {
	list-style: none;
	padding: 0;
	margin: 0 0 16px 0;
}

.product-item-detail-properties-item {
	display: flex;
	align-items: baseline;
	margin-bottom: 8px;
	font-size: 13.5px;
}

.product-item-detail-properties-name {
	color: var(--ps-text-muted) !important;
	flex: 0 0 auto;
	max-width: 55%;
	padding-right: 6px;
}

.product-item-detail-properties-dots {
	flex: 1 1 auto;
	border-bottom: 1px dotted #D1D5DB !important;
	margin: 0 4px;
	min-width: 10px;
}

.product-item-detail-properties-value {
	color: var(--ps-dark) !important;
	font-weight: 600;
	flex: 0 0 auto;
	max-width: 45%;
	text-align: right;
	padding-left: 6px;
}

.product-item-detail-properties-more {
	margin-top: 8px;
	margin-bottom: 16px;
	text-align: left;
}

.product-item-detail-properties-more a {
	font-family: var(--ps-font-main);
	font-size: 13px;
	font-weight: 600;
	color: var(--ps-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.2s ease;
	cursor: pointer;
}

.product-item-detail-properties-more a:hover {
	color: var(--ps-dark);
}

/* 5. Правый блок покупки (Pay Block) */
.product-item-detail-pay-block {
	background: #FFFFFF !important;
	border: 1px solid var(--ps-border) !important;
	border-top: 3px solid var(--ps-accent) !important;
	border-radius: 0px !important;
	padding: 24px !important;
	box-shadow: 0 4px 16px rgba(18, 29, 45, 0.05) !important;
	position: relative;
	margin-bottom: 24px;
}

/* Рейтинг */
.bx-rating {
	margin-bottom: 14px;
}

.bx-rating svg path {
	fill: #F59E0B !important;
}

/* Цены */
.product-item-detail-price-old {
	font-family: var(--ps-font-heading) !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	color: var(--ps-text-muted) !important;
	text-decoration: line-through !important;
	margin-bottom: 4px;
	text-align: left !important;
}

.product-item-detail-price-current {
	font-family: var(--ps-font-heading) !important;
	font-size: 32px !important;
	font-weight: 800 !important;
	color: var(--ps-dark) !important;
	letter-spacing: -0.5px;
	line-height: 1.1;
	margin-bottom: 6px;
	text-align: left !important;
}

.product-item-detail-economy-price {
	font-family: var(--ps-font-main) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #059669 !important;
	text-align: left !important;
	margin-bottom: 16px;
}

/* Наличие / остаток */
.product-item-detail-info-container-title {
	font-size: 12px;
	color: var(--ps-text-muted);
}

.product-item-quantity {
	font-size: 13px;
	font-weight: 600;
	color: var(--ps-dark);
}

/* Блок количества (+ / -) */
.product-item-amount {
	margin: 16px 0;
	padding: 0;
	text-align: left !important;
}

.product-item-amount-field-container {
	display: flex;
	align-items: center;
	border: 1px solid var(--ps-border) !important;
	border-radius: 0px !important;
	height: 42px;
	width: 130px;
	margin: 0 !important;
	background: #FFFFFF;
}

.product-item-amount-field-btn-minus,
.product-item-amount-field-btn-plus {
	width: 38px;
	height: 40px;
	line-height: 40px;
	background-color: var(--ps-bg-light) !important;
	color: var(--ps-dark) !important;
	border: none !important;
	border-radius: 0px !important;
	cursor: pointer;
	transition: background 0.2s ease;
	position: relative;
	text-align: center;
}

.product-item-amount-field-btn-minus:hover,
.product-item-amount-field-btn-plus:hover {
	background-color: #E2E8F0 !important;
}

.product-item-amount-field-block {
	flex: 1;
}

.product-item-amount-field {
	width: 100%;
	height: 40px;
	border: none !important;
	border-radius: 0px !important;
	background: transparent !important;
	color: var(--ps-dark) !important;
	text-align: center;
	font-family: var(--ps-font-heading);
	font-weight: 700;
	font-size: 15px;
	outline: none !important;
}

.product-item-amount-description-container {
	display: none;
}

/* Кнопки "В корзину" / "Купить" */
.btn.product-item-detail-buy-button {
	width: 100% !important;
	max-width: 100% !important;
	height: 48px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-family: var(--ps-font-heading) !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.8px !important;
	border-radius: 0px !important;
	cursor: pointer !important;
	text-decoration: none !important;
	transition: all 0.25s ease !important;
	margin: 0 0 10px 0 !important;
	padding: 0 20px !important;
}

.btn-primary.product-item-detail-buy-button,
#ADD_BASKET_LINK,
#BUY_LINK {
	background-color: var(--ps-accent) !important;
	border: 1px solid var(--ps-accent) !important;
	color: #FFFFFF !important;
	box-shadow: 0 4px 12px rgba(5, 174, 233, 0.25) !important;
}

.btn-primary.product-item-detail-buy-button:hover,
#ADD_BASKET_LINK:hover,
#BUY_LINK:hover {
	background-color: var(--ps-dark) !important;
	border-color: var(--ps-dark) !important;
	color: #FFFFFF !important;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(18, 29, 45, 0.2) !important;
}

.btn-link.product-item-detail-buy-button {
	background-color: var(--ps-dark) !important;
	border: 1px solid var(--ps-dark) !important;
	color: #FFFFFF !important;
	height: 48px !important;
}

.btn-link.product-item-detail-buy-button:hover {
	background-color: var(--ps-accent) !important;
	border-color: var(--ps-accent) !important;
}

/* Сравнение */
.product-item-detail-compare-container {
	margin: 16px -24px -24px -24px;
	padding: 12px 24px;
	border-top: 1px solid var(--ps-border);
	background: var(--ps-bg-light);
	border-radius: 0px !important;
	font-size: 13px;
	color: var(--ps-text-muted);
}

.product-item-detail-compare .checkbox {
	margin: 0;
}

/* 6. Вкладки (Tabs) - Описание, Характеристики, Отзывы */
.product-item-detail-tabs-container {
	min-height: auto;
	border-bottom: 2px solid var(--ps-border);
	margin-top: 40px;
}

.product-item-detail-tabs-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.product-item-detail-tab {
	margin: 0;
	min-height: auto;
}

.product-item-detail-tab-link {
	display: inline-block;
	padding: 14px 28px !important;
	height: auto !important;
	font-family: var(--ps-font-heading) !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.6px;
	color: var(--ps-text-muted) !important;
	text-decoration: none !important;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	transition: all 0.2s ease !important;
}

.product-item-detail-tab-link:hover {
	color: var(--ps-dark) !important;
	background-color: var(--ps-bg-light);
}

.product-item-detail-tab.active .product-item-detail-tab-link {
	color: var(--ps-accent) !important;
	border-bottom-color: var(--ps-accent) !important;
	background-color: #FFFFFF;
}

.product-item-detail-tab-link:after {
	display: none !important;
}

/* Контент вкладок */
.product-item-detail-tab-content {
	background: #FFFFFF !important;
	border: 1px solid var(--ps-border);
	border-top: none;
	padding: 30px !important;
	font-family: var(--ps-font-main);
	font-size: 14.5px;
	line-height: 1.7;
	color: #374151;
}

.product-item-detail-tab-content[style*="display: none"],
.product-item-detail-tab-content[style*="display:none"] {
	display: none !important;
}

.product-item-detail-tab-content h3 {
	font-family: var(--ps-font-heading);
	font-size: 18px;
	font-weight: 700;
	color: var(--ps-dark);
	margin-bottom: 16px;
}

.product-item-detail-tab-content ul.product-item-detail-properties {
	margin: 0;
	border: 1px solid var(--ps-border);
}

.product-item-detail-tab-content .product-item-detail-properties-item {
	padding: 12px 18px;
	margin: 0;
	border-bottom: 1px solid var(--ps-border);
	display: flex;
	justify-content: space-between;
}

.product-item-detail-tab-content .product-item-detail-properties-item:nth-child(even) {
	background-color: var(--ps-bg-light);
}

.product-item-detail-tab-content .product-item-detail-properties-item:last-child {
	border-bottom: none;
}

.product-item-detail-tab-content .product-item-detail-properties-name {
	font-weight: 500;
	color: var(--ps-text-muted);
}

.product-item-detail-tab-content .product-item-detail-properties-dots {
	display: none;
}

.product-item-detail-tab-content .product-item-detail-properties-value {
	font-weight: 600;
	color: var(--ps-dark);
}

/* 7. Фиксированная плашка при скролле и дублирующие вкладки */
/* В Битриксе эти блоки предназначены для всплывания сверху при скролле,
   но без скрытия они рендерятся статично в потоке документа прямо под описанием.
   Скрываем их, чтобы исключить дублирование и наложение блоков */
.product-item-detail-short-card-fixed,
.product-item-detail-tabs-container-fixed {
	display: none !important;
}

/* 8. Рекомендованные и просмотренные товары */
.catalog-block-header {
	font-family: var(--ps-font-heading) !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	color: var(--ps-dark) !important;
	text-transform: uppercase !important;
	letter-spacing: 0.6px !important;
	border-left: 4px solid var(--ps-accent) !important;
	border-bottom: none !important;
	padding: 4px 0 4px 14px !important;
	margin: 40px 0 24px 0 !important;
}

/* 9. Адаптивность для мобильных устройств */
@media (max-width: 767px) {
	.bx-catalog-element h1 {
		font-size: 22px !important;
	}

	.product-item-detail-slider-container {
		padding: 10px !important;
	}

	.product-item-detail-price-current {
		font-size: 26px !important;
	}

	.product-item-detail-pay-block {
		padding: 16px !important;
	}

	.product-item-detail-tab-link {
		padding: 10px 16px !important;
		font-size: 12px !important;
	}

	.product-item-detail-tab-content {
		padding: 16px !important;
	}
}