/* Panier flottant Blocksy. Le pourquoi de chaque règle est dans
 * floating-bar.php, « Notes sur floating-bar.css » — ce fichier est servi
 * aux visiteurs, on y laisse le minimum. */

/* Ceinture : bouton de variation masqué tant que floating-bar.js n'a pas
 * écrit sa cible. */
.single-product a.product_type_variation.add_to_cart_button:not(.cala-synced):not(.products a) {
	display: none !important;
}
/* Exception carte cadeau (classe posée par floating-bar.php). */
.single-product.cala-gift-card a.product_type_variation.add_to_cart_button:not(.products a) {
	display: inline-flex !important;
}
.single-product.cala-gift-card .ct-floating-bar .quantity {
	display: none;
}

/* « / Disponible » retiré. */
.ct-floating-bar .product-price .stock {
	display: none;
}

/* Finition dans la rangée du prix (span écrit par floating-bar.js). */
.ct-floating-bar .product-price .cala-bar-finition {
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ct-floating-bar .product-price .cala-bar-finition::after {
	content: "\00B7";
	margin: 0 0.45em;
}
body .ct-floating-bar .product-price {
	column-gap: 0;
}

/* Téléphone : barre en bas, bouton et photo à 52 px, titre / finition / prix
 * sur trois rangées. Le préfixe `body` est nécessaire (voir floating-bar.php). */
@media (max-width: 689.98px) {
	body .ct-drawer-canvas[data-location="start"] .ct-floating-bar {
		top: auto;
		bottom: 0;
		--translate-offset: 80px;
		--theme-box-shadow: 0 -10px 20px rgba(44, 62, 80, 0.15);
		box-sizing: border-box;
		padding-bottom: env(safe-area-inset-bottom, 0px);
		height: calc(80px + env(safe-area-inset-bottom, 0px));
	}
	body:has(.ct-drawer-canvas[data-location="start"][data-floating-bar="yes"]) {
		padding-bottom: 80px;
	}
	body .ct-drawer-canvas[data-location="start"] .ct-floating-bar .ct-container {
		width: calc(100% - 32px);
		grid-template-columns: minmax(0, 200px) minmax(150px, 1fr);
		gap: 12px;
	}
	body .ct-drawer-canvas[data-location="start"] .ct-floating-bar .ct-floating-bar-content {
		gap: 10px;
	}
	body .ct-drawer-canvas[data-location="start"] .ct-floating-bar .ct-media-container {
		width: 52px;
		max-width: 52px;
		border-radius: 3px;
	}
	body .ct-drawer-canvas[data-location="start"] .ct-floating-bar .product-title {
		font-size: 13px;
	}
	body .ct-drawer-canvas[data-location="start"] .ct-floating-bar .product-price {
		display: block;
	}
	body .ct-drawer-canvas[data-location="start"] .ct-floating-bar .product-price .cala-bar-finition,
	body .ct-drawer-canvas[data-location="start"] .ct-floating-bar .product-price .price {
		display: block;
		font-size: 12px;
		line-height: 1.4;
	}
	body .ct-drawer-canvas[data-location="start"] .ct-floating-bar .product-price .cala-bar-finition::after {
		display: none;
	}
	body .ct-drawer-canvas[data-location="start"] .ct-floating-bar .ct-floating-bar-actions .add_to_cart_button {
		--theme-button-min-height: 52px;
		--theme-button-padding: 5px 16px;
		min-width: 150px;
		flex: 1 1 auto;
	}
}
