/* Mini cart: cart effects ("Popup"), flying picture and animations */

/* The basket shakes when the flying picture has landed. */
.whmc-fx-shake {
	-webkit-animation: whmc-fx-shake .75s ease-in-out;
	animation: whmc-fx-shake .75s ease-in-out;
	transform-origin: 50% 80%;
}

@keyframes whmc-fx-shake {
	0%, 100% { transform: rotate(0) scale(1); }
	15% { transform: rotate(-16deg) scale(1.12); }
	32% { transform: rotate(13deg) scale(1.12); }
	48% { transform: rotate(-9deg) scale(1.08); }
	64% { transform: rotate(6deg) scale(1.04); }
	80% { transform: rotate(-3deg) scale(1.02); }
}

/* The little count badge "pops" when a product has landed in the cart. */
.whmc-count-footer.whmc-fx-bump {
	animation: whmc-fx-bump .45s ease;
}

@keyframes whmc-fx-bump {
	0% { transform: scale(1); }
	40% { transform: scale(1.5); }
	100% { transform: scale(1); }
}

/* The flying product picture */
.whmc-fx-fly-img {
	position: fixed;
	z-index: 1000003;
	pointer-events: none;
	margin: 0;
	border-radius: 10px;
	object-fit: cover;
	background: #fff;
	box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
	will-change: transform, opacity;
}

/* ------------------------------------------------------------------
 * Popup
 * The same cart, opened in the middle of the screen.
 * ---------------------------------------------------------------- */
body.whmc-fx-popup #pm_menu {
	position: fixed !important;
	top: 50% !important;
	left: 50% !important;
	right: auto !important;
	bottom: auto !important;
	width: min(max(var(--menu-width, 420px), 460px), 94vw) !important;
	height: min(86vh, 720px) !important;
	border-radius: 14px !important;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
	transform: translate(-50%, -46%) scale(.94);
	opacity: 0;
	visibility: hidden;
	-webkit-animation: none !important;
	animation: none !important;
	transition: opacity .28s ease, transform .28s ease, visibility 0s linear .28s;
}

body.whmc-fx-popup #pm_menu.pm_open,
body.whmc-fx-popup #pm_menu.pm_open_auto {
	transform: translate(-50%, -50%) scale(1);
	opacity: 1;
	visibility: visible;
	transition-delay: 0s;
}

/* The popup box does not clip, so the "Products you may like" panel can sit on its edge like it does on the side cart.
   The cart content itself is clipped to the rounded corners. */
body.whmc-fx-popup #pm_menu {
	overflow: visible !important;
}
body.whmc-fx-popup #pm_menu #pm_menu_child {
	border-radius: inherit;
	overflow: hidden;
	max-height: 100%;
}

/* Products you may like: opens beside the popup, and the pair stays centred on the screen. */
body.whmc-fx-popup .whmc-sgeested-drawer.whmc-sgeested-drawer-active {
	left: auto !important;
	right: 100% !important;
	width: 350px;
	max-width: 350px;
	border-radius: 14px 0 0 14px;
	box-shadow: -10px 0 40px rgba(0, 0, 0, .18);
	overflow: visible;
}
body.whmc-fx-popup #pm_menu.whmc-fx-sug-on {
	left: calc(50% + 175px) !important;
}
body.whmc-fx-popup .whmc-sgeested-drawer .whmc-related-products {
	height: 100%;
	border-radius: 14px 0 0 14px;
	overflow: hidden;
}
body.whmc-fx-popup .whmc-sgeested-drawer .whmc-sgeested-rp-cont {
	height: 100%;
	display: flex;
	flex-direction: column;
}
body.whmc-fx-popup .whmc-sgeested-drawer .whmc_sug_rp-title {
	flex: none;
}
body.whmc-fx-popup .whmc-sgeested-drawer ul.whmc-sgeested-products {
	flex: 1 1 auto;
	min-height: 0;
	max-height: none;
	overflow-y: auto;
	padding-bottom: 16px;
}
@media (max-width: 879px) {
	/* Not enough room next to the popup on small screens. */
	body.whmc-fx-popup .whmc-sgeested-drawer,
	body.whmc-fx-popup span.whmc-related-dtg-icon,
	body.whmc-fx-popup span.whmc-sgeested-drawer-fixoicons {
		display: none !important;
	}
	body.whmc-fx-popup #pm_menu.whmc-fx-sug-on {
		left: 50% !important;
	}
}

/* Popup: no arrow in the panel header, no toggle icons, and a cross instead of the back arrow. */
body.whmc-fx-popup .whmc_sug_rp-title span.icon_arrow-left2,
body.whmc-fx-popup span.whmc-related-dtg-icon,
body.whmc-fx-popup span.whmc-sgeested-drawer-fixoicons {
	display: none !important;
}
body.whmc-fx-popup .cloasebtn i.icon_arrow-left2:before {
	content: "\2715" !important;
	font-family: Arial, Helvetica, sans-serif !important;
	font-style: normal;
	font-weight: 400;
	font-size: 22px;
	line-height: 1;
}

@media (max-width: 767px) {
	body.whmc-fx-popup #pm_menu {
		width: 94vw !important;
		height: 88vh !important;
	}
}

/* ------------------------------------------------------------------
 * Popup animation styles ("Popup Animation" setting)
 * zoom is the default one above.
 * ---------------------------------------------------------------- */
body.whmc-fx-pop-fade #pm_menu {
	transform: translate(-50%, -50%);
}

body.whmc-fx-pop-bounce #pm_menu {
	transform: translate(-50%, calc(-50% + 60px));
	transition: opacity .25s ease, transform .55s cubic-bezier(.34, 1.56, .64, 1), visibility 0s linear .55s;
}
body.whmc-fx-pop-bounce #pm_menu.pm_open,
body.whmc-fx-pop-bounce #pm_menu.pm_open_auto {
	transform: translate(-50%, -50%);
	transition-delay: 0s;
}

body.whmc-fx-pop-bubble #pm_menu {
	transform-origin: var(--whmc-ox, 50%) var(--whmc-oy, 50%);
	transform: translate(-50%, -50%) scale(.04);
	border-radius: 40px !important;
	transition: opacity .2s ease, transform .5s cubic-bezier(.22, .9, .3, 1), border-radius .5s ease, visibility 0s linear .5s;
}
body.whmc-fx-pop-bubble #pm_menu.pm_open,
body.whmc-fx-pop-bubble #pm_menu.pm_open_auto {
	transform: translate(-50%, -50%) scale(1);
	border-radius: 14px !important;
	transition-delay: 0s;
}

/* ------------------------------------------------------------------
 * Backdrop blur: the page behind the cart fades into a soft blur.
 * ---------------------------------------------------------------- */
/* Hidden from the very first paint, so nothing flashes or fades while the page loads or refreshes. */
body.whmcfx-on-blur .pm_overlay:not(.pm_show) {
	opacity: 0;
	visibility: hidden;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	-webkit-animation: none !important;
	animation: none !important;
}
body.whmcfx-on-blur .pm_overlay.pm_show {
	opacity: 1;
	visibility: visible;
	background: rgba(15, 23, 42, .45);
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
	-webkit-animation: none !important;
	animation: none !important;
}
/* The fade only runs once the page is ready (class added by the script). */
body.whmcfx-on-blur.whmc-fx-ready .pm_overlay {
	transition: opacity .28s ease, -webkit-backdrop-filter .28s ease, backdrop-filter .28s ease, visibility 0s linear .28s;
}
body.whmcfx-on-blur.whmc-fx-ready .pm_overlay.pm_show {
	transition-delay: 0s;
}

/* ------------------------------------------------------------------
 * Page push / parallax (side cart on desktop)
 * ---------------------------------------------------------------- */
body.whmc-fx-anim .whmc-fx-page {
	transition: transform .5s cubic-bezier(.22, .8, .3, 1);
}
body.whmc-fx-moving .whmc-fx-page {
	transform: translateX(var(--whmc-fx-move, 0px));
}

/* ------------------------------------------------------------------
 * Staggered reveal: items rise into place one after another.
 * ---------------------------------------------------------------- */
#pm_menu.whmc-fx-reveal .whmc_top_part,
#pm_menu.whmc-fx-reveal .whmc-cart-items-inner,
#pm_menu.whmc-fx-reveal .whmc-bottom-part .couplonfield,
#pm_menu.whmc-fx-reveal .whmc-buy-summary > div,
#pm_menu.whmc-fx-reveal .whmc_ft-buttons-cons {
	-webkit-animation: whmc-fx-rise .5s cubic-bezier(.22, .8, .3, 1) both;
	animation: whmc-fx-rise .5s cubic-bezier(.22, .8, .3, 1) both;
	-webkit-animation-delay: calc(var(--whmc-i, 0) * 45ms + 120ms);
	animation-delay: calc(var(--whmc-i, 0) * 45ms + 120ms);
}

@keyframes whmc-fx-rise {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------
 * Number roll
 * ---------------------------------------------------------------- */
.whmc-fx-roll {
	position: relative;
	-webkit-animation: whmc-fx-roll .5s cubic-bezier(.2, .9, .3, 1);
	animation: whmc-fx-roll .5s cubic-bezier(.2, .9, .3, 1);
}

@keyframes whmc-fx-roll {
	0% { opacity: 0; top: .7em; }
	100% { opacity: 1; top: 0; }
}

/* ------------------------------------------------------------------
 * Subtotal pulse
 * ---------------------------------------------------------------- */
.whmc-fx-pulse-row {
	border-radius: 6px;
	-webkit-animation: whmc-fx-flash .8s ease-out;
	animation: whmc-fx-flash .8s ease-out;
}

@keyframes whmc-fx-flash {
	0% { background-color: rgba(250, 204, 21, .55); }
	100% { background-color: rgba(250, 204, 21, 0); }
}

.whmc-fx-pulse {
	-webkit-animation: whmc-fx-ring .8s ease-out;
	animation: whmc-fx-ring .8s ease-out;
}

@keyframes whmc-fx-ring {
	0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .55); }
	100% { box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.whmc-fx-shake,
	body.whmc-fx-anim .whmc-fx-page,
	body.whmcfx-on-blur .pm_overlay,
	#pm_menu.whmc-fx-reveal *,
	.whmc-fx-roll,
	.whmc-fx-pulse,
	.whmc-fx-pulse-row {
		-webkit-animation: none !important;
		animation: none !important;
		transition: none !important;
	}
}

/* ------------------------------------------------------------------
 * Suggested products: slow, one-by-one entrance when the cart opens
 * ---------------------------------------------------------------- */
#pm_menu.whmc-fx-sugin .whmc-sgeested-drawer .whmc-sug-reward-group,
#pm_menu.whmc-fx-sugin .whmc-sgeested-drawer ul.whmc-sgeested-products > li.whmc_sug_rp_item {
	-webkit-animation: whmc-fx-sugrise .8s cubic-bezier(.22, .8, .3, 1) both;
	animation: whmc-fx-sugrise .8s cubic-bezier(.22, .8, .3, 1) both;
	-webkit-animation-delay: calc(var(--whmc-si, 0) * 140ms + 200ms);
	animation-delay: calc(var(--whmc-si, 0) * 140ms + 200ms);
}

@keyframes whmc-fx-sugrise {
	from { opacity: 0; transform: translateY(26px) scale(.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ------------------------------------------------------------------
 * "Add one of these to unlock ..." groups inside the suggested products
 * ---------------------------------------------------------------- */
.whmc-sgeested-drawer ul.whmc-sgeested-products li.whmc-sug-reward-group {
	list-style: none;
	margin: 0 0 14px;
	padding: 10px 10px 4px;
	border-radius: 12px;
	background: rgba(34, 197, 94, .12);
	border: 1px dashed rgba(34, 139, 74, .55);
}
.whmc-sug-reward-shipping { background: rgba(37, 99, 235, .10) !important; border-color: rgba(37, 99, 235, .5) !important; }
.whmc-sug-reward-gift { background: rgba(236, 72, 153, .10) !important; border-color: rgba(236, 72, 153, .5) !important; }

.whmc-sug-reward-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}
.whmc-sug-reward-need {
	flex: none;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 20px;
	background: rgba(0, 0, 0, .08);
}
.whmc-sgeested-drawer ul.whmc-sgeested-products ul.whmc-sug-reward-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: none;
	overflow: visible;
}
.whmc-sgeested-drawer ul.whmc-sgeested-products ul.whmc-sug-reward-list > li {
	margin-left: 0;
	margin-right: 0;
}

@media (prefers-reduced-motion: reduce) {
	#pm_menu.whmc-fx-sugin .whmc-sgeested-drawer * {
		-webkit-animation: none !important;
		animation: none !important;
	}
}

/* ------------------------------------------------------------------
 * Popup: the coupon and variation panels fade in place. (On the side cart they wait outside the drawer; in the popup that
 * place is where the suggested products are, and they would block clicks there.)
 * ---------------------------------------------------------------- */
body.whmc-fx-popup .whmc-coupon,
body.whmc-fx-popup .whmc-modal {
	-webkit-transform: none !important;
	transform: none !important;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .3s ease, visibility 0s linear .3s;
}
body.whmc-fx-popup .whmc-coupon.sidecartright,
body.whmc-fx-popup .whmc-modal.sidecartright {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition-delay: 0s;
}
