/* Sticky cart bar under site nav — only when cart has items */
.fsp-cart-bar {
	position: sticky;
	top: var(--fsp-nav-height, 64px);
	z-index: 90;
	background: linear-gradient(135deg, #0f172a, #1e3a5f);
	color: #fff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.fsp-cart-bar[hidden] {
	display: none !important;
}

.fsp-cart-bar__inner {
	max-width: 1120px;
	margin: 0 auto;
	padding: 8px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.fsp-cart-bar__open {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: start;
	cursor: pointer;
}

.fsp-cart-bar__icon {
	font-size: 1.15rem;
}

.fsp-cart-bar__copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.fsp-cart-bar__copy strong {
	font-size: 0.92rem;
}

.fsp-cart-bar__copy span {
	font-size: 0.8rem;
	opacity: 0.9;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.fsp-cart-bar__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.5rem;
	height: 1.5rem;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--fsp-brand-orange, #f97316);
	font-size: 0.78rem;
	font-weight: 900;
}

.fsp-cart-bar__actions {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.fsp-cart-bar__link,
.fsp-cart-bar__checkout {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 0 12px;
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 800;
	text-decoration: none;
}

.fsp-cart-bar__link {
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: #fff;
}

.fsp-cart-bar__checkout {
	background: var(--fsp-brand-orange, #f97316);
	color: #fff;
}

/* Drawer */
.fsp-mini-cart[hidden] {
	display: none !important;
}

.fsp-mini-cart {
	position: fixed;
	inset: 0;
	z-index: 10050;
}

.fsp-mini-cart__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}

.fsp-mini-cart__panel {
	position: absolute;
	top: 0;
	bottom: 0;
	inset-inline-start: 0;
	width: min(100%, 380px);
	display: flex;
	flex-direction: column;
	background: #fff;
	color: #0f172a;
	box-shadow: 8px 0 40px rgba(15, 23, 42, 0.25);
}

.fsp-mini-cart__head,
.fsp-mini-cart__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid #e2e8f0;
}

.fsp-mini-cart__foot {
	flex-direction: column;
	align-items: stretch;
	border-bottom: 0;
	border-top: 1px solid #e2e8f0;
}

.fsp-mini-cart__head h2 {
	margin: 0;
	font-size: 1.05rem;
}

.fsp-mini-cart__close {
	border: 0;
	background: transparent;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	color: #64748b;
}

.fsp-mini-cart__body {
	flex: 1;
	overflow: auto;
	padding: 12px 16px 20px;
}

.fsp-mini-cart__empty {
	margin: 24px 0;
	text-align: center;
	color: #64748b;
}

.fsp-mini-cart__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
}

.fsp-mini-cart__item {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
}

.fsp-mini-cart__thumb {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 10px;
	background: #f1f5f9;
}

.fsp-mini-cart__name {
	display: block;
	margin-bottom: 4px;
	color: inherit;
	font-weight: 800;
	text-decoration: none;
	line-height: 1.4;
}

.fsp-mini-cart__price {
	margin-bottom: 8px;
	color: #475569;
	font-size: 0.9rem;
}

.fsp-mini-cart__qty {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	overflow: hidden;
}

.fsp-mini-cart__qty-btn {
	width: 34px;
	height: 34px;
	border: 0;
	background: #f8fafc;
	font-size: 1.1rem;
	cursor: pointer;
}

.fsp-mini-cart__qty-input {
	width: 44px;
	height: 34px;
	border: 0;
	text-align: center;
	font: inherit;
	font-weight: 700;
}

.fsp-mini-cart__total {
	display: flex;
	justify-content: space-between;
	font-weight: 700;
}

.fsp-mini-cart__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.fsp-mini-cart__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 12px;
	border-radius: 12px;
	font-weight: 800;
	text-decoration: none;
}

.fsp-mini-cart__btn--ghost {
	border: 1px solid #cbd5e1;
	color: #0f172a;
	background: #fff;
}

.fsp-mini-cart__btn--primary {
	background: linear-gradient(135deg, var(--fsp-brand-orange, #f97316), #c2410c);
	color: #fff;
}

.fsp-mini-cart__account {
	margin: 0.75rem 0 0;
	text-align: center;
	font-size: 0.85rem;
}

.fsp-mini-cart__account a {
	color: inherit;
	opacity: 0.8;
	text-decoration: underline;
	text-underline-offset: 3px;
}

body.fsp-mini-cart-open {
	overflow: hidden;
}

@media (max-width: 720px) {
	.fsp-cart-bar__inner {
		padding: 8px 12px;
	}

	.fsp-cart-bar__link {
		display: none;
	}

	.fsp-mini-cart__panel {
		width: min(100%, 100vw);
	}
}
