/* =============================================================
   Built-in Product Compare
   ============================================================= */

/* Shop loop icon button (matches the quick view button grid) ---- */
.woocommerce ul.products .mpa-compare-btn {
	display: inline-block;
	position: relative;
	margin: 0 8px 0 0;
	border: 0;
	color: #000;
	font-size: 0;
	line-height: 38px;
	height: 38px;
	width: 38px;
	padding: 0;
	vertical-align: top;
	background: #ffffff;
	border-radius: 4px;
	transition: color 0.2s ease, background 0.2s ease;
}

.woocommerce ul.products .mpa-compare-btn:hover,
.woocommerce ul.products .mpa-compare-btn.is-active {
	background: #ed516c;
	color: #ffffff;
}

.woocommerce ul.products .mpa-compare-btn .mpa-compare-svg {
	display: inline-block;
	vertical-align: middle;
}

/* Slider icon buttons ------------------------------------------- */
.woocommerce ul.product-slider .mpa-compare-btn,
.woocommerce ul.product-slider-1-column .mpa-compare-btn {
	width: 40px;
}

/* Single product page button ------------------------------------ */
.mpa-compare-btn--single {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	margin-bottom: 30px;
	padding: 12px 22px;
	background: transparent;
	color: #ed516c;
	border: 2px solid #ed516c;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	border-radius: 4px;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.mpa-compare-btn--single:hover,
.mpa-compare-btn--single.is-active {
	background: #ed516c;
	color: #ffffff;
	border-color: #ed516c;
	opacity: 1;
}

.mpa-compare-btn--single .mpa-compare-svg {
	width: 18px;
	height: 18px;
}

/* Header compare icon ------------------------------------------- */
.mpa-compare-icon-container {
	list-style: none;
	margin: 0;
	padding: 0;
	display: inline-flex;
}

.mpa-compare-icon-container li {
	margin: 0;
}

.mpa-compare-icon-container a {
	position: relative;
	display: inline-flex;
	align-items: center;
	color: #000;
	font-size: 20px;
	line-height: 1;
	padding: 0 8px;
}

.mpa-compare-count {
	position: absolute;
	top: -8px;
	right: -2px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	font-size: 11px;
	font-weight: 600;
	line-height: 18px;
	text-align: center;
	color: #ffffff;
	background: #ed516c;
	border-radius: 9px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease;
}

.mpa-compare-count.is-visible {
	opacity: 1;
	visibility: visible;
}

/* Compare modal ------------------------------------------------- */
.mpa-compare-modal {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: none;
	overflow-x: hidden;
	overflow-y: auto;
}

.mpa-compare-modal.open {
	display: block;
}

.mpa-compare-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.mpa-compare-modal.open .mpa-compare-overlay {
	opacity: 1;
}

.mpa-compare-dialog {
	position: relative;
	max-width: 960px;
	width: calc(100% - 40px);
	margin: 60px auto;
	background: #ffffff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	transform: translateY(20px);
	opacity: 0;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.mpa-compare-modal.open .mpa-compare-dialog {
	transform: translateY(0);
	opacity: 1;
}

.mpa-compare-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
	border-bottom: 1px solid #eeeeee;
}

.mpa-compare-head h3 {
	margin: 0;
	font-size: 18px;
	color: #222222;
}

.mpa-compare-close {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	color: #888888;
	cursor: pointer;
	transition: color 0.2s ease;
}

.mpa-compare-close:hover,
.mpa-compare-close:focus {
	color: #ed516c;
}

.mpa-compare-body {
	padding: 24px;
	min-height: 160px;
}

.mpa-compare-loader {
	width: 38px;
	height: 38px;
	margin: 60px auto;
	border: 4px solid #eeeeee;
	border-top-color: #ed516c;
	border-radius: 50%;
	animation: mpacmpspin 0.8s linear infinite;
}

@keyframes mpacmpspin {
	to { transform: rotate(360deg); }
}

.mpa-compare-empty {
	text-align: center;
	color: #888888;
	padding: 40px 0;
}

/* Compare table ------------------------------------------------- */
.mpa-compare-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.mpa-compare-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 520px;
}

.mpa-compare-table th,
.mpa-compare-table td {
	text-align: center;
	vertical-align: middle;
	padding: 14px 10px;
	border-bottom: 1px solid #f0f0f0;
}

.mpa-compare-table th {
	font-weight: 600;
}

.mpa-compare-table-corner {
	width: 140px;
}

.mpa-compare-row-label {
	width: 140px;
	text-align: left;
	font-size: 13px;
	color: #888888;
	font-weight: 600;
	background: #fafafa;
}

.mpa-compare-product-col {
	position: relative;
}

.mpa-compare-product-col img {
	max-width: 90px;
	height: auto;
	border-radius: 4px;
}

.mpa-compare-remove-corner {
	position: absolute;
	top: 4px;
	right: 6px;
	width: 24px;
	height: 24px;
	line-height: 22px;
	border-radius: 50%;
	background: #f5f5f5;
	color: #999999;
	font-size: 18px;
	text-decoration: none;
	transition: color 0.2s ease, background 0.2s ease;
}

.mpa-compare-remove-corner:hover {
	color: #ffffff;
	background: #ed516c;
}

.mpa-compare-product-title {
	display: block;
	color: #222222;
	font-weight: 600;
	text-decoration: none;
}

.mpa-compare-product-title:hover {
	color: #ed516c;
}

.mpa-compare-price {
	font-size: 16px;
	font-weight: 700;
	color: #ed516c;
}

.mpa-compare-table .out-of-stock {
	color: #c92a2a;
}

.mpa-compare-table td .button {
	font-size: 13px;
	padding: 8px 14px;
}

.mpa-compare-actions {
	padding: 16px 0 0;
	text-align: right;
}

.mpa-compare-clear-all {
	padding: 8px 18px;
	border: 1px solid #e0e0e0;
	background: #ffffff;
	color: #555555;
	font-size: 13px;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.mpa-compare-clear-all:hover {
	color: #ed516c;
	border-color: #ed516c;
}

body.mpa-compare-open {
	overflow: hidden;
}

/* Responsive ---------------------------------------------------- */
@media (max-width: 700px) {
	.mpa-compare-dialog {
		margin: 20px auto;
	}

	.mpa-compare-body {
		padding: 16px;
	}
}
