/*
 * UniMarket – styles globaux (accueil, WhatsApp, confiance).
 * Couleurs : palette Blocksy existante.
 */

/* ------------------------------------------------------------------
 * Bouton WhatsApp flottant (à gauche : le bouton d'appel est à droite)
 * --------------------------------------------------------------- */

.um-wa-float {
	position: fixed;
	left: 16px;
	bottom: 20px;
	z-index: 98;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #25d366;
	color: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
	transition: bottom 0.25s ease, transform 0.15s ease;
}
.um-wa-float:hover,
.um-wa-float:focus-visible {
	color: #fff;
	transform: scale(1.06);
}
body.um-sticky-on .um-wa-float {
	bottom: 88px;
}

/* ------------------------------------------------------------------
 * Fiche produit : confiance + commande WhatsApp
 * --------------------------------------------------------------- */

.um-trust {
	display: grid;
	gap: 6px;
	margin: 16px 0 12px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--theme-palette-color-6, #f2f5f7);
	font-size: 0.9rem;
	list-style: none;
}
.um-trust li {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}
.um-wa-order {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	border: 2px solid #25d366;
	border-radius: 8px;
	color: #128c4a;
	font-weight: 700;
	text-decoration: none;
}
.um-wa-order:hover {
	background: #25d366;
	color: #fff;
}

/* ------------------------------------------------------------------
 * Accueil : meilleures ventes
 * --------------------------------------------------------------- */

.um-bestsellers {
	padding: 48px 16px;
}
.um-bestsellers__inner {
	max-width: var(--theme-normal-container-max-width, 1290px);
	margin: 0 auto;
}
.um-bestsellers__title {
	margin: 0 0 4px;
	text-align: center;
	color: var(--theme-palette-color-2, #ff6600);
}

/* ------------------------------------------------------------------
 * Cartes produits uniformes (accueil, boutique, catégories, recherche,
 * produits similaires) : mêmes proportions, titres sur 2 lignes.
 * --------------------------------------------------------------- */

ul.products li.product .woocommerce-loop-product__title a {
	display: -webkit-box;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
ul.products li.product .ct-media-container img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

@media (max-width: 689.98px) {
	ul.products {
		--shop-columns: repeat(2, minmax(0, 1fr));
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 20px 12px !important;
	}
	ul.products li.product .woocommerce-loop-product__title,
	ul.products li.product .woocommerce-loop-product__title a {
		--theme-font-size: 14px;
		font-size: 14px !important;
		line-height: 1.35 !important;
	}
	ul.products li.product .price {
		font-size: 14px !important;
	}
	ul.products li.product .onsale {
		font-size: 11px;
		padding: 4px 8px;
	}
	ul.products li.product .button {
		width: 100%;
		min-height: 40px;
		padding: 0 8px;
		font-size: 13px;
	}
}

/* ------------------------------------------------------------------
 * Accès rapide aux catégories (boutique / catégories / recherche)
 * --------------------------------------------------------------- */

.um-cats {
	margin: 0 0 20px;
}
.um-cats ul {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0 0 4px;
	overflow-x: auto;
	list-style: none;
	scrollbar-width: none;
}
.um-cats li {
	flex: none;
	margin: 0;
}
.um-cats a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid var(--theme-border-color, #eaeaec);
	border-radius: 999px;
	color: var(--theme-palette-color-4, #111518);
	font-size: 0.9rem;
	white-space: nowrap;
}
.um-cats a span {
	font-size: 0.75rem;
	opacity: 0.6;
}
.um-cats a[aria-current="page"],
.um-cats a:hover {
	border-color: var(--theme-palette-color-1, #007bff);
	background: var(--theme-palette-color-1, #007bff);
	color: #fff;
}

/* ------------------------------------------------------------------
 * Confirmation de commande
 * --------------------------------------------------------------- */

.um-thanks {
	margin: 0 0 32px;
	padding: 20px;
	border: 1px solid var(--theme-border-color, #eaeaec);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 6px 24px rgba(17, 21, 24, 0.06);
}
.um-thanks__title {
	margin: 0 0 14px;
	color: var(--theme-palette-color-2, #ff6600);
	font-size: 1.25rem;
	font-weight: 700;
}
.um-thanks__recap {
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}
.um-thanks__recap li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 8px 0;
	border-bottom: 1px solid var(--theme-border-color, #eaeaec);
}

/* ------------------------------------------------------------------
 * Pas de fausse urgence : un compte à rebours terminé n'est plus affiché
 * (le message « Fin de l'offre » apparaissait alors que la promotion
 * est toujours active).
 * --------------------------------------------------------------- */

.wooct-wrap-single:has(.wooct-ended),
.wooct-countdown.wooct-ended {
	display: none !important;
}
.um-bestsellers__intro {
	margin: 0 0 24px;
	text-align: center;
	opacity: 0.8;
}
.um-bestsellers__more {
	margin: 24px 0 0;
	text-align: center;
}

/* ------------------------------------------------------------------
 * Accueil sur mobile : pages moins longues, lecture plus rapide
 * --------------------------------------------------------------- */

@media (max-width: 767.98px) {
	/* Catégories : 2 par ligne au lieu d'une */
	.home .elementor-element-e747e1d.e-con-full,
	.home .elementor-element-e747e1d > .e-con-inner {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
	/* Elementor compensait l'ancienne grille par une marge de -700px. */
	.home .elementor-element-e747e1d {
		margin-bottom: 24px !important;
	}
	.home .elementor-element-e747e1d .e-con.e-child {
		--width: 100%;
		width: 100% !important;
		min-width: 0;
		margin: 0 !important;
		padding: 10px !important;
	}
	.home .elementor-element-e747e1d .elementor-image-box-img {
		margin-bottom: 6px !important;
	}
	.home .elementor-element-e747e1d .elementor-image-box-img img {
		width: 100%;
		max-height: 140px;
		object-fit: contain;
	}
	.home .elementor-element-e747e1d .elementor-image-box-title {
		font-size: 15px !important;
		line-height: 1.3 !important;
	}
	.home .elementor-element-e747e1d .wpr-button {
		padding: 8px 12px !important;
		font-size: 13px !important;
	}

	.um-bestsellers {
		padding: 32px 16px;
	}
}
