/**
 * 佈景橋接樣式（極少）：版心與元件樣式以 journal3-livesync.css、journal3-home-critical.css、
 * journal3-masterslider.css、journal3-masterslider-minimal.css 為準；此檔僅保留 WordPress 特有區塊與必要橋接。
 */

*,
*::before,
*::after {
	box-sizing: border-box;
}

/* 與 .bottom-menu 實際高度對齊（圖示＋文字常略高於 50px），避免固定列與底欄之間透出內文 */
html.has-bottom-menu {
	--spilia-bottom-nav-offset: 56px;
}

.has-bottom-menu .site-wrapper {
	padding-bottom: var(--spilia-bottom-nav-offset, 56px);
}

/*
 * 底部 Tab：四等分、不橫向捲動；預設/選單僅前 4 項有效（見 spilia_journal_bottom_menu_limit_four）。
 * Journal home-critical 裡 .bottom-menu-item-9 與 .bottom-menu-item-4 使用同一 icomoon，第四格改為購物車圖示。
 */
html.has-bottom-menu .bottom-menu {
	overflow-x: hidden;
	-webkit-overflow-scrolling: auto;
}

html.has-bottom-menu .bottom-menu > ul {
	width: 100%;
	min-width: 0;
}

html.has-bottom-menu .bottom-menu > ul > li {
	flex: 1 1 0;
	min-width: 0;
}

.bottom-menu-266 .bottom-menu-item-9 > a::before {
	content: '\f07a' !important;
	font-family: 'FontAwesome' !important;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/*
 * 首頁 #top 橫幅：手機優先（預設即參考站 mobile 留白），≥1025px 再還原桌面版；
 * 未載入 Master Slider JS 時由圖片寬 100% / 高 auto 撐開。
 */
html.route-common-home #top .grid-row-top-2 {
	background: rgba(255, 255, 255, 1);
	padding: 5px;
}

html.route-common-home #top .grid-row-top-3 {
	background: rgba(255, 255, 255, 1);
	padding: 5px;
	padding-bottom: 0;
}

html.route-common-home #top .grid-row-top-4 {
	padding: 5px;
	padding-top: 0;
}

html.route-common-home #top .grid-row-top-5 {
	padding-top: 8px;
	padding-bottom: 8px;
}

@media (max-width: 1024px) {
	html.route-common-home #top .grid-col-top-3-1 {
		width: 100%;
		padding-right: 0;
		padding-bottom: 20px;
	}
}

@media (min-width: 1025px) {
	html.route-common-home #top .grid-row-top-2 {
		padding: 20px;
		padding-top: 10px;
	}

	html.route-common-home #top .grid-row-top-3 {
		padding: 20px;
		padding-top: 0;
	}

	html.route-common-home #top .grid-row-top-4 {
		padding: 20px;
		padding-top: 10px;
	}

	html.route-common-home #top .grid-row-top-5 {
		padding-top: 10px;
		padding-bottom: 10px;
	}

	html.route-common-home #top .grid-col-top-3-1 {
		padding-bottom: 0;
	}
}

html.route-common-home #top .grid-row-top-2 .grid-cols,
html.route-common-home #top .grid-row-top-3 .grid-cols,
html.route-common-home #top .grid-row-top-4 .grid-cols {
	height: auto;
	min-height: 0;
}

html.route-common-home #top .grid-row-top-2 .grid-items,
html.route-common-home #top .grid-row-top-3 .grid-items,
html.route-common-home #top .grid-row-top-4 .grid-items {
	height: auto;
	min-height: 0;
}

html.route-common-home .module-master_slider .ms-view {
	background: transparent;
}

html.route-common-home .module-master_slider .ms-slide-container {
	height: auto;
}

html.route-common-home .module-master_slider .ms-slide.ms-slide-auto-height {
	position: relative;
	height: auto;
	width: 100%;
	display: block;
}

html.route-common-home .module-master_slider .ms-slide .ms-slide-bgcont {
	position: relative;
	width: 100%;
	height: auto;
		overflow: hidden;
}

html.route-common-home .module-master_slider .ms-slide .ms-slide-bgcont img.img-responsive {
	width: 100%;
	height: auto;
	display: block;
}

/* 右下角固定浮動：LINE、購物車、Instagram（在底欄上方）；回到頂部與 Journal .scroll-top 類似，疊在圓鈕接縫上、不佔 flex 欄位。 */
.spilia-float-fabs {
	--spilia-float-fab-size: 52px;
	--spilia-float-fab-gap: 10px;
	--spilia-float-top-size: 40px;
	position: fixed;
	right: 12px;
	bottom: 20px;
	z-index: 9980;
	width: var(--spilia-float-fab-size);
	pointer-events: none;
}

.has-bottom-menu .spilia-float-fabs {
	bottom: calc(var(--spilia-bottom-nav-offset, 56px) + 14px);
}

.spilia-float-fabs__stack {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--spilia-float-fab-gap);
	pointer-events: none;
}

.spilia-float-fabs__stack > .spilia-float-fab {
	pointer-events: auto;
}

.spilia-float-fab {
	pointer-events: auto;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
	text-decoration: none;
	color: #fff;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	border: 0;
	line-height: 1;
}

button.spilia-float-fab {
	cursor: pointer;
	font-family: inherit;
	-webkit-appearance: none;
	appearance: none;
}

.spilia-float-fab:hover,
.spilia-float-fab:focus-visible {
	color: #fff;
	transform: scale(1.06);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
	outline: none;
}

.spilia-float-fab--line {
	background: #06c755;
}

.spilia-float-fab--cart {
	background: #8e44ad;
	position: relative;
}

.spilia-float-fab__badge {
	position: absolute;
	top: 2px;
	right: 2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: #e74c3c;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
	pointer-events: none;
}

.spilia-float-fab__badge--empty {
	display: none;
}

.spilia-float-top {
	position: absolute;
	left: 50%;
	/* 疊在購物車／IG 接縫上；尺寸略小於圓形 FAB，方角深藍＋細白箭頭（對齊參考截圖） */
	bottom: calc(
		var(--spilia-float-fab-size) + (var(--spilia-float-fab-gap) / 2) -
			(var(--spilia-float-top-size) / 2)
	);
	z-index: 10002;
	width: var(--spilia-float-top-size);
	height: var(--spilia-float-top-size);
	border-radius: 5px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #103080;
	color: #fff;
	border: 0;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
	cursor: pointer;
	line-height: 1;
	transform: translateX(-50%);
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease, visibility 0.2s ease;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.spilia-float-top.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.spilia-float-top:hover,
.spilia-float-top:focus-visible {
	transform: translateX(-50%) scale(1.06);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
	outline: none;
}

.spilia-float-top__icon {
	display: block;
	flex-shrink: 0;
	margin-top: 1px;
}

.spilia-float-fab--ig {
	background: linear-gradient(
		45deg,
		#f09433 0%,
		#e6683c 25%,
		#dc2743 50%,
		#cc2366 75%,
		#bc1888 100%
	);
}

.spilia-float-fab__svg {
	display: block;
	flex-shrink: 0;
}

.spilia-float-fab__fa {
	font-size: 24px;
	line-height: 1;
}

html[dir="rtl"] .spilia-float-fabs {
	right: auto;
	left: 12px;
}

html[dir="rtl"] .spilia-float-top {
	left: 50%;
	transform: translateX(-50%);
}

html[dir="rtl"] .spilia-float-top:hover,
html[dir="rtl"] .spilia-float-top:focus-visible {
	transform: translateX(-50%) scale(1.06);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/*
 * Journal home-critical 中 .mobile-header-active .top-menu 連結色較晚載入、權重較高，
 * 會蓋掉 @media (max-width:760px) 的白字；頂欄需與參考站一致（豆沙底 + 白字）。
 */
@media (max-width: 1024px) {
	html.mobile-header-active #spilia-site-header .mobile-header .mobile-top-bar .top-menu .j-menu > li > a {
		color: rgba(255, 255, 255, 1);
	}
	html.mobile-header-active #spilia-site-header .mobile-header .mobile-top-bar .top-menu .j-menu > li > a::before {
		color: rgba(255, 255, 255, 1);
	}
}

/* 頂欄僅用連結、無幣別／語系時隱藏空欄，避免 flex 排版偏一邊。 */
.header-classic .mobile-header .mobile-top-bar > .language-currency.top-menu {
	display: none;
}

.header-classic .mobile-header .mobile-top-bar > .mobile-top-menu-wrapper {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	min-width: 0;
}

/*
 * Journal：.site-wrapper { overflow: hidden } 會讓 position:sticky 失效，頁首無法黏頂。
 * 僅放開垂直方向，保留橫向裁切，避免版面橫溢。
 */
/*
 * 頁首已移出 .site-wrapper（見 header.php），避免 Journal .mobile-header-active .site-wrapper { overflow:hidden }
 * 造成 fixed 頁首異常。此處僅做橫向裁切。
 */
html.mobile-header-active .site-wrapper {
	overflow-x: hidden;
	overflow-y: visible !important;
}

/*
 * 固定頁首：與 functions.php 內聯樣式（#spilia-site-header）一致；此處陰影與 Journal header{position:relative} 補強。
 * padding-top 由 main.js 寫入 --spilia-mobile-header-h。
 */
html.mobile-header-active #spilia-site-header {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	background: transparent;
}

/*
 * Logo：journal3-livesync 已移除全域 #logo { height:100% }；改由頁首內自動高度 + 以下規則控制大小與位置。
 */
#spilia-site-header #logo {
	height: auto;
	width: auto;
	max-width: 100%;
	margin: 0;
}

#spilia-site-header #logo a,
#spilia-site-header #logo .custom-logo-link {
	height: auto;
	width: auto;
	max-width: 100%;
	box-sizing: border-box;
}

/*
 * Logo 白列：以前誤寫 .mobile-header-active.header-classic（兩 class 須在同一元素），規則從未生效。
 * 手機改為三欄 Grid，Logo 永遠在中欄單列對齊，避免 Journal 的 flex-grow 與窄螢幕換行把 logo 挤到下方蓋住分類鈕。
 */
/* ≤1024px：與 Journal tablet 手機頁首一致，避免僅 760 以下才套用導致寬螢幕「沒變化」。 */
@media (max-width: 1024px) {
	html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar.sticky-bar {
		display: grid !important;
		grid-template-columns: 52px minmax(0, 1fr) 52px;
		align-items: center;
		justify-items: stretch;
		column-gap: 4px;
		min-height: 52px;
		height: 78px;
		box-sizing: border-box;
		padding: 4px 10px;
		background: #fff;
		overflow: visible;
		flex-wrap: nowrap !important;
	}

	/* Journal：.mobile-2 .mobile-bar > div { height:100% } 在 Grid 內易把列高拉高或視覺上「坐」在下方。 */
	html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar.sticky-bar > .spilia-custom-bar-control--nav,
	html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar.sticky-bar > .mobile-logo-wrapper,
	html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar.sticky-bar > .spilia-custom-bar-control--cart {
		align-self: center;
		height: auto !important;
		max-height: 78px;
	}

	html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar.sticky-bar > .spilia-custom-bar-control--nav {
		justify-self: start;
	position: relative;
		z-index: 100020;
		pointer-events: auto !important;
	}

	html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar.sticky-bar > .mobile-logo-wrapper {
		position: relative;
		justify-self: stretch;
	width: 100%;
		max-width: 100%;
		min-width: 0;
		flex-grow: 0 !important;
		-ms-flex-positive: 0 !important;
		z-index: 1;
	}

	html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar.sticky-bar > .spilia-custom-bar-control--cart {
		justify-self: end;
		position: relative;
		z-index: 100020;
		pointer-events: auto !important;
	}

	/* 捲動時隱藏褐色頂欄（註冊會員／售後／訂單查詢），與常見手機商城行為一致。 */
	html.mobile-header-active.spilia-scroll-compact-header #spilia-site-header .mobile-header .mobile-top-bar {
		height: 0 !important;
		min-height: 0 !important;
		max-height: 0 !important;
		padding: 0 !important;
		margin: 0 !important;
		overflow: hidden !important;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		border: 0;
	}

	/* 白列僅顯示圖示：隱藏「N 件商品」摘要，角標才能貼齊購物車圖示右上角。 */
	html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar.sticky-bar .mobile-cart-wrapper #cart-total {
		display: none !important;
	}

	/* 手機購物車角標：蓋過 Journal #cart-items { transform;margin-top }，避免被 overflow 裁切或貼到列外。 */
	html.mobile-header-active #spilia-site-header .mobile-cart-wrapper #cart > a.cart-heading {
		position: relative;
		display: flex !important;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		min-width: 48px;
		min-height: 48px;
		box-sizing: border-box;
		margin: 0 auto;
		padding: 0 !important;
	}

	html.mobile-header-active #spilia-site-header .mobile-cart-wrapper #cart > a > i {
		display: flex !important;
		align-items: center;
	justify-content: center;
		width: auto !important;
		height: auto !important;
		min-width: 0;
		min-height: 0;
		margin: 0 !important;
	}

	/* Journal home-critical 對手機 #cart>i 設了 50×35，在白列方塊內改回由圖示字級決定大小，角標才對準圖示。 */
	html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar.sticky-bar .mobile-cart-wrapper #cart > a > i {
		width: auto !important;
		height: auto !important;
		font-size: 24px !important;
		line-height: 1 !important;
	}

	html.mobile-header-active #spilia-site-header .mobile-cart-wrapper #cart-items.count-badge,
	html.mobile-header-active #spilia-site-header .mobile-cart-wrapper #cart-items:not(.count-zero) {
		position: absolute !important;
		top: 2px !important;
		right: 2px !important;
		left: auto !important;
		transform: none !important;
		margin: 0 !important;
		margin-top: 0 !important;
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		min-width: 17px;
		height: 17px;
		padding: 0 4px;
		font-size: 10px;
		font-weight: 600;
		line-height: 1;
		box-sizing: border-box;
		border-width: 1px;
		z-index: 3;
	}

	html.mobile-header-active #spilia-site-header .mobile-cart-wrapper #cart-items.count-zero {
		display: none !important;
	}

	/* Journal home-critical：.mobile-header-active #logo a { padding:10px } 會讓 Logo 視覺往下偏、上下留白不均。 */
	html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar.sticky-bar #logo a,
	html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar.sticky-bar .custom-logo-link {
		padding: 0 !important;
	margin: 0;
		box-sizing: border-box;
	}

	html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar.sticky-bar #logo {
		position: absolute;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%);
		height: auto;
		max-height: 64px;
		width: max-content;
		max-width: min(320px, 88vw);
		margin: 0;
	display: flex;
		align-items: center;
		justify-content: center;
	}

	html.mobile-header-active #spilia-site-header .mobile-header .mobile-logo-wrapper #logo,
	html.mobile-header-active #spilia-site-header .mobile-header .mobile-logo-wrapper #logo a,
	html.mobile-header-active #spilia-site-header .mobile-header .mobile-logo-wrapper .custom-logo-link {
		min-height: 0;
	}

	html.mobile-header-active #spilia-site-header .mobile-header .mobile-logo-wrapper {
	justify-content: center;
		align-items: center;
		text-align: center;
	}

	html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar.sticky-bar .mobile-logo-wrapper #logo img,
	html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar.sticky-bar .mobile-logo-wrapper img.custom-logo,
	html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar.sticky-bar .mobile-logo-wrapper .spilia-bundled-logo {
		max-height: 56px !important;
		max-width: min(300px, 88vw) !important;
	}
}

html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar {
	align-items: center;
	flex-wrap: nowrap;
}

html.mobile-header-active #spilia-site-header .mobile-header .mobile-logo-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	align-self: center;
	max-height: 100%;
}

/*
 * 僅非白列 mobile-bar 使用 width/100% 排版；白列 .sticky-bar 的 #logo 以 @media (max-width:1024px) 內絕對置中為準。
 */
html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar:not(.sticky-bar) .mobile-logo-wrapper #logo,
html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar:not(.sticky-bar) .mobile-logo-wrapper #logo a,
html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar:not(.sticky-bar) .mobile-logo-wrapper .custom-logo-link {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
	max-height: 44px;
	margin: 0 auto;
	width: 100%;
	max-width: min(240px, 72vw);
	height: auto;
}

html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar:not(.sticky-bar) .mobile-logo-wrapper #logo img,
html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar:not(.sticky-bar) .mobile-logo-wrapper img.custom-logo,
html.mobile-header-active #spilia-site-header .mobile-header .mobile-bar:not(.sticky-bar) .mobile-logo-wrapper .spilia-bundled-logo {
	display: block;
	margin: 0 auto;
	max-height: 34px !important;
	width: auto !important;
	height: auto !important;
	max-width: min(200px, 58vw) !important;
	object-fit: contain;
	object-position: center center;
	vertical-align: middle;
}

/* 頁首搜尋：Bootstrap 3 未載入時的後備；有 Bootstrap 時與 .open 一致。 */
#search.dropdown:not(.open) > .dropdown-menu.j-dropdown {
	display: none;
}

#search.dropdown.open > .dropdown-menu.j-dropdown {
	display: block !important;
}

/* 側欄選單（OpenCart 用 off-canvas；本站改為 WordPress 選單）。 */
.spilia-slide-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	/* 關閉時仍覆蓋視窗；未禁用 pointer-events 會擋住頁首（z-index 較低）的點擊 */
	pointer-events: none;
	transition: opacity 0.2s, visibility 0.2s;
}

.spilia-slide-overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.spilia-slide-panel {
	position: absolute;
	top: 0;
	left: 0;
	width: min(88vw, 320px);
	height: 100%;
	background: #fff;
	box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
	padding: 48px 0 24px;
	transform: translateX(-100%);
	transition: transform 0.25s ease;
	overflow-y: auto;
}

.spilia-slide-overlay.is-open .spilia-slide-panel {
	transform: translateX(0);
}

.spilia-slide-close {
	position: absolute;
	top: 8px;
	right: 12px;
	width: 40px;
	height: 40px;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #8b9198;
}

.spilia-slide-list,
.spilia-slide-list ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.spilia-slide-list a {
	display: block;
	padding: 14px 20px;
	border-bottom: 1px solid #e2e2e2;
	font-weight: 600;
	color: #333;
	text-decoration: none;
}

.spilia-slide-list__heading {
	pointer-events: none;
	padding: 14px 20px 6px;
	margin: 8px 0 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #8b9198;
	border-top: 1px solid #e8e8e8;
	list-style: none;
}

.spilia-slide-list__heading span {
	display: block;
}

/* 頁首迷你購物車：與 Journal 下拉層級，避免擋住角標點擊區 */
#spilia-site-header #cart-content.cart-content {
	max-height: min(70vh, 420px);
	overflow-y: auto;
}

/*
 * 商品卡：純文字「快速選購」；隱藏 Woo / Journal / icomoon 購物車圖示（含豆沙色 extra-group）。
 */
.product-thumb .btn-cart::before,
.product-thumb .btn-extra-46::before,
.product-thumb .extra-group .add_to_cart_button::before,
.product-thumb .extra-group .button::before,
.product-thumb .extra-group a[class*='add_to_cart']::before {
	content: none !important;
	display: none !important;
	width: 0 !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
}

.product-thumb .btn-cart .fa-shopping-cart,
.product-thumb .add_to_cart_button .fa-shopping-cart,
.product-thumb .extra-group .fa,
.product-thumb .extra-group .fa-shopping-cart,
/* 僅保留豆沙色 extra 列時，隱藏上方整格 cart-group（含重複加入購物車；列表 stepper Journal 已常設為隱藏）。 */
.product-layout.has-extra-button .cart-group {
	display: none !important;
}

.main-products.product-list .product-thumb .btn-cart::before,
.main-products.product-list .product-thumb .btn-extra-46::before {
	content: none !important;
	display: none !important;
}

/* 首頁商品模組：標題豆沙色（與參考商品卡一致）。 */
.module-products-326 .main-products.product-grid .product-thumb .name a,
.main-products.product-grid.product-grid .product-thumb .name a {
	color: rgba(185, 136, 119, 1);
}

.module-products-326 .main-products.product-grid .product-thumb .name a:hover,
.main-products.product-grid.product-grid .product-thumb .name a:hover {
	color: rgba(233, 102, 49, 1);
}

/* 頁尾樣式改由 functions.php：wp_add_inline_style( spilia-journal-main, spilia_journal_footer_critical_inline_css() ) 注入 #spilia-footer-root */

/*
 * 自訂側欄／購物車：專用按鈕與 overlay（不依 Journal #cart / .menu-trigger，避免被主題樣式攔截點擊）。
 */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

#spilia-site-header .spilia-custom-bar-control {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	min-height: 48px;
	-webkit-tap-highlight-color: transparent;
}

.spilia-custom-icon-btn {
	-webkit-appearance: none;
	appearance: none;
	margin: 0;
	padding: 6px;
	border: 0;
	background: transparent;
	color: #333;
	cursor: pointer;
	position: relative;
	pointer-events: auto !important;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	box-sizing: border-box;
}

.spilia-custom-icon-btn:focus-visible {
	outline: 2px solid #e96631;
	outline-offset: 2px;
}

.spilia-hamburger {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 22px;
	height: 18px;
}

.spilia-hamburger span {
	display: block;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
}

.spilia-custom-cart-ico {
	font-size: 22px;
	display: block;
	line-height: 1;
}

.spilia-custom-cart-badge {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 999px;
	background: #e74c3c;
	color: #fff;
	font-size: 10px;
	line-height: 17px;
	text-align: center;
	font-weight: 700;
	pointer-events: none;
	box-sizing: border-box;
}

.spilia-custom-cart-badge.is-zero {
	background: #aaa;
}

.spilia-custom-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.45);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.spilia-custom-overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.spilia-custom-panel {
	position: absolute;
	top: 0;
	bottom: 0;
	width: min(88vw, 360px);
	max-width: 100%;
	background: #fff;
	box-shadow: 0 0 36px rgba(0, 0, 0, 0.18);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 52px 0 0;
	box-sizing: border-box;
}

.spilia-custom-panel-header {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 16px;
	box-sizing: border-box;
	background: #f3f3f3;
	border-bottom: 1px solid #e2e2e2;
	z-index: 3;
}

.spilia-custom-panel-title {
	margin: 0;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	color: #6b6b6b;
	line-height: 1;
}

.spilia-custom-panel--nav .spilia-custom-overlay-close {
	position: static;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 30px;
	color: #6b6b6b;
}

.spilia-custom-panel--nav .spilia-custom-overlay-close:hover,
.spilia-custom-panel--nav .spilia-custom-overlay-close:focus-visible {
	color: #333;
	background: rgba(0, 0, 0, 0.04);
	border-radius: 6px;
	outline: none;
}

.spilia-custom-panel--nav {
	left: 0;
	transform: translateX(-100%);
	transition: transform 0.28s ease;
}

.spilia-custom-overlay--nav.is-open .spilia-custom-panel--nav {
	transform: translateX(0);
}

.spilia-custom-panel--cart {
	right: 0;
	left: auto;
	background: #eeeeee;
	padding-top: 45px;
	transform: translateX(100%);
	transition: transform 0.28s ease;
}

.spilia-custom-panel--cart .spilia-cart-drawer-title {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 45px;
	margin: 0;
	padding: 0 14px;
	display: flex;
	align-items: center;
	font-size: 17px;
	font-weight: 700;
	color: #666973;
	background: #f0f2f5;
	border-bottom: 1px solid #e2e2e2;
	box-sizing: border-box;
	z-index: 3;
}

.spilia-custom-panel--cart .spilia-custom-overlay-close {
	position: absolute;
	top: 1px;
	right: 8px;
	z-index: 5;
	width: 45px;
	height: 45px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 34px;
	line-height: 1;
	color: #6f7078;
}

.spilia-custom-overlay--cart.is-open .spilia-custom-panel--cart {
	transform: translateX(0);
}

.spilia-custom-overlay-close {
	position: absolute;
	top: 8px;
	right: 10px;
	z-index: 2;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #8b9198;
}

.spilia-custom-overlay--cart .spilia-custom-overlay-close {
	right: 10px;
	left: auto;
}

.spilia-custom-slide-list,
.spilia-custom-slide-list ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.spilia-custom-slide-list a.spilia-custom-slide-link {
	display: block;
	padding: 14px 20px;
	border-bottom: 1px solid #e8e8e8;
	font-weight: 500;
	font-size: 18px;
	color: #4a4a4a;
	text-decoration: none;
}

.spilia-custom-slide-list a.spilia-custom-slide-link:active {
	background: #f5f5f5;
}

.spilia-custom-slide-list__heading {
	pointer-events: none;
	padding: 14px 20px 6px;
	margin: 8px 0 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #8b9198;
	border-top: 1px solid #e8e8e8;
	list-style: none;
}

/* Nav panel content should start below header */
.spilia-custom-panel--nav .spilia-custom-slide-nav {
	padding-top: 8px;
}

.spilia-custom-slide-list__heading span {
	display: block;
}

.spilia-cart-drawer-title {
	margin: 0 44px 16px 20px;
	padding: 0;
	font-size: 1.15rem;
	font-weight: 700;
	color: #333;
}

.spilia-cart-drawer-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 0;
	box-sizing: border-box;
	background: #eeeeee;
	position: relative;
}

.spilia-cart-drawer__empty {
	margin: 24px 20px;
	color: #666;
	font-size: 14px;
}

.spilia-cart-drawer-list {
	list-style: none;
	margin: 0;
	padding: 0 16px 170px;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	background: #ffffff !important;
	background-color: #ffffff !important;
}

/* 右侧购物车中间大块区域：强制浅灰底，避免出现白底块 */
.spilia-custom-overlay--cart .spilia-custom-panel--cart,
.spilia-custom-overlay--cart .spilia-custom-panel--cart #spilia-cart-drawer-fragment,
.spilia-custom-overlay--cart .spilia-custom-panel--cart .spilia-cart-drawer-inner,
.spilia-custom-overlay--cart .spilia-custom-panel--cart .spilia-cart-drawer-list,
.spilia-custom-overlay--cart .spilia-custom-panel--cart .spilia-cart-drawer-list > li,
.spilia-custom-overlay--cart .spilia-custom-panel--cart .spilia-cart-drawer-item,
.spilia-custom-overlay--cart .spilia-custom-panel--cart .spilia-cart-drawer-item__body {
	background: #ffffff !important;
	background-color: #ffffff !important;
}

.spilia-cart-drawer-item {
	display: flex;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid #e2e2e2;
	align-items: flex-start;
}

.spilia-cart-drawer-item__media {
	flex-shrink: 0;
	width: 64px;
}

.spilia-cart-drawer-item__media img {
	width: 64px;
	height: auto;
	display: block;
	border-radius: 4px;
}

.spilia-cart-drawer-item__body {
	flex: 1;
	min-width: 0;
}

.spilia-cart-drawer-item__title {
	display: block;
	font-weight: 600;
	color: #b08f80;
	text-decoration: none;
	font-size: 14px;
	line-height: 1.35;
	margin-bottom: 6px;
}

.spilia-cart-drawer-item__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #8a8691;
}

.spilia-cart-drawer-item__subtotal {
	margin-left: auto;
	font-weight: 600;
	color: #6c6a77;
}

.spilia-cart-drawer-item__remove {
	flex-shrink: 0;
	align-self: flex-start;
	margin: -4px -2px 0 4px;
	padding: 4px 8px;
	border: 0;
	background: transparent;
	color: #dd0e1c;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	border-radius: 4px;
	-webkit-tap-highlight-color: transparent;
}

.spilia-cart-drawer-item__remove:hover,
.spilia-cart-drawer-item__remove:focus-visible {
	color: #c20d1a;
	background: rgba(0, 0, 0, 0.06);
	outline: none;
}

.spilia-cart-drawer-item__remove:disabled {
	opacity: 0.45;
	cursor: wait;
}

.spilia-cart-drawer-item__remove-icon {
	display: block;
	line-height: 1;
}

.spilia-cart-drawer-footer {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin-top: 0;
	padding: 8px 12px 10px;
	border-top: 1px solid #e2e2e2;
	background: #e6e6e6;
}

.spilia-cart-drawer-summary {
	margin: 0 0 6px;
	font-size: 13px;
	color: #696973;
}

.spilia-cart-drawer-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	line-height: 1.5;
}

.spilia-cart-drawer-summary-row--total .spilia-cart-drawer-summary-label {
	font-weight: 600;
}

.spilia-cart-drawer-summary-row--total .spilia-cart-drawer-summary-amount {
	font-size: 13px;
	font-weight: 700;
	color: #696973;
}

.spilia-cart-drawer-summary-label {
	white-space: nowrap;
}

.spilia-cart-drawer-summary-amount {
	min-width: 72px;
	text-align: right;
}

.spilia-cart-drawer-footer-buttons {
	display: flex;
	justify-content: center;
	gap: 12px;
	padding-top: 8px;
	border-top: 1px solid #e2e2e2;
}

.spilia-cart-drawer-footer-buttons .spilia-custom-btn {
	width: auto;
	min-width: 126px;
	max-width: 180px;
	margin: 0;
	padding: 9px 10px;
	font-size: 12px;
	font-weight: 700;
	border-radius: 4px;
}

.spilia-cart-drawer-footer-buttons .spilia-cart-drawer-view-cart {
	background: #21468b;
	color: #ffffff;
}

.spilia-cart-drawer-footer-buttons .spilia-cart-drawer-checkout {
	background: #1a9b4a;
	color: #ffffff;
}

/* 外掛／片段注入的第二顆「前往結帳」（.mlm-secondary-btn），與主題按鈕重複時隱藏 */
.spilia-custom-panel--cart .mlm-secondary-btn {
	display: none !important;
}

.spilia-custom-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-bottom: 10px;
	padding: 12px 16px;
	border: 0;
	border-radius: 4px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	box-sizing: border-box;
}

.spilia-custom-btn--primary {
	background: #e96631;
	color: #fff;
}

.spilia-custom-btn--primary:hover {
	filter: brightness(1.05);
}

.spilia-custom-btn--ghost {
	background: #f0f0f0;
	color: #333;
}

/* 單品頁固定底欄 z-index 低於此層，右上角購物車抽屜才可完整蓋住底列 */
body.spilia-wc-pdp-body .spilia-custom-overlay {
	z-index: 110000;
}

/* 第三方「加入購物車」飛入提示層（外掛產生之 .wm-cart-flyin / #wm-cart-flyin）；主題改為不顯示 */
.wm-cart-flyin,
#wm-cart-flyin {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}
