/**
 * Woo Sales Booster
 * Sticky Add to Cart
 *
 * Complete desktop and mobile stylesheet.
 */

/* =========================================================
   1. MAIN STICKY CART
   ========================================================= */

.wsb-sticky-cart {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999999;

	width: 100%;
	padding: 12px 20px;
	box-sizing: border-box;

	background: #ffffff;
	border-top: 1px solid #e5e7eb;
	box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.12);

	opacity: 0;
	visibility: hidden;
	transform: translateY(100%);
	pointer-events: none;

	transition:
		opacity 0.25s ease,
		visibility 0.25s ease,
		transform 0.25s ease;
}

.wsb-sticky-cart.wsb-sticky-cart--visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}


/* =========================================================
   2. INNER CONTAINER
   ========================================================= */

.wsb-sticky-cart__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;

	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	gap: 24px;
	box-sizing: border-box;
}


/* =========================================================
   3. PRODUCT AREA
   ========================================================= */

.wsb-sticky-cart__product {
	display: flex;
	align-items: center;
	flex: 1 1 auto;

	min-width: 0;
	gap: 14px;
}


/* =========================================================
   4. PRODUCT IMAGE
   ========================================================= */

.wsb-sticky-cart__image {
	flex: 0 0 74px;

	width: 74px;
	height: 74px;
	overflow: hidden;

	background: #f4f4f5;
	border-radius: 10px;
}

.wsb-sticky-cart__image img {
	display: block;

	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;

	object-fit: cover;
	border-radius: inherit;
}


/* =========================================================
   5. PRODUCT DETAILS
   ========================================================= */

.wsb-sticky-cart__details {
	display: flex;
	flex-direction: column;
	align-items: flex-start;

	flex: 1 1 auto;
	min-width: 0;
}


/* =========================================================
   6. TITLE AND SALE BADGE
   ========================================================= */

.wsb-sticky-cart__title-row {
	display: flex;
	align-items: center;

	width: 100%;
	min-width: 0;
	gap: 8px;
}

.wsb-sticky-cart__title {
	display: block;

	max-width: 100%;
	margin: 0;
	overflow: hidden;

	color: #18181b;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.25;

	white-space: nowrap;
	text-overflow: ellipsis;
}

.wsb-sticky-cart__sale-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;

	padding: 4px 8px;

	color: #ffffff;
	background: #dc2626;

	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;

	border-radius: 999px;
}


/* =========================================================
   7. RATING
   ========================================================= */

.wsb-sticky-cart__rating {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;

	margin-top: 3px;

	color: #52525b;
	font-size: 12px;
	line-height: 1.2;
	white-space: nowrap;
}

.wsb-sticky-cart__rating .star-rating {
	margin: 0 5px 0 0;
	font-size: 13px;
}


/* =========================================================
   8. PRICE
   ========================================================= */

.wsb-sticky-cart__price {
	display: flex;
	align-items: center;
	flex-wrap: wrap;

	margin-top: 3px;
	gap: 5px;

	color: #27272a;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
}

.wsb-sticky-cart__price .price {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
}

.wsb-sticky-cart__price del {
	color: #71717a;
	font-weight: 400;
	opacity: 0.85;
}

.wsb-sticky-cart__price ins {
	color: #18181b;
	font-weight: 700;
	text-decoration: none;
}


/* =========================================================
   9. STOCK
   ========================================================= */

.wsb-sticky-cart__stock {
	display: inline-block;

	margin-top: 3px;

	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
}

.wsb-sticky-cart__stock--instock {
	color: #15803d;
}

.wsb-sticky-cart__stock--outofstock {
	color: #dc2626;
}

.wsb-sticky-cart__stock--onbackorder {
	color: #d97706;
}


/* =========================================================
   10. FREE SHIPPING MESSAGE
   ========================================================= */

.wsb-sticky-cart-shipping-fragment {
	display: block;
	width: 100%;
	max-width: 430px;
}

.wsb-sticky-cart-shipping-fragment .wsb-sticky-cart__free-shipping,
.wsb-sticky-cart-shipping-fragment .wsb-sticky-cart__progress {
	max-width: none;
}

.wsb-sticky-cart__free-shipping {
	display: flex;
	align-items: center;

	width: 100%;
	max-width: 430px;
	margin-top: 7px;
	padding: 6px 9px;
	box-sizing: border-box;
	overflow: hidden;

	color: #166534;
	background: #f0fdf4;
	border: 1px solid #4ade80;

	font-size: 11px;
	line-height: 1.25;
	white-space: nowrap;
	text-overflow: ellipsis;

	border-radius: 8px;
}

.wsb-sticky-cart__free-shipping img.emoji {
	flex: 0 0 auto;

	width: 15px;
	height: 15px;
	margin-right: 4px;
}

.wsb-sticky-cart__free-shipping strong {
	display: inline;
	margin: 0 2px;
	white-space: nowrap;
}

.wsb-sticky-cart__remaining-amount {
	display: inline;
	white-space: nowrap;
}


/* =========================================================
   11. SHIPPING PROGRESS
   ========================================================= */

.wsb-sticky-cart__progress {
	width: 100%;
	max-width: 430px;
	height: 6px;
	margin-top: 6px;
	overflow: hidden;

	background: #e5e7eb;
	border-radius: 999px;
}

.wsb-sticky-cart__progress-fill {
	display: block;

	height: 100%;

	background: #22c55e;
	border-radius: 999px;

	transition: width 0.3s ease;
}


/* =========================================================
   12. ACTIONS
   ========================================================= */

.wsb-sticky-cart__actions {
	display: flex;
	align-items: center;
	flex: 0 0 auto;

	gap: 10px;
	margin: 0;
}


/* =========================================================
   13. QUANTITY INPUT
   ========================================================= */

.wsb-sticky-cart__quantity {
	display: block;

	width: 74px !important;
	min-width: 74px;
	height: 48px !important;
	min-height: 48px;
	margin: 0 !important;
	padding: 0 8px !important;
	box-sizing: border-box;

	color: #27272a;
	background: #ffffff;
	border: 1px solid #d4d4d8;

	font-size: 16px;
	font-weight: 500;
	line-height: normal;
	text-align: center;

	border-radius: 8px;
	outline: none;
}

.wsb-sticky-cart__quantity:focus {
	border-color: #6c3ef4;
	box-shadow: 0 0 0 3px rgba(108, 62, 244, 0.13);
}


/* =========================================================
   14. ADD TO CART BUTTON
   ========================================================= */

.wsb-sticky-cart__button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;

	min-width: 170px;
	height: 48px !important;
	min-height: 48px;
	margin: 0 !important;
	padding: 0 22px !important;
	box-sizing: border-box;

	color: #ffffff !important;
	background: #6c3ef4 !important;
	border: 1px solid #6c3ef4 !important;

	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.1px;
	text-align: center;
	text-decoration: none !important;
	white-space: nowrap;

	border-radius: 8px;

	transition:
		background 0.2s ease,
		border-color 0.2s ease,
		transform 0.2s ease,
		opacity 0.2s ease;
}

.wsb-sticky-cart__button:hover,
.wsb-sticky-cart__button:focus {
	color: #ffffff !important;
	background: #5b31dc !important;
	border-color: #5b31dc !important;
	transform: translateY(-1px);
}

.wsb-sticky-cart__button--loading {
	opacity: 0.7;
	cursor: wait;
	pointer-events: none;
}

.wsb-sticky-cart__button--success {
	color: #ffffff !important;
	background: #16a34a !important;
	border-color: #16a34a !important;
	pointer-events: none;
}


/* =========================================================
   15. TABLET LAYOUT
   ========================================================= */

@media screen and (max-width: 900px) {

	.wsb-sticky-cart__inner {
		gap: 14px;
	}

	.wsb-sticky-cart__button {
		min-width: 145px;
	}

	.wsb-sticky-cart__free-shipping,
	.wsb-sticky-cart__progress {
		max-width: 360px;
	}

	.wsb-sticky-cart-shipping-fragment {
		max-width: 360px;
	}
}


/* =========================================================
   16. MOBILE LAYOUT
   ========================================================= */

@media screen and (max-width: 767px) {

	.wsb-sticky-cart {
		position: fixed !important;
		top: auto !important;
		right: 0 !important;
		bottom: 0 !important;
		left: 0 !important;
		z-index: 999999 !important;

		width: 100% !important;
		max-width: 100% !important;
		padding: 10px 12px !important;
	}

	.wsb-sticky-cart__inner {
		display: flex;
		flex-wrap: wrap;
		align-items: center;

		width: 100%;
		max-width: none;
		gap: 8px;
	}

	.wsb-sticky-cart__product {
		display: grid;
		grid-template-columns: 60px minmax(0, 1fr);
		align-items: center;

		flex: 1 1 100%;
		width: 100%;
		min-width: 0;
		gap: 10px;
	}

	.wsb-sticky-cart__image {
		width: 60px;
		height: 68px;
		min-width: 60px;
	}

	.wsb-sticky-cart__title {
		font-size: 15px;
		line-height: 1.2;
	}

	.wsb-sticky-cart__sale-badge {
		padding: 3px 6px;
		font-size: 10px;
	}

	.wsb-sticky-cart__rating {
		margin-top: 2px;
		font-size: 10px;
	}

	.wsb-sticky-cart__rating .star-rating {
		font-size: 11px;
	}

	.wsb-sticky-cart__price {
		margin-top: 2px;
		font-size: 14px;
		line-height: 1.2;
	}

	.wsb-sticky-cart__stock {
		margin-top: 2px;
		font-size: 11px;
	}

	.wsb-sticky-cart__free-shipping {
		width: 100%;
		max-width: 100%;
		min-height: 27px;
		margin-top: 5px;
		padding: 5px 7px;

		font-size: 10px;
		line-height: 1.2;
	}

	.wsb-sticky-cart-shipping-fragment {
		max-width: 100%;
	}

	.wsb-sticky-cart__progress {
		width: 100%;
		max-width: 100%;
		height: 5px;
		margin-top: 5px;
	}

	.wsb-sticky-cart__actions {
		display: grid;
		grid-template-columns: 58px minmax(0, 1fr);
		align-items: center;

		flex: 1 1 100%;
		width: 100%;
		gap: 8px;
	}

	.wsb-sticky-cart__quantity {
		width: 35px !important;
		min-width: 35px !important;
		max-width: 35px !important;
		height: 35px !important;
		min-height: 35px !important;
		padding: 0 5px !important;

		font-size: 15px;
	}

	.wsb-sticky-cart__button {
		width: 100% !important;
		min-width: 0 !important;
		height: 35px !important;
		min-height: 35px !important;
		padding: 0 14px !important;

		font-size: 14px;
	}
}


/* =========================================================
   17. SMALL MOBILE
   ========================================================= */

@media screen and (max-width: 420px) {

	.wsb-sticky-cart {
		padding: 9px 10px !important;
	}

	.wsb-sticky-cart__product {
		grid-template-columns: 54px minmax(0, 1fr);
		gap: 8px;
	}

	.wsb-sticky-cart__image {
		width: 54px;
		height: 64px;
		min-width: 54px;
	}

	.wsb-sticky-cart__title {
		font-size: 14px;
	}

	.wsb-sticky-cart__price {
		font-size: 13px;
	}

	.wsb-sticky-cart__stock {
		font-size: 10px;
	}

	.wsb-sticky-cart__free-shipping {
		min-height: 26px;
		padding: 4px 6px;
		font-size: 9px;
	}

	.wsb-sticky-cart__actions {
		grid-template-columns: 52px minmax(0, 1fr);
		gap: 7px;
	}

	.wsb-sticky-cart__quantity {
		width: 45px !important;
		min-width: 45px !important;
		max-width: 45px !important;
		height: 35px !important;
		min-height: 42px !important;

		font-size: 14px;
	}

	.wsb-sticky-cart__button {
		height: 35px !important;
		min-height: 35px !important;
		padding: 0 10px !important;

		font-size: 13px;
	}
}


/* =========================================================
   18. VERY SMALL MOBILE
   ========================================================= */

@media screen and (max-width: 350px) {

	.wsb-sticky-cart__product {
		grid-template-columns: 48px minmax(0, 1fr);
	}

	.wsb-sticky-cart__image {
		width: 48px;
		height: 58px;
		min-width: 48px;
	}

	.wsb-sticky-cart__actions {
		grid-template-columns: 48px minmax(0, 1fr);
	}

	.wsb-sticky-cart__quantity {
		width: 48px !important;
		min-width: 48px !important;
		max-width: 48px !important;
	}
}

/* Quantity control wrapper */
.wsb-sticky-cart__quantity-control {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	border: 1px solid #d4d4d8;
	border-radius: 8px;
	overflow: hidden;
	background: #ffffff;
}

/* Minus and plus buttons */
.wsb-sticky-cart__quantity-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	background: #ffffff;
	color: #27272a;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.wsb-sticky-cart__quantity-button:hover {
	background: #f4f4f5;
}

/* Quantity input inside control */
.wsb-sticky-cart__quantity-control .wsb-sticky-cart__quantity {
	width: 44px !important;
	min-width: 44px !important;
	max-width: 44px !important;
	height: 44px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-right: 1px solid #e4e4e7 !important;
	border-left: 1px solid #e4e4e7 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	text-align: center;
	appearance: textfield;
	-moz-appearance: textfield;
}

/* Hide browser number arrows */
.wsb-sticky-cart__quantity-control
	.wsb-sticky-cart__quantity::-webkit-inner-spin-button,
.wsb-sticky-cart__quantity-control
	.wsb-sticky-cart__quantity::-webkit-outer-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

/* Mobile sizing */
@media screen and (max-width: 767px) {

	.wsb-sticky-cart__actions {
	    display: flex;
	    align-items: center;
	    justify-content: flex-end;
	    width: 100%;
	    gap: 8px;
    }

	.wsb-sticky-cart__quantity-control {
	    flex: 0 0 100px;
	    width: 100px;
	    height: 40px;
    }

    .wsb-sticky-cart__quantity-button {
	    width: 30px;
	    height: 40px;
	    font-size: 16px;
    }

    .wsb-sticky-cart__quantity-control .wsb-sticky-cart__quantity {
	    width: 40px !important;
	    min-width: 40px !important;
	    max-width: 40px !important;
	    height: 40px !important;
    }

    .wsb-sticky-cart__button {
	    flex: 0 0 118px;
	    width: 118px !important;
	    min-width: 118px !important;
	    max-width: 118px !important;
	    height: 40px !important;
	    min-height: 40px !important;
	    padding: 0 10px !important;
	    font-size: 13px;
	    border-radius: 7px;
    }
}
/**
 * Final mobile compact polish.
 */
@media screen and (max-width: 767px) {

	.wsb-sticky-cart {
		padding: 8px 10px !important;
	}

	.wsb-sticky-cart__inner {
		gap: 7px;
	}

	.wsb-sticky-cart__product {
		grid-template-columns: 54px minmax(0, 1fr);
		gap: 8px;
	}

	.wsb-sticky-cart__image {
		width: 54px;
		height: 62px;
		min-width: 54px;
	}

	.wsb-sticky-cart__title {
		font-size: 14px;
		line-height: 1.15;
	}

	.wsb-sticky-cart__price {
		margin-top: 1px;
		font-size: 13px;
	}

	.wsb-sticky-cart__stock {
		margin-top: 1px;
		font-size: 10px;
	}

	.wsb-sticky-cart__free-shipping {
		min-height: 25px;
		margin-top: 4px;
		padding: 4px 6px;
		font-size: 9px;
	}

	.wsb-sticky-cart__progress {
		height: 4px;
		margin-top: 4px;
	}

	.wsb-sticky-cart__progress-fill {
	    display: block !important;
	    height: 100% !important;
	    min-height: 100% !important;
	    background-color: #22c55e !important;
	    border-radius: 999px;
    }

	.wsb-sticky-cart__actions {
		gap: 8px;
	}

	.wsb-sticky-cart__quantity-control {
		height: 40px;
	}

	.wsb-sticky-cart__quantity-button {
		width: 30px;
		height: 40px;
		font-size: 16px;
	}

	.wsb-sticky-cart__quantity-control .wsb-sticky-cart__quantity {
		width: 40px !important;
		min-width: 40px !important;
		max-width: 40px !important;
		height: 40px !important;
		font-size: 14px;
	}

	.wsb-sticky-cart__button {
		width: 120px !important;
		min-width: 120px !important;
		max-width: 120px !important;
		height: 40px !important;
		min-height: 40px !important;
		padding: 0 12px !important;
		font-size: 13px;
	}
}

/**
 * Sticky Cart progress fill safeguard.
 */
.wsb-sticky-cart__progress-fill {
	display: block !important;
	height: 100% !important;
	min-height: 100% !important;
	background: #22c55e !important;
	border-radius: 999px;
	transition: width 0.3s ease;
}

/* Premium user-configurable Sticky Add to Cart button style. */
.wsb-sticky-cart .wsb-sticky-cart__button {
	background: var(--wsb-sc-button-bg, #6c3ef4) !important;
	border-color: var(--wsb-sc-button-border, #6c3ef4) !important;
	border-width: var(--wsb-sc-button-border-width, 1px) !important;
	border-radius: var(--wsb-sc-button-radius, 8px) !important;
	box-shadow: var(--wsb-sc-button-shadow, none) !important;
	color: var(--wsb-sc-button-color, #fff) !important;
	font-family: var(--wsb-sc-button-font, inherit) !important;
	font-size: var(--wsb-sc-button-font-size, 15px) !important;
	font-weight: var(--wsb-sc-button-font-weight, 700) !important;
}

.wsb-sticky-cart .wsb-sticky-cart__button:hover,
.wsb-sticky-cart .wsb-sticky-cart__button:focus {
	background: var(--wsb-sc-button-hover-bg, #5b31dc) !important;
	color: var(--wsb-sc-button-hover-color, #fff) !important;
}

.wsb-sticky-cart .wsb-sticky-cart__button--success {
	background: #16a34a !important;
	border-color: #16a34a !important;
	box-shadow: none !important;
	color: #fff !important;
}

/* =========================================================
   STABILITY & ACCESSIBILITY STATES
   ========================================================= */

.wsb-sticky-cart__sale-badge--hidden {
	display: none !important;
}

.wsb-sticky-cart__notice {
	width: 100%;
	margin: 0 0 8px;
	padding: 8px 10px;
	color: #991b1b;
	background: #fef2f2;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.35;
	border: 1px solid #fecaca;
	border-radius: 6px;
}

.wsb-sticky-cart__notice[hidden] {
	display: none !important;
}

.wsb-sticky-cart__button--disabled,
.wsb-sticky-cart__button--disabled:hover,
.wsb-sticky-cart__button--disabled:focus {
	cursor: not-allowed;
	filter: grayscale(0.35);
	opacity: 0.58;
	transform: none;
	pointer-events: auto;
}

.wsb-sticky-cart__quantity-control--disabled {
	opacity: 0.55;
}

.wsb-sticky-cart__quantity-control--disabled button,
.wsb-sticky-cart__quantity-control--disabled input {
	cursor: not-allowed;
	pointer-events: none;
}
