/* ==========================================================================
   iPartsMall Child — 信任条 / 页脚
   视觉基准：wp-site-prototype/index.html（.strip / footer / .fgrid / .fbot）
   ==========================================================================

   Blocksy 实际输出的页脚结构（已核实）：
   ---------------------------------------------------------------
   footer.ct-footer[data-id="type-1"]
     [data-row="middle"] > .ct-container[data-columns-divider]
        [data-column="widget-area-1"] … [data-column="widget-area-4"]
     [data-row="bottom"]  > .ct-container > [data-column="copyright"]
   ---------------------------------------------------------------
   四个小工具区域的内容是用核心区块写的，James 以后可以在
   后台「外观 → 小工具」里直接改，不用碰代码。
   ========================================================================== */


/* ==========================================================================
   1. 信任条（原型 .strip）—— 做成可复用区块，首页放在 Hero 下面
   ========================================================================== */

.ns-strip {
	border-top: 1px solid var(--ns-line);
	border-bottom: 1px solid var(--ns-line);
	background: var(--ns-bg);
	padding: 22px 0;
}

.ns-strip .ns-strip-inner {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

.ns-strip .ns-strip-item {
	display: flex;
	align-items: center;
	gap: 13px;
}

.ns-strip .ns-strip-ic {
	width: 42px;
	height: 42px;
	flex: none;
	border-radius: 12px;
	background: var(--ns-brand-soft);
	color: var(--ns-brand);
	display: grid;
	place-items: center;
	font-weight: 900;
	font-size: 15px;
}

.ns-strip .ns-strip-ic svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ns-strip b {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: var(--ns-ink);
	line-height: 1.3;
}

.ns-strip span {
	font-size: 12.5px;
	color: var(--ns-muted);
}


/* ==========================================================================
   2. 页脚容器
   ========================================================================== */

#main-container > footer.ct-footer {
	background: var(--ns-bg-soft);
	border-top: 1px solid var(--ns-line);
	padding-top: 62px;
	margin-top: 78px;
}

/* .ct-container 已按视口收窄留边（theme.css 容器宽度），不再叠 padding-inline */
.ct-footer [data-row] > .ct-container {
	max-width: var(--ns-max);
}

/* 列宽：对齐原型 .fgrid 的 1.6fr / 1fr / 1fr / 1.2fr 比例 */
.ct-footer [data-row="middle"] > .ct-container {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
	gap: 36px;
	padding-bottom: 46px;
	align-items: start;
}

.ct-footer [data-row="middle"] [data-column] {
	width: auto;
	min-width: 0;
}

/* 去掉演示站的列分割线 */
.ct-footer .ct-container[data-columns-divider] > * {
	border: 0;
}


/* ==========================================================================
   3. 页脚内容排版
   ========================================================================== */

.ct-footer .ct-widget {
	font-size: 14px;
	color: var(--ns-muted);
}

.ct-footer .ct-widget h1,
.ct-footer .ct-widget h2,
.ct-footer .ct-widget h3,
.ct-footer .ct-widget h4,
.ct-footer .ct-widget h5,
.ct-footer .ct-widget h6 {
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 1.3px;
	text-transform: uppercase;
	color: var(--ns-ink);
	margin: 0 0 15px;
}

.ct-footer .ct-widget p {
	font-size: 14px;
	color: var(--ns-muted);
	margin: 0 0 14px;
	max-width: 320px;
}

.ct-footer .ct-widget a {
	color: var(--ns-muted);
	font-size: 14px;
	transition: color 0.18s ease;
}

.ct-footer .ct-widget a:hover {
	color: var(--ns-brand);
}

/* 页脚里的链接列表 */
.ct-footer .ct-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 9px;
}

.ct-footer .ct-widget ul li {
	font-size: 14px;
	color: var(--ns-muted);
}

.ct-footer .ct-widget ul li::before {
	content: none;
}


/* ==========================================================================
   4. 社交图标 / 支付方式 —— 原型 .socials / .pays
   注意：上面「.ct-footer .ct-widget ul」的 grid 规则特异性更高，
   会把这里的 flex 压掉，所以这里要带上 .ct-footer .ct-widget 前缀再赢回来。
   ========================================================================== */

.ct-footer .ct-widget ul.ns-socials {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}

.ct-footer .ct-widget .ns-socials a {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	border: 1px solid var(--ns-line);
	background: #fff;
	color: var(--ns-ink-2);
	display: grid;
	place-items: center;
	font-size: 11.5px;
	font-weight: 800;
	transition: border-color 0.18s ease, color 0.18s ease;
}

.ct-footer .ct-widget .ns-socials a:hover {
	border-color: var(--ns-brand-2);
	color: var(--ns-brand);
}

.ct-footer .ct-widget ul.ns-pays {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}

.ct-footer .ct-widget .ns-pays span {
	border: 1px solid var(--ns-line);
	background: #fff;
	border-radius: 7px;
	padding: 5px 10px;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.5px;
	color: var(--ns-ink-2);
	white-space: nowrap;
}


/* ==========================================================================
   5. 底部版权条
   ========================================================================== */

.ct-footer [data-row="bottom"] > .ct-container {
	border-top: 1px solid var(--ns-line);
	padding-top: 20px;
	padding-bottom: 20px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
}

.ct-footer .ct-footer-copyright,
.ct-footer [data-column="copyright"] {
	font-size: 13px;
	line-height: 1.75;
	max-width: 1020px;
	color: var(--ns-muted);
}

.ct-footer .ct-footer-copyright a {
	color: var(--ns-muted);
}

.ct-footer .ct-footer-copyright a:hover {
	color: var(--ns-brand);
}

/* 底部右侧的政策链接 */
.ct-footer [data-row="bottom"] .ns-fbot-links {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	font-size: 13px;
}

.ct-footer [data-row="bottom"] .ns-fbot-links a {
	color: var(--ns-muted);
}

.ct-footer [data-row="bottom"] .ns-fbot-links a:hover {
	color: var(--ns-brand);
}


/* ==========================================================================
   6. 响应式
   ========================================================================== */

@media (max-width: 980px) {
	.ns-strip .ns-strip-inner {
		grid-template-columns: 1fr 1fr;
		gap: 18px 20px;
	}

	.ct-footer [data-row="middle"] > .ct-container {
		grid-template-columns: 1fr 1fr;
		gap: 30px;
	}
}

@media (max-width: 720px) {
	.ns-strip .ns-strip-inner {
		grid-template-columns: 1fr;
	}

	.ct-footer [data-row="middle"] > .ct-container {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.ct-footer [data-row="bottom"] > .ct-container {
		justify-content: flex-start;
	}
}


/* ==========================================================================
   7. WhatsApp 在线沟通浮窗（全站右下角）
   —— 纯 CSS 显隐，无依赖；移动端只留图标，避免盖住内容
   ========================================================================== */

.ns-wa {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 9990;
	display: flex;
	align-items: center;
	opacity: 0;
	transform: translateY(14px);
	pointer-events: none;
	/* 延迟 2.2s 淡入：不抢首屏，也避开页面加载抖动 */
	animation: ns-wa-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) 2.2s forwards;
}

@keyframes ns-wa-in {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ns-wa-btn {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	height: 56px;
	padding-right: 0;
	border-radius: var(--ns-radius-pill);
	background: var(--ns-wa);
	color: #fff;
	text-decoration: none;
	overflow: hidden;
	white-space: nowrap;
	box-shadow: 0 8px 22px var(--ns-wa-ring), var(--ns-shadow-md);
	transition: background-color 0.2s ease, padding-right 0.3s ease, box-shadow 0.2s ease;
}

.ns-wa-btn:hover,
.ns-wa-btn:focus-visible {
	background: var(--ns-wa-hover);
	color: #fff;
	box-shadow: 0 10px 28px var(--ns-wa-ring), var(--ns-shadow-lg);
}

.ns-wa-ic {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	display: grid;
	place-items: center;
}

.ns-wa-ic svg {
	width: 30px;
	height: 30px;
	display: block;
	fill: currentColor;
}

.ns-wa-txt {
	max-width: 0;
	opacity: 0;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.01em;
	transition: max-width 0.3s ease, opacity 0.22s ease;
}

.ns-wa-btn:hover .ns-wa-txt,
.ns-wa-btn:focus-visible .ns-wa-txt {
	max-width: 240px;
	padding-right: 22px;
	opacity: 1;
}

/* 触屏设备没有 hover，展开文字无意义，只保留圆形图标 */
@media (max-width: 720px) {
	.ns-wa {
		right: 14px;
		bottom: 14px;
	}

	.ns-wa-btn {
		height: 52px;
	}

	.ns-wa-ic {
		flex-basis: 52px;
		width: 52px;
		height: 52px;
	}

	.ns-wa-ic svg {
		width: 27px;
		height: 27px;
	}

	.ns-wa-txt {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ns-wa {
		animation-duration: 0.01ms;
	}
}

@media print {
	.ns-wa {
		display: none;
	}
}
