/* ==========================================================================
   Single idol page - Instagram Reels-style feed (the QR landing page)
   Vertical swipe/scroll = next idol. Horizontal swipe = that idol's gallery.
   ========================================================================== */

.ganapati-floating-whatsapp { display: none; } /* replaced by the per-slide WhatsApp action in the rail */

.ganapati-reels-shell {
	position: relative;
	height: calc(100vh - 68px);
	height: calc(100dvh - 68px);
	background: var(--color-ink);
	overflow: hidden;
}

.ganapati-reels {
	position: relative;
	height: 100%;
	overflow-y: scroll;
	scroll-snap-type: y mandatory;
	overscroll-behavior-y: contain;
	scrollbar-width: none;
}
.ganapati-reels::-webkit-scrollbar { display: none; }

.ganapati-reel-sentinel { height: 1px; }

.ganapati-reel-end {
	scroll-snap-align: start;
	height: 160px;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #C9BEA9;
	font-size: 14px;
	background: var(--color-ink);
}

/* ---------- One reel ---------- */

.ganapati-reel {
	position: relative;
	height: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	background: radial-gradient(120% 90% at 50% 34%, #3E3020 0%, #201811 60%, #140F0A 100%);
	overflow: hidden;
}

.ganapati-reel-carousel {
	position: absolute;
	inset: 0;
}

.ganapati-reel-track {
	display: flex;
	height: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	touch-action: pan-x pan-y;
	scrollbar-width: none;
}
.ganapati-reel-track::-webkit-scrollbar { display: none; }

.ganapati-reel-frame {
	flex: 0 0 100%;
	height: 100%;
	scroll-snap-align: start;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}
.ganapati-reel-frame img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	user-select: none;
}
.ganapati-reel-placeholder {
	font-size: 96px;
	opacity: 0.3;
}

.ganapati-reel-dots {
	position: absolute;
	top: 14px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 6px;
	z-index: 2;
}
.ganapati-reel-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.4);
	transition: background 0.2s ease, transform 0.2s ease;
}
.ganapati-reel-dot.is-active { background: #fff; transform: scale(1.2); }

.ganapati-reel .ganapati-tag {
	top: 16px;
	left: 16px;
	z-index: 2;
}

/* ---------- Ambient gold particles (style alternates per idol, id % 4) ---------- */

.ganapati-reel-particles {
	position: absolute;
	inset: 0;
	z-index: 1;
	overflow: hidden;
	pointer-events: none;
}

.ganapati-particle {
	position: absolute;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: #ffd477;
	box-shadow: 0 0 6px #ffd477, 0 0 14px #ff9800;
	opacity: 0;
}

.ganapati-particle:nth-child(1) { left: 8%;  top: 70%; animation-delay: 0s; }
.ganapati-particle:nth-child(2) { left: 15%; top: 18%; animation-delay: 0.7s; }
.ganapati-particle:nth-child(3) { left: 88%; top: 75%; animation-delay: 1.4s; }
.ganapati-particle:nth-child(4) { left: 92%; top: 20%; animation-delay: 2.1s; }
.ganapati-particle:nth-child(5) { left: 50%; top: 88%; animation-delay: 2.8s; }
.ganapati-particle:nth-child(6) { left: 30%; top: 8%;  animation-delay: 3.5s; }
.ganapati-particle:nth-child(7) { left: 70%; top: 10%; animation-delay: 4.2s; }
.ganapati-particle:nth-child(8) { left: 5%;  top: 45%; animation-delay: 4.9s; }

/* Style 1: Divine Float */
.ganapati-reel-particles.style-1 .ganapati-particle {
	animation: ganapati-divine-float 5s ease-in-out infinite;
}
@keyframes ganapati-divine-float {
	0%   { transform: translate(0, 45px) scale(0.3); opacity: 0; }
	20%  { opacity: 0.8; }
	50%  { transform: translate(20px, -20px) scale(1); opacity: 1; }
	80%  { opacity: 0.5; }
	100% { transform: translate(-15px, -130px) scale(0.2); opacity: 0; }
}

/* Style 2: Firefly */
.ganapati-reel-particles.style-2 .ganapati-particle {
	width: 5px;
	height: 5px;
	background: #fff2b0;
	box-shadow: 0 0 5px #ffd166, 0 0 15px #ff9d00, 0 0 25px rgba(255, 157, 0, 0.6);
	animation: ganapati-firefly 4s ease-in-out infinite;
}
@keyframes ganapati-firefly {
	0%   { transform: scale(0); opacity: 0; }
	25%  { transform: scale(0.7); opacity: 0.5; }
	50%  { transform: scale(1.5); opacity: 1; }
	70%  { transform: scale(0.8); opacity: 0.6; }
	100% { transform: scale(0); opacity: 0; }
}

/* Style 3: Orbit */
.ganapati-reel-particles.style-3 .ganapati-particle {
	left: 50% !important;
	top: 50% !important;
	animation: ganapati-orbit 8s linear infinite;
}
@keyframes ganapati-orbit {
	from { transform: rotate(0deg) translateX(32vmin) rotate(0deg); opacity: 0.2; }
	50%  { opacity: 1; }
	to   { transform: rotate(360deg) translateX(32vmin) rotate(-360deg); opacity: 0.2; }
}

/* Style 4: Rising Sacred Sparks */
.ganapati-reel-particles.style-4 .ganapati-particle {
	width: 3px;
	height: 3px;
	background: #fff4c2;
	box-shadow: 0 0 5px #ffd166, 0 0 12px #ff9800;
	animation: ganapati-sacred-spark 6s ease-in-out infinite;
}
@keyframes ganapati-sacred-spark {
	0%   { transform: translate(0, 120px) scale(0); opacity: 0; }
	15%  { opacity: 1; transform: translate(-5px, 80px) scale(0.7); }
	35%  { transform: translate(15px, 30px) scale(1); opacity: 0.9; }
	55%  { transform: translate(-10px, -30px) scale(0.7); opacity: 0.8; }
	75%  { transform: translate(20px, -90px) scale(0.5); opacity: 0.5; }
	100% { transform: translate(-5px, -160px) scale(0); opacity: 0; }
}

.ganapati-reel-heart-burst {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.4);
	font-size: 110px;
	color: #fff;
	text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
	opacity: 0;
	pointer-events: none;
	z-index: 3;
}
.ganapati-reel-heart-burst.is-bursting {
	animation: ganapati-heart-pop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes ganapati-heart-pop {
	0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
	35% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
	55% { transform: translate(-50%, -50%) scale(0.95); }
	100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

/* Bottom scrim so caption/rail stay legible over any photo */
.ganapati-reel::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 46%;
	background: linear-gradient(180deg, transparent, rgba(10, 7, 4, 0.72) 60%, rgba(10, 7, 4, 0.85));
	pointer-events: none;
	z-index: 1;
}

/* ---------- Right action rail ---------- */

.ganapati-reel-rail {
	position: absolute;
	right: 10px;
	bottom: 108px;
	z-index: 4;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
}

.ganapati-reel-action {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: #fff;
	text-decoration: none;
}
.ganapati-reel-icon {
	width: 46px;
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	line-height: 1;
	border-radius: 50%;
	background: rgba(20, 15, 10, 0.35);
	backdrop-filter: blur(3px);
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
	transition: transform 0.15s ease;
}
.ganapati-reel-action:active .ganapati-reel-icon { transform: scale(0.88); }

.ganapati-reel-count {
	font-size: 12px;
	font-weight: 600;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.ganapati-reel-like[aria-pressed="true"] .ganapati-reel-icon-like {
	color: #FF3B5C;
	animation: ganapati-like-bounce 0.35s ease;
}
.ganapati-reel-icon-like { transition: color 0.15s ease; }
@keyframes ganapati-like-bounce {
	0% { transform: scale(1); }
	40% { transform: scale(1.35); }
	100% { transform: scale(1); }
}

/* .ganapati-reel-whatsapp .ganapati-reel-icon { background: rgba(37, 168, 96, 0.9); } */

/* ---------- Caption ---------- */

.ganapati-reel-caption {
	position: absolute;
	left: 0;
	right: 76px;
	bottom: 24px;
	z-index: 4;
	padding: 0 16px;
	color: #fff;
}

.ganapati-reel-caption-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 4px;
	font-size: 12px;
	color: #E9DEC9;
	letter-spacing: 0.03em;
}
.ganapati-reel-caption-price {
	font-weight: 700;
	color: #F4C868;
}

.ganapati-reel-caption-title {
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 600;
	color: #fff;
	margin: 0 0 6px;
	line-height: 1.25;
}

.ganapati-reel-caption-desc {
	font-size: 13.5px;
	line-height: 1.5;
	color: #E9DEC9;
	margin: 0 0 10px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ganapati-reel-caption.is-expanded .ganapati-reel-caption-desc {
	-webkit-line-clamp: unset;
	overflow: visible;
}

.ganapati-reel-caption-specs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: 12.5px;
	color: #D8CBB2;
}
.ganapati-reel-caption-link {
	font-weight: 700;
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ---------- Desktop: phone-frame column, blank space either side ---------- */

@media (min-width: 900px) {
	.ganapati-reels-shell {
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 28px 0;
		background:
			radial-gradient(60% 50% at 50% 0%, rgba(201, 162, 39, 0.14), transparent 70%),
			var(--color-ink);
	}

	.ganapati-reels {
		width: min(460px, 94vw);
		height: 100%;
		border-radius: var(--radius-lg);
		box-shadow: 0 50px 100px -30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
	}

}

/* ---------- Share sheet ---------- */

.ganapati-share-sheet {
	position: fixed;
	inset: 0;
	z-index: 1000;
	visibility: hidden;
	pointer-events: none;
}
.ganapati-share-sheet.is-open {
	visibility: visible;
	pointer-events: auto;
}
.ganapati-share-sheet-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 15, 10, 0.55);
	opacity: 0;
	transition: opacity 0.2s ease;
}
.ganapati-share-sheet.is-open .ganapati-share-sheet-backdrop {
	opacity: 1;
}
.ganapati-share-sheet-panel {
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translate(-50%, 100%);
	width: min(460px, 100%);
	background: var(--color-ink);
	color: #fff;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
	padding: 10px 20px 28px;
	box-shadow: var(--shadow-lift);
	transition: transform 0.25s ease;
}
.ganapati-share-sheet.is-open .ganapati-share-sheet-panel {
	transform: translate(-50%, 0);
}
.ganapati-share-sheet-handle {
	width: 40px;
	height: 4px;
	border-radius: var(--radius-pill);
	background: rgba(255, 255, 255, 0.25);
	margin: 6px auto 16px;
}
.ganapati-share-sheet-preview {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-bottom: 18px;
	margin-bottom: 6px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.ganapati-share-sheet-image {
	width: 52px;
	height: 52px;
	border-radius: var(--radius-sm);
	object-fit: cover;
	flex-shrink: 0;
}
.ganapati-share-sheet-info {
	min-width: 0;
}
.ganapati-share-sheet-title {
	font-weight: 700;
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ganapati-share-sheet-caption {
	font-size: 12.5px;
	color: #D8CBB2;
}
.ganapati-share-sheet-actions {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 18px 4px 6px;
}
.ganapati-share-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	background: none;
	border: none;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}
.ganapati-share-icon {
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: #fff;
}
.ganapati-share-icon-whatsapp { background: #25D366; }
.ganapati-share-icon-telegram { background: #229ED9; }
.ganapati-share-icon-instagram { background: linear-gradient(135deg, #FEDA75, #D62976 55%, #4F5BD5); }
.ganapati-share-icon-more { background: rgba(255, 255, 255, 0.14); }
.ganapati-share-sheet-close {
	position: absolute;
	top: 12px;
	right: 16px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	border: none;
	font-size: 14px;
	cursor: pointer;
}

/* ---------- Toast ---------- */

.ganapati-reel-toast {
	position: fixed;
	left: 50%;
	bottom: 32px;
	transform: translateX(-50%) translateY(12px);
	background: rgba(20, 15, 10, 0.92);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	padding: 10px 18px;
	border-radius: var(--radius-pill);
	box-shadow: var(--shadow-lift);
	opacity: 0;
	pointer-events: none;
	z-index: 1001;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.ganapati-reel-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}
