/**
 * Fansidea-like product reviews — true masonry (column flow by image height).
 */

body.single-product .fi-reviews-section {
	width: 100vw;
	max-width: 100vw;
	margin: 8px 0 48px;
	margin-left: calc(50% - 50vw);
	padding: 36px max(20px, calc((100vw - 1400px) / 2)) 48px;
	background: #fff;
	box-sizing: border-box;
	clear: both;
}

body.single-product .fi-reviews-section > .elementor-element,
body.single-product .fi-reviews-section .elementor-widget-container {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
}

body.single-product #reviews {
	font-family: Outfit, "Segoe UI", sans-serif;
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
}

body.single-product #reviews .woocommerce-Reviews-title,
body.single-product #reviews .woocommerce-noreviews {
	font-size: 16px;
	font-weight: 700;
	color: #111;
	text-transform: none;
	letter-spacing: 0;
	margin: 0 0 18px;
}

body.single-product #reviews .star-rating {
	color: #f5b400;
	float: none !important;
	margin: 0 0 6px !important;
}

/* True masonry: items pack by natural height (driven by photos). */
body.single-product #reviews .commentlist {
	display: block !important;
	column-count: 5;
	column-gap: 14px;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

body.single-product #reviews .commentlist > .review,
body.single-product #reviews .commentlist > .comment {
	display: inline-block;
	width: 100%;
	margin: 0 0 14px !important;
	padding: 12px !important;
	border: 1px solid #ececec !important;
	border-radius: 8px;
	background: #fff;
	box-shadow: none !important;
	float: none !important;
	break-inside: avoid;
	page-break-inside: avoid;
	-webkit-column-break-inside: avoid;
	box-sizing: border-box;
	vertical-align: top;
}

body.single-product #reviews .comment_container {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

body.single-product #reviews .comment-text {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

body.single-product #reviews .avatar,
body.single-product #reviews img.avatar {
	display: none !important;
}

body.single-product #reviews .meta {
	order: 2;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	line-height: 1.35;
}

body.single-product #reviews .star-rating {
	order: 3;
}

body.single-product #reviews .description {
	order: 4;
}

body.single-product #reviews .fi-review-photos {
	order: 1;
	margin-top: 0;
	margin-bottom: 4px;
}

body.single-product #reviews .woocommerce-review__author {
	font-size: 14px;
	font-weight: 700;
	color: #111;
}

body.single-product #reviews .woocommerce-review__dash {
	display: none;
}

body.single-product #reviews .woocommerce-review__published-date {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: #8a8f94;
	font-weight: 400;
}

body.single-product #reviews .woocommerce-review__verified {
	font-size: 0;
	color: transparent;
}

body.single-product #reviews .woocommerce-review__verified::before {
	content: "";
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-left: 4px;
	vertical-align: middle;
	background: #111;
	border-radius: 50%;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 8px 8px no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 8px 8px no-repeat;
}

body.single-product #reviews .description,
body.single-product #reviews .comment-text {
	font-size: 13px;
	line-height: 1.5;
	color: #333;
}

body.single-product #reviews .description p {
	margin: 0 0 4px;
}

.fi-review-photos {
	position: relative;
	display: block;
	margin: 0;
}

.fi-review-photo {
	display: block;
	overflow: hidden;
	border-radius: 6px;
	background: #f5f5f5;
}

.fi-review-photo.is-extra {
	display: none;
}

.fi-review-photo img {
	display: block;
	width: 100%;
	height: auto;
	vertical-align: middle;
}

.fi-review-photo-badge {
	position: absolute;
	top: 8px;
	right: 8px;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 3px 7px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	pointer-events: none;
}

/* Lightbox */
body.fi-review-lb-open {
	overflow: hidden;
}

.fi-review-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.88);
	padding: 24px;
}

.fi-review-lb img {
	max-width: min(92vw, 980px);
	max-height: 86vh;
	object-fit: contain;
	border-radius: 4px;
}

.fi-review-lb__close,
.fi-review-lb__nav {
	position: absolute;
	border: 0;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
}

.fi-review-lb__close {
	top: 16px;
	right: 18px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 28px;
	line-height: 1;
}

.fi-review-lb__nav {
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 28px;
	line-height: 1;
}

.fi-review-lb__nav.is-prev {
	left: 16px;
}

.fi-review-lb__nav.is-next {
	right: 16px;
}

.fi-review-lb__count {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
	font-size: 13px;
}

body.single-product #reviews .comment-reply-title,
body.single-product #review_form_wrapper {
	margin-top: 28px;
}

@media (max-width: 1200px) {
	body.single-product #reviews .commentlist {
		column-count: 4;
	}
}

@media (max-width: 900px) {
	body.single-product .fi-reviews-section {
		padding-left: 16px;
		padding-right: 16px;
	}

	body.single-product #reviews .commentlist {
		column-count: 3;
	}
}

@media (max-width: 700px) {
	body.single-product #reviews .commentlist {
		column-count: 2;
	}
}

@media (max-width: 480px) {
	body.single-product #reviews .commentlist {
		column-count: 1;
	}
}
