/* ============================================================
   THEMARMOHOME — PDP · Leave a message（2026-11-09）
   位置：ADD TO CART 之后、We Accept 之前
   视觉口径：与全站编辑风一致 —— 直角、发丝线、黄铜金、无卡片阴影
   动效口径：克制。一次缓慢扫光（6.5s 一轮）+ 图标呼吸点 + 悬停金线填充
             不跑马灯、不弹跳、不用 emoji；prefers-reduced-motion 全部关闭
   注：所有选择器带 body.tmh 前缀 —— 站点有 body.tmh button{border:none;
       background:none} 重置，裸类名会被它盖掉边框。
   ============================================================ */

/* ---------- 1. 触发器按钮 ---------- */
body.tmh .tmh-ml{margin-top:14px}

body.tmh .tmh-ml-btn{
	position:relative;display:flex;align-items:center;gap:14px;width:100%;
	padding:15px 18px;margin:0;text-align:left;cursor:pointer;
	background:rgba(255,255,255,.5);
	border:1px solid rgba(154,123,63,.34);
	border-radius:0;overflow:hidden;
	text-decoration:none;color:inherit;
	transition:border-color .38s ease,background .38s ease;
	-webkit-tap-highlight-color:transparent;
}
body.tmh .tmh-ml-btn:hover{border-color:var(--gold);background:rgba(154,123,63,.055)}
body.tmh .tmh-ml-btn:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
body.tmh .tmh-ml-btn:active{background:rgba(154,123,63,.1)}

/* 图标 + 呼吸点 */
body.tmh .tmh-ml-ic{
	position:relative;flex:0 0 auto;width:34px;height:34px;display:grid;place-items:center;
	color:var(--gold);border:1px solid rgba(154,123,63,.3);
	transition:border-color .38s ease,color .38s ease;
}
body.tmh .tmh-ml-ic svg{width:17px;height:17px;display:block}
body.tmh .tmh-ml-btn:hover .tmh-ml-ic{border-color:var(--gold);color:var(--gold-text)}
body.tmh .tmh-ml-ic::after{
	content:"";position:absolute;top:-4px;right:-4px;width:8px;height:8px;border-radius:50%;
	box-sizing:content-box;background:var(--gold);border:2px solid var(--bg);
	animation:tmh-ml-ping 3.4s cubic-bezier(.2,.6,.35,1) infinite;
}

/* 文案 */
body.tmh .tmh-ml-tx{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:3px}
body.tmh .tmh-ml-tx b{font-family:var(--sans);font-size:11.5px;font-weight:600;letter-spacing:.16em;
	text-transform:uppercase;color:var(--ink);transition:color .38s ease}
body.tmh .tmh-ml-tx i{font-style:normal;font-size:12.5px;line-height:1.5;color:var(--ink-soft);
	transition:color .38s ease}
body.tmh .tmh-ml-btn:hover .tmh-ml-tx b{color:var(--gold-text)}

/* 箭头 */
body.tmh .tmh-ml-ar{flex:0 0 auto;color:var(--gold);display:grid;place-items:center;
	transition:transform .42s cubic-bezier(.22,.7,.2,1),color .38s ease}
body.tmh .tmh-ml-ar svg{width:18px;height:18px;display:block}
body.tmh .tmh-ml-btn:hover .tmh-ml-ar{transform:translateX(5px);color:var(--gold-text)}

/* 扫光：一层极淡斜向高光，每 6.5 秒从左掠过一次 —— 「这里在动」的余光，不抢加购 */
body.tmh .tmh-ml-shine{
	position:absolute;top:0;left:0;width:36%;height:100%;pointer-events:none;
	background:linear-gradient(100deg,rgba(255,255,255,0) 0%,rgba(255,244,222,.92) 50%,rgba(255,255,255,0) 100%);
	transform:translateX(-140%) skewX(-16deg);opacity:0;
	animation:tmh-ml-sweep 6.5s cubic-bezier(.4,0,.5,1) infinite;
}

@keyframes tmh-ml-sweep{
	0%   {transform:translateX(-140%) skewX(-16deg);opacity:0}
	6%   {opacity:.85}
	26%  {transform:translateX(360%) skewX(-16deg);opacity:0}
	100% {transform:translateX(360%) skewX(-16deg);opacity:0}
}
@keyframes tmh-ml-ping{
	0%   {box-shadow:0 0 0 0 rgba(154,123,63,.5)}
	60%  {box-shadow:0 0 0 7px rgba(154,123,63,0)}
	100% {box-shadow:0 0 0 0 rgba(154,123,63,0)}
}

/* ---------- 2. 抽屉 ---------- */
body.tmh .tmh-ml-drawer{
	position:fixed;inset:0;z-index:1200;visibility:hidden;
	pointer-events:none;transition:visibility 0s linear .5s;
}
body.tmh .tmh-ml-drawer.on{visibility:visible;pointer-events:auto;transition-delay:0s}

body.tmh .tmh-ml-scrim{
	position:absolute;inset:0;background:rgba(20,16,11,.46);
	opacity:0;transition:opacity .44s ease;
	-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);
}
body.tmh .tmh-ml-drawer.on .tmh-ml-scrim{opacity:1}

body.tmh .tmh-ml-panel{
	position:absolute;top:0;right:0;bottom:0;width:min(438px,94vw);
	background:var(--bg);border-left:1px solid var(--line);
	padding:34px 34px 30px;overflow-y:auto;overscroll-behavior:contain;
	transform:translateX(102%);
	transition:transform .5s cubic-bezier(.22,.7,.2,1);
	box-shadow:-24px 0 60px rgba(30,24,16,.14);
}
body.tmh .tmh-ml-drawer.on .tmh-ml-panel{transform:none}

body.tmh .tmh-ml-x{
	position:absolute;top:16px;right:18px;width:34px;height:34px;
	display:grid;place-items:center;font-size:22px;line-height:1;
	color:var(--ink-soft);background:none;border:0;cursor:pointer;
	transition:color .24s ease,transform .32s ease;
}
body.tmh .tmh-ml-x:hover{color:var(--ink);transform:rotate(90deg)}

body.tmh .tmh-ml-panel .note{display:block;margin-bottom:10px}
body.tmh .tmh-ml-panel h2{font-family:var(--serif);font-size:33px;font-weight:400;line-height:1.1;
	margin:0 0 20px;color:var(--ink);letter-spacing:-.3px}

/* 商品上下文条 */
body.tmh .tmh-ml-prod{display:flex;align-items:center;gap:13px;padding:11px 0;
	border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-bottom:20px}
body.tmh .tmh-ml-prod img{width:56px;height:56px;object-fit:cover;flex:0 0 auto;background:var(--bg-2)}
body.tmh .tmh-ml-prod-tx{display:flex;flex-direction:column;gap:3px;min-width:0}
body.tmh .tmh-ml-prod-tx b{font-size:13px;font-weight:500;line-height:1.45;color:var(--ink);
	display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.tmh .tmh-ml-prod-tx i{font-style:normal;font-size:10.5px;letter-spacing:.14em;
	text-transform:uppercase;color:var(--ink-soft)}

body.tmh .tmh-ml-lede{font-size:13.5px;line-height:1.68;color:var(--ink-soft);margin:0 0 22px}

/* ---------- 3. 表单字段 ---------- */
body.tmh .tmh-ml-row{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
body.tmh .tmh-ml-f{margin-bottom:16px;min-width:0}
body.tmh .tmh-ml-f label{display:block;font-size:10px;font-weight:600;letter-spacing:.18em;
	text-transform:uppercase;color:var(--ink-soft);margin-bottom:7px}
body.tmh .tmh-ml-f label em{font-style:normal;color:var(--gold)}
body.tmh .tmh-ml-f label span{font-weight:400;letter-spacing:.1em;text-transform:none;
	color:var(--ink-mute,#7a7064);font-size:10.5px}
body.tmh .tmh-ml-f input,body.tmh .tmh-ml-f textarea{
	width:100%;display:block;margin:0;padding:12px 13px;
	font-family:var(--sans);font-size:14.5px;line-height:1.5;color:var(--ink);
	background:var(--card);border:1px solid var(--line);border-radius:0;
	transition:border-color .24s ease,box-shadow .24s ease;appearance:none;
}
body.tmh .tmh-ml-f textarea{resize:vertical;min-height:104px}
body.tmh .tmh-ml-f input:focus,body.tmh .tmh-ml-f textarea:focus{
	outline:none;border-color:var(--gold);box-shadow:0 0 0 3px rgba(154,123,63,.11)}
body.tmh .tmh-ml-f input::placeholder,body.tmh .tmh-ml-f textarea::placeholder{color:#b6ac9c}
body.tmh .tmh-ml-f input.err,body.tmh .tmh-ml-f textarea.err{border-color:var(--sale);
	box-shadow:0 0 0 3px rgba(192,57,43,.09)}

/* 蜜罐：移出视口，不用 display:none（部分反垃圾脚本会识别 display:none 并跳过） */
body.tmh .tmh-ml-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* ---------- 4. 提交按钮 ---------- */
body.tmh .tmh-ml-submit{
	position:relative;display:flex;align-items:center;justify-content:center;gap:10px;
	width:100%;padding:16px 20px;margin-top:6px;
	background:var(--gold-btn,#8a6b33);border:0;border-radius:0;cursor:pointer;
	color:#fff;font-family:var(--sans);font-size:11.5px;font-weight:600;
	letter-spacing:.16em;text-transform:uppercase;
	transition:background .3s ease,transform .18s ease;overflow:hidden;
}
body.tmh .tmh-ml-submit:hover{background:var(--gold-deep)}
body.tmh .tmh-ml-submit:active{transform:translateY(1px)}
body.tmh .tmh-ml-submit[disabled]{opacity:.62;cursor:default;transform:none}
body.tmh .tmh-ml-submit::after{
	content:"";position:absolute;inset:0;pointer-events:none;
	background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.22) 50%,transparent 80%);
	transform:translateX(-120%);transition:transform .8s ease;
}
body.tmh .tmh-ml-submit:hover::after{transform:translateX(120%)}

/* loading：文字隐去，中心出旋转环 */
body.tmh .tmh-ml-submit.loading .tmh-ml-submit-tx{opacity:0}
body.tmh .tmh-ml-submit.loading::before{
	content:"";position:absolute;top:50%;left:50%;width:17px;height:17px;margin:-8.5px 0 0 -8.5px;
	border:2px solid rgba(255,255,255,.34);border-top-color:#fff;border-radius:50%;
	animation:tmh-ml-spin .72s linear infinite;
}
@keyframes tmh-ml-spin{to{transform:rotate(360deg)}}

body.tmh .tmh-ml-err{margin:12px 0 0;font-size:12.5px;line-height:1.55;color:var(--sale);display:none}
body.tmh .tmh-ml-err.on{display:block}

body.tmh .tmh-ml-alt{margin:18px 0 0;font-size:12.5px;line-height:1.7;color:var(--ink-soft);text-align:center}
body.tmh .tmh-ml-alt a{color:var(--gold-text);text-decoration:none;border-bottom:1px solid rgba(154,123,63,.4);
	transition:border-color .24s ease,color .24s ease}
body.tmh .tmh-ml-alt a:hover{color:var(--gold);border-color:var(--gold)}

/* ---------- 5. 成功态 ---------- */
body.tmh .tmh-ml-done{text-align:center;padding:26px 0 6px}
body.tmh .tmh-ml-check{width:64px;height:64px;margin:0 auto 20px;display:block;overflow:visible}
body.tmh .tmh-ml-check circle{fill:none;stroke:var(--gold);stroke-width:1.4;opacity:.5;
	stroke-dasharray:151;stroke-dashoffset:151}
body.tmh .tmh-ml-check path{fill:none;stroke:var(--gold);stroke-width:1.9;stroke-linecap:round;
	stroke-linejoin:round;stroke-dasharray:34;stroke-dashoffset:34}
body.tmh .tmh-ml-done.on .tmh-ml-check circle{animation:tmh-ml-draw .7s ease forwards}
body.tmh .tmh-ml-done.on .tmh-ml-check path{animation:tmh-ml-draw .45s ease .55s forwards}
@keyframes tmh-ml-draw{to{stroke-dashoffset:0}}

body.tmh .tmh-ml-done h3{font-family:var(--serif);font-size:27px;font-weight:400;margin:0 0 10px;color:var(--ink)}
body.tmh .tmh-ml-done p{font-size:13.5px;line-height:1.7;color:var(--ink-soft);margin:0 auto 22px;max-width:300px}
body.tmh .tmh-ml-close-btn{padding:13px 26px;background:none;border:1px solid var(--line-2,#c9ba9f);
	border-radius:0;cursor:pointer;font-family:var(--sans);font-size:10.5px;font-weight:600;
	letter-spacing:.16em;text-transform:uppercase;color:var(--ink);
	transition:border-color .28s ease,background .28s ease,color .28s ease}
body.tmh .tmh-ml-close-btn:hover{background:var(--ink);border-color:var(--ink);color:#fff}

/* 901–1180：右侧信息区被挤窄，副文案折两行会把按钮顶到 92px，收一档保持紧凑 */
@media (min-width:901px) and (max-width:1180px){
	body.tmh .tmh-ml-btn{padding:13px 16px;gap:12px}
	body.tmh .tmh-ml-tx i{font-size:12px;line-height:1.45}
}

/* ---------- 6. 移动端：底部上滑面板 ---------- */
@media (max-width:1024px){
	body.tmh .tmh-ml{margin-top:12px}
	body.tmh .tmh-ml-btn{padding:13px 15px;gap:12px}
	body.tmh .tmh-ml-btn .tmh-ml-ic{width:30px;height:30px}
	body.tmh .tmh-ml-btn .tmh-ml-ic svg{width:15px;height:15px}
	body.tmh .tmh-ml-tx b{font-size:11px;letter-spacing:.14em}
	/* 手机上说明文案最多两行，避免按钮过高挤走加购 */
	body.tmh .tmh-ml-tx i{font-size:12px;line-height:1.45;display:-webkit-box;
		-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

	body.tmh .tmh-ml-panel{
		top:auto;left:0;right:0;bottom:0;width:100%;max-height:96vh;
		border-left:0;border-top:1px solid var(--line);
		padding:22px 20px calc(22px + env(safe-area-inset-bottom,0px));
		transform:translateY(102%);
		box-shadow:0 -20px 50px rgba(30,24,16,.18);
	}
	body.tmh .tmh-ml-drawer.on .tmh-ml-panel{transform:none}
	body.tmh .tmh-ml-panel h2{font-size:26px;margin-bottom:10px}
	body.tmh .tmh-ml-x{top:10px;right:10px}
	body.tmh .tmh-ml-prod{margin-bottom:14px;padding:9px 0}
	body.tmh .tmh-ml-lede{font-size:12.5px;line-height:1.6;margin:0 0 14px}
	body.tmh .tmh-ml-row{grid-template-columns:1fr;gap:0}
	body.tmh .tmh-ml-f{margin-bottom:10px}
	/* 固定高度替代 rows=4，省下约 24px，保证 SEND MESSAGE 在一屏内可见 */
	body.tmh .tmh-ml-f textarea{height:84px;min-height:0}
	body.tmh .tmh-ml-submit{margin-top:4px;padding:15px 18px}
	body.tmh .tmh-ml-alt{margin-top:14px}
}

@media (max-width:390px){
	body.tmh .tmh-ml-tx i{display:none}   /* 极窄屏只留主标签 */
}

/* ---------- 7. 降低动效偏好 ---------- */
@media (prefers-reduced-motion:reduce){
	body.tmh .tmh-ml-shine,body.tmh .tmh-ml-ic::after{animation:none;opacity:0}
	body.tmh .tmh-ml-btn,body.tmh .tmh-ml-btn *,body.tmh .tmh-ml-panel,
	body.tmh .tmh-ml-scrim,body.tmh .tmh-ml-submit::after{transition-duration:.01ms}
	body.tmh .tmh-ml-done.on .tmh-ml-check circle,
	body.tmh .tmh-ml-done.on .tmh-ml-check path{animation:none;stroke-dashoffset:0}
}
