/* Produit Blog – styles front (charte weedy.fr, orienté conversion) */

.pb-products {
	--pb-green: #43b981;
	--pb-green-dark: #2b3b30;
	--pb-green-deep: #379a6b;
	--pb-lime: #c5fa53;
	--pb-lime-hover: #d8ff85;
	--pb-price: #0d423c;
	--pb-ink: #333333;
	--pb-muted: #848484;
	--pb-line: #ececec;
	--pb-bg: #f6f9f7;

	width: 100%;
	margin: 2.5rem 0;
	font-family: "Geologica", sans-serif !important;
}

/* En-tête */
.pb-products__head {
	margin-bottom: 1.25rem;
	text-align: center;
}

.pb-products__title {
	font-family: "Geologica", sans-serif !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-size: clamp(1.15rem, 2.4vw, 1.5rem);
	color: var(--pb-green-dark);
	margin: 0 0 0.4rem;
	line-height: 1.15;
}

.pb-products__title::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin: 0.5rem auto 0;
	border-radius: 4px;
	background: var(--pb-price);
}

/* Grille – 5 produits sur toute la largeur de la section (desktop) */
.pb-products__grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Carte */
.pb-product {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--pb-line);
	border-radius: 12px;
	overflow: hidden;
	transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.pb-product:hover,
.pb-product:focus-within {
	box-shadow: 0 10px 24px rgba(43, 59, 48, 0.14);
	transform: translateY(-3px);
	border-color: var(--pb-green);
}

/* Média (lien vers la fiche produit) */
.pb-product__media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: var(--pb-bg);
	overflow: hidden;
	text-decoration: none;
}

.pb-product__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.pb-product:hover .pb-product__img {
	transform: scale(1.05);
}

/* Corps */
.pb-product__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 0.7rem 0.75rem 0.8rem;
	gap: 0.55rem;
}

.pb-product__name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-weight: 600;
	font-size: 0.85rem;
	line-height: 1.3;
	letter-spacing: -0.2px;
	color: #000 !important;
	min-height: 2.6em;
	text-decoration: none;
}

.pb-product__name:hover {
	color: var(--pb-green-deep) !important;
}

.pb-product__footer {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.pb-product__price {
	font-family: "Geologica", sans-serif !important;
	font-weight: 700;
	font-size: 1.3rem;
	color: var(--pb-price);
	line-height: 1;
}

/* CTA « Ajouter au panier » – lime conversion façon weedy.fr */
.pb-product__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	width: 100%;
	min-height: 44px;
	padding: 0 0.4rem;
	border-radius: 10px;
	background: var(--pb-lime);
	color: #000 !important;
	font-family: "Geologica", sans-serif !important;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.2px;
	font-size: 0.72rem;
	white-space: nowrap;
	overflow: hidden;
	text-decoration: none;
	box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
	transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.pb-product__cta-label {
	white-space: nowrap;
}

/* Icône panier masquée en desktop (cartes étroites en 5 colonnes),
   affichée en mobile où les cartes sont plus larges. */
.pb-product__carticon {
	display: none;
	flex: 0 0 auto;
}

.pb-product:hover .pb-product__cta {
	background: var(--pb-lime-hover);
}

.pb-product__cta:active {
	transform: translateY(2px);
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

/* Mobile/tablette : carrousel horizontal (une seule ligne, défilement) */
@media (max-width: 781px) {
	.pb-products__grid {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 44%;
		gap: 0.75rem;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 0.5rem;
		/* léger débord pour montrer qu'on peut scroller */
		scroll-padding-left: 0;
	}
	.pb-product {
		scroll-snap-align: start;
	}
	.pb-product__name {
		font-size: 0.82rem;
	}
	.pb-product__price {
		font-size: 1.2rem;
	}
	.pb-product__cta {
		font-size: 0.85rem;
		min-height: 46px;
		letter-spacing: 0.4px;
	}
	.pb-product__carticon {
		display: inline-block;
	}
}
