/*
 * Cart Drawer — bottom-anchored panel (mibble-blocks pattern).
 * Fixed to bottom of viewport, content expands upward on open.
 */

/* Body scroll lock when cart is open */
body.cc-cart-open {
	overflow: hidden;
}

/* ── Overlay ── */
.cc-cart-overlay {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100vh;
	z-index: 9999;
	background: rgba(0, 0, 0, 0.6);
	transition: opacity 400ms cubic-bezier(0.4, 0, 0.2, 1);
	opacity: 0;
	pointer-events: none;
}

.cc-cart-overlay--opened {
	opacity: 1;
	pointer-events: auto;
	z-index: 99999;
}

/* ── Cart container ── */
.cc-cart {
	/* Font-size scale — tied to theme presets */
	--cc-font-base: var(--wp--preset--font-size--small, 1.05rem);
	--cc-font-sm: var(--wp--preset--font-size--x-small, .95rem);
	--cc-font-xs: clamp(.75rem, 1.5vw, .8125rem);

	/* Design tokens — override via theme CSS or theme.json custom properties */
	--cc-radius-sm: 8px;
	--cc-radius-md: 12px;
	--cc-radius-lg: 12px;
	--cc-radius-pill: 999px;
	--cc-btn-height: 48px;
	--cc-field-height: 44px;
	--cc-shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
	--cc-color-danger: #ef4444;
	--cc-color-badge: #047857;

	display: flex;
	flex-direction: column;
	position: fixed;
	z-index: 9999;
	background: var(--wp--preset--color--base, #fff);
	user-select: none;
	visibility: hidden;
}

.cc-cart.cc-cart--opened {
	z-index: 99999;
	visibility: visible;
}

/* Fade-in only when first item is added (JS adds cc-cart--entering) */
.cc-cart.cc-cart--entering {
	animation: cc-cart-fade-in 300ms ease forwards;
}

@keyframes cc-cart-entrance {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes cc-cart-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* ── Expandable content wrapper ── */
.cc-cart__content-wrap {
	max-height: 0;
	overflow: hidden;
	transition: max-height 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Scrollable content area ── */
.cc-cart__content {
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	overflow-x: hidden;
}

/* ── Header ── */
.cc-cart__header {
	border-bottom: 1px solid var(--wp--preset--color--border, rgba(0,0,0,0.06));
	padding: 0 20px;
}

.cc-cart__header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 16px 0;
	max-width: var(--wp--style--global--wide-size, 1260px);
	margin: 0 auto;
}

.cc-cart__header-title {
	font-family: var(--wp--preset--font-family--primary, inherit);
	font-size: var(--wp--preset--font-size--base, 1.165rem);
	font-weight: 500;
}

.cc-cart__header-count {
	font-weight: 400;
	color: var(--wp--preset--color--secondary, #434c6c);
}

/* ── More options (ellipsis dropdown) ── */
.cc-cart__more {
	position: relative;
	margin-left: auto;
}

.cc-cart__more-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: none;
	border: none;
	border-radius: var(--cc-radius-sm);
	cursor: pointer;
	color: var(--wp--preset--color--main, #000);
	padding: 0;
}

.cc-cart__more-btn:hover {
	background: var(--wp--preset--color--tertiary, #f9f9fb);
}

.cc-cart__more-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: -1;
	max-height: 0;
	overflow: hidden;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid transparent;
	border-radius: var(--cc-radius-md);
	transition: max-height 200ms ease, border-color 200ms ease;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cc-cart__more--open .cc-cart__more-dropdown {
	z-index: 10;
	max-height: 200px;
	border-color: var(--wp--preset--color--border, rgba(0,0,0,0.06));
}

.cc-cart__more-item {
	display: block;
	width: 100%;
	padding: 12px 16px;
	background: none;
	border: none;
	cursor: pointer;
	white-space: nowrap;
	font-size: var(--cc-font-sm);
	font-weight: 500;
	color: var(--wp--preset--color--main, #000);
	text-align: left;
}

.cc-cart__more-item:hover {
	background: var(--wp--preset--color--tertiary, #f9f9fb);
}

/* Close button — hidden on desktop, visible on mobile */
.cc-cart__close {
	display: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: none;
	border: none;
	border-radius: var(--cc-radius-sm);
	cursor: pointer;
	padding: 0;
	color: var(--wp--preset--color--main, #000);
}

.cc-cart__close:hover {
	background: var(--wp--preset--color--tertiary, #f9f9fb);
}

.cc-cart__close svg {
	width: 20px;
	height: 20px;
}

/* ── Reward nudges ── */
.cc-cart__reward-nudges {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px 20px 0;
}

.cc-cart__reward-nudges[hidden] {
	display: none;
}

.cc-cart__reward-nudge {
	padding: 10px 14px;
	border-radius: var(--cc-radius-sm);
	font-size: var(--cc-font-xs);
	line-height: 1.4;
}

.cc-cart__reward-nudge[hidden] {
	display: none;
}

.cc-cart__reward-nudge--spend {
	background: #fffbeb;
	border-left: 3px solid #f59e0b;
	color: #92400e;
}

.cc-cart__reward-nudge--streak {
	background: #eff6ff;
	border-left: 3px solid var(--wp--preset--color--primary, #3B5998);
	color: #1e40af;
}

.cc-cart__reward-nudge--applied {
	background: #ecfdf5;
	border-left: 3px solid var(--cc-color-badge, #047857);
	color: #065f46;
}

/* ── Body (items area) ── */
.cc-cart__body {
	flex: 1;
	padding: 0 20px;
	position: relative;
}

.cc-cart__body-inner {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 24px 0 0;
	max-width: var(--wp--style--global--wide-size, 1260px);
	margin: 0 auto;
}

/* ── Cart item ── */
.cc-cart__item {
	display: grid;
	grid-template-columns: 50px 1fr auto;
	grid-template-rows: auto auto;
	gap: 4px 12px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--wp--preset--color--border, rgba(0,0,0,0.06));
	position: relative;
	overflow: hidden;
}

.cc-cart__item:last-of-type {
	border-bottom: none;
	padding-bottom: 0;
}

.cc-cart__item-image {
	grid-row: 1 / 3;
	width: 50px;
	height: 50px;
	border-radius: var(--cc-radius-sm);
	border: 1px solid var(--wp--preset--color--border, rgba(0,0,0,0.06));
	overflow: hidden;
}

.cc-cart__item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: calc(var(--cc-radius-sm) - 1px);
}

.cc-cart__item-details {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	grid-column: 2;
	grid-row: 1;
	min-height: 36px;
}

.cc-cart__item-name {
	font-size: var(--cc-font-sm);
	font-weight: 400;
	color: var(--wp--preset--color--main, #000);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cc-cart__item-name:hover {
	text-decoration: underline;
}

.cc-cart__item-variation {
	font-size: var(--cc-font-xs);
	color: var(--wp--preset--color--secondary, #434c6c);
}

.cc-cart__item-variation[hidden] {
	display: none;
}

.cc-cart__item-price {
	font-size: var(--cc-font-sm);
	font-weight: 500;
	color: var(--wp--preset--color--main, #000);
	white-space: nowrap;
	justify-self: end;
	grid-column: 3;
	grid-row: 1;
}

/* ── Item actions (stepper + delete) ── */
.cc-cart__item-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	grid-column: 2;
	grid-row: 2;
	padding-top: 4px;
}

.cc-cart__item-stepper {
	display: flex;
	align-items: center;
	gap: 0;
	border: 1px solid var(--wp--preset--color--border, rgba(0,0,0,0.06));
	border-radius: var(--cc-radius-sm);
	overflow: hidden;
}

.cc-cart__stepper-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: var(--wp--preset--color--base, #fff);
	border: none;
	border-radius: 0;
	cursor: pointer;
	padding: 0;
	color: var(--wp--preset--color--main, #000);
	transition: opacity 150ms ease;
}

.cc-cart__stepper-btn:hover {
	opacity: 0.7;
}

.cc-cart__stepper-btn svg {
	width: 14px;
	height: 14px;
}

/* Smart stepper icon toggle (trash-at-1) */
.cc-cart__stepper-icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.cc-cart__stepper-icon[hidden] {
	display: none;
}

.cc-cart input.cc-cart__stepper-input {
	width: 32px;
	height: 32px;
	background: transparent;
	border: 0;
	padding: 0;
	text-align: center;
	font-size: var(--cc-font-sm);
	font-weight: 500;
	color: var(--wp--preset--color--main, #000);
	outline: none;
	line-height: 32px;
	-moz-appearance: textfield;
}

.cc-cart__stepper-input::-webkit-outer-spin-button,
.cc-cart__stepper-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ── Per-item loading state ── */
.cc-cart__item--updating {
	opacity: 0.5;
	pointer-events: none;
}

/* ── Empty state ── */
.cc-cart__empty {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 0;
}

.cc-cart__empty--hidden {
	display: none;
}

.cc-cart__empty h4 {
	margin: 0;
	font-size: var(--cc-font-base);
	font-weight: 500;
	color: var(--wp--preset--color--secondary, #434c6c);
}

/* ── Recommendations carousel ── */
.cc-cart__recs {
	padding: 0 0 0 20px;
	border-top: 1px solid var(--wp--preset--color--border, rgba(0,0,0,0.06));
}

.cc-cart__recs--hidden {
	display: none;
}

.cc-cart__recs-inner {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px 0;
	max-width: var(--wp--style--global--wide-size, 1260px);
	margin: 0 auto;
}

.cc-cart__recs-title {
	font-size: var(--cc-font-sm);
	font-weight: 500;
}

.cc-cart__recs-track {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding-bottom: 4px;
}

.cc-cart__recs-track::-webkit-scrollbar {
	display: none;
}

/* Row-style card: thumbnail left, info right */
.cc-cart__recs-card {
	flex: 0 0 320px;
	height: 96px;
	scroll-snap-align: start;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0;
	border: 1px solid var(--wp--preset--color--border, rgba(0,0,0,0.06));
	border-radius: var(--cc-radius-md);
	box-shadow: var(--cc-shadow-sm);
	position: relative;
}

.cc-cart__recs-card-link {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
	padding: 12px;
	flex: 1;
	min-width: 0;
	text-decoration: none;
	height: 100%;
}

.cc-cart__recs-card-link:hover .cc-cart__recs-card-name {
	text-decoration: underline;
}

.cc-cart__recs-card-image {
	display: block;
	flex: 0 0 60px;
	width: 60px;
	height: 60px;
	border-radius: var(--cc-radius-sm);
	overflow: hidden;
	order: 1;
}

.cc-cart__recs-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cc-cart__recs-card-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	flex: 1;
}

.cc-cart__recs-card-name {
	font-size: var(--cc-font-sm);
	font-weight: 400;
	line-height: 1.3;
	height: calc(2 * 1em * 1.3);
	color: var(--wp--preset--color--main, #000);
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cc-cart__recs-card-meta {
	display: flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
}

.cc-cart__recs-card-price {
	font-size: var(--cc-font-sm);
	font-weight: 600;
	color: var(--wp--preset--color--main, #000);
	white-space: nowrap;
}

.cc-cart__recs-card-sep {
	font-size: var(--cc-font-sm);
	color: var(--wp--preset--color--secondary, #434c6c);
}

.cc-cart__recs-card-category {
	font-size: var(--cc-font-sm);
	font-weight: 400;
	color: var(--wp--preset--color--secondary, #434c6c);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cc-cart__recs-card-add {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 36px;
	height: 100%;
	background: none;
	border: none;
	border-left: 1px solid var(--wp--preset--color--border, rgba(0,0,0,0.06));
	cursor: pointer;
	color: var(--wp--preset--color--main, #000);
	padding: 0;
	border-radius: 0 var(--cc-radius-md) var(--cc-radius-md) 0;
	transition: background 150ms ease;
}

.cc-cart__recs-card-add:hover {
	background: var(--wp--preset--color--tertiary, #f9f9fb);
}

.cc-cart__recs-card-add[hidden] {
	display: none;
}

.cc-cart__recs-card-add svg {
	width: 14px;
	height: 14px;
}

.cc-cart__recs-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 72px;
}

.cc-cart__recs-loading--hidden {
	display: none;
}

.cc-cart__recs-track--hidden {
	display: none;
}

.cc-cart__recs-spinner {
	width: 20px;
	height: 20px;
	border: 2px solid var(--wp--preset--color--border, rgba(0,0,0,0.06));
	border-right-color: transparent;
	border-radius: 50%;
	animation: cc-spinner 600ms linear infinite;
}

/* ── Add more pill button ── */
.cc-cart__add-more {
	padding: 12px 20px;
}

.cc-cart__add-more-inner {
	display: flex;
	justify-content: flex-end;
	max-width: var(--wp--style--global--wide-size, 1260px);
	margin: 0 auto;
}

.cc-cart__add-more-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border: 1px solid var(--wp--preset--color--border, rgba(0,0,0,0.06));
	border-radius: var(--cc-radius-pill);
	text-decoration: none;
	color: var(--wp--preset--color--main, #000);
	cursor: pointer;
	transition: background 150ms ease;
}

.cc-cart__add-more-link:hover {
	background: var(--wp--preset--color--tertiary, #f9f9fb);
}

.cc-cart__add-more-link span {
	font-size: var(--cc-font-sm);
	font-weight: 500;
	white-space: nowrap;
}

.cc-cart__add-more-link svg {
	width: 16px;
	height: 16px;
}

/* ── Panel (always visible) ── */
.cc-cart:not(.cc-cart--opened) .cc-cart__panel {
	box-shadow: 0px -4px 20px 0px rgba(0, 0, 0, 0.11);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	background: rgba(255, 255, 255, 0.92);
}

.cc-cart__totals {
	padding: 24px 20px;
	border-top: 1px solid var(--wp--preset--color--border, rgba(0,0,0,0.06));
}

/* Removed: opened padding-right override — caused layout shift */

.cc-cart__totals-inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	max-width: var(--wp--style--global--wide-size, 1260px);
	margin: 0 auto;
}

/* ── Hide/Open toggle (desktop only) ── */
.cc-cart__toggle {
	display: flex;
	align-items: center;
	gap: 12px;
	height: var(--cc-btn-height);
	cursor: pointer;
}

.cc-cart__toggle span {
	font-size: var(--cc-font-base);
	font-weight: 500;
	white-space: nowrap;
}

.cc-cart__toggle-arrow {
	width: 20px;
	height: 20px;
	transition: transform 300ms ease-in-out;
}

.cc-cart__toggle--opened .cc-cart__toggle-arrow {
	transform: rotate(180deg);
}

/* ── Totals + checkout ── */
.cc-cart__totals-wrap {
	display: flex;
	flex-direction: column;
	width: 300px;
}

/* Totals rows — in scrollable content area (under recs) */
.cc-cart__totals-rows {
	display: none;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	padding: 20px;
	border-top: 1px solid var(--wp--preset--color--border, rgba(0,0,0,0.06));
	max-width: calc(var(--wp--style--global--wide-size, 1260px) + 40px);
	margin: 0 auto;
}

.cc-cart.cc-cart--opened .cc-cart__totals-rows {
	display: flex;
}


.cc-cart__totals-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 300px;
}

.cc-cart__totals-row[hidden] {
	display: none;
}

.cc-cart__totals-label {
	font-size: var(--cc-font-sm);
}

.cc-cart__totals-value {
	font-size: var(--cc-font-sm);
}

.cc-cart__checkout-wrap {
	width: 100%;
}

/* ── Checkout button ── */
.cc-cart__checkout-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	height: var(--cc-btn-height);
	width: 100%;
	font-weight: 600;
	text-decoration: none;
	transition: opacity 150ms ease;
	border-radius: 5px;
	position: relative;
}


.cc-cart__checkout-btn--loading {
	opacity: 0.5;
	pointer-events: none;
}

/* ── Loading overlay ── */
.cc-cart__loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.08);
}

/* ── Desktop sidebar (≥ 783px) ── */
@media (min-width: 783px) {
	.cc-cart {
		top: 0;
		right: 0;
		width: 520px;
		height: 100vh;
		transform: translateX(100%);
		transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1);
	}

	.cc-cart.cc-cart--opened {
		transform: translateX(0);
	}

	/* Content-wrap always expanded — sidebar handles slide */
	.cc-cart__content-wrap {
		flex: 1;
		display: flex;
		flex-direction: column;
		overflow: hidden;
		max-height: none !important;
		transition: none;
	}

	.cc-cart__content {
		flex: 1;
		max-height: none;
		min-height: 0;
	}

	.cc-cart__body {
		flex: none;
	}

	/* Show close button on desktop */
	.cc-cart__close {
		display: flex;
	}

	/* Hide toggle bar — no bottom bar concept */
	.cc-cart__toggle {
		display: none;
	}

	/* Remove glass effect — sidebar has solid bg */
	.cc-cart:not(.cc-cart--opened) .cc-cart__panel {
		box-shadow: none;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		background: transparent;
	}

	/* Full-width checkout + totals within sidebar */
	.cc-cart__totals-wrap {
		width: 100%;
	}

	.cc-cart__totals-rows {
		align-items: stretch;
		max-width: none;
		margin: 0;
		padding: 20px 24px;
	}

	.cc-cart__totals-row {
		width: 100%;
	}
}

/* ── Mobile (≤ 782px) ── */
@media (max-width: 782px) {
	.cc-cart {
		bottom: 0;
		left: 0;
		width: 100%;
		visibility: visible;
		transition: background-color 200ms ease;
		animation: cc-cart-entrance 400ms ease both;
	}

	/* Full-screen drawer on mobile */
	.cc-cart.cc-cart--opened {
		height: 100vh;
		height: 100dvh;
	}

	.cc-cart--opened .cc-cart__content-wrap {
		flex: 1;
		display: flex;
		flex-direction: column;
		overflow: hidden;
	}

	.cc-cart--opened .cc-cart__content {
		flex: 1;
		max-height: none;
		min-height: 0;
	}

	.cc-cart--opened .cc-cart__body {
		flex: none;
		max-height: none;
	}

	/* Drag handle indicator */
	.cc-cart--opened .cc-cart__header::before {
		content: '';
		display: block;
		width: 36px;
		height: 4px;
		border-radius: 2px;
		background: var(--wp--preset--color--border, rgba(0,0,0,0.06));
		margin: 8px auto 0;
	}

	.cc-cart:not(.cc-cart--opened) {
		background: transparent;
		pointer-events: none;
	}

	.cc-cart:not(.cc-cart--opened) .cc-cart__panel {
		box-shadow: none;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		background: transparent;
	}

	.cc-cart:not(.cc-cart--opened) .cc-cart__totals {
		border-top: 0;
	}

	/* Mobile closed: hide panel inner (toggle + checkout), show pill */
	.cc-cart:not(.cc-cart--opened) .cc-cart__totals-inner {
		display: none;
	}

	.cc-cart__close {
		display: flex;
	}

	.cc-cart__toggle {
		display: none;
	}

	.cc-cart__totals-wrap {
		width: 100%;
	}

	/* Full-width totals on mobile */
	.cc-cart__totals-rows {
		align-items: stretch;
		width: 100%;
	}

	.cc-cart__totals-row {
		width: 100%;
	}

	.cc-cart__header-inner {
		padding: 12px 0;
	}

	/* Prevent keyboard pop-up on mobile — rely on +/- buttons only */
	.cc-cart input.cc-cart__stepper-input {
		pointer-events: none;
		user-select: none;
	}

	.cc-cart__recs-card {
		flex: 0 0 280px;
	}

	/* Let cards scroll flush to the right screen edge */
	.cc-cart__recs-track {
		margin-right: -20px;
	}
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
	.cc-cart-overlay,
	.cc-cart,
	.cc-cart__content-wrap,
	.cc-cart__toggle-arrow {
		transition: none;
	}

	.cc-cart {
		animation: none;
	}

	.cc-cart__recs-spinner {
		animation: none;
	}
}

/* ── Add-to-cart button loading spinner ── */
.single_add_to_cart_button.loading {
	position: relative;
	color: transparent !important;
	pointer-events: none;
}

.single_add_to_cart_button.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: cc-spinner 600ms linear infinite;
	color: var(--wp--preset--color--base, #fff);
}

@keyframes cc-spinner {
	to {
		transform: rotate(360deg);
	}
}

/* ── Swipe-to-delete (mobile) ── */
.cc-cart__item-swipe-bg {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 100px;
	background: var(--cc-color-danger);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	opacity: 0;
	pointer-events: none;
	transition: opacity 150ms ease;
}

.cc-cart__item--swiping .cc-cart__item-swipe-bg {
	pointer-events: auto;
	opacity: 1;
}

.cc-cart__item-swipe-bg svg {
	width: 20px;
	height: 20px;
}

/* ── Newly-added item highlight ── */
.cc-cart__item--just-added {
	animation: cc-highlight 1.2s ease-out;
}

@keyframes cc-highlight {
	0% {
		background: rgba(0, 0, 0, 0.06);
	}
	100% {
		background: transparent;
	}
}

/* ── Hide cart when empty ── */
.cc-cart.cc-cart--empty {
	display: none;
}

/* ── Focus indicators (WCAG 2.1 AA) ── */

.cc-cart__close:focus-visible,
.cc-cart__more-btn:focus-visible,
.cc-cart__stepper-btn:focus-visible,
.cc-cart__checkout-btn:focus-visible,
.cc-cart__toggle:focus-visible,
.cc-cart__recs-card-add:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary, #3B5998);
	outline-offset: 2px;
}

.cc-cart__stepper-input:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary, #3B5998);
	outline-offset: 2px;
}

/* ── Hide cart on checkout page (handled by PHP, belt-and-suspenders) ── */
.woocommerce-checkout .cc-cart {
	display: none;
}

/* ── Floating "View Cart" button ── */
.cc-cart-fab {
	display: flex;
	align-items: center;
	gap: 8px;
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 9998;
	height: 48px;
	padding: 0 24px;
	border: none;
	border-radius: 8px;
	background: var(--wp--preset--color--primary, #000);
	color: var(--wp--preset--color--base, #fff);
	font-size: var(--cc-font-sm);
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	transition: transform 150ms ease, box-shadow 150ms ease;
}

.cc-cart-fab[hidden] {
	display: none !important;
}

.cc-cart-fab:hover {
	transform: scale(1.03);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.cc-cart-fab:active {
	transform: scale(0.97);
}

.cc-cart-fab svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

/* Mobile — center the button */
@media (max-width: 782px) {
	.cc-cart-fab {
		right: auto;
		left: 50%;
		transform: translateX(-50%);
		bottom: 20px;
	}

	.cc-cart-fab:hover {
		transform: translateX(-50%) scale(1.03);
	}

	.cc-cart-fab:active {
		transform: translateX(-50%) scale(0.97);
	}
}

/* Hide on checkout page */
.woocommerce-checkout .cc-cart-fab {
	display: none !important;
}

/* Focus indicator */
.cc-cart-fab:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary, #3B5998);
	outline-offset: 2px;
}
