/* Page styles: compare */

.compare__title-wrap {
	margin-bottom: 10px;
}

.compare__title-wrap .compare__nav .compare__nav-link {
	display: flex;
}

.compare__nav-link svg {
	z-index: 1;
}

.compare__nav-link.btn-add {
	min-width: 160px;
}

/* Плашки товаров на странице сравнения (не карточки каталога). */
.compare__block .compare_products-list {
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 20px;
}

.compare__block .compare_products-list li.compare_item.product {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	position: relative;
	background: #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
	border-radius: 20px;
	padding: 20px;
	overflow: visible;
	grid-template-rows: unset;
	transition: box-shadow 0.3s ease;
}

.compare__block .compare_products-list li.compare_item.product:hover {
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.compare__block .compare_item-main {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	align-items: center;
}

.compare__block .compare_item-main .product__thumb-wrap {
	flex: 0 0 150px;
	max-width: 150px;
	width: 150px;
	height: 100px;
	margin: 0;
	padding: 0;
	transform: none;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

.compare__block .compare_item-main .product__thumb-wrap img {
	display: block;
	width: auto;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	margin: 0;
	object-fit: contain;
	object-position: center;
}

.compare__block .compare_item-main-text {
	flex: 1 1 auto;
	min-width: 0;
	gap: 10px;
}

.compare__block .compare_item-main-text .woocommerce-loop-product__title {
	margin: 0;
	padding: 0;
	height: auto;
	min-height: 0;
	max-height: none;
	font-size: 16px;
	font-weight: 700;
	line-height: 20px;
}

.compare__block .compare_item-main-text .woocommerce-loop-product__title a {
	display: block;
	overflow: hidden;
	color: var(--gray, #333);
	text-decoration: none;
	-webkit-line-clamp: 3;
	max-height: 60px;
}

.compare__block .compare_item-main-text .product-price {
	margin: 0;
	font-size: 14px;
	line-height: 20px;
}

.compare__block .compare_item-buttons {
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
}

.compare__block .compare_item-buttons .btn-remove,
.compare__block .compare_item-buttons .br_remove_compare_product {
	display: inline-block;
	opacity: 1;
	visibility: visible;
}

.compare__block .compare_item-buttons .product-buttons {
	margin-top: 0;
	align-self: center;
}

/* Сброс стилей виджета BeRocket внутри шорткода сравнения */
.compare__block .berocket_compare_widget li {
	display: block;
	width: auto;
	vertical-align: top;
	border-bottom: 0;
}

.compare_products-list li.product {
	padding: 20px;
}

.compare_products-list li.product .product__thumb-wrap {
	max-width: 150px;
	height: 100px;
}

.compare_products-list li.product .product-buttons > .added_to_cart,
.compare_products-list li.product .product-buttons > .btn-after-added,
.compare_products-list li.product .product-buttons > .button {
	font-size: 0;
	width: 50px;
	max-width: 50px;
	min-width: 50px;
	height: 50px;
	padding: 0;
	background: 0 0;
	border-radius: 50%;
	border: 2px solid var(--orange);
}

.compare_products-list li.product .product-buttons > .added_to_cart::before,
.compare_products-list li.product .product-buttons > .btn-after-added::before,
.compare_products-list li.product .product-buttons > .button::before {
	background: url(../../img/icons/cart-icon-orange.svg) center/contain no-repeat;
	width: 26px;
	height: 24px;
	border-radius: 0;
}

.compare_products-list li.product .product-buttons > .btn-after-added::before {
	background: url(../../img/icons/checked.svg) center/contain no-repeat;
}

.compare__table {
	margin-top: 40px;
	padding: 40px 0;
}

.compare__table[data-visible=differences] .compare__table-item.br_same_attr {
	display: none;
	visibility: hidden;
}

.compare__table-head {
	position: relative;
	margin-bottom: 20px;
}

.compare__table-head::after {
	position: absolute;
	left: 0;
	bottom: 0;
	content: "";
	width: 100%;
	height: 2px;
	background: var(--grayl);
}

.compare__table-head-btn {
	position: relative;
	z-index: 2;
	background: 0 0;
	padding-bottom: 20px;
	color: #7d8389;
	transition: .4s ease-in-out;
}

.compare__table-head-btn::after {
	position: absolute;
	content: "";
	left: 0;
	bottom: 0;
	width: 0;
	height: 2px;
	background: var(--orange);
	transition: inherit;
}

.compare__table-head-btn.active {
	color: var(--gray);
}

.compare__table-head-btn.active::after {
	width: 100%;
}

.compare__table-body {
	padding: 20px 0 0;
}

.compare__table-item {
	padding: 20px 0;
	border-bottom: 2px solid var(--grayl);
}

.compare__table-item:first-child {
	padding-top: 0;
}

.compare__table-item-title {
	margin-bottom: 20px;
}

.compare__table-char-item .attr-name,
.compare__table-char-item .attr-value {
	line-height: 20px;
}

.compare__table-char-item .attr-name {
	margin-bottom: 10px;
	font-weight: 300;
	font-size: 14px;
	color: #7d8389;
}

.compare__table .stock.in-stock {
	color: var(--orange);
}

.compare_products-empty .btn.btn-orange {
	color: #fff;
}

/* === Responsive (from breakpoints.css) === */

@media all and (max-width:1100px) {
	.compare__nav {
		grid-gap: 20px;
	}
}

@media all and (max-width: 769px) {
	.compare__nav-link-text {
		display: none;
	}

	.compare__title-wrap .compare__nav .compare__nav-link.btn-add {
		display: flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
		min-width: 50px;
		max-width: 50px;
		width: 50px;
		height: 50px;
		padding: 0;
	}

	.compare__title-wrap .compare__nav .compare__nav-link.btn-add svg {
		display: block;
		flex-shrink: 0;
	}

	.compare__block .compare_products-list li.compare_item.product {
		flex-wrap: wrap;
		align-items: flex-start;
		padding: 16px;
		gap: 16px;
	}

	.compare__block .compare_item-main {
		flex: 1 1 100%;
	}

	.compare__block .compare_item-buttons {
		flex-direction: row;
		width: 100%;
		justify-content: space-between;
	}
}

@media all and (max-width:480px) {
	.compare__table-head {
		margin-bottom: 10px;
	}

	.compare__table-head-btn {
		font-size: 18px;
	}

	.compare__block .compare_products-list li.compare_item.product {
		padding: 12px;
		gap: 12px;
	}

	.compare__block .compare_item-main .product__thumb-wrap {
		flex-basis: 100px;
		max-width: 100px;
		width: 100px;
		height: 100px;
	}

	.compare__block .compare_item-main-text .woocommerce-loop-product__title {
		font-size: 14px;
	}
}
