/*
 * Elementor Shop Blog Featured — mirrors the xsmokehub Blog page (Blog.tsx):
 * a category filter (pill buttons), the featured-article card (large
 * image-left/content-right) for the active category, and the rest-of-articles
 * grid (16:9 cards). The Elementor controls override these defaults via
 * generated CSS.
 */

/* ---- Wrapper ---- */
.esbf-wrap {
	width: 100%;
}

/* ---- Category filter pills ---- */
.esbf-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 40px;
}

.esbf-cat-btn {
	padding: 8px 16px;
	border: 1px solid #e5e5e5;
	border-radius: 999px;
	background-color: #ffffff;
	color: #666666;
	font-family: 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Hover: white background + black text + #222 border, forced over any theme
 * (Minimog) default button hover styles. */
.esbf-cat-btn:hover,
.esbf-cat-btn:focus-visible {
	background-color: #ffffff !important;
	border-color: #222222 !important;
	color: #222222 !important;
}

.esbf-cat-btn.is-active {
	background-color: #222222;
	border-color: #222222;
	color: #ffffff;
}

/* ---- Featured article card ---- */
.esbf-featured {
	display: block;
	margin-bottom: 40px;
	text-decoration: none;
}

.esbf-featured-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	background-color: #ffffff;
	border: 1px solid #e5e5e5;
	border-radius: 16px;
	overflow: hidden;
	transition: box-shadow 0.3s ease;
}

.esbf-featured:hover .esbf-featured-card {
	box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

/* Image column: fixed height on mobile, fills the column on desktop */
.esbf-featured-image {
	min-height: 256px;
	overflow: hidden;
	background-color: #ededed;
}

.esbf-featured-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.esbf-featured:hover .esbf-featured-image img {
	transform: scale(1.05);
}

/* Content column */
.esbf-featured-body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 32px;
}

.esbf-featured-tags {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.esbf-cat-pill {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid #e5e5e5;
	border-radius: 999px;
	font-family: 'Jost', sans-serif;
	font-size: 10px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #888888;
}

.esbf-featured-label {
	font-family: 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 1;
	color: #bbbbbb;
}

.esbf-featured-title {
	margin: 0 0 16px;
	font-family: 'DM Serif Display', serif;
	font-size: 30px;
	font-weight: 400;
	line-height: 1.3;
	color: #222222;
}

.esbf-featured-excerpt {
	margin: 0 0 24px;
	font-family: 'Jost', sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.625;
	color: #666666;
}

.esbf-featured-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.esbf-featured-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.esbf-featured-meta span {
	font-family: 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 1;
	color: #888888;
}

.esbf-featured-meta .esbf-meta-dot {
	color: #d4d4d4;
}

.esbf-read {
	font-family: 'Jost', sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	color: #222222;
	white-space: nowrap;
	text-underline-offset: 2px;
}

.esbf-featured:hover .esbf-read {
	text-decoration: underline;
}

/* ---- Rest of articles grid ---- */
.esbf-rest-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)); /* fallback; Elementor overrides */
	column-gap: 24px;
	row-gap: 24px;
}

/* ---- Article card ---- */
.esbf-article {
	display: block;
	background-color: #ffffff;
	border: 1px solid #e5e5e5;
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none;
	transition: box-shadow 0.3s ease;
}

.esbf-article:hover {
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.esbf-article-image {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: #ededed;
}

.esbf-article-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.esbf-article:hover .esbf-article-image img {
	transform: scale(1.05);
}

.esbf-article-body {
	padding: 24px;
}

.esbf-article-cat {
	display: inline-block;
	margin-bottom: 12px;
	padding: 4px 10px;
	border: 1px solid #e5e5e5;
	border-radius: 999px;
	font-family: 'Jost', sans-serif;
	font-size: 10px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #888888;
}

.esbf-article-title {
	margin: 0 0 8px;
	font-family: 'Jost', sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	color: #222222;
}

.esbf-article-excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0 0 20px;
	font-family: 'Jost', sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.625;
	color: #888888;
}

.esbf-article-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.esbf-article-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.esbf-article-meta span {
	font-family: 'Jost', sans-serif;
	font-size: 11px;
	font-weight: 400;
	line-height: 1;
	color: #888888;
}

.esbf-article-meta .esbf-meta-dot {
	color: #d4d4d4;
	font-size: 12px;
}

.esbf-article-read {
	font-family: 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	color: #222222;
	white-space: nowrap;
}

/* ---- Empty state ---- */
.esbf-empty {
	text-align: center;
	padding: 64px 0;
}

.esbf-empty-emoji {
	margin: 0 0 12px;
	font-size: 36px;
	line-height: 1;
}

.esbf-empty-text {
	margin: 0;
	font-family: 'Jost', sans-serif;
	font-size: 14px;
	color: #888888;
}

/* ---- Responsive: side-by-side on desktop ---- */
@media (min-width: 1024px) {
	.esbf-featured-card {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.esbf-featured-image {
		min-height: 100%;
	}

	.esbf-featured-body {
		padding: 40px;
	}
}

/* Rest grid: tablet 2 columns, mobile 1 column */
@media (max-width: 1024px) {
	.esbf-rest-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 767px) {
	.esbf-rest-grid {
		grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
	}
}
