/* ITM Reviews — frontend */

.itm-reviews-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}

/* Circular score ring */
.itm-review-score {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.itm-review-score__svg {
	transform: rotate(-90deg);
	display: block;
}

.itm-review-score__track {
	stroke: var(--itm-border, #e5e7eb);
}

.itm-review-score__bar {
	transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
}

.itm-review-score__center {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	pointer-events: none;
}

.itm-review-score__value {
	font-size: 1.75rem;
	font-weight: 800;
	line-height: 1;
	color: var(--itm-heading, #111);
	letter-spacing: -0.02em;
}

.itm-review-score--md .itm-review-score__value {
	font-size: 1.35rem;
}

.itm-review-score--sm .itm-review-score__value {
	font-size: 1rem;
}

.itm-review-score__label {
	margin-top: 4px;
	font-size: 0.62rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--itm-text-muted, #6b7280);
}

/* Overlay rings on images — white inside the ring only, no outer disc */
.itm-review-score--overlay .itm-review-score__track {
	stroke: rgba(255, 255, 255, 0.35);
}

.itm-review-score--overlay .itm-review-score__bar {
	stroke: #fff;
}

.itm-review-score--overlay .itm-review-score__value,
.itm-review-score--overlay .itm-review-score__label {
	color: #fff;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.itm-review-score-badge,
.itm-home-latest-review__score {
	background: none;
	border: none;
	padding: 0;
	box-shadow: none;
	backdrop-filter: none;
}

.itm-review-score--lg .itm-review-score__label {
	font-size: 0.68rem;
}

/* Review cards */
.itm-review-card {
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.itm-review-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--itm-shadow-lg, 0 12px 32px rgba(0, 0, 0, 0.12));
}

.itm-review-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.itm-review-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--itm-bg-elevated, #f3f4f6);
}

.itm-review-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

.itm-review-card:hover .itm-review-card__media img {
	transform: scale(1.04);
}

.itm-review-card__media .itm-review-score-badge,
.itm-review-card__media .itm-review-score {
	position: absolute;
	bottom: 12px;
	right: 12px;
	z-index: 2;
}

.itm-review-card__media--score-only {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 180px;
}

.itm-review-card__body {
	padding: 18px 20px 22px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.itm-review-card__topic {
	margin: 0;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--itm-accent, #52525b);
}

.itm-review-card__title {
	margin: 0;
	font-size: 1.1rem;
	line-height: 1.35;
	color: var(--itm-heading, #111);
}

.itm-review-card__verdict {
	margin: 0;
	font-size: 0.88rem;
	line-height: 1.5;
	color: var(--itm-text-muted, #6b7280);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Pros & cons */
.itm-review-pros-cons {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 28px 0 0;
}

.itm-review-pros,
.itm-review-cons {
	padding: 18px 20px;
	border-radius: var(--itm-radius, 12px);
	border: 1px solid var(--itm-border, rgba(0, 0, 0, 0.08));
	background: var(--itm-bg-card, #ffffff);
	box-shadow: none;
}

.itm-review-pros h3,
.itm-review-cons h3 {
	margin: 0 0 14px;
	font-size: 0.95rem;
	font-weight: 800;
	display: flex;
	align-items: center;
	gap: 8px;
}

.itm-review-pros h3 {
	color: #16a34a;
}

.itm-review-cons h3 {
	color: #52525b;
}

.itm-review-pros ul,
.itm-review-cons ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.itm-review-pros li,
.itm-review-cons li {
	position: relative;
	padding-left: 18px;
	font-size: 0.92rem;
	line-height: 1.5;
	color: var(--itm-text, #374151);
}

.itm-review-pros li::before,
.itm-review-cons li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
}

.itm-review-pros li::before {
	background: #16a34a;
}

.itm-review-cons li::before {
	background: #52525b;
}

/* Single review page */
.itm-single-review {
	margin-bottom: 48px;
}

.itm-review-hero {
	position: relative;
	border-radius: var(--itm-radius, 12px);
	overflow: hidden;
	margin-bottom: 16px;
	background: var(--itm-bg-card, #fff);
	border: 1px solid var(--itm-border, rgba(0, 0, 0, 0.08));
	box-shadow: none;
}

.itm-review-hero__media {
	position: relative;
	min-height: 280px;
	max-height: 480px;
	overflow: hidden;
}

.itm-review-hero__media img {
	width: 100%;
	height: 100%;
	min-height: 280px;
	object-fit: cover;
	display: block;
}

.itm-review-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.45) 100%);
	pointer-events: none;
}

.itm-review-score-badge {
	position: absolute;
	bottom: 20px;
	right: 20px;
	z-index: 2;
}

.itm-review-hero__content {
	position: relative;
	padding: 28px 32px 32px;
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: flex-start;
}

.itm-review-hero--no-image .itm-review-hero__content {
	padding-top: 32px;
}

.itm-review-hero__score-standalone {
	flex-shrink: 0;
}

.itm-review-hero__text {
	flex: 1;
	min-width: min(100%, 280px);
}

.itm-review-hero__topic {
	margin: 0;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--itm-accent, #52525b);
}

.itm-review-hero__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	margin: 0 0 12px;
	flex: 0 0 100%;
	width: 100%;
}

.itm-review-hero__tags .itm-review-post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}

.itm-review-hero__title {
	margin: 0 0 12px;
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	line-height: 1.2;
	color: var(--itm-heading, #111);
}

.itm-review-hero__content > .itm-review-hero__meta,
.itm-review-hero__content > .itm-review-hero__tags,
.itm-review-hero__content > .itm-review-hero__price {
	flex: 0 0 100%;
	width: 100%;
}

.itm-review-hero__price {
	display: inline-block;
	margin: 0 0 12px;
	padding: 6px 14px;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	background: #ea580c;
	border-radius: 6px;
	width: max-content;
	max-width: 100%;
	box-shadow: 0 2px 8px rgba(234, 88, 12, 0.28);
}

.itm-review-hero__verdict {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.5;
	color: var(--itm-text-muted, #6b7280);
	flex: 0 0 100%;
	width: 100%;
	max-width: none;
}

.itm-review-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	font-size: 0.85rem;
	color: var(--itm-text-muted, #6b7280);
}

.itm-review-hero__meta span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.itm-review-body {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.itm-review-body__panel,
.itm-review-body .entry-content {
	font-size: 1.02rem;
	line-height: 1.75;
	color: var(--itm-text, #374151);
}

.itm-review-body__panel {
	margin: 0;
	padding: 18px 20px;
	background: var(--itm-bg-card, #ffffff);
	border: 1px solid var(--itm-border, rgba(0, 0, 0, 0.08));
	border-radius: var(--itm-radius, 12px);
}

.itm-review-body__panel > *:first-child,
.itm-review-body .entry-content > *:first-child {
	margin-top: 0;
}

.itm-review-body__panel > *:last-child {
	margin-bottom: 0;
}

.itm-review-body .itm-review-pros-cons {
	margin: 0;
}

/* Embed shortcode */
.itm-review-embed {
	padding: 24px;
}

.itm-review-embed__header {
	display: flex;
	gap: 20px;
	align-items: center;
	margin-bottom: 8px;
}

.itm-review-embed__topic {
	margin: 0 0 4px;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--itm-accent, #52525b);
}

.itm-review-embed__title {
	margin: 0;
	font-size: 1.2rem;
}

.itm-review-embed__title a {
	color: var(--itm-heading, #111);
	text-decoration: none;
}

.itm-review-embed__title a:hover {
	color: var(--itm-accent, #52525b);
}

.itm-review-embed__verdict {
	margin: 6px 0 0;
	color: var(--itm-text-muted, #6b7280);
	font-size: 0.92rem;
}

.itm-review-embed .itm-review-pros-cons {
	margin-top: 18px;
}

.itm-review-embed__more {
	margin: 18px 0 0;
}

.itm-review-archive-header {
	margin-bottom: 36px;
}

.itm-review-post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}

.itm-topic-header-tag.is-active {
	color: var(--itm-accent, #52525b);
	border-color: rgba(var(--itm-accent-rgb, 82, 82, 91), 0.45);
	background: rgba(var(--itm-accent-rgb, 82, 82, 91), 0.08);
	pointer-events: none;
}

/* Homepage — latest review + social feed strip */
.itm-home-review-social {
	padding: 20px 0 8px;
	background: var(--itm-bg, #fff);
	border-bottom: 1px solid var(--itm-border, rgba(0, 0, 0, 0.08));
}

.itm-home-review-social__grid {
	display: grid;
	gap: 18px;
	align-items: stretch;
}

.itm-home-review-social__grid--split {
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	min-height: 380px;
}

.itm-home-review-social__grid--review-only {
	grid-template-columns: minmax(0, 1fr);
	max-width: 720px;
	margin: 0 auto;
}

.itm-home-review-social__grid--feed-only {
	grid-template-columns: minmax(0, 1fr);
	max-width: 760px;
	margin: 0 auto;
}

.itm-home-review-social__review,
.itm-home-review-social__feed {
	min-height: 0;
}

.itm-home-latest-reviews {
	--itm-home-review-interval: 6s;
	position: relative;
	height: 100%;
	min-height: 380px;
	border-radius: var(--itm-radius-lg, 14px);
	overflow: hidden;
	border: 1px solid var(--itm-border, rgba(0, 0, 0, 0.08));
	box-shadow: var(--itm-shadow, 0 4px 20px rgba(0, 0, 0, 0.06));
}

.itm-home-latest-reviews__track {
	position: relative;
	height: 100%;
	min-height: inherit;
}

.itm-home-latest-review {
	position: relative;
	height: 100%;
	min-height: inherit;
}

.itm-home-latest-reviews.is-carousel .itm-home-latest-review {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: scale(1.015);
	transition:
		opacity 0.65s ease,
		visibility 0.65s ease,
		transform 0.75s ease;
	z-index: 0;
}

.itm-home-latest-reviews.is-carousel .itm-home-latest-review.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: scale(1);
	z-index: 1;
}

.itm-home-latest-review__link {
	position: relative;
	display: block;
	height: 100%;
	min-height: inherit;
	color: #fff;
	text-decoration: none;
}

.itm-home-latest-review__media {
	position: absolute;
	inset: 0;
	background-color: #1a1a1a;
	background-image: var(--itm-home-review-image);
	background-size: cover;
	background-position: center;
	transform: scale(1.02);
	transition: transform 0.45s ease;
}

.itm-home-latest-review--no-image .itm-home-latest-review__media {
	background-image:
		linear-gradient(135deg, rgba(82, 82, 91, 0.35), rgba(10, 10, 10, 0.92)),
		radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12), transparent 45%);
}

.itm-home-latest-review__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.42) 42%, rgba(0, 0, 0, 0.12) 62%, rgba(0, 0, 0, 0.35) 100%);
	pointer-events: none;
}

.itm-home-latest-review__score {
	position: absolute;
	bottom: 18px;
	right: 18px;
	z-index: 2;
}

.itm-home-latest-review__content {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 2;
	padding: 22px 22px 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.itm-home-latest-review__label {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	padding: 6px 12px;
	border-radius: var(--itm-btn-radius, 4px);
	font-size: 0.68rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #fff;
	background: rgba(var(--itm-accent-rgb, 82, 82, 91), 0.92);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.itm-home-latest-review__topic {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: rgba(255, 255, 255, 0.82);
}

.itm-home-latest-review__title {
	margin: 0;
	font-size: clamp(1.25rem, 2.2vw, 1.75rem);
	line-height: 1.2;
	font-weight: 800;
	color: #fff;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.itm-home-latest-review__summary {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.86);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	max-width: 52ch;
}

.itm-home-latest-review__cta {
	position: absolute;
	left: 22px;
	bottom: 22px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.82rem;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.itm-home-latest-review__link:hover .itm-home-latest-review__media {
	transform: scale(1.06);
}

.itm-home-latest-review__link:hover .itm-home-latest-review__cta {
	color: #ffb4b4;
}

@media (max-width: 768px) {
	.itm-review-pros-cons {
		grid-template-columns: 1fr;
	}

	.itm-review-hero__content {
		padding: 24px 20px 28px;
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.itm-review-hero__text {
		width: 100%;
	}

	.itm-review-score-badge {
		bottom: 14px;
		right: 14px;
		padding: 4px;
	}

	.itm-review-hero__meta {
		justify-content: center;
	}

	.itm-review-embed__header {
		flex-direction: column;
		text-align: center;
	}

	.itm-home-review-social__grid--split,
	.itm-home-review-social__grid--feed-only,
	.itm-home-review-social__grid--review-only {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.itm-home-latest-reviews,
	.itm-home-latest-review {
		min-height: 320px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.itm-home-latest-reviews.is-carousel .itm-home-latest-review {
		transition: none;
		transform: none;
	}

	.itm-home-latest-reviews.is-progressing .itm-home-latest-reviews__progress-bar {
		animation: none;
		transform: scaleX(0);
	}
}
