/* =========================================================
   Gemistry Aesop 頁尾 (gemistry-apothecary-footer)
   - 版面 = aesop.com Footer（2026-11 Wayback 存檔 + commons.css 實測）；切換點 1023 / 1024px（與原站 64em 相同）
   - 整塊 #252525 底、#fffef2 字；內容最寬 1200px（左右 15px）
   - 桌機：服務保證一排（88px 高、14px）→ 連結欄每欄 200px（標題 18px 粗體 + 1px 底線，連結 14px）+ 右欄 370px（訂閱、社群）
     → 1px 分隔線 → 版權 12px（左）、法律連結 11px（右，• 分隔）
   - 手機：服務保證直排置中；連結欄變手風琴（右側 +）；右欄排在下面；聯絡按鈕兩個一排
   ========================================================= */

.gemistry-ap-footer {
	--gemistry-ap-footer-bg: var(--gemistry-ap-ink);
	--gemistry-ap-footer-fg: var(--gemistry-ap-white);
	--gemistry-ap-footer-max: 1200px;
	--gemistry-ap-footer-pad: 15px;
	--gemistry-ap-footer-col: 200px;
	--gemistry-ap-footer-aside: 370px;
	--gemistry-ap-footer-line: rgba(255, 254, 242, .3);
}

.elementor-widget-gemistry-apothecary-footer { width: 100%; }

.gemistry-ap-scope.gemistry-ap-scope.gemistry-ap-footer {
	width: 100%;
	background: var(--gemistry-ap-footer-bg);
	color: var(--gemistry-ap-footer-fg);
	font-size: 14px;
	line-height: 1.5;
}

.gemistry-ap-scope.gemistry-ap-scope.gemistry-ap-footer a { color: inherit; }

.gemistry-ap-scope.gemistry-ap-scope.gemistry-ap-footer a:hover { color: var(--gemistry-ap-accent); }

.gemistry-ap-scope.gemistry-ap-scope :is(.gemistry-ap-footer__services, .gemistry-ap-footer__middle, .gemistry-ap-footer__bottom) {
	max-width: calc(var(--gemistry-ap-footer-max) + var(--gemistry-ap-footer-pad) * 2);
	margin: 0 auto;
	padding-left: var(--gemistry-ap-footer-pad);
	padding-right: var(--gemistry-ap-footer-pad);
}

/* ---------- 服務保證 ---------- */

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__services {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-top: 24px;
	padding-bottom: 24px;
	text-align: center;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__service {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
}

/* ---------- 中段：連結欄 + 右欄 ---------- */

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__middle {
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding-top: 8px;
	padding-bottom: 32px;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__col { border-bottom: 1px solid var(--gemistry-ap-footer-line); }

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__col-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 56px;
	font-size: 14px;
	font-family: var(--gemistry-ap-font-heading);
	font-weight: 600;
	line-height: 1.5;
	list-style: none;
	cursor: pointer;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__col-title::-webkit-details-marker { display: none; }

/* + / − */
.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__plus {
	position: relative;
	flex: none;
	width: 12px;
	height: 12px;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__plus::before,
.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__plus::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 1.5px;
	background: currentColor;
	transform: translateY(-50%);
	transition: transform .25s var(--gemistry-ap-ease);
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__plus::after { transform: translateY(-50%) rotate(90deg); }

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__col[open] .gemistry-ap-footer__plus::after { transform: translateY(-50%) rotate(0); }

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__col-body { padding-bottom: 20px; }

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__links li + li { margin-top: 8px; }

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__links a,
.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__links span {
	display: inline-block;
	font-size: 14px;
	line-height: 1.2;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__col-text {
	font-size: 14px;
	line-height: 1.6;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__more { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 右欄：訂閱、聯絡、社群 ---------- */

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__aside {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__news-title {
	margin: 0 0 8px;
	color: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 0;
	text-transform: none;
}

/* 表單外掛：米白輸入框 40px、勾選框、米白外框按鈕（類別名稱依外掛而異，只用元素選擇器） */
.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__form :is(input[type="email"], input[type="text"], input[type="tel"]) {
	width: 100%;
	height: 40px;
	margin: 0 0 16px;
	padding: 0 16px;
	border: 1px solid rgba(51, 51, 51, .2);
	border-radius: 0;
	background: var(--gemistry-ap-white);
	box-shadow: none;
	color: var(--gemistry-ap-black);
	font: 14px/1.2 var(--gemistry-ap-font);
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__form input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 2px 10px 0 0;
	accent-color: var(--gemistry-ap-accent);
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__form :is(label, p) {
	color: inherit;
	font-size: 12px;
	line-height: 1.6;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__form :is(button, input[type="submit"]) {
	min-width: 116px;
	height: 48px;
	padding: 0 24px;
	border: 1px solid var(--gemistry-ap-white);
	border-radius: 0;
	background: transparent;
	color: var(--gemistry-ap-white);
	font: 500 14px/1.5 var(--gemistry-ap-font);
	cursor: pointer;
	transition: background-color .2s var(--gemistry-ap-ease), color .2s var(--gemistry-ap-ease);
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__form :is(button, input[type="submit"]):hover {
	background: var(--gemistry-ap-white);
	color: var(--gemistry-ap-black);
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__contacts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__contact {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0 10px;
	border: 1px solid var(--gemistry-ap-white);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__social {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -12px;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__social a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	--gemistry-ap-icon: 22px;
}

/* ---------- 底部列 ---------- */

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__bottom {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding-bottom: 24px;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__meta {
	padding-top: 24px;
	border-top: 1px solid var(--gemistry-ap-footer-fg);
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__copyright {
	font-size: 12px;
	line-height: 1.5;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__locale {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	font-size: 12px;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 0;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__legal li {
	display: flex;
	align-items: center;
	font-size: 11px;
	line-height: 1.2;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__legal li + li::before {
	content: "•";
	margin: 0 9px;
}

.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__hint { color: var(--gemistry-ap-gray-light); font-size: 12px; }

/* ---------- 桌機（≥ 1024px） ---------- */

@media (min-width: 1024px) {
	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__services {
		display: grid;
		grid-template-columns: repeat(var(--gemistry-ap-footer-services, 3), minmax(0, 1fr));
		gap: 0;
		align-items: center;
		min-height: 88px;
		padding-top: 0;
		padding-bottom: 0;
	}

	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__middle {
		flex-direction: row;
		justify-content: space-between;
		gap: 40px;
		padding-top: 20px;
		padding-bottom: 64px;
	}

	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__nav { display: flex; padding-top: 4px; }

	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__col {
		width: var(--gemistry-ap-footer-col);
		padding: 12px;
		border-bottom: 0;
	}

	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__col-title {
		min-height: 0;
		margin-bottom: 16px;
		padding-bottom: 15px;
		border-bottom: 1px solid var(--gemistry-ap-footer-fg);
		font-size: 18px;
		line-height: 1.5;
		cursor: default;
		pointer-events: none;
	}

	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__plus { display: none; }

	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__col-body { padding-bottom: 0; }

	/* 右欄右邊和連結欄一樣內縮 15px（原站右欄 935–1305px / 1440 寬） */
	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__aside {
		flex: 0 0 var(--gemistry-ap-footer-aside);
		gap: 40px;
		margin-right: 15px;
	}

	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__contacts { display: none; }

	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__social { margin: 0; }

	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__social a { width: 48px; height: 24px; justify-content: flex-start; }

	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__bottom {
		flex-direction: row;
		justify-content: space-between;
		gap: 40px;
		position: relative;
		padding-bottom: 0;
	}

	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__bottom::before {
		content: "";
		position: absolute;
		top: 0;
		left: var(--gemistry-ap-footer-pad);
		right: var(--gemistry-ap-footer-pad);
		height: 1px;
		background: var(--gemistry-ap-footer-fg);
	}

	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__meta {
		flex: 0 1 800px;
		padding: 16px 0 24px;
		border-top: 0;
	}

	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__legal {
		flex: 0 0 var(--gemistry-ap-footer-aside);
		align-content: flex-start;
		margin-right: 15px;
		padding-top: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__plus::before,
	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__plus::after,
	.gemistry-ap-scope.gemistry-ap-scope .gemistry-ap-footer__form :is(button, input[type="submit"]) { transition: none; }
}
