.property-card__compare {
	position: absolute;
	top: 56px;
	right: 12px;
	z-index: 3;
	display: inline-flex;
	width: 36px;
	height: 36px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid rgba(203, 213, 225, .9);
	border-radius: 50%;
	background: rgba(255, 255, 255, .96);
	color: #64748b;
	box-shadow: 0 2px 6px rgba(15, 23, 42, .18);
	cursor: pointer;
	transition: transform .15s, color .15s, background-color .15s, border-color .15s;
}
.property-card__compare:hover {
	transform: scale(1.08);
	color: #1f7bff;
}
.property-card__compare:focus-visible {
	outline: 3px solid rgba(31, 123, 255, .35);
	outline-offset: 2px;
}
.property-card__compare.is-active {
	border-color: #1f7bff;
	background: #1f7bff;
	color: #fff;
}

.ad-compare-tooltip {
	position: fixed;
	z-index: 10000;
	width: max-content;
	max-width: min(240px, calc(100vw - 16px));
	padding: 8px 10px;
	border-radius: 8px;
	background: #0f172a;
	color: #fff;
	box-shadow: 0 8px 24px rgba(15, 23, 42, .24);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.35;
	text-align: center;
	opacity: 0;
	pointer-events: none;
	transform: translateY(3px);
	transition: opacity .14s ease, transform .14s ease;
}
.ad-compare-tooltip.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.ad-compare-tray {
	position: fixed;
	z-index: 9996;
	right: 24px;
	bottom: 24px;
	left: 24px;
	display: flex;
	max-width: 780px;
	min-height: 76px;
	margin: 0 auto;
	align-items: center;
	gap: 18px;
	padding: 12px 14px 12px 18px;
	border: 1px solid #dbe4ee;
	border-radius: 18px;
	background: rgba(255, 255, 255, .97);
	box-shadow: 0 22px 50px rgba(15, 23, 42, .22);
	backdrop-filter: blur(14px);
	transform: translateY(130%);
	opacity: 0;
	pointer-events: none;
	transition: transform .22s ease, opacity .22s ease;
}
.ad-compare-tray.is-visible {
	transform: translateY(0);
	opacity: 1;
	pointer-events: auto;
}
.ad-compare-tray__copy {
	min-width: 130px;
}
.ad-compare-tray__title {
	display: block;
	color: #0f172a;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
}
.ad-compare-tray__count {
	display: block;
	margin-top: 3px;
	color: #64748b;
	font-size: 12px;
	line-height: 1.2;
}
.ad-compare-tray__slots {
	display: flex;
	flex: 1;
	gap: 8px;
}
.ad-compare-tray__slot {
	display: inline-flex;
	width: 34px;
	height: 34px;
	align-items: center;
	justify-content: center;
	border: 1px dashed #cbd5e1;
	border-radius: 50%;
	color: #94a3b8;
	font-size: 12px;
	font-weight: 700;
}
.ad-compare-tray__slot.is-filled {
	border-style: solid;
	border-color: #bfdbfe;
	background: #eff6ff;
	color: #1f7bff;
}
.ad-compare-tray__clear {
	padding: 8px;
	border: 0;
	background: transparent;
	color: #64748b;
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}
.ad-compare-tray__action,
.compare-page__browse {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	border: 0;
	border-radius: 12px;
	background: #1f7bff;
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}
.ad-compare-tray__action:disabled {
	background: #cbd5e1;
	cursor: not-allowed;
}

.ad-compare-toast {
	position: fixed;
	z-index: 9999;
	top: 22px;
	left: 50%;
	max-width: min(420px, calc(100vw - 32px));
	padding: 12px 16px;
	border-radius: 12px;
	background: #0f172a;
	color: #fff;
	box-shadow: 0 12px 30px rgba(15, 23, 42, .25);
	font-size: 14px;
	font-weight: 600;
	transform: translate(-50%, -18px);
	opacity: 0;
	pointer-events: none;
	transition: transform .18s ease, opacity .18s ease;
}
.ad-compare-toast.is-visible {
	transform: translate(-50%, 0);
	opacity: 1;
}

.compare-page {
	width: min(1480px, calc(100% - 40px));
	margin: 0 auto;
	padding: 48px 0 80px;
}
.compare-page__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 30px;
}
.compare-page__header h1 {
	margin: 4px 0 8px;
	color: #0f172a;
	font-size: clamp(32px, 4vw, 48px);
	line-height: 1.08;
}
.compare-page__header p {
	max-width: 720px;
	margin: 0;
	color: #64748b;
}
.compare-page__eyebrow {
	color: #1f7bff !important;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .12em;
}
.compare-page__clear {
	padding: 10px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	background: #fff;
	color: #475569;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}
.compare-page__state {
	display: flex;
	min-height: 300px;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 12px;
	padding: 38px;
	border: 1px solid #e2e8f0;
	border-radius: 18px;
	background: #fff;
	text-align: center;
}
.compare-page__state[hidden],
.compare-page__viewport[hidden] {
	display: none;
}
.compare-page__state h2,
.compare-page__state p {
	margin: 0;
}
.compare-page__state p {
	max-width: 560px;
	color: #64748b;
}
.compare-page__state--error {
	border-color: #fecaca;
	background: #fffafa;
}
.compare-page__spinner {
	width: 30px;
	height: 30px;
	border: 3px solid #dbeafe;
	border-top-color: #1f7bff;
	border-radius: 50%;
	animation: ad-compare-spin .8s linear infinite;
}
@keyframes ad-compare-spin { to { transform: rotate(360deg); } }

.compare-page__viewport {
	overflow-x: auto;
	padding: 2px 2px 18px;
}
.compare-matrix {
	--compare-count: 2;
	display: grid;
	min-width: calc(180px + (var(--compare-count) * 245px));
	grid-template-columns: 180px repeat(var(--compare-count), minmax(245px, 1fr));
	border: 1px solid #dfe7ef;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 14px 40px rgba(15, 23, 42, .08);
	overflow: hidden;
}
.compare-matrix__corner,
.compare-matrix__property,
.compare-matrix__label,
.compare-matrix__value {
	padding: 15px 16px;
	border-right: 1px solid #e2e8f0;
	border-bottom: 1px solid #e2e8f0;
}
.compare-matrix > :nth-child(n) {
	min-width: 0;
}
.compare-matrix__corner {
	background: #f8fafc;
}
.compare-matrix__property {
	position: relative;
	min-height: 130px;
	background: #f8fafc;
}
.compare-matrix__property h2 {
	margin: 0 32px 8px 0;
	color: #0f172a;
	font-size: 17px;
	line-height: 1.35;
}
.compare-matrix__price {
	margin: 0;
	color: #1f7bff;
	font-size: 20px;
	font-weight: 800;
}
.compare-matrix__status {
	display: inline-flex;
	margin-top: 10px;
	padding: 4px 8px;
	border-radius: 999px;
	background: #ecfdf5;
	color: #047857;
	font-size: 11px;
	font-weight: 700;
}
.compare-matrix__remove {
	position: absolute;
	top: 12px;
	right: 12px;
	display: inline-flex;
	width: 30px;
	height: 30px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid #dbe4ee;
	border-radius: 50%;
	background: #fff;
	color: #64748b;
	font: inherit;
	font-size: 18px;
	cursor: pointer;
}
.compare-matrix__label {
	background: #f8fafc;
	color: #475569;
	font-size: 13px;
	font-weight: 700;
}
.compare-matrix__value {
	color: #0f172a;
	font-size: 14px;
	line-height: 1.45;
}
.compare-matrix__action-cell {
	padding: 18px 16px;
	border-right: 1px solid #e2e8f0;
	background: #fff;
}
.compare-matrix__view {
	display: flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	padding: 10px 16px;
	border-radius: 12px;
	background: #1f7bff;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

@media (max-width: 720px) {
	.ad-compare-tray {
		right: 12px;
		bottom: 12px;
		left: 12px;
		gap: 10px;
		padding: 10px 12px;
	}
	.ad-compare-tray__copy {
		min-width: 0;
	}
	.ad-compare-tray__slots {
		display: none;
	}
	.ad-compare-tray__clear {
		display: none;
	}
	.ad-compare-tray__action {
		margin-left: auto;
	}
	.compare-page {
		width: min(100% - 24px, 1480px);
		padding-top: 28px;
	}
	.compare-page__header {
		align-items: flex-start;
		flex-direction: column;
	}
	.compare-matrix {
		min-width: calc(130px + (var(--compare-count) * 230px));
		grid-template-columns: 130px repeat(var(--compare-count), 230px);
	}
	.compare-matrix__corner,
	.compare-matrix__property,
	.compare-matrix__label,
	.compare-matrix__value {
		padding: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ad-compare-tray,
	.ad-compare-tooltip,
	.ad-compare-toast,
	.compare-page__spinner {
		transition: none;
		animation: none;
	}
}
