:root {
	--wndfc-red: #16645b;
	--wndfc-red-dark: #123f46;
	--wndfc-gold: #78a99c;
	--wndfc-gold-light: #ffffff;
	--wndfc-paper: #f5f4ec;
	--wndfc-ink: #193c40;
	--wndfc-muted: #526963;
	--wndfc-line: #cfdbd5;
}

.wndfc {
	position: fixed;
	z-index: 99990;
	top: 42%;
	right: 5px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	transform: translateY(-50%);
	font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

.admin-bar .wndfc {
	top: calc(42% + 16px);
}

.wndfc__cart-button {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 64px;
	min-height: 184px;
	padding: 18px 9px;
	border: 2px solid var(--wndfc-red);
	border-right: 2px solid var(--wndfc-red);
	border-radius: 999px;
	background: var(--wndfc-red);
	box-shadow: 0 16px 26px rgba(18, 63, 70, 0.26);
	color: #ffffff;
	cursor: pointer;
	text-decoration: none;
	transform-origin: right center;
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.wndfc__cart-button::before,
.wndfc__cart-button::after {
	content: "";
	position: absolute;
	right: 16px;
	left: 16px;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--wndfc-gold-light), transparent);
	opacity: 0.85;
}

.wndfc__cart-button::before {
	top: 12px;
}

.wndfc__cart-button::after {
	bottom: 12px;
}

.wndfc__cart-button:hover,
.wndfc__cart-button:focus-visible,
.wndfc__cart-button[aria-expanded="true"] {
	border-color: var(--wndfc-gold);
	transform: translateY(-2px);
	box-shadow: 0 22px 38px rgba(18, 63, 70, 0.36);
	filter: brightness(1.04);
	outline: 0;
}

.wndfc__cart-icon {
	position: relative;
	width: 30px;
	height: 30px;
	margin-bottom: 10px;
	color: var(--wndfc-gold-light);
}

.wndfc__cart-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.wndfc__cart-badge {
	position: absolute;
	top: -9px;
	right: -11px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border: 2px solid #ffffff;
	border-radius: 999px;
	background: #b55b2d;
	box-shadow: 0 4px 9px rgba(18, 63, 70, 0.28);
	color: #fff;
	font-size: 16px;
	font-weight: 900;
	line-height: 1;
}

.wndfc__cart-badge.is-empty {
	display: none;
}

.wndfc__cart-label {
	writing-mode: vertical-rl;
	font-family: "Noto Serif TC", "Microsoft JhengHei", serif;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.5em;
	line-height: 1;
}

.wndfc__social {
	position: relative;
	display: block;
	width: 50px;
	height: 50px;
	border-radius: 999px;
	background: radial-gradient(circle at 35% 28%, #fff 0%, #fff 48%, #f3f5f8 100%);
	box-shadow:
		0 10px 18px rgba(18, 63, 70, 0.24),
		0 2px 4px rgba(18, 63, 70, 0.16),
		inset 0 0 0 1px rgba(255, 255, 255, 0.82);
	text-decoration: none;
	transition: transform 0.18s ease, filter 0.18s ease;
	isolation: isolate;
}

.wndfc__social:hover,
.wndfc__social:focus-visible {
	transform: translateX(-3px);
	filter: brightness(1.04);
	outline: 0;
}

.wndfc__social-img {
	position: absolute;
	inset: 8px;
	display: block;
	width: calc(100% - 16px);
	height: calc(100% - 16px);
	border-radius: inherit;
	object-fit: contain;
	filter: drop-shadow(0 2px 3px rgba(18, 63, 70, 0.18));
	transition: opacity 0.18s ease;
}

.wndfc__social-img--hover {
	opacity: 0;
}

.wndfc__social:hover .wndfc__social-img--normal,
.wndfc__social:focus-visible .wndfc__social-img--normal {
	opacity: 0;
}

.wndfc__social:hover .wndfc__social-img--hover,
.wndfc__social:focus-visible .wndfc__social-img--hover {
	opacity: 1;
}

.wndfc__cart-panel {
	position: absolute;
	top: -18px;
	right: 90px;
	width: min(360px, calc(100vw - 118px));
	max-height: min(72vh, 680px);
	overflow: auto;
	padding: 30px 30px 24px;
	border: 1px solid rgba(18, 63, 70, 0.28);
	border-radius: 14px;
	background: rgba(255, 253, 248, 0.98);
	box-shadow: 0 20px 46px rgba(18, 63, 70, 0.22);
	color: var(--wndfc-ink);
}

.wndfc__cart-panel[hidden] {
	display: none;
}

.wndfc__close {
	position: absolute;
	top: 12px;
	right: 16px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid rgba(18, 63, 70, 0.18);
	border-radius: 4px;
	background: var(--wndfc-red);
	color: #fff;
	font-size: 28px;
	font-weight: 300;
	line-height: 28px;
	cursor: pointer;
	box-shadow: 0 6px 14px rgba(18, 63, 70, 0.2);
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.wndfc__close:hover,
.wndfc__close:focus-visible {
	border-color: var(--wndfc-gold);
	background: var(--wndfc-red-dark);
	color: var(--wndfc-gold-light);
	box-shadow: 0 8px 18px rgba(18, 63, 70, 0.26);
	outline: 0;
}

.wndfc__items {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.wndfc__item {
	position: relative;
	display: grid;
	grid-template-columns: 78px minmax(0, 1fr) 26px;
	gap: 14px;
	padding: 22px 0;
	border-bottom: 1px solid var(--wndfc-line);
}

.wndfc__thumb img {
	display: block;
	width: 70px;
	height: 70px;
	object-fit: contain;
}

.wndfc__item-title {
	display: block;
	color: var(--wndfc-ink);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.65;
	text-decoration: none;
}

.wndfc__item-title:hover,
.wndfc__item-title:focus-visible {
	color: var(--wndfc-red);
}

.wndfc__item-meta {
	margin-top: 6px;
	color: #8d8580;
	font-size: 15px;
	line-height: 1.45;
}

.wndfc__remove {
	align-self: center;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border: 1px solid #d9dee3;
	border-radius: 999px;
	color: #c6cbd0;
	font-size: 20px;
	font-weight: 300;
	line-height: 1;
	text-decoration: none;
}

.wndfc__remove:hover,
.wndfc__remove:focus-visible {
	border-color: var(--wndfc-red);
	color: var(--wndfc-red);
	outline: 0;
}

.wndfc__subtotal {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 24px 0;
	border-bottom: 1px solid var(--wndfc-line);
	color: var(--wndfc-ink);
	font-size: 18px;
	font-weight: 800;
}

.wndfc__subtotal .woocommerce-Price-amount {
	font-weight: 800;
}

.wndfc__checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	margin-top: 22px;
	border-radius: 8px;
	background: var(--wndfc-red);
	color: #fff;
	font-size: 18px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-decoration: none;
	box-shadow: 0 10px 20px rgba(18, 63, 70, 0.16);
	transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.wndfc__checkout:hover,
.wndfc__checkout:focus-visible {
	background: var(--wndfc-red-dark);
	color: #fff;
	box-shadow: 0 12px 24px rgba(18, 63, 70, 0.22);
	transform: translateY(-1px);
	outline: 0;
}

.wndfc__empty {
	padding: 46px 10px 26px;
	color: var(--wndfc-muted);
	text-align: center;
}

.wndfc__empty p {
	margin: 0;
}

@media (max-width: 767px) {
	.wndfc {
		top: auto;
		right: 5px;
		bottom: 18px;
		gap: 10px;
		transform: none;
	}

	.admin-bar .wndfc {
		top: auto;
	}

	.wndfc__cart-button {
		width: 76px;
		min-height: 60px;
		padding: 0;
		border: 2px solid var(--wndfc-red);
		border-radius: 999px;
	}

	.wndfc__cart-button::before,
	.wndfc__cart-button::after,
	.wndfc__cart-label {
		display: none;
	}

	.wndfc__cart-icon {
		margin: 0;
	}

	.wndfc__social {
		width: 46px;
		height: 46px;
	}

	.wndfc__cart-panel {
		position: fixed;
		right: 14px;
		bottom: 92px;
		top: auto;
		width: min(360px, calc(100% - 28px));
		max-height: min(68vh, 620px);
		padding: 28px 22px 22px;
	}

	.wndfc__item {
		grid-template-columns: 64px minmax(0, 1fr) 24px;
		gap: 12px;
		padding: 18px 0;
	}

	.wndfc__thumb img {
		width: 58px;
		height: 58px;
	}

	.wndfc__item-title {
		font-size: 15px;
	}

	.wndfc__subtotal {
		font-size: 18px;
	}
}

/* A complete capsule, inset on every viewport; no temple-style ornaments. */
.wndfc__cart-button::before,.wndfc__cart-button::after{display:none}
.wndfc__cart-button:focus-visible,.wndfc__close:focus-visible{outline:3px solid #b55b2d;outline-offset:3px}
.wndfc__cart-button:hover,.wndfc__cart-button[aria-expanded="true"]{background:var(--wndfc-red-dark);border-color:var(--wndfc-red-dark)}
.wndfc__cart-panel{background:#f5f4ec;border-color:#cfdbd5;border-radius:18px}
