/**
 * Corbycraft Custom Testimonial Carousel Styles
 * - Square product images instead of circular
 * - Uniform content height with expandable text
 */

/* Force square aspect ratio for product images */
.corby-square-image {
	--gz-ratio-percent: 100% !important; /* Square aspect ratio */
	--gz-image-rounded: 4px !important; /* Small border radius, not circular */
}

.corby-square-image img {
	object-fit: contain !important; /* Fit entire image without cropping */
	width: 100%;
	height: 100%;
}

/* Disable hover zoom effect on product images */
.corby-square-image img {
	transform: none !important;
	transition: none !important;
}

/* Hide second image used for hover effect */
.corby-square-image .product-thumbnails--fadein-image {
	display: none !important;
}

/* Expandable content with uniform height */
.corby-expandable-content {
	position: relative;
}

.corby-expandable-content .corby-content-text {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.corby-expandable-content:not(.expanded) .corby-content-text {
	-webkit-line-clamp: var(--corby-max-lines, 2);
}

.corby-expandable-content.expanded .corby-content-text {
	-webkit-line-clamp: unset;
	max-height: none;
}

.corby-see-more-link {
	display: inline-block;
	margin-top: 8px;
	font-size: 0.875em;
	cursor: pointer;
	text-decoration: underline;
	color: var(--gz-primary-color, #0073aa);
	font-weight: 500;
}

.corby-see-more-link:hover {
	color: var(--gz-primary-hover-color, #005a87);
	text-decoration: none;
}

.corby-see-more-link:focus {
	outline: 2px solid var(--gz-primary-color, #0073aa);
	outline-offset: 2px;
}

/* Hide see more link when content is not truncated */
.corby-expandable-content:not(.has-overflow) .corby-see-more-link {
	display: none;
}

/* Ensure all carousel items have equal height */
.glozin-testimonial-carousel .swiper-wrapper {
	align-items: stretch;
}

.glozin-testimonial-carousel__item {
	display: flex;
	flex-direction: column;
	height: auto;
}

.glozin-testimonial-carousel__summary {
	flex: 1;
	display: flex;
	flex-direction: column;
}

/* Push product info to bottom */
.glozin-testimonial-carousel__product {
	margin-top: auto !important;
}

/* Smooth transitions for expand/collapse */
.corby-expandable-content.transitioning {
	overflow: hidden;
}

/* Mobile adjustments */
@media (max-width: 767px) {
	.corby-square-image {
		width: 50px;
		height: 50px;
	}
}

/* Tablet and up */
@media (min-width: 768px) {
	.corby-square-image {
		width: 60px;
		height: 60px;
	}
}
