/* ============================================
   WooCommerce Testimonials Widget Styles
   ============================================ */

.wc-testimonials-wrapper {
	position: relative;
	width: 100%;
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

/* ============================================
   Testimonial Container
   ============================================ */

.wc-testimonials-slider {
	position: relative;
	width: 100%;
	overflow: visible;
}

.testimonial {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.testimonial-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
	padding: 30px !important;
	border-radius: 24px !important;
	background-color: #fffdf8 !important;
	border: 1px solid rgba(123, 128, 109, 0.14) !important;
	transition: box-shadow .5s ease, transform .35s ease !important;
	box-sizing: border-box;
}

.testimon-style-boxed .testimonial:hover .testimonial-inner {
	box-shadow: 0 18px 45px rgba(95, 99, 86, 0.11) !important;
	transform: translateY(-3px) !important;
}

/* ============================================
   Avatar Styles
   ============================================ */

.testimonial-avatar {
	display: inline-block !important;
	margin-bottom: 15px !important;
}

.testimonial-avatar img {
	min-width: 60px !important;
	max-width: 100px !important;
	height: auto !important;
	border-radius: 50% !important;
	border: 2px solid #fffdf8 !important;
	box-shadow: 0 4px 12px rgba(95, 99, 86, 0.12) !important;
	display: block !important;
}

/* ============================================
   Rating Stars
   ============================================ */

.testimonial-rating {
	display: none !important;
	margin-bottom: 10px !important;
	color: #d6a84d !important;
	font-size: 14px !important;
}

.testimon-with-rating .testimonial-rating {
	display: block !important;
	color: #d6a84d !important;
}

.testimonial-rating,
.testimonial-rating span,
.testimonial-rating:before,
.testimonial-rating span:before {
	color: #d6a84d !important;
}

/* ============================================
   Content Styles
   ============================================ */

.testimonial-content {
	color: #5f6356 !important;
	flex: 1 1 auto;
	display: flex !important;
	flex-direction: column;
	opacity: 1 !important;
	visibility: visible !important;
	min-height: 1px;
	min-width: 0; /* flex öğelerinin metni sarmalayabilmesi (wrap) için kritik - yoksa metin taşar */
	width: 100%;
	overflow-wrap: break-word;
	word-break: break-word;
}

.testimonial-content p {
	color: rgba(95, 99, 86, 0.82) !important;
	font-size: 15px !important;
	line-height: 1.6 !important;
	margin: 12px 0 !important;
	flex: 1 1 auto;
	opacity: 1 !important;
	visibility: visible !important;
	display: block !important;
	min-height: 1px;
	min-width: 0;
	overflow-wrap: break-word;
	word-break: break-word;
}

.testimonial-content footer {
	margin-top: auto !important;
	margin-top: 15px !important;
	color: #3f4138 !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	opacity: 1 !important;
	visibility: visible !important;
	display: block !important;
}

.testimonial-content footer strong {
	display: block !important;
	margin-bottom: 4px !important;
	opacity: 1 !important;
	visibility: visible !important;
}

.testimonial-content footer > span {
	color: rgba(95, 99, 86, 0.55) !important;
	font-weight: 400 !important;
	display: block !important;
	font-size: 13px !important;
	opacity: 1 !important;
	visibility: visible !important;
}

/* Avatar: mobil taraf\u0131c\u0131lardaki flex-collapse / animasyon kal\u0131nt\u0131s\u0131 sorunlar\u0131na kar\u015f\u0131 koruma */
.testimonial-avatar {
	opacity: 1 !important;
	visibility: visible !important;
	flex-shrink: 0;
}

.testimonial-avatar img {
	opacity: 1 !important;
	visibility: visible !important;
}

/* Elementor giriş animasyonu (entrance animation) artıklarına karşı güvenlik önlemi:
   widget'a dışardan animasyon uygulanmış ve mobilde (scroll/intersection hesaplama
   sorunları yüzünden) hiç tetiklenmemişse içerik kalıcı gizli kalmasın */
.elementor-widget-wc_testimonials.elementor-invisible,
.elementor-widget-wc_testimonials .elementor-widget-container {
	opacity: 1 !important;
	visibility: visible !important;
	animation: none !important;
	transform: none !important;
}

/* ============================================
   Alignment Variants
   ============================================ */

.testimon-align-center .testimonial {
	text-align: center !important;
}

.testimon-align-center .testimonial-inner {
	align-items: center !important;
}

.testimon-align-center .testimonial-avatar {
	margin-bottom: 15px !important;
}

.testimon-align-left .testimonial {
	text-align: left !important;
}

.testimon-align-left .testimonial-inner {
	display: flex !important;
	flex-direction: row !important;
	align-items: flex-start !important;
}

.testimon-align-left .testimonial-avatar {
	flex: 0 0 auto !important;
	margin-right: 20px !important;
	margin-bottom: 0 !important;
}

.testimon-align-left .testimonial-content {
	flex: 1 1 auto !important;
}

.testimon-align-right .testimonial {
	text-align: right !important;
}

.testimon-align-right .testimonial-inner {
	display: flex !important;
	flex-direction: row-reverse !important;
	align-items: flex-start !important;
}

.testimon-align-right .testimonial-avatar {
	flex: 0 0 auto !important;
	margin-left: 20px !important;
	margin-bottom: 0 !important;
}

.testimon-align-right .testimonial-content {
	flex: 1 1 auto !important;
}

/* ============================================
   Swiper Navigation & Pagination
   ============================================ */

.swiper-button-prev,
.swiper-button-next {
	width: 50px !important;
	height: 50px !important;
	background-color: #f5f5f5 !important;
	border-radius: 50% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: all 0.3s ease !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	position: absolute !important;
	z-index: 10 !important;
	cursor: pointer !important;
	outline: none !important;
	border: none !important;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
	background-color: #d6a84d !important;
}

.swiper-button-prev::after,
.swiper-button-next::after {
	font-size: 18px !important;
	font-weight: bold !important;
	color: #3f4138 !important;
}

.swiper-button-prev:hover::after,
.swiper-button-next:hover::after {
	color: #fff !important;
}

.swiper-button-prev {
	left: 15px !important;
}

.swiper-button-next {
	right: 15px !important;
}

/* Pagination (sayfa göstergesi) */

.swiper-pagination {
	position: static !important;
	margin-top: 20px !important;
	display: flex !important;
	justify-content: center !important;
	gap: 8px !important;
}

.swiper-pagination-bullet {
	width: 10px !important;
	height: 10px !important;
	background-color: rgba(95, 99, 86, 0.3) !important;
	opacity: 1 !important;
	border-radius: 50% !important;
	transition: all 0.3s ease !important;
}

.swiper-pagination-bullet-active {
	background-color: #d6a84d !important;
	width: 24px !important;
	border-radius: 5px !important;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
	.testimonial-inner {
		padding: 20px !important;
	}

	.testimonial-avatar img {
		min-width: 50px !important;
		max-width: 80px !important;
	}

	.swiper-button-prev,
	.swiper-button-next {
		width: 40px !important;
		height: 40px !important;
	}

	.swiper-button-prev {
		left: 10px !important;
	}

	.swiper-button-next {
		right: 10px !important;
	}
}

/* Mobile */
@media (max-width: 480px) {
	.wc-testimonials-wrapper {
		padding: 0 10px;
	}

	.testimonial-inner {
		padding: 15px !important;
		border-radius: 16px !important;
	}

	.testimonial-avatar img {
		min-width: 45px !important;
		max-width: 70px !important;
	}

	.testimonial-content p {
		font-size: 13px !important;
	}

	.testimonial-content footer {
		font-size: 12px !important;
		margin-top: 10px !important;
	}

	.testimonial-content footer > span {
		font-size: 11px !important;
	}

	.swiper-button-prev,
	.swiper-button-next {
		display: none !important;
	}

	.testimon-align-left .testimonial-inner,
	.testimon-align-right .testimonial-inner {
		flex-direction: column !important;
	}

	.testimon-align-left .testimonial-avatar,
	.testimon-align-right .testimonial-avatar {
		margin-right: 0 !important;
		margin-left: 0 !important;
		margin-bottom: 12px !important;
	}

	.testimon-align-right .testimonial {
		text-align: center !important;
	}
}

/* ============================================
   No Comments State
   ============================================ */

.wc-testimonials-wrapper p {
	text-align: center;
	color: rgba(95, 99, 86, 0.55);
	padding: 30px 0;
	font-size: 14px;
}

/* Yatayda kırpma ZORUNLU (yoksa autoplay sırasında tüm kartlar aynı anda
   görünüp sağa doğru kayıyormuş gibi görünür). Dikeyde ise hover
   gölgesi/kaldırma efektinin kesilmemesi için taşmaya izin veriyoruz. */
.wc-testimonials-wrapper .swiper-wrapper {
	overflow-x: hidden !important;
	overflow-y: visible !important;
}

.wc-testimonials-wrapper .swiper {
	overflow-x: hidden !important;
	overflow-y: visible !important;
}

/* Slide container */
.wc-testimonials-slider .swiper-slide {
	height: auto;
	display: flex;
	align-items: stretch;
	min-width: 0;
}

.testimonial {
	width: 100%;
	min-width: 0;
}

.testimonial-inner {
	width: 100%;
}

/* ============================================
   Custom Star Rating (wc-testimonials-stars)
   ============================================ */

/* WooCommerce'in kendi rating HTML'ini tamamen gizle */
.testimonial-rating .star-rating,
.testimonial-rating .woocommerce-review-link {
	display: none !important;
}

/* Kendi yıldız bileşenimiz */
.wc-testimonials-stars {
	display: inline-flex !important;
	gap: 2px !important;
	font-size: 18px !important;
	line-height: 1 !important;
	margin-bottom: 2px !important;
}

.wc-testimonials-star {
	display: inline-block !important;
	color: #e0e0e0 !important;
	transition: color 0.15s ease !important;
}

.wc-testimonials-star--filled {
	color: #d6a84d !important;
}

.wc-testimonials-star--empty {
	color: rgba(214, 168, 77, 0.25) !important;
}

/* ============================================
   FOUC Prevention - Layout Shift Fix
   ============================================ */

/* Swiper başlatılana kadar kartları gizle */
.wc-testimonials-slider:not(.wc-swiper-ready) .swiper-wrapper {
	display: flex !important;
	overflow: hidden !important;
	height: 0 !important;
	opacity: 0 !important;
}

/* Swiper hazır olunca göster - animasyonla */
.wc-testimonials-slider.wc-swiper-ready .swiper-wrapper {
	height: auto !important;
	opacity: 1 !important;
	transition: opacity 0.3s ease !important;
}

/* ============================================
   Elementor Editor Mode
   ============================================ */

/* Editörde Swiper çalışmaz, kartları grid olarak göster */
.elementor-editor-active .wc-testimonials-slider .swiper-wrapper {
	display: flex !important;
	flex-wrap: wrap !important;
	height: auto !important;
	opacity: 1 !important;
	overflow: visible !important;
	transform: none !important;
}

.elementor-editor-active .wc-testimonials-slider .swiper-slide {
	width: calc(50% - 12px) !important;
	flex-shrink: 0 !important;
	margin-bottom: 20px !important;
}

.elementor-editor-active .wc-testimonials-slider .swiper-pagination,
.elementor-editor-active .wc-testimonials-slider .swiper-button-prev,
.elementor-editor-active .wc-testimonials-slider .swiper-button-next {
	display: none !important;
}

/* 1 sütun seçilmişse editörde tek kart göster */
.elementor-editor-active .wc-testimonials-slider[data-columns="1"] .swiper-slide {
	width: 100% !important;
}
