/* ==========================================================================
   社媒询盘 + 返回顶部（social-enquiry-module 移植，配色换成 FOTO 令牌）
   联系方式在后台「社媒询盘」里填写。
   手机端（<900，和本站底部标签栏 .mbar 同一断点）整列抬到底部标签栏上面。
   ========================================================================== */

/* 模块令牌 → FOTO 主样式变量（main.css :root） */
.foto-se,
.foto-totop {
	--se-green: var(--navy);
	--se-green-hover: var(--orange);
	--se-gold: var(--orange);
	--se-cream: #fff;
	--se-ink: var(--ink);
	--se-ink-soft: var(--ink-2);
	--se-ink-faint: var(--muted);
	--se-line: var(--line);
	--se-line-strong: #c9d1dc;
	--se-surface: #fff;
	--se-radius-sm: var(--radius);
	--se-radius-pill: var(--radius);
	--se-font-body: var(--font);
	--se-tabbar-h: 58px; /* .mbar__btn 高度 */
}

.foto-se,
.foto-se * {
	box-sizing: border-box;
}
.foto-se {
	position: fixed;
	z-index: 90;
	right: 22px;
	bottom: 96px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.foto-se__item {
	position: relative;
	display: flex;
	justify-content: flex-end;
}
.foto-se__btn {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: #fff !important;
	text-decoration: none !important;
	box-shadow: 0 10px 24px rgba(12, 22, 35, 0.2);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.foto-se__btn svg {
	display: block;
	width: 24px;
	height: 24px;
	fill: currentColor;
}
.foto-se__btn:hover,
.foto-se__btn:focus-visible,
.foto-se__item.is-open .foto-se__btn {
	color: #fff !important;
	transform: translateY(-2px) scale(1.05);
	box-shadow: 0 14px 30px rgba(12, 22, 35, 0.26);
	filter: saturate(1.08);
	outline: none;
}
/* 各平台品牌色 */
.foto-se__btn--whatsapp { background: #25d366; }
.foto-se__btn--instagram { background: linear-gradient(135deg, #5851db 4%, #833ab4 32%, #c13584 57%, #e1306c 76%, #fd1d1d 100%); }
.foto-se__btn--facebook { background: #1877f2; }
.foto-se__btn--phone { background: #08b8ad; }
.foto-se__btn--email { background: var(--se-gold); }

/* 信息卡 */
.foto-se__panel {
	position: absolute;
	top: 50%;
	right: 62px;
	width: 228px;
	padding: 18px 16px 16px;
	border: 1px solid var(--se-line);
	background: var(--se-surface);
	color: var(--se-ink);
	text-align: center;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate(10px, -50%);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.foto-se__panel::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -6px;
	width: 12px;
	height: 12px;
	border-top: 1px solid var(--se-line);
	border-right: 1px solid var(--se-line);
	background: #fff;
	transform: translateY(-50%) rotate(45deg);
}
.foto-se__item.is-open .foto-se__panel {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate(0, -50%);
}
@media (hover: hover) and (pointer: fine) {
	.foto-se:not(.is-touch) .foto-se__item:hover .foto-se__panel,
	.foto-se:not(.is-touch) .foto-se__item:focus-within .foto-se__panel {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translate(0, -50%);
	}
}
.foto-se__title {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.foto-se__line {
	display: block;
	margin: 0 0 12px;
	color: var(--se-ink-soft);
	font-size: 13px;
	line-height: 1.4;
}
.foto-se__line--todo {
	color: var(--se-gold);
}
.foto-se__qr {
	display: block;
	width: 140px;
	height: 140px;
	margin: 0 auto 12px;
	border: 1px solid #eee;
	object-fit: contain;
	background: #fff;
}
.foto-se__action {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 10px 12px;
	background: var(--se-green);
	color: #fff !important;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: background-color 0.2s ease;
}
.foto-se__action:hover {
	background: var(--se-green-hover);
}

/* 手机：按钮放在底部工具栏上方，尺寸略小 */
@media (max-width: 899px) {
	.foto-se {
		right: 12px;
		bottom: calc(var(--se-tabbar-h) + 74px + env(safe-area-inset-bottom, 0px));
		gap: 8px;
	}
	.foto-se__btn {
		width: 42px;
		height: 42px;
	}
	.foto-se__btn svg {
		width: 21px;
		height: 21px;
	}
	.foto-se__panel {
		right: 54px;
		width: min(220px, calc(100vw - 80px));
		padding: 14px 12px 12px;
	}
	.foto-se__qr {
		width: 128px;
		height: 128px;
	}
}
/* 返回顶部（WoodMart 风格，外圈为滚动进度） */
.foto-totop {
	position: fixed;
	z-index: 90;
	right: 22px;
	bottom: 34px;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--se-green);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, box-shadow 0.2s ease;
}
.foto-totop.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.foto-totop:hover {
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}
.foto-totop__ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}
.foto-totop__ring circle {
	fill: none;
	stroke: var(--se-green);
	stroke-width: 1.5;
	transition: stroke-dashoffset 0.1s linear;
}
.foto-totop__arrow {
	position: relative;
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.2s ease;
}
.foto-totop:hover .foto-totop__arrow {
	transform: translateY(-2px);
}
@media (max-width: 899px) {
	.foto-totop {
		right: 12px;
		bottom: calc(var(--se-tabbar-h) + 20px + env(safe-area-inset-bottom, 0px));
		width: 42px;
		height: 42px;
	}
}

/* 手机抽屉菜单打开时隐藏，避免挡住菜单 */
html:has(#drawer:not([hidden])) .foto-totop,
html:has(#drawer:not([hidden])) .foto-se {
	opacity: 0;
	pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
	.foto-se__btn,
	.foto-se__panel {
		transition: none;
	}
}


/* 社媒询盘按钮：收起 / 展开 */
.foto-se {
	align-items: flex-end;
}
.foto-se__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 400px;
	transform-origin: bottom center;
	transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.3s ease, margin 0.3s ease;
}
.foto-se.is-collapsed .foto-se__list {
	max-height: 0;
	margin-bottom: -10px;
	opacity: 0;
	transform: translateY(16px) scale(0.85);
	pointer-events: none;
	overflow: hidden;
}
.foto-se.is-collapsed .foto-se__panel { display: none; }
.foto-se__toggle {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	margin-right: 6px;
	padding: 0;
	border: 1px solid var(--se-line-strong);
	border-radius: 50%;
	background: #fff;
	color: var(--se-green);
	box-shadow: 0 6px 16px rgba(12, 22, 35, 0.14);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, width 0.2s ease, height 0.2s ease, margin 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}
.foto-se__toggle:hover { transform: scale(1.06); }
.foto-se__toggle svg { width: 16px; height: 16px; }
.foto-se__ico-show { display: none; }
.foto-se.is-collapsed .foto-se__ico-hide { display: none; }
.foto-se.is-collapsed .foto-se__ico-show { display: block; width: 22px; height: 22px; }
.foto-se.is-collapsed .foto-se__toggle {
	width: 48px;
	height: 48px;
	margin-right: 0;
	border-color: var(--se-green);
	background: var(--se-green);
	color: #fff;
}
@media (max-width: 899px) {
	.foto-se__list { gap: 8px; }
	.foto-se__toggle { width: 32px; height: 32px; margin-right: 5px; }
	.foto-se.is-collapsed .foto-se__toggle { width: 42px; height: 42px; margin-right: 0; }
}

/* 字体跟站点走 */
.foto-se { font-family: var(--se-font-body); }
.foto-se__panel { border-radius: var(--se-radius-sm); }
.foto-se__panel::after { background: var(--se-surface); }
.foto-se__action { border-radius: var(--se-radius-pill); }
.foto-se__qr { border-radius: var(--se-radius-sm); }
.foto-totop { background: var(--se-surface); }
.foto-se__toggle { background: var(--se-surface); }

/* 收起后的按钮：深蓝底聊天气泡，白色描边（在深蓝页脚上也看得见） */
.foto-se.is-collapsed .foto-se__ico-show { width: 24px; height: 24px; }
.foto-se.is-collapsed .foto-se__toggle {
	width: 54px;
	height: 54px;
	/* 比下面的返回顶部按钮（48px / 手机 42px）宽 6px，右边往外让 3px，两个按钮中心线对齐 */
	margin-right: -3px;
	border: 2px solid var(--se-cream);
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--se-green) 35%, transparent), 0 8px 20px -8px color-mix(in srgb, var(--se-ink) 60%, transparent);
}
@media (max-width: 899px) {
	.foto-se.is-collapsed .foto-se__toggle { width: 48px; height: 48px; margin-right: -3px; }
	.foto-se.is-collapsed .foto-se__ico-show { width: 22px; height: 22px; }
}

/* 信息卡里的多个按钮 + 二维码（2026-10-24） */
.foto-se__actions { display: grid; gap: 8px; }
.foto-se__action--alt {
	border: 1px solid var(--se-green);
	background: transparent;
	color: var(--se-green) !important;
}
.foto-se__action--alt:hover { background: color-mix(in srgb, var(--se-green) 8%, transparent); }
.foto-se__or {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 12px 0 10px;
	color: var(--se-ink-faint);
	font-size: 10px;
	letter-spacing: .18em;
	text-transform: uppercase;
}
.foto-se__or::before,
.foto-se__or::after { content: ""; flex: 1; height: 1px; background: var(--se-line); }
.foto-se__qr-link {
	display: block;
	color: var(--se-ink-soft) !important;
	text-decoration: none !important;
}
.foto-se__qr-link .foto-se__qr { margin-bottom: 8px; transition: transform .2s ease, box-shadow .2s ease; }
.foto-se__qr-link:hover .foto-se__qr { transform: scale(1.03); box-shadow: 0 6px 16px rgba(0, 0, 0, .1); }
.foto-se__qr--empty {
	display: grid;
	place-items: center;
	border: 1.5px dashed var(--se-line-strong) !important;
	background: var(--grey) !important;
	color: var(--se-ink-faint);
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
}
.foto-se__qr-cap { display: block; font-size: 11.5px; line-height: 1.4; }
@media (max-width: 899px) {
	.foto-se__qr { width: 116px; height: 116px; }
	.foto-se__or { margin: 10px 0 8px; }
}

/* 打印时不显示 */
@media print {
	.foto-se,
	.foto-totop { display: none !important; }
}

/* ==========================================================================
   收起后的询盘按钮：熔炉 / 坩埚效果（2026-11-23）
   深蓝炉膛 + 底部翻滚的铝液 + 外圈热浪 + 往上飘的火星
   ========================================================================== */
.foto-se__furnace,
.foto-se__sparks { display: none; }

.foto-se.is-collapsed .foto-se__toggle {
	position: relative;
	isolation: isolate;
	overflow: visible;
	border: 2px solid #3a4a60;
	background:
		radial-gradient(120% 70% at 50% 108%, rgba(255, 122, 51, .55) 0%, rgba(242, 101, 34, .18) 45%, transparent 70%),
		radial-gradient(circle at 35% 28%, var(--navy-2) 0%, var(--navy-3) 75%);
	box-shadow:
		inset 0 2px 0 rgba(255, 255, 255, .08),
		inset 0 -6px 14px rgba(0, 0, 0, .35),
		0 0 0 3px var(--navy-3),
		0 0 0 4px rgba(242, 101, 34, .55),
		0 10px 24px -8px rgba(7, 22, 41, .7);
	animation: foto-se-heat 2.8s ease-in-out infinite;
}
/* 炉口外圈的热光 */
.foto-se.is-collapsed .foto-se__toggle::after {
	content: "";
	position: absolute;
	inset: -7px;
	z-index: -1;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 122, 51, 0) 55%, rgba(255, 122, 51, .35) 68%, rgba(255, 122, 51, 0) 78%);
	animation: foto-se-glow 2.8s ease-in-out infinite;
	pointer-events: none;
}

/* 炉膛：裁成圆形，里面装铝液 */
.foto-se.is-collapsed .foto-se__furnace {
	display: block;
	position: absolute;
	inset: 0;
	z-index: 0;
	border-radius: 50%;
	overflow: hidden;
	pointer-events: none;
}
/* 铝液：大号圆角方块旋转，液面就会上下起伏 */
.foto-se__melt {
	position: absolute;
	left: -50%;
	top: 60%;
	width: 200%;
	height: 200%;
	border-radius: 42%;
	background: linear-gradient(180deg, #ffe08a 0%, #ffb347 6%, var(--orange-2) 16%, var(--orange) 34%, var(--orange-dark) 60%);
	box-shadow: 0 0 12px 2px rgba(255, 179, 71, .65);
	animation: foto-se-pour 6s linear infinite;
	transition: top .45s cubic-bezier(.3, 1.4, .5, 1);
}
.foto-se__melt--b {
	top: 64%;
	border-radius: 38%;
	background: linear-gradient(180deg, rgba(255, 224, 138, .9) 0%, rgba(242, 101, 34, .85) 20%, #b8410f 60%);
	opacity: .75;
	animation-duration: 9s;
	animation-direction: reverse;
}

/* 聊天图标浮在铝液上面 */
.foto-se.is-collapsed .foto-se__ico-show {
	position: relative;
	z-index: 2;
	filter: drop-shadow(0 1px 2px rgba(7, 22, 41, .55));
}

/* 火星 */
.foto-se.is-collapsed .foto-se__sparks {
	display: block;
	position: absolute;
	left: 50%;
	top: 6px;
	z-index: 3;
	width: 0;
	height: 0;
	pointer-events: none;
}
.foto-se__sparks i {
	position: absolute;
	left: 0;
	top: 0;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #ffd36a;
	box-shadow: 0 0 6px 1px rgba(255, 140, 50, .9);
	opacity: 0;
	animation: foto-se-spark 2.6s ease-out infinite;
}
.foto-se__sparks i:nth-child(1) { --x: -12px; animation-delay: 0s; }
.foto-se__sparks i:nth-child(2) { --x: 9px;  animation-delay: .7s; width: 2px; height: 2px; }
.foto-se__sparks i:nth-child(3) { --x: -3px; animation-delay: 1.35s; }
.foto-se__sparks i:nth-child(4) { --x: 14px; animation-delay: 1.9s; width: 2px; height: 2px; }

/* 悬停：火更旺，铝液涨上来 */
.foto-se.is-collapsed .foto-se__toggle:hover,
.foto-se.is-collapsed .foto-se__toggle:focus-visible {
	transform: translateY(-2px) scale(1.06);
	outline: none;
}
.foto-se.is-collapsed .foto-se__toggle:hover .foto-se__melt,
.foto-se.is-collapsed .foto-se__toggle:focus-visible .foto-se__melt { top: 46%; }
.foto-se.is-collapsed .foto-se__toggle:hover .foto-se__melt--b,
.foto-se.is-collapsed .foto-se__toggle:focus-visible .foto-se__melt--b { top: 50%; }
.foto-se.is-collapsed .foto-se__toggle:hover .foto-se__sparks i,
.foto-se.is-collapsed .foto-se__toggle:focus-visible .foto-se__sparks i { animation-duration: 1.4s; }

@keyframes foto-se-pour {
	to { transform: rotate(360deg); }
}
@keyframes foto-se-spark {
	0%   { opacity: 0; transform: translate(0, 0) scale(1); }
	12%  { opacity: 1; }
	100% { opacity: 0; transform: translate(var(--x, 0), -30px) scale(.3); }
}
@keyframes foto-se-heat {
	0%, 100% { border-color: #3a4a60; }
	50%      { border-color: #7a4a2e; }
}
@keyframes foto-se-glow {
	0%, 100% { opacity: .45; transform: scale(.96); }
	50%      { opacity: 1;   transform: scale(1.04); }
}

@media (max-width: 899px) {
	.foto-se.is-collapsed .foto-se__sparks { top: 5px; }
}

/* 系统设置了“减少动态效果”就静止显示 */
@media (prefers-reduced-motion: reduce) {
	.foto-se.is-collapsed .foto-se__toggle,
	.foto-se.is-collapsed .foto-se__toggle::after,
	.foto-se__melt { animation: none; }
	.foto-se__sparks { display: none !important; }
}
