/* Single Product Page Styles - FIXED STICKY SIDEBAR */

/* Reset and Base Styles */
.custom-single-product {
	margin: 0;
	padding: 0;
	max-width: 1400px;
	margin: 0 auto;
	padding: 60px 40px;
	overflow: visible; /* Critical for sticky */
}

/* Main Product Container - Grid Layout */
.custom-product-container {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 60px;
	margin-bottom: 60px;
	align-items: start; /* Changed from flex-start */
}

/* Left Column - Description Only */
.custom-product-left-column {
	display: flex;
	flex-direction: column;
	min-height: 100vh; /* Ensures enough height for sticky to work */
}

/* Right Column - Sticky Container */
.custom-product-right-column {
	position: relative;
	height: fit-content;
}

/* CRITICAL FIX: Sticky Sidebar */
.custom-product-details-sticky {
	position: sticky;
	position: -webkit-sticky; /* Safari support */
	top: 20px; /* Distance from top when stuck */
	background: white;
	border-radius: 24px;
	padding: 40px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
	/* No max-height or overflow - entire column sticks */
}

/* Featured Image Section */
.custom-product-image-section {
	position: relative;
	overflow: hidden;
	border-radius: 16px;
	background: #F5F5F5;
	margin-bottom: 30px;
}

.custom-featured-image {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 16px;
	transition: transform 0.4s ease;
}

.custom-featured-image:hover {
	transform: scale(1.02);
}

/* Product Title */
.custom-product-title {
	font-size: 42px;
	font-weight: 700;
	color: #2c3e50;
	margin: 0 0 24px 0;
	line-height: 1.2;
}

/* Stats Section */
.custom-stats-section {
	margin-bottom: 30px;
}

.custom-stats-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
}

.custom-stat-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 15px;
	background: #F8F9FA;
	border-radius: 12px;
	transition: all 0.3s ease;
}

.custom-stat-item:hover {
	background: #E9ECEF;
	transform: translateY(-2px);
}

.custom-stat-icon {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: white;
	color: #5CB3C4;
	font-size: 18px;
}

.custom-stat-details {
	flex: 1;
}

.custom-stat-number {
	font-size: 20px;
	font-weight: 700;
	color: #2c3e50;
	line-height: 1;
	margin-bottom: 4px;
}

.custom-stat-label {
	font-size: 13px;
	color: #6c757d;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Product Excerpt */
.custom-product-excerpt {
	font-size: 17px;
	color: #666;
	line-height: 1.8;
	margin-bottom: 30px;
}

.custom-product-excerpt p {
	margin: 0 0 15px 0;
}

/* Product Meta (Categories & Tags) */
.custom-product-meta {
	margin-bottom: 35px;
	padding: 20px 0;
	border-top: 2px solid #F5F5F5;
	border-bottom: 2px solid #F5F5F5;
}

.custom-meta-item {
	margin-bottom: 12px;
	font-size: 15px;
	color: #555;
}

.custom-meta-item:last-child {
	margin-bottom: 0;
}

.custom-meta-label {
	font-weight: 600;
	color: #2c3e50;
	margin-right: 8px;
}

.custom-meta-item a {
	color: #5CB3C4;
	text-decoration: none;
	transition: color 0.3s ease;
}

.custom-meta-item a:hover {
	color: #4a9fb0;
	text-decoration: underline;
}

/* Action Buttons */
.custom-action-buttons {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 30px;
}

.custom-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px 20px;
	border-radius: 100px;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	font-family: inherit;
	white-space: nowrap;
	width: 100%;
	box-sizing: border-box;
}

.custom-btn i {
	font-size: 18px;
	flex-shrink: 0;
}

.custom-btn-preview {
	background: #5CB3C4;
	color: white;
}

.custom-btn-preview:hover {
	background: #4a9fb0;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(92, 179, 196, 0.4);
}

.custom-btn-download {
	background: #5CB3C4;
	color: white;
}

.custom-btn-download:hover {
	background: #4a9fb0;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(92, 179, 196, 0.4);
}

.custom-btn-whatsapp {
	background: #25D366;
	color: white;
}

.custom-btn-whatsapp:hover {
	background: #20ba5a;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

/* Download Dropdown */
.custom-download-wrapper {
	position: relative;
	width: 100%;
}

.custom-download-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	background: white;
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.3s ease;
	z-index: 100;
}

.custom-download-dropdown.active {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.custom-dropdown-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 20px;
	color: #2c3e50;
	text-decoration: none;
	font-size: 16px;
	font-weight: 500;
	transition: all 0.3s ease;
	border-bottom: 1px solid #F5F5F5;
}

.custom-dropdown-item:last-child {
	border-bottom: none;
}

.custom-dropdown-item:hover {
	background: #F5F5F5;
	color: #5CB3C4;
	padding-left: 24px;
}

.custom-dropdown-item i {
	font-size: 20px;
}

/* Full Description Section */
.custom-product-full-description {
	background: white;
	border-radius: 24px;
	padding: 50px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
	margin-top: 40px;
}

.custom-description-title {
	font-size: 32px;
	font-weight: 700;
	color: #2c3e50;
	margin: 0 0 30px 0;
	padding-bottom: 20px;
	border-bottom: 3px solid #5CB3C4;
}

.custom-description-content {
	font-size: 16px;
	color: #666;
	line-height: 1.8;
}

.custom-description-content p {
	margin: 0 0 16px 0;
}

.custom-description-content h2,
.custom-description-content h3,
.custom-description-content h4 {
	color: #2c3e50;
	margin: 24px 0 12px 0;
	font-weight: 600;
}

.custom-description-content ul,
.custom-description-content ol {
	margin: 16px 0;
	padding-left: 24px;
}

.custom-description-content li {
	margin-bottom: 8px;
}

/* Tutorial Section - Inside Sidebar */
.custom-tutorial-section-sidebar {
	margin-top: 30px;
	padding-top: 30px;
	border-top: 2px solid #F5F5F5;
}

.custom-tutorial-title {
	font-size: 20px;
	font-weight: 700;
	color: #2c3e50;
	margin: 0 0 20px 0;
}

/* Tutorial Section - Full Width */
.custom-tutorial-section {
	background: white;
	border-radius: 24px;
	padding: 50px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
	margin-bottom: 60px;
	width: 100%;
	max-width: 1400px;
	margin-left: auto;
	margin-right: auto;
}

.custom-section-title {
	font-size: 32px;
	font-weight: 700;
	color: #2c3e50;
	margin: 0 0 30px 0;
	text-align: center;
}

.custom-video-wrapper {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	border-radius: 16px;
	background: #F5F5F5;
}

.custom-video-wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 16px;
}

/* Download Timer Modal */
.custom-download-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.75);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	padding: 20px;
}

.custom-download-modal.active {
	opacity: 1;
	visibility: visible;
}

.custom-modal-content {
	background: white;
	border-radius: 24px;
	max-width: 500px;
	width: 100%;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	transform: scale(0.9);
	transition: transform 0.3s ease;
}

.custom-download-modal.active .custom-modal-content {
	transform: scale(1);
}

.custom-modal-header {
	padding: 30px 30px 20px 30px;
	text-align: center;
	border-bottom: 2px solid #F5F5F5;
}

.custom-modal-header h3 {
	font-size: 24px;
	font-weight: 700;
	color: #2c3e50;
	margin: 0;
}

.custom-modal-body {
	padding: 40px 30px;
	text-align: center;
}

.custom-timer-circle {
	position: relative;
	width: 150px;
	height: 150px;
	margin: 0 auto 30px auto;
}

.custom-timer-svg {
	transform: rotate(-90deg);
	width: 100%;
	height: 100%;
}

.custom-timer-bg {
	fill: none;
	stroke: #F5F5F5;
	stroke-width: 8;
}

.custom-timer-progress {
	fill: none;
	stroke: #5CB3C4;
	stroke-width: 8;
	stroke-linecap: round;
	stroke-dasharray: 283;
	stroke-dashoffset: 0;
	transition: stroke-dashoffset 1s linear;
}

.custom-timer-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 48px;
	font-weight: 700;
	color: #5CB3C4;
}

.custom-timer-message {
	font-size: 17px;
	color: #666;
	margin: 0 0 30px 0;
}

.custom-timer-message span {
	font-weight: 600;
	color: #5CB3C4;
}

.custom-ad-space {
	background: #F5F5F5;
	border-radius: 16px;
	padding: 20px;
	margin-top: 30px;
}

.custom-ad-space p {
	font-size: 12px;
	color: #999;
	margin: 0 0 12px 0;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.custom-ad-placeholder {
	background: #EBEBEB;
	padding: 60px 20px;
	border-radius: 12px;
	color: #999;
	font-size: 16px;
	font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
	.custom-single-product {
		padding: 40px 30px;
	}

	.custom-product-container {
		gap: 40px;
	}

	.custom-product-details-sticky {
		top: 80px;
		padding: 30px;
	}

	.custom-product-full-description {
		padding: 30px;
	}

	.custom-tutorial-section {
		padding: 40px;
	}
}

@media (max-width: 968px) {
	.custom-product-container {
		grid-template-columns: 1fr;
		gap: 30px;
		display: flex;
		flex-direction: column;
	}

	.custom-product-left-column {
		min-height: auto;
		order: 3; /* Show left column (description) third/last */
		display: flex;
		flex-direction: column;
	}

	.custom-product-right-column {
		order: 2; /* Show right column (details) second */
	}

	/* DISABLE STICKY ON MOBILE */
	.custom-product-details-sticky {
		position: relative;
		top: 0;
		max-height: none;
		overflow-y: visible;
		display: flex;
		flex-direction: column;
		padding: 25px;
	}

	/* Move featured image to top of everything */
	.custom-product-image-section {
		order: -1; /* This makes it appear first, before right column */
		margin-bottom: 0; /* Remove bottom margin since it's separated */
	}

	/* Reorder elements within left column */
	.custom-product-full-description {
		padding: 25px;
		order: 1;
	}

	/* Order elements within the sticky sidebar (right column) */
	.custom-product-title {
		order: 1;
		font-size: 32px;
		margin-top: 0;
	}

	.custom-stats-section {
		order: 2;
	}

	.custom-product-excerpt {
		order: 3;
	}

	.custom-product-meta {
		order: 4;
	}

	.custom-action-buttons {
		order: 5;
	}

	/* Tutorial video in sidebar */
	.custom-tutorial-section-sidebar {
		order: 6;
		margin-top: 20px;
	}
}

@media (max-width: 640px) {
	.custom-single-product {
		padding: 30px 20px;
	}

	.custom-product-title {
		font-size: 28px;
	}

	.custom-stats-container {
		grid-template-columns: 1fr;
	}

	.custom-tutorial-section {
		padding: 30px 25px;
	}

	.custom-section-title {
		font-size: 24px;
	}

	.custom-btn {
		padding: 14px 24px;
		font-size: 15px;
	}

	.custom-modal-content {
		margin: 20px;
	}

	.custom-timer-circle {
		width: 120px;
		height: 120px;
	}

	.custom-timer-text {
		font-size: 40px;
	}
}

/* Hide default WooCommerce elements */
.custom-single-product .woocommerce-product-gallery {
	display: none;
}

.custom-single-product .entry-summary {
	display: none;
}

.woocommerce-tabs {
	display: none;
}

/* Loading Animation */
@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

.custom-timer-text {
	animation: pulse 1s ease-in-out infinite;
}