/* ============================================
   Reviews — картки відгуків, повний текст,
   форма відгуку, фото, YouTube
   ============================================ */

/* Review Cards - Start */
.review-card {
	background: var(--light-gray);
	border-radius: var(--radius-small);
	padding: 20px;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	position: relative;
}

/* Шапка карточки отзыва */
.review-card .review-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 15px;
}

.review-card .review-meta {
	display: flex;
	align-items: flex-start;
	flex-direction: column-reverse;
	width: 100%;
	gap: 5px;
}
.review-card .review-author {
	display: block;
	font-family: var(--font-family-2);
	font-size: 18px;
	line-height: 22px;
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.review-card .review-date {
	position: absolute;
	bottom: 20px;
	right: 20px;
}

/* Информация о товаре в отзыве */
.review-card .review-product-info {
	margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid var(--border);
}

.review-card .product-link {
	display: inline-block;
	font-size: 14px;
	line-height: 20px;
	color: var(--primary);
	text-decoration: none;
	transition: all 0.3s ease;
}

.review-card .product-link:hover {
	text-decoration: underline;
}

/* Контент отзыва */
.review-card .review-content {
	display: flex;
	flex-direction: column;
	height: 100%;
}
.review-card .review-text {
	margin-bottom: 10px;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.review-card .read-more-review {
	display: inline-block;
	font-family: var(--font-family-2);
	font-size: 14px;
	line-height: 20px;
	text-decoration: none;
	font-weight: 500;
	margin-bottom: 10px;
	transition: all 0.3s ease;
}

/* Фотографии в карточке отзыва */
.review-card .review-photos {
	margin-top: auto;
}

.review-card .review-photos-grid {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.review-card .review-photo-thumb,
.review-youtube-thumb {
	position: relative;
	width: 50px;
	height: 50px;
	border-radius: var(--radius-small);
	overflow: hidden;
	cursor: pointer;
	transition: all 0.3s ease;
}

.review-card .review-photo-thumb:hover,
.review-youtube-thumb:hover {
	opacity: 0.8;
	transform: scale(1.05);
	border-color: var(--primary);
}

.review-card .review-photo-thumb img,
.review-card .review-youtube-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Рейтинг в карточке */
.review-card .star-rating {
	display: flex;
	gap: 3px;
	font-size: 20px;
	line-height: 20px;
}

.review-card .star {
	color: var(--border);
	cursor: default;
}

.review-card .star.filled {
	color: var(--gold);
}

/* Модификатор для больших звезд (страница товара) */
.review-card-slider .star-rating {
	font-size: 28px;
	line-height: 25px;
}

.review-card-slider .star.filled {
	color: var(--gold);
}

/* Модификаторы для разных контекстов */
.review-card.review-card-slider {
	height: 100%;
}

.review-card.review-card-slider .review-text {
	-webkit-line-clamp: 6;
}

.reviews-grid .review-card {
	width: calc(100% / 4 - var(--blocks-indent) * 3 / 4);
}


.review-card .read-more-review.expanded {
	color: var(--primary);
}

.review-card .review-text {
	transition: all 0.3s ease;
}

.review-card-slider .review-text.expanded {
	-webkit-line-clamp: unset;
	display: block;
}

/* YouTube видео в карточках отзывов */
.youtube-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 20px;
	height: 20px;
	pointer-events: none;
	transition: all 0.3s ease;
}
.youtube-play-icon svg {
	width: 20px;
	height: 20px;
}

.review-youtube-thumb:hover .youtube-play-icon {
	transform: translate(-50%, -50%) scale(1.1);
}

/* YouTube лайтбокс */
.youtube-video-lightbox .lightbox-section {
	padding: 0 !important;
}
.youtube-video-lightbox .lightbox-section .close-lightbox {
	background: rgb(255 255 255 / 50%);
	z-index: 10;
	transition: all 0.3s ease;
}
.youtube-video-lightbox .lightbox-section .close-lightbox:hover {
	background: rgb(255 255 255 / 100%);
}

.youtube-video-lightbox .youtube-lightbox-content {
	padding: 0;
	overflow: visible;
}

.youtube-video-container {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
	height: 0;
	overflow: hidden;
	border-radius: var(--radius-small);
	background: var(--black);
}

.youtube-video-container iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
	border-radius: var(--radius-small);
}

@media (max-width: 1279px) {
	.youtube-video-lightbox .lightbox-section {
		padding: 20px;
		width: 95%;
	}
}

/* YouTube видео в информере полного отзыва */
.review-full-youtube {
	margin-top: 25px;
	padding-top: 25px;
	border-top: 1px solid var(--gray);
}

.review-full-youtube-container {
	position: relative;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius-medium);
	overflow: hidden;
	background: var(--black);
}

.review-full-youtube-container iframe {
	width: 100%;
	height: 100%;
	border: none;
}

/* Форма - поле YouTube */
.youtube-upload-section {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.youtube-upload-label {
	display: block;
	font-family: var(--font-family-2);
	font-size: 14px;
	line-height: 20px;
	margin-bottom: 5px;
}

.youtube-input {
	width: 100%;
}

.youtube-info {
	font-size: 12px;
	line-height: 16px;
	color: var(--gray);
}

.youtube-preview-container {
	display: none;
	margin-top: 10px;
}

.youtube-preview-container.active {
	display: block;
}

.youtube-preview-item {
	position: relative;
	width: 100%;
	max-width: 100px;
	overflow: hidden;
	border-radius: var(--radius-small);
}

.youtube-preview-item img {
	width: 100%;
	height: auto;
	display: block;
}

.youtube-preview-remove {
	position: absolute;
	top: 5px;
	right: 5px;
	width: 20px;
	height: 20px;
	background: rgba(0, 0, 0, 0.7);
	border-radius: var(--radius-max);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.youtube-preview-remove:hover {
	background: rgba(0, 0, 0, 0.9);
	transform: scale(1.1);
}

.youtube-preview-remove::before,
.youtube-preview-remove::after {
	content: "";
	position: absolute;
	width: 9px;
	height: 1px;
	background: white;
}

.youtube-preview-remove::before {
	transform: rotate(45deg);
}

.youtube-preview-remove::after {
	transform: rotate(-45deg);
}

.youtube-preview-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 20px;
	height: 20px;
	pointer-events: none;
}
.youtube-preview-play-icon svg {
	width: 20px;
	height: 20px;
}

/* Review Cards Responsive */
@media (max-width: 1279px) {
	.youtube-lightbox-close {
		top: -40px;
		width: 35px;
		height: 35px;
	}

	.youtube-lightbox-close::before,
	.youtube-lightbox-close::after {
		width: 25px;
	}
}

@media (max-width: 1680px) {
	.reviews-grid .review-card {
		width: calc(100% / 3 - var(--blocks-indent) * 2 / 3);
		padding: 25px;
	}

	.review-card .review-author {
		font-size: 16px;
		line-height: 22px;
	}
}

@media (max-width: 1279px) {
	.reviews-grid .review-card {
		width: 100%;
		padding: 20px;
	}

	.review-card .review-header {
		margin-bottom: 15px;
	}

	.review-card .review-person {
		width: 40px;
		height: 40px;
		min-width: 40px;
	}

	.review-card .review-text {
		font-size: 14px;
		line-height: 22px;
		-webkit-line-clamp: 4;
	}

	.review-card .review-photos-grid {
		gap: 5px;
	}

	.review-card .review-photo-thumb,
	.review-youtube-thumb {
		width: 40px;
		height: 40px;
	}

	.review-card .star-rating {
		font-size: 18px;
	}
}
/* Review Cards - End */

/* Информер для полного текста отзыва - Start */

/* Шапка информера */
.review-full-header {
	display: flex;
	gap: 20px;
	margin-bottom: 25px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--gray);
}

.review-full-avatar {
	width: 60px;
	height: 60px;
	min-width: 60px;
	border-radius: var(--radius-max);
	overflow: hidden;
	background: var(--light-gray);
}

.review-full-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.review-full-meta {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.review-full-author {
	font-size: 20px;
	line-height: 26px;
	font-weight: 600;
}

.review-full-date {
	font-size: 14px;
	line-height: 20px;
}

/* Контент информера */
.review-full-content {
	font-size: 16px;
	line-height: 26px;
	max-height: 400px;
	overflow-y: auto;
	padding-right: 10px;
}
.review-full-rating {
	display: flex;
	gap: 3px;
	font-size: 22px;
	line-height: 22px;
}
.review-full-rating .star {
	color: var(--border);
}
.review-full-rating .star.filled {
	color: var(--gold);
}

/* Фотографии в информере */
.review-full-photos {
	margin-top: 25px;
	padding-top: 25px;
	border-top: 1px solid var(--gray);
}
.review-full-photos .review-photos-grid {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.review-full-photos .review-photo-thumb {
	width: 100px;
	height: 100px;
	border-radius: var(--radius-medium);
	overflow: hidden;
	cursor: pointer;
	transition: all 0.3s ease;
}

.review-full-photos .review-photo-thumb:hover {
	opacity: 0.9;
	transform: scale(1.05);
	border-color: var(--primary);
}

.review-full-photos .review-photo-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 1279px) {
	.review-full-header {
		display: flex;
		flex-direction: column;
		gap: 5px;
		margin-bottom: 20px;
		padding-bottom: 15px;
	}

	.review-full-avatar {
		width: 50px;
		height: 50px;
		min-width: 50px;
	}

	.review-full-author {
		font-size: 18px;
		line-height: 24px;
	}

	.review-full-content {
		font-size: 14px;
		line-height: 22px;
		margin-bottom: 0;
		max-height: calc(100dvh - 380px);
	}

	.review-full-rating {
		font-size: 20px;
	}

	.review-full-photos .review-photo-thumb {
		width: 50px;
		height: 50px;
	}
}
/* Информер для полного текста отзыва - End */

/* Форма отзыва (для лайтбокса) - Start */
.form-lightbox-wrapper.store-review-form .lightbox-section {
	max-width: 730px;
}

.form-lightbox-wrapper.store-review-form .form-head {
	margin-bottom: 30px;
	text-align: center;
}

.form-lightbox-wrapper.store-review-form .form-head .h2 {
	margin-bottom: 10px;
}

.form-lightbox-wrapper.store-review-form .form-head p {
	font-size: 16px;
	line-height: 24px;
	color: var(--gray);
}

/* Рейтинг в форме */
.rating-section {
	width: 220px !important;
	margin-bottom: 25px;
}

.rating-section label {
	display: block;
	font-family: var(--font-family-2);
	margin-bottom: 10px;
}

.stars-rating {
	display: flex;
	gap: 5px;
}

.stars-rating .star {
	font-size: 32px;
	color: var(--border);
	cursor: pointer;
	transition: all 0.3s ease;
}

.stars-rating .star:hover,
.stars-rating .star.active {
	color: var(--gold);
	transform: scale(1.1);
}

/* Загрузка фото в форме */
.photo-upload-section {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	margin-bottom: 25px;
}

.photo-upload-label {
	display: none;
	font-family: var(--font-family-2);
	margin-bottom: 10px;
}
.btn.photo-upload-btn {
	height: 35px;
	padding: 0 18px;
}

.photo-upload-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	margin-left: 50px;
}

#file-upload,
#store-review-photos,
#review-photos {
	display: none;
}

.photo-info {
	max-width: 170px;
	color: var(--gray);
}

/* Превью загруженных фото */
.photo-preview,
.photo-preview-container,
#photo-preview,
#store-photo-preview {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 15px;
}

.photo-preview-container,
#store-photo-preview {
	position: absolute;
	top: 60px;
	display: flex;
	justify-content: flex-end;
	min-width: 150px;
}

.photo-preview-item {
	position: relative;
	width: 78px;
	height: 78px;
	border-radius: var(--radius-small);
	overflow: hidden;
}

.photo-preview-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.photo-preview-item .remove-photo,
.photo-preview-item .photo-preview-remove {
	position: absolute;
	top: 5px;
	right: 5px;
	width: 24px;
	height: 24px;
	background: rgba(0, 0, 0, 0.7);
	border-radius: var(--radius-max);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
}

.photo-preview-item .remove-photo:hover,
.photo-preview-item .photo-preview-remove:hover {
	background: rgba(0, 0, 0, 0.9);
	transform: scale(1.1);
}

.photo-preview-item .remove-photo::before,
.photo-preview-item .remove-photo::after,
.photo-preview-item .photo-preview-remove::before,
.photo-preview-item .photo-preview-remove::after {
	content: "";
	position: absolute;
	width: 12px;
	height: 2px;
	background: white;
}

.photo-preview-item .remove-photo::before,
.photo-preview-item .photo-preview-remove::before {
	transform: rotate(45deg);
}

.photo-preview-item .remove-photo::after,
.photo-preview-item .photo-preview-remove::after {
	transform: rotate(-45deg);
}
.review-success-message {
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: center;
	text-align: center;
	max-width: 510px;
	margin: 30px auto;
}
@media (max-width: 1279px) {
	.photo-upload-wrapper {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
		margin-left: 0;
	}

	.photo-upload-btn {
		width: 100%;
		justify-content: center;
	}

	.photo-preview,
	.photo-preview-container,
	#photo-preview,
	#store-photo-preview {
		position: relative;
		top: 0;
		width: 100% !important;
		gap: 8px;
	}

	.photo-preview-item {
		width: 80px;
		height: 80px;
	}

	.photo-preview-item .remove-photo,
	.photo-preview-item .photo-preview-remove {
		width: 20px;
		height: 20px;
	}

	.photo-preview-item .remove-photo::before,
	.photo-preview-item .remove-photo::after,
	.photo-preview-item .photo-preview-remove::before,
	.photo-preview-item .photo-preview-remove::after {
		width: 10px;
	}
	.photo-upload-section {
		width: 100% !important;
		justify-content: flex-start;
		margin-bottom: 15px;
	}
}
/* Форма отзыва (для лайтбокса) - End */
