:root {
	--ek-blog-accent: #6366f1;
	--ek-blog-muted: #64748b;
	--ek-blog-surface: #ffffff;
}

.ek-blog-archive,
.ek-single-post {
	padding: 56px 0;
	background: #f8fafc;
}

.ek-blog-header {
	max-width: 760px;
	margin: 0 auto 32px;
	text-align: center;
}

.ek-page-title,
.ek-post-title {
	margin: 0;
	color: #1e293b;
	font-weight: 800;
}

.ek-page-title { font-size: clamp(1.75rem, 4vw, 2.4rem); }
.ek-blog-header p,
.ek-archive-description { color: var(--ek-blog-muted); line-height: 1.9; }

.ek-posts-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.ek-blog-card,
.ek-post-content,
.ek-comments-section {
	background: var(--ek-blog-surface);
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	box-shadow: 0 8px 30px rgba(15, 23, 42, .05);
}

.ek-blog-card {
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
}
.ek-card-image { display: block; aspect-ratio: 16 / 9; background: #e2e8f0; }
.ek-card-image img { width: 100%; height: 100%; object-fit: cover; }
.ek-placeholder-img { display: grid; height: 100%; place-items: center; color: var(--ek-blog-muted); }
.ek-card-content {
	padding: 20px;
	display: flex;
	flex: 1;
	flex-direction: column;
}
.ek-card-category,
.ek-meta-tags a { color: var(--ek-blog-accent); font-size: .85rem; font-weight: 700; }
.ek-card-title { margin: 10px 0; font-size: 1.1rem; line-height: 1.7; }
.ek-card-excerpt { color: var(--ek-blog-muted); font-size: .92rem; line-height: 1.9; }
.ek-card-footer,
.ek-post-meta,
.ek-share-buttons {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 18px;
	color: var(--ek-blog-muted);
	font-size: .85rem;
}
.ek-card-footer {
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px dashed #e2e8f0;
	align-items: center;
}
.ek-card-footer time {
	font-size: 0.8rem;
	color: #64748b;
}
.ek-read-more-btn,
.ek-share-buttons a {
	color: var(--ek-blog-accent);
	font-weight: 700;
}
.ek-read-more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-right: auto;
	white-space: nowrap;
	padding: 8px 12px;
	border-radius: 10px;
	background: rgba(99, 102, 241, 0.06);
	transition: all 0.2s ease;
}
.ek-read-more-btn:hover {
	background: var(--ek-blog-accent);
	color: #fff;
}

.ek-single-post-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.8fr);
	gap: 28px;
	align-items: start;
}
.ek-post-content {
	max-width: 860px;
	margin: 0 auto;
	overflow: hidden;
	background: var(--ek-blog-surface);
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}
.ek-post-sidebar {
	position: sticky;
	top: 24px;
}
.ek-sidebar-box {
	background: linear-gradient(180deg, rgba(255,255,255,1), rgba(248,250,252,0.96));
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	padding: 20px 18px;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}
.ek-sidebar-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
	font-size: 1.1rem;
	font-weight: 800;
	color: #1e293b;
}
.ek-sidebar-title i {
	color: var(--ek-blog-accent);
	font-size: 1rem;
	--fa-primary-color: #6366f1;
	--fa-secondary-color: #a5b4fc;
}
.ek-sidebar-posts-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.ek-sidebar-post-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 8px 8px 6px;
	border-radius: 14px;
	text-decoration: none;
	color: #334155;
	transition: background .2s ease, transform .2s ease;
}
.ek-sidebar-post-link:hover {
	background: rgba(99, 102, 241, 0.04);
	transform: translateX(-2px);
}
.ek-sidebar-post-thumb {
	width: 54px;
	height: 54px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	background: #e2e8f0;
	border: 2px solid rgba(99, 102, 241, 0.12);
	box-shadow: 0 6px 12px rgba(99, 102, 241, 0.1);
}
.ek-sidebar-post-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ek-sidebar-post-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--ek-blog-accent);
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(148, 163, 184, 0.08));
}
.ek-sidebar-post-copy {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	flex: 1;
}
.ek-sidebar-post-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	font-size: 0.86rem;
	font-weight: 700;
	line-height: 1.7;
	color: #1e293b;
}
.ek-sidebar-post-date {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.72rem;
	color: #64748b;
}
.ek-sidebar-post-date i {
	font-size: 0.7rem;
	--fa-primary-color: #64748b;
	--fa-secondary-color: #cbd5e1;
}
.ek-post-thumbnail { aspect-ratio: 16 / 8; background: #e2e8f0; }
.ek-post-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ek-post-header,
.ek-post-body { padding: 28px clamp(20px, 4vw, 48px); }
.ek-post-title { margin: 12px 0; font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.55; }
.ek-post-body { padding-top: 0; color: #334155; line-height: 2; }
.ek-post-body img { height: auto; max-width: 100%; }
.ek-post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px 18px;
	padding: 14px 18px;
	margin-top: 18px;
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(148, 163, 184, 0.03));
	border: 1px solid #e2e8f0;
	border-radius: 14px;
}
.ek-post-meta span,
.ek-post-meta time {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.88rem;
	font-weight: 700;
	color: #475569;
	line-height: 1.6;
}
.ek-post-meta i {
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: rgba(99, 102, 241, 0.08);
	color: var(--ek-blog-accent);
	font-size: 0.9rem;
	--fa-primary-color: #6366f1;
	--fa-secondary-color: #a5b4fc;
}
.ek-post-meta .ek-meta-author,
.ek-post-meta .ek-meta-date,
.ek-post-meta .ek-meta-comments {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.ek-post-tags { margin-top: 28px; }
.ek-post-tags-block {
	margin-top: 30px;
	padding: 20px 22px;
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(148, 163, 184, 0.04));
	border: 1px solid #e2e8f0;
	border-radius: 18px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.ek-post-tags-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	font-size: 0.92rem;
	font-weight: 800;
	color: #334155;
}
.ek-post-tags-header i {
	font-size: 0.95rem;
	color: var(--ek-blog-accent);
	--fa-primary-color: #6366f1;
	--fa-secondary-color: #a5b4fc;
}
.ek-post-tags-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.ek-post-tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 14px;
	border-radius: 999px;
	background: #ffffff;
	border: 1px solid #dfe7f3;
	color: #475569;
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none;
	transition: all 0.25s ease;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}
.ek-post-tag:hover,
.ek-post-tag:focus {
	background: var(--ek-blog-accent);
	color: #ffffff;
	border-color: var(--ek-blog-accent);
	transform: translateY(-2px);
	box-shadow: 0 8px 18px rgba(99, 102, 241, 0.22);
}
.ek-share-buttons { padding: 0 clamp(20px, 4vw, 48px) 30px; justify-content: flex-start; }
.ek-comments-section { max-width: 860px; margin: 24px auto 0; padding: clamp(20px, 4vw, 40px); }
.comment-list { padding: 0; list-style: none; }
.comment-body { padding: 18px 0; border-bottom: 1px solid #e2e8f0; }
.comment-respond textarea,
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"] { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 8px; }
.form-submit .submit { border: 0; border-radius: 8px; padding: 10px 16px; background: var(--ek-blog-accent); color: #fff; cursor: pointer; }
.ek-related-products-section {
	margin-top: 28px;
	padding: 26px 20px 12px;
	background: linear-gradient(180deg, rgba(255,255,255,1), rgba(248,250,252,0.9));
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.ek-related-products-section .ek-section-title {
	margin: 0 0 18px;
	color: #1e293b;
	font-size: 1.35rem;
	font-weight: 800;
}
.ek-related-products-section .ek-product-grid {
	gap: 18px;
}
.navigation.pagination { margin-top: 36px; text-align: center; }
.navigation.pagination .page-numbers { display: inline-block; margin: 0 3px; padding: 8px 12px; border-radius: 8px; background: #fff; color: #475569; }
.navigation.pagination .current { background: var(--ek-blog-accent); color: #fff; }

@media (max-width: 900px) {
	.ek-posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ek-single-post-layout {
		grid-template-columns: 1fr;
	}
	.ek-post-sidebar {
		position: static;
	}
}
@media (max-width: 600px) {
	.ek-blog-archive,
	.ek-single-post { padding: 32px 0; }
	.ek-posts-grid { grid-template-columns: 1fr; }
	.ek-post-header,
	.ek-post-body { padding: 20px 18px; }
	.ek-post-meta {
		justify-content: flex-start;
		gap: 10px 12px;
	}
	.ek-sidebar-post-link {
		padding-right: 4px;
	}
}

/* Homepage blog carousel */
.ek-home-blog .ek-blog-carousel {
	position: relative;
}

.ek-home-blog .ek-posts-grid {
	display: flex;
	grid-template-columns: none;
	align-items: stretch;
	gap: 24px;
	overflow-x: auto;
	scroll-snap-type: inline mandatory;
	scroll-behavior: smooth;
	padding: 2px;
	scrollbar-width: none;
}

.ek-home-blog .ek-posts-grid::-webkit-scrollbar {
	display: none;
}

.ek-home-blog .ek-blog-card {
	flex: 0 0 calc((100% - 48px) / 3);
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 360px;
	scroll-snap-align: start;
}

.ek-blog-card-compact {
	display: flex;
	flex-direction: column;
}

.ek-blog-card-compact .ek-card-content {
	display: flex;
	min-height: 130px;
	flex: 1;
	flex-direction: column;
}

.ek-blog-card-compact .ek-card-title {
	overflow: hidden;
	margin-top: 0;
	white-space: normal;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	text-overflow: ellipsis;
}

.ek-blog-card-compact .ek-card-footer {
	margin-top: auto;
	justify-content: stretch;
}

.ek-blog-card-compact .ek-read-more-btn {
	width: 100%;
	padding: 10px 14px;
	border-radius: 8px;
	background: var(--ek-blog-accent);
	color: #fff;
	text-align: center;
}

.ek-blog-carousel-control {
	position: absolute;
	top: 50%;
	z-index: 1;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--ek-blog-accent);
	box-shadow: 0 4px 16px rgba(15, 23, 42, .15);
	cursor: pointer;
	transform: translateY(-50%);
}

.ek-blog-carousel-prev { right: -20px; }
.ek-blog-carousel-next { left: -20px; }

@media (max-width: 900px) {
	.ek-home-blog .ek-blog-card { flex-basis: calc((100% - 24px) / 2); }
	.ek-blog-carousel-prev { right: -10px; }
	.ek-blog-carousel-next { left: -10px; }
}

@media (max-width: 600px) {
	.ek-home-blog .ek-blog-card { flex-basis: 100%; }
	.ek-blog-carousel-control { display: none; }
}

/* Homepage article cards: match the product-card visual system */
.ek-home-blog .ek-blog-card {
	border: 1px solid #f1f5f9;
	border-radius: 18px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, .03);
	transition: transform .3s cubic-bezier(.4, 0, .2, 1), box-shadow .3s cubic-bezier(.4, 0, .2, 1), border-color .3s ease;
}

.ek-home-blog .ek-blog-card:hover {
	transform: translateY(-5px);
	border-color: #e2e8f0;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
}

.ek-home-blog .ek-card-image {
	aspect-ratio: 1 / 1;
	background: #f8fafc;
}

.ek-home-blog .ek-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.ek-home-blog .ek-blog-card:hover .ek-card-image img {
	transform: scale(1.05);
}

.ek-home-blog .ek-card-content {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 148px;
	padding: 18px 20px 20px;
}

.ek-home-blog .ek-card-title,
.ek-home-blog .ek-card-title a,
.ek-home-blog .ek-blog-card-compact .ek-card-title,
.ek-home-blog .ek-blog-card-compact .ek-card-title a {
	margin: 0 0 12px;
	color: #1e293b;
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.6;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: normal;
	transition: color .2s ease;
}

.ek-home-blog .ek-card-title a:hover {
	color: var(--ek-blog-accent);
}

.ek-home-blog .ek-card-footer {
	justify-content: flex-start;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px dashed #f1f5f9;
}

.ek-home-blog .ek-read-more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: auto;
	min-width: 112px;
	padding: 8px 11px;
	border: 1px solid #e0e7ff;
	border-radius: 10px;
	background: #f5f7ff;
	color: #4f46e5;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.ek-home-blog .ek-read-more-btn i {
	font-size: 13px;
	--fa-primary-color: #4f46e5;
	--fa-secondary-color: #818cf8;
}

.ek-home-blog .ek-read-more-btn:hover {
	border-color: #6366f1;
	background: #6366f1;
	color: #fff;
	box-shadow: 0 5px 12px rgba(99, 102, 241, .22);
	transform: translateX(-2px);
}

.ek-home-blog .ek-read-more-btn:hover i {
	--fa-primary-color: #fff;
	--fa-secondary-color: #fff;
}
