/*
 * REENERGO Product Specifications
 * Unified responsive specifications design
 */

.reenergo-product-specifications {
	max-width: 1100px;
	margin: 0 auto;
}

.reenergo-product-specifications-content {
	--rps-border: #e6e8eb;
	--rps-soft: #f7f8f9;
	--rps-label: #4b5563;
	--rps-text: #1f2937;
	--rps-radius: 8px;

	color: var(--rps-text);
	font-size: 15px;
	line-height: 1.5;
}

.reenergo-product-specifications-content h2,
.reenergo-product-specifications-content h3,
.reenergo-product-specifications-content h4 {
	margin: 28px 0 12px;
	line-height: 1.3;
	color: var(--rps-text);
	font-weight: 700;
}

.reenergo-product-specifications-content h2 {
	font-size: 22px;
}

.reenergo-product-specifications-content h3 {
	font-size: 19px;
}

.reenergo-product-specifications-content h4 {
	font-size: 16px;
}


/* =========================================
   1. OLD HTML TABLES
   ========================================= */

.reenergo-product-specifications-content table {
	width: 100% !important;
	height: auto !important;
	margin: 12px 0 24px !important;
	border: 1px solid var(--rps-border) !important;
	border-collapse: separate !important;
	border-spacing: 0 !important;
	border-radius: var(--rps-radius);
	overflow: hidden;
	table-layout: fixed;
}

.reenergo-product-specifications-content table tbody,
.reenergo-product-specifications-content table tr {
	height: auto !important;
}

.reenergo-product-specifications-content table tr:nth-child(even) {
	background: var(--rps-soft);
}

.reenergo-product-specifications-content table td,
.reenergo-product-specifications-content table th {
	width: auto !important;
	height: auto !important;
	padding: 11px 15px !important;
	border: 0 !important;
	border-bottom: 1px solid var(--rps-border) !important;
	vertical-align: top !important;
	text-align: left;
	word-break: normal;
	overflow-wrap: anywhere;
}

.reenergo-product-specifications-content table tr:last-child td {
	border-bottom: 0 !important;
}

.reenergo-product-specifications-content table td:first-child {
	width: 48% !important;
	font-weight: 600;
	color: var(--rps-label);
}

.reenergo-product-specifications-content table td:last-child {
	width: 52% !important;
	color: var(--rps-text);
}


/* =========================================
   2. ELECTRO items-list
   ========================================= */

.reenergo-product-specifications-content ul.items-list {
	list-style: none !important;
	margin: 12px 0 24px !important;
	padding: 0 !important;
	border: 1px solid var(--rps-border);
	border-radius: var(--rps-radius);
	overflow: hidden;
}

.reenergo-product-specifications-content ul.items-list > li {
	display: grid;
	grid-template-columns: minmax(0, 48%) minmax(0, 52%);
	column-gap: 20px;
	row-gap: 6px;
	margin: 0 !important;
	padding: 11px 15px !important;
	border-bottom: 1px solid var(--rps-border);
	list-style: none !important;
}

.reenergo-product-specifications-content ul.items-list > li:nth-child(even):not(.item-subheader) {
	background: var(--rps-soft);
}

.reenergo-product-specifications-content ul.items-list > li:last-child {
	border-bottom: 0;
}

.reenergo-product-specifications-content ul.items-list > li.item-subheader {
	display: block;
	padding: 13px 15px !important;
	background: #eef0f2;
	color: var(--rps-text);
	font-size: 16px;
	font-weight: 700;
}

.reenergo-product-specifications-content ul.items-list > li > strong:not(.subitem) {
	grid-column: 1;
	color: var(--rps-label);
	font-weight: 600;
}

.reenergo-product-specifications-content ul.items-list .item-feature {
	grid-column: 2;
	color: var(--rps-text);
}

.reenergo-product-specifications-content ul.items-list strong.subitem {
	grid-column: 1;
	padding-left: 18px;
	color: var(--rps-label);
	font-weight: 500;
}


/* =========================================
   3. properties-group
   ========================================= */

.reenergo-product-specifications-content .properties-group__items {
	margin: 12px 0 24px;
	border: 1px solid var(--rps-border);
	border-radius: var(--rps-radius);
	overflow: hidden;
}

.reenergo-product-specifications-content .properties-group__item {
	display: grid !important;
	grid-template-columns: minmax(0, 48%) minmax(0, 52%);
	gap: 20px;
	padding: 11px 15px !important;
	border-bottom: 1px solid var(--rps-border);
}

.reenergo-product-specifications-content .properties-group__item:nth-child(even) {
	background: var(--rps-soft);
}

.reenergo-product-specifications-content .properties-group__item:last-child {
	border-bottom: 0;
}

.reenergo-product-specifications-content .properties-group__name-wrap,
.reenergo-product-specifications-content .properties-group__value-wrap {
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
}

.reenergo-product-specifications-content .properties-group__name {
	color: var(--rps-label) !important;
	font-weight: 600;
}

.reenergo-product-specifications-content .properties-group__value {
	color: var(--rps-text) !important;
}


/* =========================================
   4. character-group
   ========================================= */

.reenergo-product-specifications-content .character-group-list-item {
	display: grid !important;
	grid-template-columns: minmax(0, 48%) minmax(0, 52%);
	gap: 20px;
	padding: 11px 15px !important;
	border-bottom: 1px solid var(--rps-border);
}

.reenergo-product-specifications-content .character-group-list-item:nth-child(even) {
	background: var(--rps-soft);
}

.reenergo-product-specifications-content .character-group-list-item > *:first-child {
	color: var(--rps-label);
	font-weight: 600;
}

.reenergo-product-specifications-content .character-group-list-item__value {
	color: var(--rps-text);
}


/* =========================================
   5. UIkit / uk-leader legacy markup
   ========================================= */

.reenergo-product-specifications-content .uk-grid {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 20px;
	margin: 0 !important;
	padding: 11px 15px !important;
	border-bottom: 1px solid var(--rps-border);
}

.reenergo-product-specifications-content .uk-leader {
	width: auto !important;
	min-width: 0;
}

.reenergo-product-specifications-content .uk-leader-fill::after {
	display: none !important;
}


/* =========================================
   6. Other legacy specification blocks
   ========================================= */

.reenergo-product-specifications-content .product__specification-body,
.reenergo-product-specifications-content .us-product-attributes-cont {
	margin: 12px 0 24px;
	border: 1px solid var(--rps-border);
	border-radius: var(--rps-radius);
	overflow: hidden;
}

.reenergo-product-specifications-content .us-product-attributes-cont .justify-content-between {
	display: grid !important;
	grid-template-columns: minmax(0, 48%) minmax(0, 52%);
	gap: 20px;
	padding: 11px 15px !important;
	border-bottom: 1px solid var(--rps-border);
}

.reenergo-product-specifications-content .us-product-attributes-cont .justify-content-between:nth-child(even) {
	background: var(--rps-soft);
}


/* Remove old fixed dimensions inside specifications only */
.reenergo-product-specifications-content [style*="height:"] {
	height: auto !important;
}

.reenergo-product-specifications-content img {
	max-width: 100%;
	height: auto;
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 767px) {

	.reenergo-product-specifications-content {
		font-size: 14px;
	}

	.reenergo-product-specifications-content h2 {
		font-size: 20px;
	}

	.reenergo-product-specifications-content h3 {
		font-size: 17px;
	}

	/* Tables become readable cards */
	.reenergo-product-specifications-content table,
	.reenergo-product-specifications-content table tbody,
	.reenergo-product-specifications-content table tr,
	.reenergo-product-specifications-content table td {
		display: block !important;
		width: 100% !important;
	}

	.reenergo-product-specifications-content table tr {
		padding: 10px 13px;
		border-bottom: 1px solid var(--rps-border);
	}

	.reenergo-product-specifications-content table td {
		padding: 2px 0 !important;
		border: 0 !important;
	}

	.reenergo-product-specifications-content table td:first-child {
		width: 100% !important;
		margin-bottom: 3px;
		font-size: 13px;
		color: var(--rps-label);
	}

	.reenergo-product-specifications-content table td:last-child {
		width: 100% !important;
		font-weight: 600;
		color: var(--rps-text);
	}

	/* All pair-based legacy formats stack vertically */
	.reenergo-product-specifications-content ul.items-list > li,
	.reenergo-product-specifications-content .properties-group__item,
	.reenergo-product-specifications-content .character-group-list-item,
	.reenergo-product-specifications-content .us-product-attributes-cont .justify-content-between,
	.reenergo-product-specifications-content .uk-grid {
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 3px !important;
		padding: 10px 13px !important;
	}

	.reenergo-product-specifications-content ul.items-list > li > strong,
	.reenergo-product-specifications-content ul.items-list .item-feature,
	.reenergo-product-specifications-content ul.items-list strong.subitem {
		grid-column: 1 !important;
	}

	.reenergo-product-specifications-content ul.items-list .item-feature,
	.reenergo-product-specifications-content .properties-group__value,
	.reenergo-product-specifications-content .character-group-list-item__value {
		font-weight: 600;
	}

	.reenergo-product-specifications-content ul.items-list strong.subitem {
		padding-left: 0;
		margin-top: 6px;
		font-size: 13px;
	}
}
/* =========================================
   ELECTRO items-list compatibility fix
   Старые стили Electro делили LI на 2 колонки
   ========================================= */

.reenergo-product-specifications-content ul.items-list {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	column-count: 1 !important;
	columns: auto !important;
	box-sizing: border-box !important;
}

.reenergo-product-specifications-content ul.items-list::after {
	content: "";
	display: block;
	clear: both;
}

.reenergo-product-specifications-content ul.items-list > li {
	float: none !important;
	clear: both !important;
	position: static !important;

	display: grid !important;
	grid-template-columns: minmax(0, 48%) minmax(0, 52%) !important;

	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;

	margin: 0 !important;
	box-sizing: border-box !important;
}

.reenergo-product-specifications-content ul.items-list > li.item-subheader {
	display: block !important;
	float: none !important;
	clear: both !important;
	width: 100% !important;
	max-width: 100% !important;
}

.reenergo-product-specifications-content ul.items-list > li > strong,
.reenergo-product-specifications-content ul.items-list .subitem,
.reenergo-product-specifications-content ul.items-list .item-feature {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box !important;
}

.reenergo-product-specifications-content ul.items-list .item-feature {
	text-align: left !important;
}

/* Вложенные строки: название слева, значение справа */
.reenergo-product-specifications-content ul.items-list strong.subitem {
	grid-column: 1 !important;
}

.reenergo-product-specifications-content ul.items-list .item-feature {
	grid-column: 2 !important;
}

/* На телефоне всё складываем вертикально */
@media (max-width: 767px) {
	.reenergo-product-specifications-content ul.items-list > li {
		grid-template-columns: 1fr !important;
	}

	.reenergo-product-specifications-content ul.items-list > li > strong,
	.reenergo-product-specifications-content ul.items-list strong.subitem,
	.reenergo-product-specifications-content ul.items-list .item-feature {
		grid-column: 1 !important;
	}

	.reenergo-product-specifications-content ul.items-list .item-feature {
		margin-top: 3px !important;
		font-weight: 600;
	}
}
