/* ============================================
   ТАБЛИЦЫ - ОБЩИЕ СТИЛИ
   ============================================ */

.smart_price_list table,
.content_blog_single_text_in table,
.text_wrap table {
	border-radius: 0;
	width: calc(100% + 16px) !important;
	border: 0 none;
	height: auto !important;
	border-collapse: separate !important;
	border-spacing: 8px;
	margin: -8px;
}

.smart_price_list table tbody,
.content_blog_single_text_in table tbody,
.text_wrap table tbody {
	width: 100% !important;
	height: auto !important;
}

.smart_price_list table tr,
.content_blog_single_text_in table tr,
.text_wrap table tr {
	height: auto !important;
	width: 100% !important;
}

.smart_price_list table th,
.smart_price_list table td,
.content_blog_single_text_in table th,
.content_blog_single_text_in table td,
.text_wrap table th,
.text_wrap table td {
	height: auto !important;
	max-height: none !important;
	width: auto !important;
	text-align: left;
	border-radius: var(--min_border_radius);
	vertical-align: middle;
}

.smart_price_list table th,
.content_blog_single_text_in table th,
.text_wrap table th {
	border: none;
	font-weight: 700;
	text-transform: uppercase;
	background-color: var(--main_color);
	padding: 14px 16px;
	font-size: 14px;
	color: #fff;
}

.smart_price_list table td,
.content_blog_single_text_in table td,
.text_wrap table td {
	position: relative;
	background-color: var(--main_color_opacity_10);
	border: 0 none;
	padding: 14px 16px;
	font-weight: 500;
}

.smart_price_list table td strong,
.content_blog_single_text_in table td strong,
.text_wrap table td strong {
	text-transform: uppercase;
	color: var(--main_color);
	font-size: 15px;
	font-weight: 600;
}


/* ============================================
   ОТСТУПЫ ОТ ДРУГИХ ЭЛЕМЕНТОВ
   ============================================ */

.content_blog_single_text_in .table-scroll-wrap,
.text_wrap .table-scroll-wrap {
	margin: 24px 0;
}

.content_blog_single_text_in :is(h2, h3, h4) + .table-scroll-wrap,
.text_wrap :is(h2, h3, h4) + .table-scroll-wrap {
	margin-top: 16px;
}

.content_blog_single_text_in .table-scroll-wrap + :is(h2, h3, h4),
.text_wrap .table-scroll-wrap + :is(h2, h3, h4) {
	margin-top: 32px;
}

.content_blog_single_text_in .table-scroll-wrap + :is(p, ul, ol),
.text_wrap .table-scroll-wrap + :is(p, ul, ol) {
	margin-top: 24px;
}

.content_blog_single_text_in :is(p, ul, ol) + .table-scroll-wrap,
.text_wrap :is(p, ul, ol) + .table-scroll-wrap {
	margin-top: 24px;
}


/* ============================================
   ДВУХКОЛОНОЧНЫЕ ТАБЛИЦЫ (только smart_price_list)
   Таблица с ровно 2 колонками → карточный layout
   ============================================ */

.smart_price_list table:has(td:nth-child(2)):not(:has(td:nth-child(3))) {
	display: flex;
	flex-wrap: wrap;
	border-spacing: 0;
	margin: -6px;
	width: calc(100% + 12px) !important;
}

.smart_price_list table:has(td:nth-child(2)):not(:has(td:nth-child(3))) thead {
	display: none;
}

.smart_price_list table:has(td:nth-child(2)):not(:has(td:nth-child(3))) tbody {
	display: flex;
	flex-wrap: wrap;
	width: 100% !important;
}

.smart_price_list table:has(td:nth-child(2)):not(:has(td:nth-child(3))) tr {
	width: 50% !important;
	display: flex;
	justify-content: space-between;
	padding: 6px;
	border: 0 none;
}

.smart_price_list table:has(td:nth-child(2)):not(:has(td:nth-child(3))) td {
	display: flex !important;
	align-items: center;
	padding: 16px 20px;
	font-weight: 500;
	text-align: left;
	border-radius: 0;
}

.smart_price_list table:has(td:nth-child(2)):not(:has(td:nth-child(3))) td:first-child {
	width: 70% !important;
	border-top-left-radius: var(--min_border_radius);
	border-bottom-left-radius: var(--min_border_radius);
}

.smart_price_list table:has(td:nth-child(2)):not(:has(td:nth-child(3))) td:last-child {
	width: 30% !important;
	text-align: right;
	justify-content: flex-end;
	font-weight: 700;
	border-top-right-radius: var(--min_border_radius);
	border-bottom-right-radius: var(--min_border_radius);
	color: var(--main_color);
}


/* ============================================
   TABLE SCROLL - Обёртка для скролла
   ============================================ */

.table-scroll-wrap {
	position: relative;
	overflow: hidden;
}

.table-scroll-inner {
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	padding: 8px;
	margin: -8px;
}

.table-scroll-inner table,
.table-scroll-inner table tr,
.table-scroll-inner table td,
.table-scroll-inner table th {
	height: auto !important;
	max-height: none !important;
}

.table-scroll-wrap.no-scroll {
	overflow: visible;
}

.table-scroll-wrap.no-scroll .table-scroll-inner {
	overflow: visible;
	padding: 6px;
	margin: -6px;
}

.table-scroll-wrap.no-scroll .table-scroll-indicator {
	display: none;
}

.table-scroll-indicator {
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: 48px;
	background: linear-gradient(to right, transparent, rgba(255,255,255,0.95));
	display: flex;
	align-items: center;
	justify-content: flex-end;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s;
	z-index: 5;
}

.table-scroll-wrap.can-scroll .table-scroll-indicator {
	opacity: 1;
}

.table-scroll-indicator svg {
	color: var(--main_color);
	animation: scrollArrow 1.2s ease-in-out infinite;
}

@keyframes scrollArrow {
	0%, 100% { transform: translateX(0); opacity: 1; }
	50% { transform: translateX(6px); opacity: 0.4; }
}


/* ============================================
   PRICE LIST - Частичное скрытие (только ПК)
   ============================================ */

.smart_price_list .price_list_toggle_btn {
	display: none;
}

.smart_price_list .price_list_toggle_btn.visible {
	display: flex;
}

.smart_price_list .show_more_price_list .text-hide {
	display: none;
}

.smart_price_list .show_more_price_list.expanded .text-show {
	display: none;
}

.smart_price_list .show_more_price_list.expanded .text-hide {
	display: inline;
}

.smart_price_list .table-height-limiter {
	overflow: hidden;
	transition: height 0.4s ease;
}


/* ============================================
   МОБИЛЬНЫЕ СТИЛИ
   ============================================ */

@media (max-width: 990px) {

	.smart_price_list table,
	.content_blog_single_text_in table,
	.text_wrap table {
		border-spacing: 6px;
		margin: -6px;
		width: max-content !important;
		min-width: calc(100% + 12px);
	}

	.table-scroll-inner {
		padding: 6px;
		margin: -6px;
	}

	.smart_price_list table th,
	.content_blog_single_text_in table th,
	.text_wrap table th {
		padding: 10px 12px;
		font-size: 12px;
		white-space: nowrap;
	}

	.smart_price_list table td,
	.content_blog_single_text_in table td,
	.text_wrap table td {
		padding: 10px 12px;
		font-size: 13px;
		white-space: nowrap;
	}

	/* Двухколоночные - только smart_price_list */
	.smart_price_list table:has(td:nth-child(2)):not(:has(td:nth-child(3))) {
		width: calc(100% + 12px) !important;
		min-width: auto;
	}

	.smart_price_list table:has(td:nth-child(2)):not(:has(td:nth-child(3))) tr {
		width: 100% !important;
		font-size: 13px;
	}

	.smart_price_list table:has(td:nth-child(2)):not(:has(td:nth-child(3))) td {
		padding: 12px 14px;
		white-space: normal;
	}

	.smart_price_list table:has(td:nth-child(2)):not(:has(td:nth-child(3))) td:first-child {
		width: 66% !important;
	}

	.smart_price_list table:has(td:nth-child(2)):not(:has(td:nth-child(3))) td:last-child {
		width: 34% !important;
	}

	.content_blog_single_text_in .table-scroll-wrap,
	.text_wrap .table-scroll-wrap {
		margin: 20px 0;
	}

	.smart_price_list .table-height-limiter {
		height: auto !important;
		overflow: visible;
	}

	.smart_price_list .price_list_toggle_btn {
		display: none !important;
	}

	.show_more_price_list {
		font-size: 14px;
		margin-top: 12px;
	}
}
