/*
 * Estimated Delivery Date — habillage Lentilles Maroc (fiche produit)
 * Bloc délai de livraison : carte, sélecteur de ville en pastille,
 * bandeau "Livraison prévue", frise Commande → Livraison.
 */

/* ---------- Carte ---------- */
.single-product #parent_div {
	background: #f5f9fc;
	border: 1px solid #e1ecf5;
	border-radius: 12px;
	padding: 14px 16px 12px;
	margin: 12px 0 0;
	font-family: Lato, sans-serif;
	color: #12324a;
}

/* ---------- Titre + sélecteur de ville ---------- */
.single-product #parent_div .plgfyest-ville {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 !important;
}
.single-product #parent_div .plgfyest-ville:has(select) { margin-bottom: 12px !important; }

.single-product #parent_div .plugify_select_heading {
	margin: 0;
	font-size: 13px;
	line-height: 1.3;
	color: #12324a;
}
.single-product #parent_div .plugify_select_heading strong { font-weight: 700; }
.single-product #parent_div .plgfyest-note {
	display: block;
	font-size: 11.5px;
	font-weight: 400;
	color: #6b8396;
}

/* Pastille */
.single-product #parent_div .select2-container {
	width: auto !important;
	min-width: 180px;
	max-width: 100%;
}
.single-product #parent_div .select2-selection--single {
	height: 36px;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 12px 0 10px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: #eaf3fa;
	cursor: pointer;
	outline: none;
	transition: background .15s, border-color .15s, box-shadow .15s;
}
.single-product #parent_div .select2-selection--single::before,
.single-product #parent_div .select2-selection--single::after {
	content: "";
	background: #1b75bb;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}
.single-product #parent_div .select2-selection--single::before {
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5A7 7 0 0 1 19 9.5C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-11.5A7 7 0 0 1 19 9.5C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E");
}
.single-product #parent_div .select2-selection--single::after {
	flex: 0 0 12px;
	width: 12px;
	height: 12px;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	transition: transform .2s;
}
.single-product #parent_div .select2-container--open .select2-selection--single::after { transform: rotate(180deg); }
.single-product #parent_div .select2-selection--single:hover { background: #dcebf7; }
.single-product #parent_div .select2-container--open .select2-selection--single,
.single-product #parent_div .select2-container--focus .select2-selection--single {
	background: #fff;
	border-color: #1b75bb;
	box-shadow: 0 0 0 3px rgba(27, 117, 187, .15);
}
.single-product #parent_div .select2-selection__rendered {
	flex: 1 1 auto;
	padding: 0 !important;
	line-height: 1 !important;
	font-size: 14px;
	font-weight: 700;
	color: #1b75bb !important;
	white-space: nowrap;
}
.single-product #parent_div .select2-selection__arrow { display: none; }

/* Liste déroulante des villes */
.select2-dropdown.plgfyest-dropdown {
	border: 1px solid #e1ecf5 !important;
	border-radius: 12px !important;
	box-shadow: 0 12px 32px rgba(18, 50, 74, .16);
	overflow: hidden;
	margin-top: 6px;
	font-family: Lato, sans-serif;
}
.select2-dropdown--above.plgfyest-dropdown { margin-top: -6px; }
.plgfyest-dropdown .select2-search--dropdown { padding: 8px; }
.plgfyest-dropdown .select2-search__field {
	border: 1px solid #cfdeea !important;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 14px;
	outline: none;
}
.plgfyest-dropdown .select2-search__field:focus { border-color: #1b75bb !important; }
.plgfyest-dropdown .select2-results__options { max-height: 260px !important; padding: 4px; }
.plgfyest-dropdown .select2-results__option {
	padding: 9px 12px;
	border-radius: 8px;
	font-size: 14px;
	color: #12324a;
}
.plgfyest-dropdown .select2-results__option--highlighted,
.plgfyest-dropdown .select2-results__option--highlighted[aria-selected] {
	background: #eaf3fa !important;
	color: #1b75bb !important;
}
.plgfyest-dropdown .select2-results__option[aria-selected="true"] {
	background: #1b75bb !important;
	color: #fff !important;
	font-weight: 700;
}

/* ---------- Message texte du plugin ----------
 * Masqué quand le bandeau est affiché (il dit la même chose) ; sinon
 * (aucune ville choisie, rupture de stock…) affiché en sobre. */
.single-product #parent_div #plgfy_estemated_message {
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	font-family: inherit !important;
	font-size: 12.5px;
	color: #6b8396 !important;
}
.single-product #parent_div:has(.plgfyest-timeline:not([style*="none"])) #plgfy_estemated_message { display: none !important; }

/* ---------- Bandeau "Livraison prévue" ---------- */
.plgfyest-timeline { margin: 0; padding: 0; border: 0; }

.plgfyest-headline {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #fff;
	border: 1px solid #e1ecf5;
	border-radius: 10px;
	padding: 10px 12px;
	margin-bottom: 12px;
}
.plgfyest-headline__icon {
	flex: 0 0 36px;
	height: 36px;
	border-radius: 50%;
	background: #eaf3fa;
	color: #1b75bb;
	display: flex;
	align-items: center;
	justify-content: center;
}
.plgfyest-headline__icon svg { width: 20px; height: 20px; }
.plgfyest-headline__label,
.plgfyest-headline__sub {
	font-size: 12px;
	line-height: 1.3;
	color: #6b8396;
}
.plgfyest-headline__date {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.25;
	color: #1b75bb;
}

/* ---------- Frise Commande → Livraison ---------- */
.plgfyest-steps {
	display: flex;
	position: relative;
}
.plgfyest-steps::before {
	content: "";
	position: absolute;
	top: 11px;
	left: 25%;
	right: 25%;
	height: 2px;
	background: #d6e4ef;
}
.plgfyest-step {
	flex: 1 1 0;
	text-align: center;
	position: relative;
	z-index: 1;
}
.plgfyest-step__dot {
	display: block;
	width: 24px;
	height: 24px;
	margin: 0 auto 6px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #d6e4ef;
	box-sizing: border-box;
}
.plgfyest-step--done .plgfyest-step__dot {
	background: #1b75bb;
	border-color: #1b75bb;
}
.plgfyest-step--target .plgfyest-step__dot {
	border-color: #1b75bb;
	box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 12px #1b75bb;
}
.plgfyest-step__date {
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.3;
	color: #12324a;
}
.plgfyest-step--target .plgfyest-step__date { color: #1b75bb; }
.plgfyest-step__label {
	font-size: 11.5px;
	line-height: 1.3;
	color: #6b8396;
}

/* ---------- Barre "Ajouter au panier" collante (Flatsome) ----------
 * Flatsome déplace tout le bloc "Ajouter au panier" dans la barre
 * collante quand on descend, et le délai de livraison partait avec.
 * Il reste affiché sur la fiche et il est masqué dans la barre.
 */
.sticky-add-to-cart #parent_div,
.sticky-add-to-cart .plgfyest-ville,
.sticky-add-to-cart .plgfyest-timeline,
.sticky-add-to-cart .plgfyest-note {
	display: none !important;
}

/* ---------- Barre "Ajouter au panier" collante — habillage Lentilles Maroc ----------
 * Carte blanche avec ombre, vignette arrondie, nom du produit + prix,
 * bouton bleu de la fiche produit. Sur mobile, placée au-dessus du menu
 * du bas, et la bulle du panier (Side Cart) remonte au-dessus d'elle.
 */
.sticky-add-to-cart--active {
	background: #fff !important;
	border-top: 1px solid #e1ecf5;
	border-radius: 16px 16px 0 0;
	box-shadow: 0 -8px 24px rgba(18, 50, 74, .12);
	padding: 8px 12px !important;
}
.sticky-add-to-cart--active .sticky-add-to-cart__product {
	display: grid !important;
	grid-template-columns: 48px auto 1fr auto;
	grid-template-rows: auto auto;
	align-items: center;
	column-gap: 10px;
	row-gap: 2px;
	max-width: 1080px;
	margin: 0 auto;
	font-family: Lato, sans-serif;
}
.sticky-add-to-cart--active .sticky-add-to-cart-img {
	grid-column: 1;
	grid-row: 1 / span 2;
	width: 48px !important;
	height: 48px !important;
	object-fit: cover;
	border: 1px solid #e1ecf5;
	border-radius: 10px;
	background: #fff;
	margin: 0 !important;
}
.sticky-add-to-cart--active .product-title-small {
	display: block !important;
	grid-column: 2 / span 2;
	grid-row: 1;
	min-width: 0;
	margin: 0 !important;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 13px;
	line-height: 1.25;
	color: #12324a;
}
.sticky-add-to-cart--active .product-title-small strong { font-weight: 700; }
.sticky-add-to-cart--active .sticky-add-to-cart__product > ins {
	grid-column: 2;
	grid-row: 2;
	margin: 0 !important;
	text-decoration: none;
	font-size: 17px;
	font-weight: 900;
	line-height: 1.2;
	color: #12324a;
	white-space: nowrap;
}
.sticky-add-to-cart--active .sticky-add-to-cart__product > del {
	grid-column: 3;
	grid-row: 2;
	margin: 0 !important;
	font-size: 12px;
	line-height: 1.2;
	color: #8aa0b2;
	white-space: nowrap;
	opacity: 1;
}
.sticky-add-to-cart--active .sticky-add-to-cart__product > .screen-reader-text {
	position: absolute !important;
}
.sticky-add-to-cart--active .sticky-add-to-cart__product > .button {
	grid-column: 4;
	grid-row: 1 / span 2;
	margin: 0 !important;
	min-height: 46px;
	padding: 0 18px;
	border: 0;
	border-radius: 12px;
	background: #1b75bb !important;
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	line-height: 46px;
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(27, 117, 187, .25);
}
.sticky-add-to-cart--active .product-title-small,
.sticky-add-to-cart--active .sticky-add-to-cart__product > ins,
.sticky-add-to-cart--active .sticky-add-to-cart__product > del {
	justify-self: start;
	text-align: left;
}
/* Libellé court : "Sélectionner les options" ne tenait pas sur mobile */
.sticky-add-to-cart--active .sticky-add-to-cart-select-options-button > span {
	display: none;
}
.sticky-add-to-cart--active .sticky-add-to-cart-select-options-button::after {
	content: "Commander";
}
.sticky-add-to-cart--active .sticky-add-to-cart__product > .button:hover {
	background: #155f98 !important;
}

/* Produits simples (ex. MeniCare Plus) : Flatsome met le formulaire complet
 * dans la barre (libellé "Quantité", sélecteur de quantité, bouton).
 * Vignette | nom du produit (2 lignes max) | quantité + bouton. */
.sticky-add-to-cart--active .sticky-add-to-cart__product:has(> form.cart) {
	grid-template-columns: 44px 1fr auto !important;
}
.sticky-add-to-cart--active .sticky-add-to-cart__product:has(> form.cart) .product-title-small {
	grid-column: 2;
	grid-row: 1 / span 2;
	display: -webkit-box !important;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	white-space: normal;
}
.sticky-add-to-cart--active .sticky-add-to-cart__product > form.cart {
	grid-column: 3;
	grid-row: 1 / span 2;
	display: flex !important;
	align-items: center;
	gap: 8px;
	width: auto;
	margin: 0 !important;
}
.sticky-add-to-cart--active form.cart > .qty {
	display: none !important;
}
.sticky-add-to-cart--active form.cart .ux-quantity {
	display: flex;
	align-items: center;
	height: 46px;
	margin: 0 !important;
	border: 1px solid #e1ecf5;
	border-radius: 12px;
	overflow: hidden;
	background: #f5f9fc;
}
.sticky-add-to-cart--active form.cart .ux-quantity .button,
.sticky-add-to-cart--active form.cart .ux-quantity input {
	height: 44px !important;
	min-height: 44px;
	margin: 0 !important;
	padding: 0;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #12324a;
	font-size: 15px;
}
.sticky-add-to-cart--active form.cart .ux-quantity .button {
	width: 30px;
}
.sticky-add-to-cart--active form.cart .ux-quantity input.qty {
	width: 28px;
	text-align: center;
	font-weight: 700;
}
.sticky-add-to-cart--active form.cart .single_add_to_cart_button {
	margin: 0 !important;
	min-height: 46px;
	padding: 0 14px;
	border: 0;
	border-radius: 12px;
	background: #1b75bb !important;
	color: #fff !important;
	font-size: 13px;
	font-weight: 700;
	line-height: 46px;
	letter-spacing: 0;
	text-transform: none;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(27, 117, 187, .25);
}
.sticky-add-to-cart--active form.cart .single_add_to_cart_button:hover {
	background: #155f98 !important;
}

/* Ordinateur / tablette : barre pleine largeur, contenu aligné sur la
 * largeur du site (1080 px) — nom + prix à gauche, quantité + bouton à droite. */
@media (min-width: 550px) {
	.sticky-add-to-cart--active {
		grid-template-columns: minmax(0, 1080px) !important;
		padding: 10px 24px !important;
		border-radius: 0;
	}
	.sticky-add-to-cart--active .sticky-add-to-cart__product {
		width: 100%;
		max-width: 1080px;
		grid-template-columns: 52px auto 1fr auto;
		column-gap: 14px;
	}
	.sticky-add-to-cart--active .sticky-add-to-cart__product:has(> form.cart) {
		grid-template-columns: 52px 1fr auto !important;
	}
	.sticky-add-to-cart--active .sticky-add-to-cart-img {
		width: 52px !important;
		height: 52px !important;
	}
	.sticky-add-to-cart--active .product-title-small {
		font-size: 16px;
	}
	.sticky-add-to-cart--active .sticky-add-to-cart__product > ins {
		font-size: 19px;
	}
	.sticky-add-to-cart--active .sticky-add-to-cart__product > del {
		font-size: 13px;
	}
	.sticky-add-to-cart--active .sticky-add-to-cart__product > .button,
	.sticky-add-to-cart--active form.cart .single_add_to_cart_button {
		min-height: 48px;
		padding: 0 28px;
		font-size: 15px;
		line-height: 48px;
	}
	.sticky-add-to-cart--active form.cart {
		gap: 12px;
	}
	.sticky-add-to-cart--active form.cart .ux-quantity {
		height: 48px;
	}
	.sticky-add-to-cart--active form.cart .ux-quantity .button,
	.sticky-add-to-cart--active form.cart .ux-quantity input {
		height: 46px !important;
		min-height: 46px;
	}
	.sticky-add-to-cart--active form.cart .ux-quantity .button {
		width: 36px;
	}
	.sticky-add-to-cart--active form.cart .ux-quantity input.qty {
		width: 34px;
	}
	body:has(.sticky-add-to-cart--active) .xoo-wsc-basket {
		bottom: 92px !important;
		transition: bottom .25s ease;
	}
}

/* Mobile : au-dessus du menu du bas (SHOP / CALL / MON COMPTE / PANIER,
 * .sticky-mobile-menu, 66 px, z-index 999), et bulle du panier remontée. */
@media (max-width: 549px) {
	body:has(.sticky-mobile-menu) .sticky-add-to-cart--active {
		bottom: 66px !important;
		z-index: 998;
	}
	.sticky-add-to-cart--active .sticky-add-to-cart__product {
		grid-template-columns: 44px auto 1fr auto;
		column-gap: 8px;
	}
	.sticky-add-to-cart--active .sticky-add-to-cart-img {
		width: 44px !important;
		height: 44px !important;
	}
	.sticky-add-to-cart--active .sticky-add-to-cart__product > .button {
		padding: 0 14px;
		font-size: 13px;
	}
	body:has(.sticky-add-to-cart--active) .xoo-wsc-basket {
		bottom: 150px !important;
		transition: bottom .25s ease;
	}
}
