/* ============================================================
   Custom Product Compare — Styles
   ============================================================ */

/* ---- Ẩn YITH filter & sidebar trên trang so sánh ---- */
.cpc-compare-page .yith-wcan-filters,
.cpc-compare-page .yith-wcan-reset-button,
.cpc-compare-page #sidebar,
.cpc-compare-page .sidebar,
.cpc-compare-page aside.widget-area {
	display: none !important;
}

/* Kéo content full width khi sidebar bị ẩn */
.cpc-compare-page .col-main,
.cpc-compare-page #main-content,
.cpc-compare-page .main-content {
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
}

/* ---- Checkbox trên single product ---- */
.cpc-wrap {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 10px;
	cursor: pointer;
}

/* Button chỉ chứa icon — reset mọi button style */
.cpc-toggle,
.cpc-toggle:hover,
.cpc-toggle:focus,
.cpc-toggle:active {
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
	cursor: pointer !important;
	line-height: 1 !important;
	color: #555 !important;
	transition: color 0.2s ease !important;
	display: inline-flex !important;
	align-items: center !important;
}

.cpc-icon {
	font-size: 16px;
	line-height: 1;
	color: #555;
	transition: color 0.2s ease;
}

/* Link text */
.cpc-label-link {
	font-size: 13px;
	font-weight: 400;
	color: #555;
	text-decoration: none;
	transition: color 0.2s ease;
	line-height: 1.5;
}

.cpc-label-link:hover {
	color: #cc7758;
	text-decoration: none;
}

/* Hover trên wrapper → cả icon lẫn text đổi màu */
.cpc-wrap:hover .cpc-icon,
.cpc-wrap:hover .cpc-toggle {
	color: #cc7758 !important;
}

.cpc-wrap:hover .cpc-label-link {
	color: #cc7758;
}

/* Trạng thái đã tích */
.cpc-toggle.is-checked .cpc-icon {
	color: #cc7758 !important;
}

/* ---- Trang so sánh — wrapper ---- */
.cpc-table-wrap {
	padding: 10px 0 40px;
}

.cpc-empty {
	text-align: center;
	padding: 80px 20px;
	color: #888;
}

.cpc-empty-icon {
	font-size: 56px;
	margin-bottom: 16px;
	opacity: 0.3;
}

.cpc-empty p {
	font-size: 15px;
	margin-bottom: 20px;
}

/* ---- Scroll wrapper (mobile) ---- */
.cpc-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* ---- Bảng so sánh ---- */
.cpc-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 560px;
	table-layout: fixed;
}

.cpc-table th,
.cpc-table td {
	padding: 14px 16px;
	border: 1px solid #ebebeb;
	text-align: center;
	vertical-align: middle;
	font-size: 13px;
}

/* Cột nhãn trái */
.cpc-label-col {
	text-align: left !important;
	font-weight: 600;
	background: #f7f7f7;
	width: 150px;
	min-width: 130px;
	color: #333;
}

/* Cột sản phẩm */
.cpc-product-col {
	min-width: 200px;
}

/* Header: ảnh sản phẩm + nút xóa */
.cpc-product-head {
	position: relative;
	display: inline-block;
}

.cpc-product-head img {
	display: block;
	max-width: 160px;
	height: auto;
	margin: 0 auto;
	border-radius: 4px;
}

/* Nút × xóa sản phẩm — reset toàn bộ Porto button styles */
.cpc-compare-page .cpc-remove,
.cpc-compare-page .cpc-remove:hover,
.cpc-compare-page .cpc-remove:focus,
.cpc-compare-page .cpc-remove:active {
	position: absolute !important;
	top: 0 !important;
	right: 0 !important;
	width: 22px !important;
	height: 22px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: 22px !important;
	max-height: 22px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	background: #e74c3c !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 22px !important;
	text-align: center !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-shadow: none !important;
	outline: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	z-index: 2 !important;
	transition: background 0.2s !important;
}

.cpc-compare-page .cpc-remove:hover {
	background: #c0392b !important;
}

/* Cột "+" thêm sản phẩm */
.cpc-add-col {
	min-width: 160px;
	background: #fafafa;
}

.cpc-add-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-decoration: none !important;
	color: #888;
	padding: 20px 10px;
	transition: color 0.2s ease;
}

.cpc-add-btn:hover {
	color: #cc7758;
}

.cpc-plus-circle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: 2px dashed #ccc;
	border-radius: 50%;
	font-size: 32px;
	font-weight: 300;
	line-height: 1;
	transition: border-color 0.2s ease;
}

.cpc-add-btn:hover .cpc-plus-circle {
	border-color: #cc7758;
}

.cpc-add-label {
	font-size: 12px;
	text-align: center;
}

/* Tên sản phẩm */
.cpc-product-name {
	font-weight: 600;
	color: #222;
	text-decoration: none;
	display: block;
}

.cpc-product-name:hover {
	color: #cc7758;
}

/* Giá */
.cpc-price .woocommerce-Price-amount {
	font-size: 15px;
	font-weight: 700;
	color: #cc7758;
}

/* Tình trạng kho */
.cpc-stock {
	font-size: 12px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 3px;
}

.cpc-instock {
	color: #27ae60;
	background: #eafaf1;
}

.cpc-outstock {
	color: #e74c3c;
	background: #fdecea;
}

/* Mô tả ngắn */
.cpc-description {
	text-align: left !important;
	font-size: 12px;
	color: #555;
	line-height: 1.6;
	max-width: 220px;
}

/* Giá trị rỗng */
.cpc-empty-val {
	color: #ccc;
}

/* Dòng nút action */
.cpc-row-action td {
	padding-top: 18px;
	padding-bottom: 18px;
	border-top: 2px solid #ebebeb;
}

.cpc-buy-btn {
	font-size: 12px !important;
	padding: 8px 16px !important;
}

/* ---- Color Swatches trong bảng so sánh ---- */
.cpc-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.cpc-swatch-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.cpc-swatch-dot {
	display: block;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
	flex-shrink: 0;
}

.cpc-swatch-name {
	font-size: 11px;
	color: #666;
	text-align: center;
	line-height: 1.2;
	max-width: 50px;
	word-break: break-word;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
	.cpc-label-col {
		width: 110px;
		min-width: 110px;
		font-size: 12px;
	}

	.cpc-table th,
	.cpc-table td {
		padding: 10px 10px;
		font-size: 12px;
	}

	.cpc-product-head img {
		max-width: 110px;
	}
}
