/* Sticky Add to cart / Buy now bar (store-profile feature "sticky_bar").
   Colours and fonts of the two buttons are copied from the page's own buttons
   by sticky-bar.js, so it always matches them. */

.wd-sb {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9990; /* below the Buy Now popup (100000) and the theme's off-canvas panels */
	display: flex;
	justify-content: center;
	padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px));
	box-sizing: border-box;
	pointer-events: none;
	transform: translateY(130%);
	opacity: 0;
	transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .2s ease;
}
.wd-sb.is-visible {
	transform: none;
	opacity: 1;
}
.wd-sb *,
.wd-sb *::before,
.wd-sb *::after { box-sizing: border-box; }

.wd-sb__card {
	pointer-events: auto;
	width: 100%;
	max-width: 520px;
	padding: 10px;
	background: var(--theme-palette-color-8, #fff);
	border: 1px solid var(--theme-palette-color-5, #d3e6d9);
	border-radius: 18px;
	box-shadow: 0 10px 30px -8px rgba(14, 61, 39, .35);
	font-family: var(--theme-font-family, Lexend, sans-serif);
	color: var(--theme-text-color, #1a1a17);
}

.wd-sb__top {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
	min-height: 46px;
}
.wd-sb__thumb {
	position: relative;
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: 10px;
	background: var(--theme-palette-color-6, #e4f2e8);
}
.wd-sb__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: inherit;
}
.wd-sb__qty {
	position: absolute;
	top: -7px;
	left: -7px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: var(--theme-palette-color-2, #0e3d27);
	color: #fff;
	font-size: 11px;
	font-style: normal;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 0 0 2px #fff;
}
.wd-sb__qty[hidden] { display: none; }

.wd-sb__text {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.wd-sb__name {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--theme-palette-color-2, #0e3d27);
}
/* with a variation line beneath, the name keeps to one line */
.wd-sb:not(.wd-sb--novar) .wd-sb__name { -webkit-line-clamp: 1; line-clamp: 1; }
.wd-sb__var {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.25;
	color: var(--theme-text-color, #1a1a17);
	opacity: .75;
}
.wd-sb__var:empty { display: none; }
.wd-sb__var.is-prompt { opacity: .55; }
.wd-sb__price {
	flex: none;
	font-size: 16px;
	font-weight: 800;
	white-space: nowrap;
	color: var(--theme-palette-color-3, #1a1a17);
}

.wd-sb__actions { display: flex; gap: 10px; }
.wd-sb .wd-sb__atc,
.wd-sb .wd-sb__buy {
	flex: 1 1 0;
	display: flex !important;
	align-items: center;
	justify-content: center;
	height: 46px !important;
	min-height: 0 !important;
	margin: 0;
	padding: 0 12px !important;
	border: 0 !important;
	box-shadow: none !important;
	background: var(--theme-button-background-initial-color, #1e7a4c);
	color: #fff;
	font-family: var(--theme-button-font-family, Montserrat, sans-serif);
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1 !important;
	letter-spacing: .02em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: filter .15s ease, transform .1s ease;
}
.wd-sb .wd-sb__atc::before, .wd-sb .wd-sb__atc::after,
.wd-sb .wd-sb__buy::before, .wd-sb .wd-sb__buy::after { display: none !important; }
.wd-sb .wd-sb__atc:hover, .wd-sb .wd-sb__buy:hover { filter: brightness(1.06); }
.wd-sb .wd-sb__atc:active, .wd-sb .wd-sb__buy:active { transform: scale(.98); }
/* Buy now: colours are copied from the page's own Buy now button by sticky-bar.js */
.wd-sb .wd-sb__buy { background: #f5a524; color: #1a1a17; }
.wd-sb .wd-sb__buy[hidden] { display: none !important; }

/* the variations picker flashes when a button is pressed before choosing */
.wd-sb-flash {
	outline: 2px solid var(--theme-button-background-initial-color, #1e7a4c);
	outline-offset: 6px;
	border-radius: 10px;
	animation: wd-sb-flash 1.2s ease;
}
@keyframes wd-sb-flash {
	0%, 100% { outline-color: transparent; }
	25%, 75% { outline-color: var(--theme-button-background-initial-color, #1e7a4c); }
}

@media (min-width: 769px) {
	.wd-sb--mobile { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.wd-sb { transition: none; }
	.wd-sb-flash { animation: none; }
}
