/**
 * Afro-Exotique — accueil Electro UX 2026
 *
 * Scope strict :
 * - body.home uniquement
 * - contenu Visual Composer après Slider Revolution uniquement
 * - aucun sélecteur du header, du slider ou du footer
 */

body.home {
	--ae-home-brand: #00b14d;
	--ae-home-brand-dark: #008f3e;
	--ae-home-ink: #252525;
	--ae-home-muted: #666;
	--ae-home-line: #e7e7e7;
	--ae-home-soft: #f7f8f7;
	--ae-home-card: #fff;
	--ae-home-radius: 14px;
	--ae-home-shadow: 0 8px 24px rgba(24, 35, 28, 0.07);
}

/*
 * Réassurance Electro sous le slider.
 * Le sélecteur exclut explicitement le bloc Slider Revolution précédent.
 */
body.home .entry-content .features-list {
	margin: 0 0 2.4rem;
	overflow: hidden;
	background: var(--ae-home-card);
	border: 1px solid var(--ae-home-line);
	border-top: 0;
	border-radius: 0 0 var(--ae-home-radius) var(--ae-home-radius);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.035);
}

body.home .entry-content .features-list .feature {
	min-width: 0;
	padding: 1.2rem 1.35rem;
}

body.home .entry-content .features-list .feature + .feature .media {
	border-left-color: var(--ae-home-line);
}

body.home .entry-content .features-list .feature-icon i {
	color: var(--ae-home-brand-dark);
}

body.home .entry-content .features-list .feature-text {
	color: var(--ae-home-muted);
	font-size: 0.86rem;
}

body.home .entry-content .features-list .feature-text strong {
	color: var(--ae-home-ink);
	font-weight: 700;
}

/* Espacement cohérent des sections Electro, sans modifier leur structure. */
body.home .entry-content .section-products-carousel,
body.home .entry-content .products-8-1,
body.home .entry-content .section-product-cards-carousel {
	margin-bottom: 2.7rem;
}

body.home .entry-content .section-products-carousel > header,
body.home .entry-content .products-8-1 > .container > header,
body.home .entry-content .section-product-cards-carousel > header {
	min-height: 3rem;
	margin-bottom: 1.05rem;
	padding-bottom: 0.8rem;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	border-bottom: 1px solid var(--ae-home-line);
}

body.home .entry-content .section-products-carousel > header .h1,
body.home .entry-content .products-8-1 > .container > header .h1,
body.home .entry-content .section-product-cards-carousel > header .h1 {
	margin: 0;
	color: var(--ae-home-ink);
	font-size: clamp(1.25rem, 2.3vw, 1.75rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.025em;
}

body.home .entry-content .ae-home-section-link {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

body.home .entry-content .ae-home-section-link::after {
	content: "Voir la catégorie →";
	padding: 0.35rem 0.6rem;
	color: var(--ae-home-brand);
	background: #eaf8f0;
	border-radius: 999px;
	font-size: 0.48em;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1;
	opacity: 1;
	white-space: nowrap;
	transform: none;
	transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

body.home .entry-content .ae-home-section-link:hover,
body.home .entry-content .ae-home-section-link:focus {
	color: var(--ae-home-brand-dark);
}

body.home .entry-content .ae-home-section-link:hover::after,
body.home .entry-content .ae-home-section-link:focus::after {
	color: #fff;
	background: var(--ae-home-brand);
	opacity: 1;
	transform: translateX(0.15rem);
}

/* Désactive uniquement l'ancien trait décoratif du titre Electro. */
body.home .entry-content .section-products-carousel > header .h1::after,
body.home .entry-content .products-8-1 > .container > header .h1::after,
body.home .entry-content .section-product-cards-carousel > header .h1::after {
	display: none;
}

body.home .entry-content .section-products-carousel .owl-nav a,
body.home .entry-content .section-product-cards-carousel .owl-nav a {
	width: 2.15rem;
	height: 2.15rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--ae-home-ink);
	background: var(--ae-home-card);
	border: 1px solid var(--ae-home-line);
	border-radius: 50%;
}

body.home .entry-content .section-products-carousel .owl-nav a:hover,
body.home .entry-content .section-product-cards-carousel .owl-nav a:hover {
	color: #fff;
	background: var(--ae-home-brand);
	border-color: var(--ae-home-brand);
}

/*
 * Cartes produits Electro.
 * Les carousels, classes AJAX et liens WooCommerce restent intacts.
 */
body.home .entry-content .section-products-carousel .product-outer,
body.home .entry-content .products-8-1 .product-outer,
body.home .entry-content .section-product-cards-carousel .product-outer {
	height: 100%;
	overflow: visible;
	background: var(--ae-home-card);
	border: 1px solid var(--ae-home-line);
	border-radius: var(--ae-home-radius);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.home .entry-content .section-products-carousel .product-outer:hover,
body.home .entry-content .products-8-1 .product-outer:hover,
body.home .entry-content .section-product-cards-carousel .product-outer:hover {
	border-color: #cfe3d6;
	box-shadow: var(--ae-home-shadow);
}

body.home .entry-content .section-products-carousel .product-inner,
body.home .entry-content .products-8-1 .product-inner,
body.home .entry-content .section-product-cards-carousel .product-inner {
	min-width: 0;
	height: 100%;
	overflow: hidden;
	background: var(--ae-home-card);
	border-radius: calc(var(--ae-home-radius) - 1px);
}

/*
 * Confinement strict des images produit.
 * Une image ne peut jamais sortir de son conteneur, quelle que soit sa taille source.
 */
body.home .entry-content .section-products-carousel .product-thumbnail,
body.home .entry-content .products-8-1 .product-thumbnail {
	width: 100%;
	height: 190px;
	padding: 0.8rem;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
}

body.home .entry-content .section-products-carousel .product-thumbnail img,
body.home .entry-content .products-8-1 .product-thumbnail img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	margin: auto !important;
	object-fit: contain !important;
	object-position: center !important;
}

/* Format spécifique aux cartes horizontales Boissons/Snacks/etc. */
body.home .entry-content .section-product-cards-carousel .card-media-left {
	width: 42%;
	height: 150px;
	padding: 0.7rem;
	overflow: hidden;
	display: flex;
	flex: 0 0 42%;
	align-items: center;
	justify-content: center;
	background: #fff;
}

body.home .entry-content .section-product-cards-carousel .card-media-left img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	margin: auto !important;
	object-fit: contain !important;
	object-position: center !important;
}

body.home .entry-content .section-product-cards-carousel .card-body {
	min-width: 0;
	padding: 0.85rem;
}

body.home .entry-content .section-products-carousel .product-loop-body,
body.home .entry-content .products-8-1 .product-loop-body,
body.home .entry-content .section-products-carousel .product-loop-footer,
body.home .entry-content .products-8-1 .product-loop-footer {
	padding-right: 0.85rem;
	padding-left: 0.85rem;
}

body.home .entry-content .section-products-carousel .loop-product-categories,
body.home .entry-content .products-8-1 .loop-product-categories,
body.home .entry-content .section-product-cards-carousel .loop-product-categories {
	max-width: 100%;
	overflow: hidden;
	color: var(--ae-home-muted);
	font-size: 0.72rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.home .entry-content .section-products-carousel .woocommerce-loop-product__title,
body.home .entry-content .products-8-1 .woocommerce-loop-product__title,
body.home .entry-content .section-product-cards-carousel .woocommerce-loop-product__title {
	min-height: 2.9em;
	margin-bottom: 0.55rem;
	overflow: hidden;
	display: -webkit-box;
	color: var(--ae-home-ink);
	font-size: 0.84rem;
	font-weight: 700;
	line-height: 1.45;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

body.home .entry-content .section-products-carousel .price,
body.home .entry-content .products-8-1 .price,
body.home .entry-content .section-product-cards-carousel .price {
	color: var(--ae-home-brand-dark);
	font-size: 1rem;
	font-weight: 700;
}

body.home .entry-content .section-products-carousel .price .woocommerce-price-suffix,
body.home .entry-content .products-8-1 .price .woocommerce-price-suffix,
body.home .entry-content .section-product-cards-carousel .price .woocommerce-price-suffix {
	color: var(--ae-home-muted);
	font-size: 0.68rem;
	font-weight: 400;
}

body.home .entry-content .section-products-carousel .add-to-cart-wrap .button,
body.home .entry-content .products-8-1 .add-to-cart-wrap .button,
body.home .entry-content .section-product-cards-carousel .add-to-cart-wrap .button {
	color: #fff !important;
	background-color: transparent !important;
}

body.home .entry-content .section-products-carousel .add-to-cart-wrap .button::before,
body.home .entry-content .section-products-carousel .added_to_cart::before,
body.home .entry-content .products-8-1 .add-to-cart-wrap .button::before,
body.home .entry-content .products-8-1 .added_to_cart::before,
body.home .entry-content .section-product-cards-carousel .add-to-cart-wrap .button::before,
body.home .entry-content .section-product-cards-carousel .added_to_cart::before {
	color: #fff !important;
	background-color: var(--ae-home-brand) !important;
	box-shadow: 0 4px 12px rgba(0, 177, 77, 0.2);
	transition: background-color 0.2s ease, transform 0.2s ease;
}

body.home .entry-content .section-products-carousel .add-to-cart-wrap .button:hover::before,
body.home .entry-content .section-products-carousel .added_to_cart:hover::before,
body.home .entry-content .products-8-1 .add-to-cart-wrap .button:hover::before,
body.home .entry-content .products-8-1 .added_to_cart:hover::before,
body.home .entry-content .section-product-cards-carousel .add-to-cart-wrap .button:hover::before,
body.home .entry-content .section-product-cards-carousel .added_to_cart:hover::before {
	background-color: var(--ae-home-brand-dark) !important;
	transform: scale(1.04);
}

/*
 * Electro positionne normalement .product-inner en absolu au survol desktop.
 * Avec les carousels cela provoquait la disparition visuelle de certaines cartes.
 * On garde donc la carte stable et le bouton panier accessible.
 */
@media (min-width: 1200px) {
	body.home .entry-content .section-products-carousel .product:hover,
	body.home .entry-content .products-8-1 .product:hover,
	body.home .entry-content .section-product-cards-carousel .product:hover {
		z-index: auto;
	}

	body.home .entry-content .section-products-carousel .product:hover .product-inner,
	body.home .entry-content .section-products-carousel .product.hover .product-inner,
	body.home .entry-content .products-8-1 .product:hover .product-inner,
	body.home .entry-content .products-8-1 .product.hover .product-inner,
	body.home .entry-content .section-product-cards-carousel .product:hover .product-inner,
	body.home .entry-content .section-product-cards-carousel .product.hover .product-inner {
		position: relative !important;
		width: 100% !important;
		height: 100% !important;
		min-height: 0 !important;
		box-shadow: none !important;
	}

	body.home .entry-content .section-products-carousel .hover-area,
	body.home .entry-content .products-8-1 .hover-area,
	body.home .entry-content .section-product-cards-carousel .hover-area {
		display: none !important;
	}

	body.home .entry-content .products-8-1 .product-main-8-1 li.product:hover .flex-div {
		height: 100% !important;
	}
}

/* Produit vedette Épicerie (structure .images différente des miniatures). */
body.home .entry-content .products-8-1 .product-main-8-1 .images {
	width: 100%;
	height: 330px;
	margin: 0 auto 0.75rem;
	padding: 1rem;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
}

body.home .entry-content .products-8-1 .product-main-8-1 .images .woocommerce-main-image {
	width: 100%;
	height: 100%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

body.home .entry-content .products-8-1 .product-main-8-1 .images img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	margin: auto !important;
	object-fit: contain !important;
	object-position: center !important;
}

/* Image décorative Fruits & Légumes : confinement identique. */
body.home .entry-content .vc-products-carousel-with-image .wpb_single_image,
body.home .entry-content .vc-products-carousel-with-image .vc_single_image-wrapper {
	max-width: 100%;
	overflow: hidden;
}

body.home .entry-content .vc-products-carousel-with-image .vc_single_image-img {
	width: 100%;
	height: auto;
	max-width: 100%;
	max-height: 430px;
	object-fit: contain;
}

/*
 * Fruits & Légumes : le réglage natif demande 7 produits dans une demi-colonne
 * sur grand écran, ce qui les rend minuscules. On conserve les mêmes produits
 * et le même bloc, mais on les présente en grille lisible sur desktop.
 */
@media (min-width: 992px) {
	body.home .entry-content .vc-products-carousel-with-image > .wpb_column:first-child {
		width: 35%;
	}

	body.home .entry-content .vc-products-carousel-with-image > .wpb_column:last-child {
		width: 65%;
	}

	body.home .entry-content .vc-products-carousel-with-image .products-carousel.owl-loaded {
		overflow: hidden;
	}

	body.home .entry-content .vc-products-carousel-with-image .products-carousel .owl-stage-outer {
		overflow: hidden !important;
	}

	body.home .entry-content .vc-products-carousel-with-image .products-carousel .owl-stage {
		width: 100% !important;
		display: grid !important;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 0.75rem;
		transform: none !important;
	}

	body.home .entry-content .vc-products-carousel-with-image .products-carousel .owl-item {
		width: auto !important;
		min-width: 0 !important;
	}

	body.home .entry-content .vc-products-carousel-with-image .products-carousel .owl-nav,
	body.home .entry-content .vc-products-carousel-with-image .products-carousel .owl-dots {
		display: none !important;
	}

	body.home .entry-content .vc-products-carousel-with-image .product-thumbnail {
		height: 185px;
	}

	body.home .entry-content .vc-products-carousel-with-image .woocommerce-loop-product__title {
		min-height: 2.8em;
		font-size: 0.9rem;
	}

	body.home .entry-content .vc-products-carousel-with-image .price {
		font-size: 1.08rem;
	}
}

/* Tablette. */
@media (max-width: 991.98px) {
	body.home .entry-content .section-products-carousel .product-thumbnail,
	body.home .entry-content .products-8-1 .product-thumbnail {
		height: 170px;
	}

	body.home .entry-content .section-product-cards-carousel .card-media-left {
		height: 135px;
	}

	body.home .entry-content .products-8-1 .product-main-8-1 .images {
		height: 280px;
	}
}

/* Mobile. */
@media (max-width: 767.98px) {
	body.home .entry-content .features-list {
		margin-bottom: 1.5rem;
		border-radius: 0 0 12px 12px;
	}

	body.home .entry-content .features-list .feature {
		padding: 0.8rem 1rem;
	}

	body.home .entry-content .features-list .feature + .feature .media {
		border-top: 1px solid var(--ae-home-line);
		border-left: 0;
	}

	body.home .entry-content .section-products-carousel,
	body.home .entry-content .products-8-1,
	body.home .entry-content .section-product-cards-carousel {
		margin-bottom: 2rem;
	}

	body.home .entry-content .section-products-carousel > header,
	body.home .entry-content .products-8-1 > .container > header,
	body.home .entry-content .section-product-cards-carousel > header {
		margin-bottom: 0.75rem;
		padding-bottom: 0.65rem;
	}

	body.home .entry-content .section-products-carousel > header .h1,
	body.home .entry-content .products-8-1 > .container > header .h1,
	body.home .entry-content .section-product-cards-carousel > header .h1 {
		font-size: 1.15rem;
	}

	body.home .entry-content .section-products-carousel > header .h1 {
		min-width: 0;
		flex: 1 1 auto;
		overflow: hidden;
	}

	/*
	 * Le libellé desktop conserve ses flammes. Sur mobile, un texte court
	 * évite le chevauchement avec les commandes du carousel.
	 */
	body.home .entry-content .ae-home-section-link--top-sales {
		max-width: 100%;
		overflow: hidden;
		font-size: 0;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	body.home .entry-content .ae-home-section-link--top-sales::before {
		content: "Top ventes du mois";
		font-size: 1rem;
		line-height: 1.25;
	}

	body.home .entry-content .ae-home-section-link--top-sales::after {
		display: inline-flex;
	}

	body.home .entry-content .ae-home-section-link::after {
		content: "Voir tout →";
		padding: 0.3rem 0.48rem;
		font-size: 0.65rem;
	}

	body.home .entry-content .section-products-carousel > header .owl-nav {
		position: static !important;
		margin: 0 !important;
		display: flex;
		flex: 0 0 auto;
		gap: 0.3rem;
	}

	body.home .entry-content .section-products-carousel > header .owl-nav a {
		width: 1.9rem;
		height: 1.9rem;
		margin: 0 !important;
		flex: 0 0 1.9rem;
		font-size: 0.8rem;
	}

	body.home .entry-content .section-products-carousel .product-thumbnail,
	body.home .entry-content .products-8-1 .product-thumbnail {
		height: 135px;
		padding: 0.55rem;
	}

	body.home .entry-content .section-product-cards-carousel .card-media-left {
		height: 120px;
		padding: 0.5rem;
	}

	body.home .entry-content .products-8-1 .product-main-8-1 .images {
		height: 230px;
		padding: 0.6rem;
	}

	body.home .entry-content .section-products-carousel .product-loop-body,
	body.home .entry-content .products-8-1 .product-loop-body,
	body.home .entry-content .section-products-carousel .product-loop-footer,
	body.home .entry-content .products-8-1 .product-loop-footer,
	body.home .entry-content .section-product-cards-carousel .card-body {
		padding-right: 0.65rem;
		padding-left: 0.65rem;
	}

	body.home .entry-content .section-products-carousel .woocommerce-loop-product__title,
	body.home .entry-content .products-8-1 .woocommerce-loop-product__title,
	body.home .entry-content .section-product-cards-carousel .woocommerce-loop-product__title {
		font-size: 0.76rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.home .entry-content .section-products-carousel .product-outer,
	body.home .entry-content .products-8-1 .product-outer,
	body.home .entry-content .section-product-cards-carousel .product-outer {
		transition: none;
	}
}
