/* WP Fan-Out Product Slider - Perfect Mockup Match Theme */

.fanout-slider-wrapper {
	position: relative;
	width: 100%;
	background: var(--dm-bg, #ffffff);
	font-family: 'Inter', sans-serif;
	padding: 10px 0 0 0;
	overflow: hidden; 
	box-sizing: border-box;
}

.fanout-slider-wrapper * {
	box-sizing: border-box;
}

/* Header */
.fanout-slider-header {
	text-align: center;
	margin-bottom: 20px;
	padding: 0 20px;
}
.fanout-header-title {
	font-size: 2.2rem;
	font-weight: 700;
	color: var(--dm-text, #111);
	margin: 0 0 10px 0;
	letter-spacing: -0.5px;
}
.fanout-header-desc {
	font-size: 1.15rem;
	color: #666;
	margin: 0;
}

/* Main Stage - No Overlap, Matches Mockup exactly */
.fanout-main-stage {
	position: relative;
	width: 100%;
	height: 420px;
	margin-bottom: 20px;
	touch-action: pan-y pinch-zoom;
	cursor: -webkit-grab !important;
	cursor: grab !important;
}

.fanout-main-stage:active {
	cursor: -webkit-grabbing !important;
	cursor: grabbing !important;
}

.fanout-main-item {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 300px;
	height: 300px;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	opacity: 0; 
	display: flex;
	justify-content: center;
	align-items: center; 
}

.fanout-main-img {
	width: 100%;
	height: 100%;
	object-fit: contain; 
	display: block;
	transition: filter 0.4s ease;
	filter: drop-shadow(0 10px 20px rgba(0,0,0,0.05));
}

.fanout-main-item:not(.active-main) .fanout-main-img {
	filter: drop-shadow(0 5px 10px rgba(0,0,0,0.05));
	opacity: 0.9;
}

/* Navigation Arrows - Match mockup (circular dark/light) */
.fanout-nav {
	position: absolute;
	bottom: 20px;
	right: 40px;
	display: flex;
	gap: 10px;
	z-index: 200;
}

.fanout-prev, .fanout-next {
	background: #333;
	border: none;
	border-radius: 50%;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #fff;
	font-size: 1.1rem;
	font-weight: normal;
	transition: all 0.2s ease;
	pointer-events: auto !important;
}

.fanout-prev:hover, .fanout-next:hover {
	background: #111;
}

/* Thumbnails Tier - Square, Flush, Small */
.fanout-thumbnails-tier {
	width: 100%;
	background: #fff;
	padding: 0;
	border-top: 1px solid #eaeaea; /* Light separator line like mockup */
}

.fanout-thumbnails-container {
	display: flex;
	gap: 0; 
	overflow-x: auto;
	scrollbar-width: none;
	cursor: -webkit-grab !important;
	cursor: grab !important;
}
.fanout-thumbnails-container:active {
	cursor: -webkit-grabbing !important;
	cursor: grabbing !important;
}
.fanout-thumbnails-container::-webkit-scrollbar {
	display: none; 
}

.fanout-thumb-item {
	width: 100px; /* Much smaller to match mockup squares */
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	text-decoration: none;
	border-right: 1px solid #eaeaea;
	opacity: 0.7;
	transition: opacity 0.3s ease;
}

.fanout-thumb-item.active, .fanout-thumb-item:hover {
	opacity: 1;
}

.fanout-thumb-img-wrap {
	width: 100%;
	height: 100px; /* Perfect square */
	background: #f7f7f7;
	overflow: hidden;
}

.fanout-thumb-img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover; 
	object-position: top;
}

.fanout-thumb-info {
	background: #fff;
	padding: 10px 12px;
	display: flex;
	flex-direction: column; /* Match mockup text placement */
	align-items: flex-start;
	gap: 4px;
	font-size: 0.8rem;
	color: #333;
	border-bottom: 2px solid transparent;
}

.fanout-thumb-item.active .fanout-thumb-info {
	border-bottom-color: var(--dm-text, #333);
}

.fanout-thumb-price {
	font-weight: 700;
	color: #000;
}

.fanout-thumb-title {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	width: 100%;
	color: #666;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
	.fanout-main-stage {
		height: 400px;
	}
	.fanout-main-item {
		width: 220px;
		height: 220px;
	}
	.fanout-thumb-item {
		width:90px;
	}
	.fanout-thumb-img-wrap {
		height: 90px;
	}
	.fanout-nav {
		right: 20px;
	}
}

/* Dark Theme Support */
.dark-theme {
	background: #111 !important;
	--dm-text: #fff !important;
}
.dark-theme .fanout-thumbnails-tier {
	background: #111;
	border-top-color: #222;
}
.dark-theme .fanout-thumb-item {
	border-right-color: #222;
}
.dark-theme .fanout-thumb-img-wrap {
	background: #222;
}
.dark-theme .fanout-thumb-info {
	background: #111;
}
.dark-theme .fanout-thumb-price {
	color: #fff;
}
.dark-theme .fanout-thumb-title {
	color: #aaa;
}
.dark-theme .fanout-prev, .dark-theme .fanout-next {
	background: #eee;
	color: #000;
}
.dark-theme .fanout-prev:hover, .dark-theme .fanout-next:hover {
	background: #fff;
}
