/* Nelb WooCommerce Macchedil Pack — Blog con filtri e ricerca.
   Le tinte brand passano da variabili CSS impostate dai controlli Elementor. */

.nelb-bf {
	--nelb-primary: #FE3F12;
	--nelb-text: #212121;
	--nelb-border: #e0e0e0;
	--nelb-muted: #9a9a9a;
}

/* Ricerca */
.nelb-bf .nelb-bf-search {
	width: 100%;
	height: 40px;
	border: 1.5px solid var(--nelb-border);
	border-radius: 10px;
	padding: 0 16px 0 42px;
	font-size: 14px;
	font-family: inherit;
	color: var(--nelb-text);
	background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239a9a9a' stroke-width='2' viewBox='0 0 24 24'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.3-4.3'/></svg>") no-repeat 14px center;
}
.nelb-bf .nelb-bf-search:focus {
	outline: none;
	border-color: var(--nelb-primary);
}

/* Pillole: layout wrap (default) o scroll orizzontale */
.nelb-bf .nelb-bf-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin: 14px 0 1.3rem;
}
.nelb-bf.pills-scroll .nelb-bf-pills {
	flex-wrap: nowrap;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	padding-bottom: 6px;
}
.nelb-bf.pills-scroll .nelb-bf-pill { flex: 0 0 auto; }
.nelb-bf.pills-scroll .nelb-bf-pills::-webkit-scrollbar { height: 6px; }
.nelb-bf.pills-scroll .nelb-bf-pills::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 999px; }

@media (min-width: 768px) and (max-width: 1024px) {
	.nelb-bf.pills-t-scroll .nelb-bf-pills {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 6px;
	}
	.nelb-bf.pills-t-scroll .nelb-bf-pill { flex: 0 0 auto; }
	.nelb-bf.pills-t-wrap .nelb-bf-pills { flex-wrap: wrap; overflow: visible; }
}
@media (max-width: 767px) {
	.nelb-bf.pills-m-scroll .nelb-bf-pills {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 6px;
		justify-content: flex-start !important;
	}
	.nelb-bf.pills-m-scroll .nelb-bf-pill { flex: 0 0 auto; }
	.nelb-bf.pills-m-wrap .nelb-bf-pills { flex-wrap: wrap; overflow: visible; }
}
.nelb-bf .nelb-bf-pill {
	padding: 8px 16px;
	border: 1.5px solid var(--nelb-border);
	border-radius: 999px;
	background: #fff !important;
	color: var(--nelb-text) !important;
	font-family: inherit;
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	transition: all .12s ease;
}
.nelb-bf .nelb-bf-pill:hover:not(.on) {
	border-color: var(--nelb-primary);
	color: var(--nelb-primary) !important;
}
.nelb-bf .nelb-bf-pill.on {
	background: var(--nelb-primary) !important;
	border-color: var(--nelb-primary);
	color: #fff !important;
}

/* Griglia (colonne/gap impostati da Elementor; fallback qui) */
.nelb-bf .nelb-bf-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	transition: opacity .15s ease;
}

/* Card */
.nelb-bf .nelb-bf-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	border: 0.5px solid #EDEDED;
	display: flex;
	flex-direction: column;
}
.nelb-bf .nelb-bf-thumb {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, #F5F7F7, #E9EBEE);
	overflow: hidden;
}
.nelb-bf .nelb-bf-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.nelb-bf .nelb-bf-ico {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9A9A9A;
}
.nelb-bf .nelb-bf-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	background: var(--nelb-primary);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .3px;
	padding: 4px 9px;
	border-radius: 6px;
}
.nelb-bf .nelb-bf-body {
	padding: 14px 15px 16px;
}
.nelb-bf .nelb-bf-title {
	font-weight: 800;
	font-size: 15px;
	line-height: 1.25;
	color: var(--nelb-text);
	margin: 0 0 8px;
}
.nelb-bf .nelb-bf-title a {
	color: inherit;
	text-decoration: none;
}
.nelb-bf .nelb-bf-title a:hover {
	color: var(--nelb-primary);
}
.nelb-bf .nelb-bf-excerpt {
	margin: 0 0 10px;
	font-size: 13px;
	line-height: 1.5;
	color: #4A4A4A;
}
.nelb-bf .nelb-bf-date {
	font-size: 12px;
	color: var(--nelb-muted);
	font-weight: 700;
	letter-spacing: .3px;
	text-transform: uppercase;
}

/* Footer / carica altri */
.nelb-bf .nelb-bf-foot {
	text-align: center;
}
.nelb-bf .nelb-bf-more {
	display: inline-block;
	margin-top: 1.4rem;
	background: #fff;
	border: 1.5px solid var(--nelb-primary);
	color: var(--nelb-primary);
	font-weight: 800;
	font-size: 14px;
	padding: 11px 26px;
	border-radius: 8px;
	cursor: pointer;
	transition: all .12s ease;
}
.nelb-bf .nelb-bf-more:hover {
	background: var(--nelb-primary);
	color: #fff;
}
.nelb-bf .nelb-bf-more[disabled] {
	opacity: .5;
	cursor: default;
}

/* Stato vuoto + caricamento */
.nelb-bf .nelb-bf-empty {
	padding: 40px 10px;
	text-align: center;
	color: var(--nelb-muted);
}
.nelb-bf.nelb-bf-loading .nelb-bf-grid {
	opacity: .5;
}
