/*
 * Yeu thich + So sanh.
 *
 * Phan lon giao dien nut trai tim da nam trong bundle chinh (`.image-tools .wishlist-button`).
 * File nay chi giu nhung gi truoc day nam trong CSS cua ban tich hop YITH va them phan
 * so sanh. Nhung quy tac ve bang cua YITH (`.wishlist_table`, `#yith-wcwl-popup-message`)
 * da bo — khong con bang do nua.
 */

/* ===== chung ===== */

.luu-sp-vung {
	min-height: 120px;
}

.luu-sp-dang-tai,
.luu-sp-trong,
.luu-sp-loi {
	padding: 40px 15px;
	text-align: center;
	font-size: 1.1em;
	color: #777;
}

.luu-sp-loi {
	color: #b00;
}

/* ===== nut tren the san pham ===== */

.wishlist-icon,
.so-sanh-icon {
	position: relative;
}

.wishlist-popup {
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 3;
	max-height: 0;
	padding: 5px 8px;
	margin-top: -10px;
	overflow: hidden;
	font-size: .9em;
	line-height: 1.3;
	color: #fff;
	text-align: center;
	white-space: nowrap;
	background-color: rgba(0, 0, 0, .8);
	border-radius: 5px;
	opacity: 0;
	transition: opacity .3s, max-height .3s;
	transition-delay: .3s;
}

.wishlist-popup:after {
	position: absolute;
	right: 10px;
	bottom: 100%;
	width: 0;
	height: 0;
	margin-left: -10px;
	pointer-events: none;
	content: " ";
	border: 10px solid transparent;
	border-bottom-color: rgba(0, 0, 0, .8);
}

.wishlist-icon:hover .wishlist-popup,
.so-sanh-icon:hover .wishlist-popup {
	max-height: 200px;
	opacity: 1;
}

/* Da luu: to dac bieu tuong. */
.wishlist-button.da-luu,
.so-sanh-button.da-luu {
	color: #fff;
	background-color: #e02b20;
	border-color: #e02b20;
}

.wishlist-button.da-luu svg,
.wishlist-button.da-luu i:before {
	fill: currentColor;
}

/* So dem tren dau trang. */
.wishlist-icon.has-products:after {
	background-color: #e02b20;
	transform: translateY(-3px);
}

/* ===== thanh so sanh o chan trang ===== */

.so-sanh-thanh {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 90;
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: center;
	padding: 10px 15px;
	background: #fff;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, .15);
}

.so-sanh-thanh[hidden] {
	display: none;
}

.so-sanh-thanh-dem {
	font-weight: bold;
}

.so-sanh-thanh .button {
	margin-bottom: 0;
}

.so-sanh-thanh-xoa {
	padding: 0;
	font-size: .9em;
	color: #777;
	text-decoration: underline;
	background: none;
	border: 0;
	cursor: pointer;
}

/* ===== bang so sanh ===== */

.so-sanh-cuon {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.so-sanh-bang {
	width: 100%;
	border-collapse: collapse;
}

.so-sanh-bang th,
.so-sanh-bang td {
	min-width: 180px;
	padding: 12px 10px;
	vertical-align: top;
	border-bottom: 1px solid #ececec;
}

/* Cot ten hang dinh o ben trai khi cuon ngang — thay cho plugin FixedColumns (20,5 KB JS). */
.so-sanh-bang th[scope="row"] {
	position: sticky;
	left: 0;
	z-index: 1;
	min-width: 120px;
	font-weight: bold;
	text-align: left;
	background: #fff;
}

.so-sanh-hang-anh td {
	position: relative;
	text-align: center;
}

.so-sanh-hang-anh img {
	width: 100%;
	max-width: 160px;
	height: auto;
	margin: 0 auto 8px;
}

.so-sanh-ten {
	display: block;
	font-weight: bold;
	line-height: 1.35;
}

.so-sanh-bo {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 24px;
	height: 24px;
	font-size: 18px;
	line-height: 20px;
	color: #999;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 100%;
	cursor: pointer;
}

.so-sanh-bo:hover {
	color: #fff;
	background: #e02b20;
	border-color: #e02b20;
}

.so-sanh-hang-mua td {
	text-align: center;
	border-bottom: 0;
}

@media screen and (max-width: 549px) {
	.so-sanh-bang th,
	.so-sanh-bang td {
		min-width: 150px;
		padding: 8px 6px;
		font-size: .9em;
	}

	.so-sanh-bang th[scope="row"] {
		min-width: 96px;
	}
}
