/* Custom Article Stabilization */
.article-content {
	overflow: hidden;
}

/* 
   Content Image Protector - Standardized wrapper for 1,300+ legacy posts 
   Used by the Image Protector script in article.liquid
*/
.article-content-img-wrapper {
	position: relative;
	display: block;
	width: 100%;
	background-color: #f5f5f5;
	margin-bottom: 20px;
	overflow: hidden;
	border-radius: 4px;
}

/* Allow images in content to be centered but maintain stability */
.article-content img {
	max-width: 100%;
	height: auto !important;
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* Target images within the content to reserve space before Load */
.article-content img:not([width]):not([height]) {
	min-height: 200px;
	background-color: #f9f9f9;
}

/* Responsive YouTube in Articles */
.article-content iframe[src*="youtube.com"],
.article-content iframe[data-yt-src*="youtube.com"],
.article-content .video-wrapper iframe {
	aspect-ratio: 16 / 9;
	width: 100%;
	height: auto;
	background-color: #000;
}

/* Standardize Haravan Editor Inline YouTube Wrappers */
.article-content span.mce-object-iframe {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	aspect-ratio: 16 / 9 !important;
	background-color: #000 !important;
	margin-bottom: 20px !important;
	overflow: hidden !important;
	border-radius: 4px !important;
}

/* Force absolute containment of iframe inside the standardized wrapper */
.article-content span.mce-object-iframe iframe {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	border: none !important;
	z-index: 1 !important;
}

/* Dynamic Image Wrapper Image Styling */
.article-content-img-wrapper img {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain !important;
}

/* Carousel Loading-State Stabilizers (Related Posts & New Products) */
.list-blogs-related:not(.owl-loaded),
.collection-owl-products:not(.owl-loaded) {
	display: flex !important;
	overflow-x: auto;
	overflow-y: hidden;
	gap: 15px;
	margin-bottom: 20px;
	scrollbar-width: none; /* Hide scrollbar for a clean pre-load state */
}

.list-blogs-related:not(.owl-loaded) .blog-item,
.collection-owl-products:not(.owl-loaded) .pro-loop {
	flex: 0 0 25%;
	min-width: 240px;
}

@media (max-width: 767px) {
	.list-blogs-related:not(.owl-loaded) .blog-item,
	.collection-owl-products:not(.owl-loaded) .pro-loop {
		flex: 0 0 45%;
		min-width: 150px;
	}
}


