
.custom-product-reviews-summary-wrapper {
	width: 100%;
	box-sizing: border-box;
}

/* ============================================
   Global Alignment Inheritance
   ============================================ */

/* Left Alignment */
.elementor-reviews-align-left .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-box,
.elementor-reviews-align-left .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-title,
.elementor-reviews-align-left .custom-product-reviews-summary-title,
.elementor-reviews-align-left .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-rating-number,
.elementor-reviews-align-left .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-stars,
.elementor-reviews-align-left .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-count,
.elementor-reviews-align-left .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-buttons {
	text-align: left;
	align-items: flex-start;
	justify-content: flex-start;
}

.elementor-reviews-align-left .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-buttons {
	justify-content: flex-start;
}

.elementor-reviews-align-left .custom-product-reviews-summary-wrapper .custom-product-reviews-panel.custom-horizontal-layout {
	justify-content: flex-start;
}

/* Center Alignment */
.elementor-reviews-align-center .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-box,
.elementor-reviews-align-center .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-title,
.elementor-reviews-align-center .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-rating-number,
.elementor-reviews-align-center .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-stars,
.elementor-reviews-align-center .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-count,
.elementor-reviews-align-center .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-buttons {
	text-align: center;
	align-items: center;
	justify-content: center;
}

.elementor-reviews-align-center .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-buttons {
	justify-content: center;
}

.elementor-reviews-align-center .custom-product-reviews-summary-wrapper .custom-product-reviews-panel.custom-horizontal-layout {
	justify-content: center;
}

/* Right Alignment */
.elementor-reviews-align-right .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-box,
.elementor-reviews-align-right .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-title,
.elementor-reviews-align-right .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-rating-number,
.elementor-reviews-align-right .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-stars,
.elementor-reviews-align-right .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-count,
.elementor-reviews-align-right .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-buttons {
	text-align: right;
	align-items: flex-end;
	justify-content: flex-end;
}

.elementor-reviews-align-right .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-buttons {
	justify-content: flex-end;
}

.elementor-reviews-align-right .custom-product-reviews-summary-wrapper .custom-product-reviews-panel.custom-horizontal-layout {
	justify-content: flex-end;
}

/* Responsive alignment inheritance - Tablet */
@media (max-width: 1024px) {
	.elementor-reviews-align-left-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-box,
	.elementor-reviews-align-left-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-title,
	.elementor-reviews-align-left-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-rating-number,
	.elementor-reviews-align-left-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-stars,
	.elementor-reviews-align-left-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-count,
	.elementor-reviews-align-left-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-buttons {
		text-align: left;
		align-items: flex-start;
		justify-content: flex-start;
	}

	.elementor-reviews-align-center-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-box,
	.elementor-reviews-align-center-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-title,
	.elementor-reviews-align-center-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-rating-number,
	.elementor-reviews-align-center-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-stars,
	.elementor-reviews-align-center-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-count,
	.elementor-reviews-align-center-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-buttons {
		text-align: center;
		align-items: center;
		justify-content: center;
	}

	.elementor-reviews-align-right-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-box,
	.elementor-reviews-align-right-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-title,
	.elementor-reviews-align-right-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-rating-number,
	.elementor-reviews-align-right-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-stars,
	.elementor-reviews-align-right-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-count,
	.elementor-reviews-align-right-tablet .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-buttons {
		text-align: right;
		align-items: flex-end;
		justify-content: flex-end;
	}
}

/* Responsive alignment inheritance - Mobile */
@media (max-width: 767px) {
	.elementor-reviews-align-left-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-box,
	.elementor-reviews-align-left-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-title,
	.elementor-reviews-align-left-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-rating-number,
	.elementor-reviews-align-left-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-stars,
	.elementor-reviews-align-left-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-count,
	.elementor-reviews-align-left-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-buttons {
		text-align: left;
		align-items: flex-start;
		justify-content: flex-start;
	}

	.elementor-reviews-align-center-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-box,
	.elementor-reviews-align-center-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-title,
	.elementor-reviews-align-center-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-rating-number,
	.elementor-reviews-align-center-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-stars,
	.elementor-reviews-align-center-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-count,
	.elementor-reviews-align-center-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-buttons {
		text-align: center;
		align-items: center;
		justify-content: center;
	}

	.elementor-reviews-align-right-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-box,
	.elementor-reviews-align-right-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-title,
	.elementor-reviews-align-right-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-rating-number,
	.elementor-reviews-align-right-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-stars,
	.elementor-reviews-align-right-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-count,
	.elementor-reviews-align-right-mobile .custom-product-reviews-summary-wrapper .custom-product-reviews-summary-buttons {
		text-align: right;
		align-items: flex-end;
		justify-content: flex-end;
	}
}

.custom-product-reviews-summary-container {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
	transition: all 300ms ease;
}

@media (min-width: 768px) {
	.custom-product-reviews-summary-container {
		flex-direction: row;
		align-items: flex-start;
		justify-content: center;
	}

	/* Active state: two-column layout */
	.custom-product-reviews-summary-container.reviews-active {
		justify-content: flex-start;
		align-items: flex-start;
	}
}

/* Summary Box */
.custom-product-reviews-summary-box {
	display: flex;
	flex-direction: column;
	gap: 15px;
	width: 100%;
	box-sizing: border-box;
	transition: width 300ms ease, max-width 300ms ease;
	align-items: inherit;
}

@media (min-width: 768px) {
	.custom-product-reviews-summary-box {
		flex: 0 0 auto;
		width: 100%;
		max-width: 100%;
	}

	/* Active state: reduced width */
	.custom-product-reviews-summary-container.reviews-active .custom-product-reviews-summary-box {
		flex: 0 0 auto;
	}
}

/* Product Title */
.custom-product-reviews-summary-title {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
}

/* Rating Number */
.custom-product-reviews-summary-rating-number {
	font-size: 32px;
	font-weight: 700;
	line-height: 1;
}

/* Stars */
.custom-product-reviews-summary-stars {
	display: flex;
	align-items: center;
	justify-content: inherit;
}

.custom-product-reviews-summary-stars .star-rating {
	display: inline-block;
	position: relative;
	font-family: star, "WooCommerce", sans-serif;
	font-size: 1.2em;
	line-height: 1;
	overflow: hidden;
	white-space: nowrap;
	vertical-align: middle;
	width: 5.4em;
	height: 1em;
}

.custom-product-reviews-summary-stars .star-rating:before {
	content: "\73\73\73\73\73";
	color: #CCCCCC;
	letter-spacing: 0.1em;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.custom-product-reviews-summary-stars .star-rating span {
	overflow: hidden;
	float: left;
	top: 0;
	left: 0;
	position: absolute;
	padding-top: 1.5em;
	height: 0;
}

.custom-product-reviews-summary-stars .star-rating span:before {
	content: "\53\53\53\53\53";
	top: 0;
	position: absolute;
	left: 0;
	color: #08AC0A !important;
	letter-spacing: 0.1em;
	width: 100%;
	height: 100%;
}

/* Review Count */
.custom-product-reviews-summary-count {
	font-size: 16px;
	line-height: 1.4;
}

/* Buttons Container */
.custom-product-reviews-summary-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 10px;
	align-items: inherit;
	justify-content: inherit;
}

@media (min-width: 480px) {
	.custom-product-reviews-summary-buttons {
		flex-direction: row;
	}
}

/* Buttons */
.custom-product-reviews-summary-button {
	display: inline-block;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	border: none;
	transition: all 0.3s ease;
	background-color: #000;
	color: #fff;
	border-radius: 4px;
	flex: 1;
	box-sizing: border-box;
}

.custom-product-reviews-summary-button:hover:not(:disabled) {
	opacity: 0.9 !important;
	transform: translateY(-1px) !important;
	cursor: pointer !important;
}

.custom-product-reviews-summary-button:active {
	transform: translateY(0);
}

/* Reviews Panel - Default State (Hidden) */
.custom-product-reviews-panel {
	box-sizing: border-box;
	opacity: 0;
	max-height: 0;
	overflow: hidden;
	transition: opacity 300ms ease, max-height 300ms ease, margin 300ms ease, width 300ms ease;
	margin: 0;
	display: none;
	/* Width controlled via Elementor - no hard-coded width */
	/* Height controlled via Elementor - no hard-coded height */
}

/* Active state: panel visible */
.custom-product-reviews-summary-container.reviews-active .custom-product-reviews-panel {
	opacity: 1;
	max-height: none;
	margin: 0;
	display: flex;
	/* Width and max-width controlled via Elementor controls */
	/* Height: auto or controlled via Elementor - NO fixed height */
	/* CRITICAL: DO NOT use overflow: hidden here - it clips content */
	/* Overflow will be set by scrolling classes (.enable-scrolling) only */
	overflow: visible; /* Allow content to be visible - scrolling classes will control overflow */
	box-sizing: border-box; /* Include padding/border in dimensions */
	/* CRITICAL: Ensure first card is visible - no left padding/margin that hides it */
	/* Note: Padding can be set via Elementor, but left padding should be minimal */
	/* Content starts from beginning - no hidden content at start */
	/* First card must be fully visible and scrollable */
}

@media (min-width: 768px) {
	.custom-product-reviews-panel {
		flex: 0 0 0;
		min-width: 0;
		width: 0;
		overflow: hidden;
	}

	/* Active state: panel uses auto width by default, or Elementor width control */
	.custom-product-reviews-summary-container.reviews-active .custom-product-reviews-panel {
		/* Width controlled by Elementor - no hard-coded fixed width */
		/* User sets width via Elementor width control */
		flex: 0 0 auto; /* Don't grow - use width from Elementor or auto */
		min-width: 300px; /* Default minimum width for safety */
		max-width: none; /* No max-width restriction - let Elementor control it */
		width: auto; /* Auto width - Elementor control will override if set */
		height: auto !important; /* CRITICAL: NO fixed height - let content determine height */
		min-height: auto !important; /* No min-height restriction */
		max-height: none !important; /* No max-height restriction */
		margin-left: 20px;
		display: flex;
		position: relative;
		/* CRITICAL: DO NOT clip content - overflow controlled by scrolling classes only */
		overflow: visible; /* Allow content to be visible - scrolling classes will control overflow */
		/* Width can be changed via Elementor control */
		/* Height: auto - NO fixed height that causes clipping */
		/* NO hard-coded width/height that causes clipping */
	}

	/* When width is explicitly set via Elementor, use that value */
	.custom-product-reviews-summary-container.reviews-active .custom-product-reviews-panel[style*="width"] {
		flex: 0 0 auto; /* Don't grow/shrink when width is explicitly set */
		/* Elementor width will override default width */
	}

	/* Horizontal layout on desktop - ensure scrolling works */
	.custom-product-reviews-summary-container.reviews-active .custom-product-reviews-panel.custom-horizontal-layout.enable-scrolling {
		overflow-x: auto !important; /* Force horizontal scroll when content exceeds */
		overflow-y: visible !important; /* CRITICAL: Allow vertical overflow so all cards are visible */
		height: auto !important; /* CRITICAL: NO fixed height - let content determine height */
		min-height: auto !important; /* No min-height restriction */
		max-height: none !important; /* No max-height restriction */
		/* CRITICAL: Content must stay within panel borders horizontally, but can expand vertically */
		/* CRITICAL: Ensure first card is visible and scrollable */
		scroll-padding-left: 0 !important; /* No padding that hides first card */
		scroll-padding-right: 0 !important;
		/* Width: Auto or controlled by Elementor - NO hard-coded width */
		/* Height: auto - NO fixed height that causes clipping */
		/* Cards MUST scroll horizontally when they exceed width */
		/* Cards MUST NOT overflow outside panel borders horizontally */
		/* Cards CAN expand vertically to show full content */
		/* First card MUST be fully visible and scrollable from position 0 */
	}

	/* Vertical layout on desktop - ensure scrolling works */
	.custom-product-reviews-summary-container.reviews-active .custom-product-reviews-panel.custom-vertical-layout.enable-scrolling {
		overflow-x: hidden;
		overflow-y: auto;
		/* Width controlled via Elementor */
		/* Height controlled via Elementor - enables scrolling when content exceeds */
	}

	/* Disable scrolling - show all content */
	.custom-product-reviews-summary-container.reviews-active .custom-product-reviews-panel.disable-scrolling {
		overflow: visible;
		flex-wrap: wrap; /* Allow wrapping if needed */
		/* No height constraint - show all content */
	}

	/* Ensure all cards are visible in horizontal layout */
	.custom-product-reviews-panel.custom-horizontal-layout .custom-product-review-card {
		flex: 0 0 auto !important; /* Prevent shrinking - CRITICAL */
		flex-shrink: 0 !important; /* Never shrink cards - CRITICAL */
		flex-grow: 0 !important; /* Never grow cards - maintain natural width */
		margin-left: 0 !important; /* CRITICAL: First card starts at left edge */
		margin-right: 0; /* Gap controlled via gap property */
		/* min-width controlled via Elementor */
		max-width: none; /* Cards can be wider than panel - enables horizontal scroll */
		width: auto; /* Let content determine width */
		min-width: 250px; /* Safe minimum width to prevent cards from being too small */
		overflow: visible; /* CRITICAL: Allow card content to be fully visible - no clipping */
		display: flex; /* Use flex for proper layout */
		box-sizing: border-box; /* Include padding/border in width calculation */
		position: relative; /* Ensure proper positioning */
		/* Cards can exceed panel width - panel will scroll horizontally */
		/* First card must be fully visible and scrollable from the start */
	}
	
	/* CRITICAL: Ensure first card is always visible and scrollable */
	.custom-product-reviews-panel.custom-horizontal-layout .custom-product-review-card:first-child {
		margin-left: 0 !important; /* First card must start at left edge */
		position: relative !important; /* Ensure proper positioning */
		left: 0 !important; /* Ensure no negative positioning */
		transform: translateX(0) !important; /* Ensure no transform that moves it */
		/* First card must be fully visible from scroll position 0 */
	}
	
	/* CRITICAL: Ensure panel itself doesn't cause positioning issues */
	.custom-product-reviews-panel.custom-horizontal-layout {
		position: relative !important; /* Ensure proper positioning */
		left: 0 !important; /* No negative positioning */
		transform: translateX(0) !important; /* No transform */
	}
	
	/* CRITICAL: Override left padding for horizontal layout to ensure first card is visible */
	.custom-product-reviews-panel.custom-horizontal-layout.enable-scrolling {
		padding-left: 0 !important; /* Remove left padding that hides first card */
		/* Top/Bottom/Right padding can remain if set via Elementor */
	}
}

/* Horizontal Layout */
.custom-product-reviews-panel.custom-horizontal-layout {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap; /* CRITICAL: Prevent cards from wrapping - they must scroll horizontally */
	align-items: flex-start; /* Align cards to top */
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	position: relative;
	/* CRITICAL: Contain all content within panel borders */
	box-sizing: border-box; /* Include padding/border in width calculation */
	/* CRITICAL: Ensure first card starts at left edge - no negative positioning */
	/* Note: Padding can be set via Elementor, but should not hide first card */
	/* Content starts from beginning - scroll position at 0 */
	/* First card must be fully visible from the start */
}

/* Enable Scrolling */
.custom-product-reviews-panel.enable-scrolling.custom-horizontal-layout {
	overflow-x: auto !important; /* Force horizontal scroll when content exceeds */
	overflow-y: visible !important; /* CRITICAL: Allow vertical overflow so all cards are visible */
	height: auto !important; /* CRITICAL: NO fixed height - let content determine height */
	min-height: auto !important; /* No min-height restriction */
	max-height: none !important; /* No max-height restriction */
	/* CRITICAL: All content must stay within panel borders horizontally */
	/* CRITICAL: Content can expand vertically to show full card content */
	/* CRITICAL: Ensure scroll starts at position 0 (beginning) */
	scroll-padding-left: 0 !important; /* No scroll padding that hides first card */
	scroll-padding-right: 0 !important;
	scroll-snap-type: none; /* Disable snap that might cause positioning issues */
	/* CRITICAL: Override left padding that might hide first card */
	/* Note: Top/Bottom/Right padding OK, but left padding should be 0 for horizontal layout */
	/* Width: Auto or controlled by Elementor - NO hard-coded fixed width */
	/* Height: auto - NO fixed height that causes clipping */
	/* When content exceeds width, horizontal scroll MUST appear */
	/* Cards must NOT overflow outside panel borders horizontally */
	/* Cards CAN expand vertically to show full content */
	/* First card must be fully visible and scrollable from position 0 */
	box-sizing: border-box; /* Include padding/border in dimensions */
	/* CRITICAL: First card must start at scroll position 0 */
}

.custom-product-reviews-panel.enable-scrolling.custom-vertical-layout {
	overflow-x: hidden;
	overflow-y: auto;
	/* Width controlled via Elementor */
	/* Height controlled via Elementor */
	/* When content exceeds height, vertical scroll appears */
}

/* Disable Scrolling - Show all content */
.custom-product-reviews-panel.disable-scrolling {
	overflow: visible !important;
}

.custom-product-reviews-panel.disable-scrolling.custom-horizontal-layout {
	flex-wrap: wrap;
}

/* Vertical Layout */
.custom-product-reviews-panel.custom-vertical-layout {
	display: flex;
	flex-direction: column;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	/* Width controlled via Elementor - no hard-coded width */
	/* Height controlled via Elementor - enables scrolling when set */
	/* Cards stack vertically and scroll when content exceeds height */
}

/* Scrollbar Styling - Default (Visible) */
.custom-product-reviews-panel.custom-horizontal-layout {
	scrollbar-width: thin;
	scrollbar-color: #ccc transparent;
}

.custom-product-reviews-panel.custom-horizontal-layout::-webkit-scrollbar {
	height: 8px;
}

.custom-product-reviews-panel.custom-horizontal-layout::-webkit-scrollbar-track {
	background: transparent;
}

.custom-product-reviews-panel.custom-horizontal-layout::-webkit-scrollbar-thumb {
	background-color: #ccc;
	border-radius: 4px;
}

.custom-product-reviews-panel.custom-horizontal-layout::-webkit-scrollbar-thumb:hover {
	background-color: #999;
}

.custom-product-reviews-panel.custom-vertical-layout {
	scrollbar-width: thin;
	scrollbar-color: #ccc transparent;
}

.custom-product-reviews-panel.custom-vertical-layout::-webkit-scrollbar {
	width: 8px;
}

.custom-product-reviews-panel.custom-vertical-layout::-webkit-scrollbar-track {
	background: transparent;
}

.custom-product-reviews-panel.custom-vertical-layout::-webkit-scrollbar-thumb {
	background-color: #ccc;
	border-radius: 4px;
}

.custom-product-reviews-panel.custom-vertical-layout::-webkit-scrollbar-thumb:hover {
	background-color: #999;
}

/* Hide Scrollbar - Chrome, Safari, Edge */
.custom-product-reviews-panel.hide-scrollbar::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

/* Hide Scrollbar - Firefox */
.custom-product-reviews-panel.hide-scrollbar {
	scrollbar-width: none;
	-ms-overflow-style: none; /* IE and Edge */
}

/* Review Card */
.custom-product-review-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px;
	background-color: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	box-sizing: border-box;
	flex-shrink: 0 !important; /* CRITICAL: Never shrink cards */
	flex-grow: 0 !important; /* CRITICAL: Never grow cards */
	overflow: hidden; /* Contain card's internal content within card borders */
	position: relative; /* Ensure proper stacking */
	word-wrap: break-word; /* Prevent text from overflowing */
	overflow-wrap: break-word; /* Prevent long words from overflowing */
	height: auto; /* CRITICAL: NO fixed height - let content determine height */
	min-height: auto; /* No min-height restriction */
	max-height: none; /* No max-height restriction */
	/* Width controlled per layout type */
	/* Height: auto - cards can be as tall as content needs */
	/* Card content contained within card, but card itself can expand vertically */
}

/* Vertical layout cards */
.custom-product-reviews-panel.custom-vertical-layout .custom-product-review-card {
	margin-bottom: 0;
	width: 100%;
	max-width: 100%; /* Ensure cards don't exceed container */
	min-width: 0; /* Allow flex shrinking if needed */
	flex: 0 0 auto; /* Don't grow or shrink, maintain size */
	overflow: hidden; /* CRITICAL: Contain card content within card borders */
	word-wrap: break-word; /* Prevent text from overflowing */
	overflow-wrap: break-word; /* Prevent long words from overflowing */
	/* Height: auto - cards can be as tall as content needs */
	/* Content must NOT overflow outside card borders */
}

/* Horizontal layout cards - Global (outside media query) */
.custom-product-reviews-panel.custom-horizontal-layout .custom-product-review-card {
	margin-bottom: 0;
	margin-left: 0 !important; /* CRITICAL: First card starts at left edge - no left margin */
	margin-right: 0; /* Gap controlled via gap property, not margin */
	flex: 0 0 auto !important; /* Prevent shrinking - CRITICAL */
	flex-shrink: 0 !important; /* Never shrink cards - CRITICAL */
	flex-grow: 0 !important; /* Never grow cards - maintain natural width */
	/* min-width controlled via Elementor */
	max-width: none; /* Cards can be wider than panel - enables horizontal scroll */
	width: auto; /* Let content determine width */
	min-width: 250px; /* Safe minimum width to prevent cards from being too small */
		overflow: visible; /* CRITICAL: Allow card content to be fully visible - no clipping */
		word-wrap: break-word; /* Prevent text from overflowing */
		overflow-wrap: break-word; /* Prevent long words from overflowing */
	box-sizing: border-box; /* Include padding/border in width calculation */
	position: relative; /* Ensure proper positioning */
	/* CRITICAL: First card must start at position 0 (left edge) */
	/* First card must be fully visible and scrollable */
	/* Height: auto - cards can be as tall as content needs */
	/* Card content must NOT overflow outside card borders */
	/* Cards can exceed panel width - panel will scroll horizontally */
}

/* CRITICAL: Ensure first card is always visible and scrollable */
.custom-product-reviews-panel.custom-horizontal-layout .custom-product-review-card:first-child {
	margin-left: 0 !important; /* First card must start at left edge */
	position: relative; /* Ensure proper positioning */
	left: 0 !important; /* Ensure no negative positioning */
	transform: translateX(0) !important; /* Ensure no transform that moves it */
}

/* Fallback for old class name (backward compatibility) */
.custom-product-reviews-panel:not(.custom-horizontal-layout):not(.custom-vertical-layout) .custom-product-review-card {
	margin-bottom: 20px;
}

.custom-product-reviews-panel:not(.custom-horizontal-layout):not(.custom-vertical-layout) .custom-product-review-card:last-child {
	margin-bottom: 0;
}

/* Review Header */
.custom-product-review-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

/* Reviewer Name */
.custom-product-review-name {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
}

/* Review Date */
.custom-product-review-date {
	font-size: 14px;
	color: #666;
	line-height: 1.4;
}

/* Review Rating */
.custom-product-review-rating {
	margin: 5px 0;
}

.bg-star-colorset{
    color: #08AC0A !important;
}

.custom-product-review-rating .star-rating {
	display: inline-block;
	position: relative;
	font-family: star;
	font-size: 1em;
	line-height: 1;
	overflow: hidden;
	white-space: nowrap;
	vertical-align: middle;
}

.custom-product-review-rating .star-rating:before {
	content: "\73\73\73\73\73";
	color: #CCCCCC;
	letter-spacing: 0.1em;
}

.custom-product-review-rating .star-rating span {
	overflow: hidden;
	float: left;
	top: 0;
	left: 0;
	position: absolute;
	padding-top: 1.5em;
}

.custom-product-review-rating .star-rating span:before {
	content: "\53\53\53\53\53";
	top: 0;
	position: absolute;
	left: 0;
	color: #08AC0A !important;
	letter-spacing: 0.1em;
}

/* Review Text */
.custom-product-review-text {
	font-size: 15px;
	line-height: 1.6;
	color: #333;
	word-wrap: break-word; /* Prevent text from overflowing */
	overflow-wrap: break-word; /* Prevent long words from overflowing */
	overflow: visible; /* Allow text to wrap naturally - no clipping */
	/* Text wraps naturally within card */
}

.custom-product-review-text p {
	margin: 0 0 10px 0;
}

.custom-product-review-text p:last-child {
	margin-bottom: 0;
}

/* Empty State */
.custom-product-reviews-empty-state-text {
	font-size: 16px;
	line-height: 1.5;
	color: #666;
	text-align: center;
	padding: 20px 0;
}

/* Responsive Styles */
@media (max-width: 767px) {
	.custom-product-reviews-summary-box {
		min-width: 100%;
		max-width: 100%;
		width: 100% !important;
	}

	.custom-product-reviews-summary-title {
		font-size: 20px;
	}

	.custom-product-reviews-summary-rating-number {
		font-size: 28px;
	}

	.custom-product-review-card {
		padding: 15px;
	}

	.custom-product-review-header {
		flex-direction: column;
		align-items: flex-start;
	}

	/* Mobile: Always stack vertically, even in active state */
	.custom-product-reviews-summary-container.reviews-active {
		flex-direction: column;
	}

	.custom-product-reviews-summary-container.reviews-active .custom-product-reviews-summary-box {
		width: 100% !important;
	}

	.custom-product-reviews-summary-container.reviews-active .custom-product-reviews-panel {
		width: 100% !important;
		margin-left: 0 !important;
		margin-top: 20px;
	}

	/* Horizontal layout on mobile */
	.custom-product-reviews-panel.custom-horizontal-layout {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.custom-product-reviews-panel.custom-horizontal-layout .custom-product-review-card {
		min-width: 280px;
	}
}

/* ============================================
   Review Popup Styles
   ============================================ */

/* Popup Container */
.custom-product-review-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 20px;
	box-sizing: border-box;
}

/* Popup in Elementor Editor Mode */
.elementor-editor-active .custom-product-review-popup {
	position: relative;
	width: 100%;
	height: auto;
	min-height: 400px;
	margin-top: 20px;
	z-index: 1;
}

/* Overlay */
.custom-product-review-popup-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	cursor: pointer;
}

/* Popup Content */
.custom-product-review-popup-content {
	position: relative;
	background-color: #ffffff;
	width: 100%;
	max-width: 600px;
	border-radius: 8px;
	padding: 30px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	z-index: 1;
	max-height: 90vh;
	overflow-y: auto;
	box-sizing: border-box;
}

/* Close Icon */
.custom-product-review-popup-close {
	position: absolute;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 24px;
	line-height: 1;
	padding: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #333;
	transition: color 0.3s ease;
	z-index: 10;
}

.custom-product-review-popup-close:hover {
	color: #000;
	opacity: 0.8;
}

.custom-product-review-popup-close-top-right {
	top: 15px;
	right: 15px;
}

.custom-product-review-popup-close-top-left {
	top: 15px;
	left: 15px;
}

.custom-product-review-popup-close-bottom-right {
	bottom: 15px;
	right: 15px;
}

.custom-product-review-popup-close-bottom-left {
	bottom: 15px;
	left: 15px;
}

/* Popup Title */
.custom-product-review-popup-title {
	margin: 0 0 20px 0;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.3;
	color: #333;
}

/* Stars Wrapper */
.custom-product-review-popup-stars-wrapper {
	margin-bottom: 20px;
}

/* Stars Container */
.custom-product-review-popup-stars {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}

/* Star Item */
.custom-product-review-popup-stars .star-item {
	color: #CCCCCC;
	cursor: pointer;
	transition: color 0.2s ease, transform 0.2s ease;
	user-select: none;
	display: inline-block;
}

.custom-product-review-popup-stars .star-item:hover,
.custom-product-review-popup-stars .star-item.hover {
	color: #FFD700;
	transform: scale(1.1);
}

.custom-product-review-popup-stars .star-item.active {
	color: #08AC0A !important;
}

/* Form */
.custom-product-review-popup-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Textarea */
.custom-product-review-popup-textarea {
	width: 100%;
	min-height: 150px;
	padding: 15px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 15px;
	line-height: 1.6;
	font-family: inherit;
	resize: vertical;
	box-sizing: border-box;
	transition: border-color 0.3s ease, outline 0.3s ease;
}

.custom-product-review-popup-textarea:focus {
	outline: none;
	border-color: #0073aa;
}

.custom-product-review-popup-textarea::placeholder {
	color: #999;
}

/* Submit Button */
.custom-product-review-popup-submit {
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 500;
	text-align: center;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
	background-color: #000;
	color: #fff;
	display: inline-block;
	box-sizing: border-box;
}

.custom-product-review-popup-submit:hover:not(:disabled) {
	opacity: 0.9;
	transform: translateY(-1px);
}

.custom-product-review-popup-submit:active:not(:disabled) {
	transform: translateY(0);
}

.custom-product-review-popup-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Messages */
.custom-product-review-popup-message {
	padding: 12px 15px;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 10px;
}

.custom-product-review-popup-message.success {
	background-color: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.custom-product-review-popup-message.error {
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* Responsive Popup */
@media (max-width: 767px) {
	.custom-product-review-popup {
		padding: 10px;
	}

	.custom-product-review-popup-content {
		padding: 20px;
		max-height: 95vh;
	}

	.custom-product-review-popup-title {
		font-size: 20px;
		margin-bottom: 15px;
	}

	.custom-product-review-popup-stars {
		font-size: 24px;
	}

	.custom-product-review-popup-textarea {
		min-height: 120px;
		padding: 12px;
		font-size: 14px;
	}

	.custom-product-review-popup-submit {
		padding: 10px 20px;
		font-size: 14px;
		width: 100%;
	}
}

