:root {
	--smfc-accent: #00b8f0;
	--smfc-accent-tint: #e0f6fd;
	--smfc-ink: #161a20;
	--smfc-line: #eef1f4;
	--smfc-overlay-opacity: 0.5;
}

/* Purely a fragment-swap wrapper (see class-smartfish-cart-drawer.php's
   fragments() docblock) - display:contents keeps it fully out of layout so
   it can never accidentally create a new containing block that would break
   its fixed-position children. */
.smfc-drawer-root {
	display: contents;
}

/* z-index pinned near the top of the practical range (rather than one
   value observed to beat the theme's own site nav, which turned out to
   have more than one sticky/scrolled variant at different z-indexes) so
   the drawer/backdrop can never again end up "behind" some header state -
   previously at 100000/99999, then 1000011, both still lost to a header
   variant with a higher index. */
.smfc-cart-drawer {
	position: fixed;
	top: 0;
	bottom: 0;
	width: min(528px, 100vw);
	background: #fff;
	z-index: 2147483000;
	display: flex;
	flex-direction: column;
	box-shadow: 0 0 40px rgba(10, 20, 30, 0.18);
	transition: transform 0.25s ease;
	transform: translateX(100%);
}

.smfc-cart-drawer[data-position="right"] {
	right: 0;
	transform: translateX(100%);
	border-radius: 20px 0 0 20px;
}

.smfc-cart-drawer[data-position="left"] {
	left: 0;
	transform: translateX(-100%);
	border-radius: 0 20px 20px 0;
}

.smfc-cart-drawer.is-open {
	transform: translateX(0);
}

.smfc-drawer__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(10, 20, 30, var(--smfc-overlay-opacity));
	z-index: 2147482999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.smfc-drawer__backdrop.is-open {
	opacity: 1;
	pointer-events: auto;
}

.smfc-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	background: var(--smfc-accent-tint);
	border-bottom: 1px solid var(--smfc-line);
}

.smfc-drawer__header h2 {
	margin: 0;
	font-size: 17px;
	font-weight: 800;
	color: var(--smfc-ink);
}

.smfc-drawer__close {
	background: rgba(255, 255, 255, 0.7);
	border: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	font-size: 20px;
	cursor: pointer;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--smfc-ink);
}

.smfc-drawer__body {
	flex: 1;
	overflow-y: auto;
	padding: 20px 24px;
}

.smfc-cart-items {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
}

.smfc-cart-item {
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 14px 0;
	border-bottom: 1px solid var(--smfc-line);
	position: relative;
}

.smfc-cart-item__thumb img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 12px;
}

.smfc-cart-item__info {
	flex: 1;
	min-width: 0;
}

.smfc-cart-item__name {
	display: block;
	font-weight: 700;
	text-decoration: none;
	color: inherit;
	margin-bottom: 4px;
}

.smfc-cart-item__qty {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
	background: #f7fafc;
	border-radius: 100px;
	padding: 3px;
}

.smfc-cart-item__qty button {
	width: 24px;
	height: 24px;
	border: none;
	background: #fff;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(10, 20, 30, 0.12);
}

.smfc-cart-item__remove {
	background: none;
	border: none;
	font-size: 18px;
	color: #b0b6c0;
	cursor: pointer;
	align-self: flex-start;
}

.smfc-empty-cart {
	text-align: center;
	padding: 48px 16px;
}

.smfc-empty-cart__title {
	font-size: 18px;
	font-weight: 800;
}

.smfc-empty-cart__btn {
	display: inline-block;
	margin-top: 16px;
	padding: 12px 28px;
	background: var(--smfc-accent);
	color: #fff;
	text-decoration: none;
	border-radius: 100px;
	font-weight: 700;
}

.smfc-coupon {
	margin: 16px 0;
}

.smfc-coupon__toggle {
	background: none;
	border: none;
	color: var(--smfc-accent);
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
	font-size: 13px;
	font-weight: 600;
}

.smfc-coupon__box {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

.smfc-coupon__input {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid var(--smfc-line);
	border-radius: 10px;
}

.smfc-coupon__apply {
	padding: 10px 16px;
	border: none;
	background: var(--smfc-ink);
	color: #fff;
	border-radius: 10px;
	cursor: pointer;
	font-weight: 700;
}

.smfc-coupon__message {
	font-size: 13px;
	margin-top: 6px;
}

.smfc-summary {
	border-top: 1px solid var(--smfc-line);
	padding-top: 12px;
	margin-top: 4px;
}

.smfc-summary__row {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	font-weight: 600;
}

.smfc-summary__savings {
	color: var(--smfc-accent);
}

.smfc-actions {
	display: flex;
	gap: 10px;
	margin-top: 18px;
}

.smfc-btn {
	flex: 1;
	text-align: center;
	padding: 14px;
	border-radius: 12px;
	text-decoration: none;
	font-weight: 700;
	font-size: 14.5px;
}

.smfc-btn--primary {
	background: var(--smfc-accent);
	color: #fff;
}

.smfc-btn--secondary {
	background: #f2f4f7;
	color: var(--smfc-ink);
}

.smfc-upsells {
	margin: 18px 0;
	padding: 16px;
	background: var(--smfc-accent-tint);
	border-radius: 16px;
	border-top: none;
}

.smfc-upsells__heading {
	font-size: 14px;
	font-weight: 800;
	margin-bottom: 12px;
	color: var(--smfc-ink);
}

.smfc-upsells__list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.smfc-upsells__item {
	text-align: center;
	background: #fff;
	border-radius: 12px;
	padding: 10px;
	min-width: 0;
}

.smfc-upsells__item a {
	text-decoration: none;
	color: inherit;
	display: block;
}

.smfc-upsells__item img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 8px;
}

.smfc-upsells__name {
	font-size: 12px;
	font-weight: 700;
	margin-top: 8px;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.smfc-upsells__price {
	font-size: 11.5px;
	font-weight: 800;
	color: var(--smfc-accent);
	margin-top: 3px;
}

.smfc-upsells__add {
	margin-top: 8px;
	width: 100%;
	border: none;
	background: var(--smfc-ink);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 6px;
	border-radius: 100px;
	cursor: pointer;
}

.smfc-fab {
	position: fixed;
	bottom: 24px;
	z-index: 99998;
	width: 56px;
	height: 56px;
	background: var(--smfc-fab-bg, var(--smfc-accent));
	color: var(--smfc-fab-icon-color, #fff);
	border: none;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	font-size: 22px;
}

.smfc-fab[data-position="right"] {
	right: 24px;
}

.smfc-fab[data-position="left"] {
	left: 24px;
}

.smfc-fab__icon {
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.smfc-fab__icon svg {
	width: 24px;
	height: 24px;
}

.smfc-fab__count {
	position: absolute;
	top: -4px;
	inset-inline-end: -4px;
	background: var(--smfc-fab-badge-bg, #fff);
	color: var(--smfc-fab-badge-text, var(--smfc-accent));
	border-radius: 999px;
	min-width: 20px;
	height: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
	padding: 0 4px;
}

.smfc-fab__total {
	position: fixed;
	bottom: 84px;
	z-index: 99998;
	background: #fff;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.smfc-fab__total[data-position="right"] {
	right: 24px;
}

.smfc-fab__total[data-position="left"] {
	left: 24px;
}
