/* ==========================================================================
   Floating Woo Toolkit — styles
   Prefix: fwt- (avoids generic/theme-colliding class names)
   ========================================================================== */

.fwt-floating-bar,
.fwt-floating-bar * {
	box-sizing: border-box;
}

/* ---------- Shared nav item ---------- */

.fwt-floating-bar {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.fwt-nav-item {
	appearance: none;
	border: 0;
	background: transparent;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: inherit;
	text-decoration: none;
	position: relative;
	font: inherit;
}

.fwt-nav-item svg {
	display: block;
	pointer-events: none;
}

/* ==========================================================================
   DESKTOP BAR — [fwt_desktop_bar] / [fwt_floating_bar] shortcode, manually
   placed in the header/navbar. Inline icon group (not fixed positioning).
   Auto-hides on small screens so it never doubles up with the Floating Bar.
   ========================================================================== */

.fwt-bar-desktop {
	display: inline-flex;
	background: var(--fwt-d-bg, #fff);
	border: 1px solid var(--fwt-d-border, #e6e6e6);
	border-radius: var(--fwt-d-radius, 14px);
	box-shadow: var(--fwt-d-shadow, none);
	padding: 6px;
	gap: var(--fwt-d-gap, 6px);
}

.fwt-bar-desktop .fwt-nav-item {
	width: calc(var(--fwt-d-icon-size, 21px) + 22px);
	height: calc(var(--fwt-d-icon-size, 21px) + 22px);
	border-radius: calc(var(--fwt-d-radius, 14px) - 4px);
	color: var(--fwt-d-icon-color, #222);
	transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.fwt-bar-desktop .fwt-nav-item svg {
	width: var(--fwt-d-icon-size, 21px);
	height: var(--fwt-d-icon-size, 21px);
}

.fwt-bar-desktop .fwt-nav-item:hover,
.fwt-bar-desktop .fwt-nav-item:focus-visible {
	background: var(--fwt-d-hover, #f2f2f2);
}

.fwt-bar-desktop .fwt-nav-item:active {
	color: var(--fwt-d-active, #111);
	transform: scale(.94);
}

.fwt-bar-desktop .fwt-nav-item:focus-visible {
	outline: 2px solid var(--fwt-d-active, #111);
	outline-offset: 2px;
}

.fwt-bar-desktop .fwt-cart-count {
	position: absolute;
	top: 2px;
	right: 2px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 999px;
	background: #e53935;
	color: #fff;
	font-size: 10px;
	font-weight: 600;
	line-height: 16px;
	text-align: center;
}

@media (max-width: 782px) {
	.fwt-bar-desktop {
		display: none;
	}
}

/* ==========================================================================
   FLOATING BAR — auto-injected fixed bottom navigation bar (no shortcode
   needed). MOBILE ONLY, always: the base rule below keeps it hidden, and it
   is only switched on inside the max-width:782px media query. There is no
   "show on desktop" option anywhere in this stylesheet or in the plugin's
   settings, by design — it never appears on desktop screens.
   ========================================================================== */

.fwt-bar-mobile {
	display: none;
}

@media (max-width: 782px) {
	.fwt-bar-mobile {
		display: flex !important;
		position: fixed !important;
		left: var(--fwt-m-side, 14px) !important;
		right: var(--fwt-m-side, 14px) !important;
		bottom: calc(var(--fwt-m-bottom, 14px) + env(safe-area-inset-bottom)) !important;
		top: auto !important;
		margin: 0 auto !important;
		max-width: var(--fwt-m-maxwidth, 420px);
		z-index: 999990 !important;
		background: var(--fwt-m-bg, #fff) !important;
		border: 1px solid var(--fwt-m-border, rgba(17, 17, 17, .06));
		border-radius: var(--fwt-m-radius, 20px) !important;
		box-shadow: var(--fwt-m-shadow, 0 10px 30px rgba(17,17,17,.18)) !important;
		padding: 6px !important;
		align-items: center !important;
		justify-content: space-between !important;
		gap: var(--fwt-m-gap, 2px) !important;
		list-style: none !important;
	}

	.fwt-bar-mobile .fwt-nav-item {
		flex: 1 1 0 !important;
		height: 50px !important;
		width: auto !important;
		border-radius: calc(var(--fwt-m-radius, 20px) - 6px) !important;
		color: var(--fwt-m-icon-color, #222) !important;
		background: transparent !important;
		transition: color .18s ease, transform .12s ease;
	}

	.fwt-bar-mobile .fwt-nav-item svg {
		width: var(--fwt-m-icon-size, 22px) !important;
		height: var(--fwt-m-icon-size, 22px) !important;
	}

	.fwt-bar-mobile .fwt-nav-item:active {
		color: var(--fwt-m-active, #111) !important;
		transform: scale(.92);
	}

	.fwt-bar-mobile .fwt-cart-count {
		position: absolute !important;
		top: 4px !important;
		left: 50% !important;
		right: auto !important;
		transform: translateX(6px) !important;
		min-width: 16px;
		height: 16px;
		padding: 0 4px;
		border-radius: 999px;
		background: #e53935;
		color: #fff;
		font-size: 10px;
		font-weight: 600;
		line-height: 16px;
		text-align: center;
	}
}

/* Belt-and-braces: even if a theme's own CSS forces min-width overrides on
   .fwt-bar-mobile elsewhere, this explicit rule keeps it off desktop. */
@media (min-width: 783px) {
	.fwt-bar-mobile {
		display: none !important;
	}
}


/* ==========================================================================
   Overlays (search / cart / account) — shared
   ========================================================================== */

body.fwt-lock {
	overflow: hidden;
}

.fwt-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(17, 17, 17, .45);
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease, visibility .2s ease;
}

.fwt-overlay.fwt-open {
	opacity: 1;
	visibility: visible;
}

.fwt-panel {
	position: absolute;
	background: #fff;
	color: #1a1a1a;
	box-sizing: border-box;
	font-size: 14px;
	line-height: 1.5;
}

.fwt-panel-title {
	margin: 0 0 18px;
	padding-right: 34px;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -.01em;
}

.fwt-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: #6b6b6b;
	border-radius: 999px;
	transition: background-color .15s ease, color .15s ease;
}

.fwt-close svg {
	width: 17px;
	height: 17px;
	display: block;
	pointer-events: none;
}

.fwt-close:hover,
.fwt-close:focus-visible {
	background: rgba(17, 17, 17, .06);
	color: #171717;
	outline: none;
}

/* ---------- Search panel ---------- */

.fwt-search-panel {
	top: 8%;
	left: 50%;
	transform: translate(-50%, -12px);
	width: min(560px, calc(100% - 32px));
	max-height: 80vh;
	overflow: auto;
	border-radius: 16px;
	padding: 24px;
	opacity: 0;
	box-shadow: 0 20px 60px rgba(17, 17, 17, .18);
	transition: transform .2s ease, opacity .2s ease;
}

.fwt-overlay.fwt-open .fwt-search-panel {
	transform: translate(-50%, 0);
	opacity: 1;
}

.fwt-search-wrap {
	position: relative;
}

.fwt-search-input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	font-size: 15px;
	font-family: inherit;
	color: inherit;
	background: #fff;
	transition: border-color .15s ease;
}

.fwt-search-input:focus {
	outline: none;
	border-color: #171717;
}

.fwt-search-results {
	display: none;
	margin-top: 10px;
	border: 1px solid #eee;
	border-radius: 12px;
	overflow: hidden;
	max-height: 55vh;
	overflow-y: auto;
}

.fwt-search-results.fwt-results-open {
	display: block;
}

.fwt-result {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid #f0f0f0;
	transition: background-color .12s ease;
}

.fwt-result:last-child {
	border-bottom: 0;
}

.fwt-result:hover {
	background: #f7f7f7;
}

.fwt-result img {
	width: 50px;
	height: 50px;
	object-fit: cover;
	border-radius: 8px;
	flex-shrink: 0;
	background: #f2f2f2;
}

.fwt-result-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13.5px;
	min-width: 0;
}

.fwt-result-info b {
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fwt-result-info small {
	color: #6b6b6b;
	font-size: 12.5px;
}

.fwt-loading,
.fwt-no-results,
.fwt-empty {
	padding: 32px 16px;
	text-align: center;
	color: #8a8a8a;
	font-size: 13.5px;
}

/* ==========================================================================
   Cart drawer
   ========================================================================== */

.fwt-cart-panel {
	top: 0;
	right: 0;
	height: 100%;
	width: min(var(--fwt-cart-width, 420px), 92vw);
	display: flex;
	flex-direction: column;
	padding: 20px 20px 0;
	transform: translateX(100%);
	box-shadow: -12px 0 40px rgba(17, 17, 17, .12);
	transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}

.fwt-overlay.fwt-open .fwt-cart-panel {
	transform: translateX(0);
}

.fwt-cart-panel .fwt-panel-title {
	flex: 0 0 auto;
	padding-bottom: 16px;
	margin-bottom: 0;
	border-bottom: 1px solid #eee;
}

.fwt-cart-content {
	flex: 1 1 auto;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	padding-bottom: 20px;
	margin: 0 -20px;
	padding-left: 20px;
	padding-right: 20px;
}

.fwt-cart-row {
	display: flex;
	gap: 12px;
	padding: 16px 0;
	border-bottom: 1px solid #f0f0f0;
}

.fwt-cart-row img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 10px;
	flex-shrink: 0;
	background: #f2f2f2;
	border: 1px solid #f0f0f0;
}

.fwt-cart-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.fwt-cart-row-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.fwt-cart-info b {
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.4;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.fwt-cart-price {
	display: block;
	margin: 4px 0 10px;
	font-size: 13px;
	color: #6b6b6b;
}

.fwt-remove-item {
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	color: #9a9a9a;
	cursor: pointer;
	border-radius: 999px;
	transition: background-color .15s ease, color .15s ease;
}

.fwt-remove-item svg {
	width: 13px;
	height: 13px;
	display: block;
	pointer-events: none;
}

.fwt-remove-item:hover,
.fwt-remove-item:focus-visible {
	background: rgba(198, 40, 40, .08);
	color: #c62828;
	outline: none;
}

.fwt-qty-control {
	display: inline-flex;
	align-items: center;
	gap: 0;
	border: 1px solid #e2e2e2;
	border-radius: 999px;
	padding: 3px;
	width: fit-content;
}

.fwt-qty-control button {
	width: 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	border-radius: 999px;
	cursor: pointer;
	color: #171717;
	padding: 0;
	transition: background-color .15s ease;
}

.fwt-qty-control button svg {
	width: 11px;
	height: 11px;
	display: block;
	pointer-events: none;
}

.fwt-qty-control button:hover {
	background: #f0f0f0;
}

.fwt-qty {
	width: 30px;
	height: 24px;
	text-align: center;
	border: 0;
	background: transparent;
	font-size: 13px;
	font-family: inherit;
	color: inherit;
	padding: 0;
}

.fwt-cart-total {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 0;
	border-top: 1px solid #eee;
	margin: 0 -20px;
	padding-left: 20px;
	padding-right: 20px;
	font-size: 14px;
}

.fwt-cart-total span {
	color: #6b6b6b;
}

.fwt-cart-total strong {
	font-size: 16px;
	font-weight: 600;
}

.fwt-cart-buttons {
	flex: 0 0 auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 0 0 20px;
}

.fwt-cart-buttons a {
	padding: 12px;
	text-align: center;
	text-decoration: none;
	border-radius: 10px;
	font-size: 13.5px;
	font-weight: 500;
	transition: opacity .15s ease, background-color .15s ease;
}

.fwt-btn-solid {
	background: #171717;
	color: #fff;
	border: 1px solid #171717;
}

.fwt-btn-solid:hover {
	opacity: .88;
}

.fwt-btn-outline {
	background: #fff;
	color: #171717;
	border: 1px solid #dcdcdc;
}

.fwt-btn-outline:hover {
	background: #f7f7f7;
}

/* ---------- Account panel ---------- */

.fwt-account-panel {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(var(--fwt-account-width, 420px), calc(100% - 32px));
	max-height: 88vh;
	overflow-y: auto;
	border-radius: 16px;
	padding: 28px 24px;
	box-shadow: 0 20px 60px rgba(17, 17, 17, .18);
}

.fwt-account-toggle {
	margin-top: 14px;
	font-size: 13px;
	text-align: center;
}

.fwt-account-toggle a {
	color: #111;
}

/* ==========================================================================
   Pincode checker
   ========================================================================== */

.fwt-pincode-box {
	display: block !important;
	width: 100% !important;
	max-width: 480px;
	box-sizing: border-box !important;
	float: none !important;
	flex: none !important;
	padding: 16px 18px;
	border: 1px solid #e6e6e6;
	border-radius: 12px;
	background: #fafafa;
}

.fwt-pincode-label {
	display: block;
	font-weight: 600;
	font-size: 13.5px;
}

.fwt-pincode-row {
	display: flex !important;
	flex-wrap: nowrap;
	gap: 8px;
	margin-top: 10px;
	font-weight: normal;
}

.fwt-pincode-input {
	flex: 1 1 auto !important;
	min-width: 0;
	width: auto !important;
	padding: 11px 12px;
	border: 1px solid #d5d5d5;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
	box-sizing: border-box !important;
	transition: border-color .15s ease;
}

.fwt-pincode-input:focus {
	outline: none;
	border-color: #171717;
}

.fwt-pincode-check {
	flex: 0 0 auto !important;
	padding: 11px 18px;
	border: 0;
	border-radius: 8px;
	background: #171717;
	color: #fff;
	cursor: pointer;
	font-size: 13.5px;
	font-weight: 500;
	font-family: inherit;
	transition: opacity .15s ease;
}

.fwt-pincode-check:hover {
	opacity: .88;
}

.fwt-pincode-before-cart {
	display: block !important;
	width: 100% !important;
	clear: both;
	margin: 0 0 18px !important;
}

.fwt-pincode-before-cart .fwt-pincode-box {
	max-width: 100%;
}

.fwt-pincode-result {
	margin-top: 12px;
	font-size: 13.5px;
	color: #1b7a1b;
}

.fwt-pincode-result:empty {
	margin-top: 0;
}

.fwt-pincode-result.fwt-error {
	color: #c62828;
}

/* ==========================================================================
   Pincode-gated Add to Cart button
   ========================================================================== */

.single_add_to_cart_button.fwt-atc-disabled,
a.add_to_cart_button.fwt-atc-disabled {
	opacity: .45 !important;
	cursor: not-allowed !important;
	pointer-events: none !important;
	filter: saturate(.6);
}

@media (prefers-reduced-motion: reduce) {
	.fwt-overlay,
	.fwt-panel,
	.fwt-nav-item {
		transition: none;
	}
}