.lfwo-wrap {
	margin: 16px 0 22px;
}

.lfwo-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	max-width: 420px;
	padding: 15px 26px;
	background: var( --lfwo-bg, #25D366 );
	color: var( --lfwo-fg, #fff );
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-align: center;
	text-decoration: none;
	border: 0;
	border-radius: 6px;
	box-sizing: border-box;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.06s ease;
	-webkit-tap-highlight-color: transparent;
}

.lfwo-btn:hover,
.lfwo-btn:focus,
.lfwo-btn:visited {
	color: var( --lfwo-fg, #fff );
	text-decoration: none;
}

.lfwo-btn:hover {
	filter: brightness( 0.93 );
}

.lfwo-btn:active {
	transform: translateY( 1px );
}

.lfwo-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/*
 * Sizing is repeated with !important because product grids on the home page are often
 * rendered by a page builder whose own rules stretch any inline SVG to fill its box.
 */
.lfwo-btn .lfwo-icon,
a[data-lfwo] svg.lfwo-icon {
	width: 20px !important;
	height: 20px !important;
	min-width: 20px;
	max-width: 20px;
	max-height: 20px;
	flex: 0 0 auto;
	display: inline-block;
	vertical-align: middle;
}

.lfwo-btn--small .lfwo-icon,
a[data-lfwo].lfwo-btn--small svg.lfwo-icon {
	width: 16px !important;
	height: 16px !important;
	min-width: 16px;
	max-width: 16px;
	max-height: 16px;
}

.lfwo-label {
	display: inline-block;
}

/* ---------------------------------------------------------------------
 * Quantity picker and button row
 * ------------------------------------------------------------------ */

.lfwo-row {
	display: flex;
	align-items: stretch;
	gap: 10px;
	flex-wrap: wrap;
}

.lfwo-row .lfwo-btn {
	flex: 1 1 240px;
	width: auto;
}

.lfwo-row--solo .lfwo-btn {
	flex: 0 1 420px;
}

.lfwo-qty {
	display: inline-flex;
	align-items: stretch;
	flex: 0 0 auto;
	border: 1px solid rgba( 0, 0, 0, 0.18 );
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}

.lfwo-qty__step {
	width: 40px;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.lfwo-qty__step:hover {
	background: rgba( 0, 0, 0, 0.05 );
}

.lfwo-qty__step:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -2px;
}

.lfwo-qty__input {
	width: 52px;
	padding: 0 4px;
	margin: 0;
	border: 0;
	border-left: 1px solid rgba( 0, 0, 0, 0.12 );
	border-right: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: 0;
	background: transparent;
	font-size: 15px;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

.lfwo-qty__input::-webkit-outer-spin-button,
.lfwo-qty__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.lfwo-qty__input:focus {
	outline: 0;
	box-shadow: none;
}

/* ---------------------------------------------------------------------
 * Availability notice
 * ------------------------------------------------------------------ */

.lfwo-notice {
	margin: 18px 0 0;
	padding: 16px 18px;
	max-width: 620px;
	background: var( --lfwo-notice-bg, #FDF4EC );
	border: 1px solid rgba( 0, 0, 0, 0.06 );
	border-left: 4px solid var( --lfwo-notice-accent, #C0182B );
	border-radius: 6px;
}

.lfwo-wrap .lfwo-notice:first-child {
	margin: 0 0 18px;
}

.lfwo-notice__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
	color: var( --lfwo-notice-accent, #C0182B );
	font-size: 15px;
	font-weight: 700;
	/* Bengali sits taller than Latin, so headings need the extra room. */
	line-height: 1.6;
}

.lfwo-notice__body,
.lfwo-notice__body p {
	margin: 0;
	font-size: 15px;
	/* Generous leading keeps Bengali conjuncts and matras from colliding. */
	line-height: 1.9;
	color: inherit;
	opacity: 0.9;
}

.lfwo-notice__body p + p {
	margin-top: 10px;
}

.lfwo-notice__body a {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.lfwo-notice__body a:hover {
	color: var( --lfwo-notice-accent, #C0182B );
}

/* ---------------------------------------------------------------------
 * Shop and category cards
 * ------------------------------------------------------------------ */

.lfwo-loop {
	display: flex;
	gap: 8px;
	align-items: stretch;
	margin-top: 10px;
	width: 100%;
}

.lfwo-loop--stacked,
.lfwo-loop--single {
	flex-direction: column;
}

.lfwo-loop .lfwo-btn--small {
	max-width: none;
	flex: 1 1 0;
	padding: 11px 14px;
	font-size: 14px;
	gap: 7px;
	border-radius: 5px;
	margin: 0;
	white-space: nowrap;
}

/* Inherits the theme's own .button styling so it matches Add to cart. */
.lfwo-loop .lfwo-view {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 0;
	margin: 0;
	padding: 11px 14px;
	font-size: 14px;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
	box-sizing: border-box;
}

@media ( max-width: 600px ) {
	.lfwo-loop--row {
		flex-direction: column;
	}
}

/* ---------------------------------------------------------------------
 * Floating chat button
 * ------------------------------------------------------------------ */

.lfwo-float {
	position: fixed;
	z-index: 9998;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 56px;
	padding: 0;
	background: var( --lfwo-bg, #25D366 );
	color: var( --lfwo-fg, #fff );
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.22 );
	transition: transform 0.16s ease, box-shadow 0.16s ease;
	-webkit-tap-highlight-color: transparent;
}

.lfwo-float:hover,
.lfwo-float:focus,
.lfwo-float:visited {
	color: var( --lfwo-fg, #fff );
	text-decoration: none;
}

.lfwo-float:hover {
	transform: scale( 1.06 );
	box-shadow: 0 6px 22px rgba( 0, 0, 0, 0.28 );
}

.lfwo-float:active {
	transform: scale( 0.98 );
}

.lfwo-float:focus-visible {
	outline: 3px solid var( --lfwo-bg, #25D366 );
	outline-offset: 3px;
}

.lfwo-float--bubble {
	width: 56px;
	border-radius: 50%;
}

/* The label still needs to reach a screen reader on the circle. */
.lfwo-float--bubble .lfwo-float__label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

.lfwo-float--pill {
	padding: 0 22px;
	border-radius: 28px;
}

/* Corners */
.lfwo-float--bottom-right {
	right: var( --lfwo-float-x, 20px );
	bottom: var( --lfwo-float-y, 20px );
}

.lfwo-float--bottom-left {
	left: var( --lfwo-float-x, 20px );
	bottom: var( --lfwo-float-y, 20px );
}

.lfwo-float--middle-right {
	right: var( --lfwo-float-x, 20px );
	top: 50%;
	transform: translateY( -50% );
}

.lfwo-float--middle-left {
	left: var( --lfwo-float-x, 20px );
	top: 50%;
	transform: translateY( -50% );
}

/* Keep the vertical centring while hovering. */
.lfwo-float--middle-right:hover,
.lfwo-float--middle-left:hover {
	transform: translateY( -50% ) scale( 1.06 );
}

.lfwo-float--middle-right:active,
.lfwo-float--middle-left:active {
	transform: translateY( -50% ) scale( 0.98 );
}

/* Device visibility */
@media ( max-width: 782px ) {
	.lfwo-float--dev-desktop {
		display: none;
	}

	/* Clear the fixed bar rather than sitting on top of it. */
	body.lfwo-has-sticky .lfwo-float--bottom-right,
	body.lfwo-has-sticky .lfwo-float--bottom-left {
		bottom: calc( var( --lfwo-float-y, 20px ) + 72px );
	}

	.lfwo-float--pill {
		height: 50px;
		padding: 0 18px;
		font-size: 14px;
	}

	.lfwo-float--bubble {
		width: 52px;
		height: 52px;
	}
}

@media ( min-width: 783px ) {
	.lfwo-float--dev-mobile {
		display: none;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.lfwo-float {
		transition: none;
	}

	.lfwo-float:hover,
	.lfwo-float:active {
		transform: none;
	}

	.lfwo-float--middle-right:hover,
	.lfwo-float--middle-left:hover,
	.lfwo-float--middle-right:active,
	.lfwo-float--middle-left:active {
		transform: translateY( -50% );
	}
}

/* ---------------------------------------------------------------------
 * Fixed bar on phones
 * ------------------------------------------------------------------ */

.lfwo-sticky {
	display: none;
}

@media ( max-width: 782px ) {
	.lfwo-sticky {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9999;
		display: block;
		padding: 10px 14px calc( 10px + env( safe-area-inset-bottom ) );
		background: rgba( 255, 255, 255, 0.96 );
		backdrop-filter: blur( 8px );
		border-top: 1px solid rgba( 0, 0, 0, 0.08 );
	}

	.lfwo-btn--sticky {
		max-width: none;
		margin: 0;
	}

	body.single-product {
		padding-bottom: 76px;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.lfwo-btn {
		transition: none;
	}

	.lfwo-btn:active {
		transform: none;
	}
}

/* ------------------------------------------------------------------
 * Order form
 * --------------------------------------------------------------- */

body.lfwo-modal-open {
	overflow: hidden;
}

.lfwo-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.lfwo-modal[hidden] {
	display: none;
}

.lfwo-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.55 );
}

.lfwo-modal__panel {
	position: relative;
	background: #fff;
	border-radius: 14px;
	width: 100%;
	max-width: 420px;
	max-height: 92vh;
	overflow-y: auto;
	padding: 26px 22px 20px;
	box-shadow: 0 18px 50px rgba( 0, 0, 0, 0.25 );
	-webkit-overflow-scrolling: touch;
}

/*
 * Themes style every <button> on the page, and WoodMart's rules load after ours and win
 * on specificity, which turned this into a large dark block sitting over the heading.
 * Scoping to the modal and forcing the layout properties keeps the control where it
 * belongs whatever the active theme does.
 */
.lfwo-modal .lfwo-modal__close {
	position: absolute !important;
	top: 10px !important;
	right: 10px !important;
	bottom: auto !important;
	left: auto !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 32px !important;
	height: 32px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #f0f0f0 !important;
	background-image: none !important;
	color: #666 !important;
	font-size: 20px !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: none !important;
	box-shadow: none !important;
	text-shadow: none !important;
	cursor: pointer;
	z-index: 3;
}

.lfwo-modal .lfwo-modal__close:hover,
.lfwo-modal .lfwo-modal__close:focus {
	background: #e2e2e2 !important;
	color: #111 !important;
	outline: none;
}

.lfwo-modal .lfwo-modal__title {
	margin: 0 0 4px !important;
	padding-right: 40px;
	font-size: 20px;
	line-height: 1.3;
	color: #1a1a1a;
}

.lfwo-modal__product {
	margin: 0 0 16px;
	color: #6b6b6b;
	font-size: 14px;
}

.lfwo-field {
	display: block;
	margin-bottom: 12px;
}

.lfwo-field > span {
	display: block;
	margin-bottom: 5px;
	font-size: 13px;
	font-weight: 600;
	color: #333;
}

.lfwo-field > span b {
	color: #C0182B;
	font-weight: 600;
}

.lfwo-field input,
.lfwo-field select,
.lfwo-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 12px;
	border: 1px solid #d8d8d8;
	border-radius: 8px;
	font-size: 16px; /* 16px keeps iOS from zooming the page on focus. */
	font-family: inherit;
	background: #fff;
	color: #222;
}

.lfwo-field input:focus,
.lfwo-field select:focus,
.lfwo-field textarea:focus {
	outline: none;
	border-color: #25D366;
	box-shadow: 0 0 0 3px rgba( 37, 211, 102, 0.15 );
}

.lfwo-field textarea {
	resize: vertical;
}

.lfwo-field-row {
	display: flex;
	gap: 10px;
}

.lfwo-field-row .lfwo-field {
	flex: 1 1 0;
	min-width: 0;
}

.lfwo-form__error {
	margin: 0 0 10px;
	padding: 9px 11px;
	background: #FDECEC;
	border-left: 3px solid #C0182B;
	border-radius: 4px;
	color: #8B1220;
	font-size: 13px;
}

.lfwo-form__error[hidden] {
	display: none;
}

.lfwo-modal .lfwo-form__submit {
	display: block !important;
	width: 100% !important;
	padding: 13px 16px !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: #25D366 !important;
	background-image: none !important;
	color: #fff !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	font-family: inherit !important;
	line-height: 1.4 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	box-shadow: none !important;
	cursor: pointer;
}

.lfwo-modal .lfwo-form__submit:hover,
.lfwo-modal .lfwo-form__submit:focus {
	background: #1FB855 !important;
	color: #fff !important;
}

.lfwo-form__note {
	margin: 10px 0 0;
	text-align: center;
	font-size: 12px;
	color: #8a8a8a;
}

.lfwo-field select {
	height: 44px;
	appearance: none;
	-webkit-appearance: none;
	background-image: url( "data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E" );
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 34px;
}
