/**
 * lpknit 全站样式：导航菜单 + 桌面端回到顶部按钮
 */

/* ===================================================================
 * 导航菜单（全站与首页一致）
 * =================================================================== */
#header.ct-header,
header.ct-header {
	z-index: 200;
	transition: background-color .25s ease, box-shadow .25s ease;
}

body:not(.home) #header.ct-header,
body:not(.home) header.ct-header {
	position: relative;
	background: #fff !important;
	box-shadow: none !important;
	border: 0 !important;
}

body.home #header.ct-header,
body.home header.ct-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	background: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
}

.ct-header [data-row],
.ct-header [data-column],
.ct-header .ct-row,
.ct-header [data-device] {
	border: 0 !important;
}

body.home .ct-header [data-row],
body.home .ct-header [data-column],
body.home .ct-header .ct-row,
body.home .ct-header [data-device] {
	background: transparent !important;
	box-shadow: none !important;
}

.ct-header .ct-menu-link,
.ct-header [data-row] a:not(.ct-button),
.ct-header .site-title {
	color: #333;
	font-size: 13px;
	font-weight: 400;
	text-transform: lowercase;
	letter-spacing: 0;
}

/* 菜单文字颜色保持不变 (悬停/当前项/子菜单选中都不变色) — 指示只用滑动毛线 */
.ct-header .ct-menu-link,
.ct-header .ct-menu-link:hover,
.ct-header .ct-menu-link:focus,
.ct-header .ct-menu-link:active,
.ct-header .menu-item.current-menu-item > .ct-menu-link,
.ct-header .menu-item.current_page_item > .ct-menu-link,
.ct-header .sub-menu .ct-menu-link,
.ct-header .sub-menu .ct-menu-link:hover,
.ct-header .sub-menu .ct-menu-link:focus,
.ct-header .sub-menu .menu-item.current-menu-item > .ct-menu-link {
	color: #333 !important;
}
/* 子菜单(下拉)项不显示毛线下划线, 保持简洁 */
.ct-header .sub-menu .ct-menu-link::after { display: none !important; }

/* Main menu hover / current item: same curved "yarn" underline as the product
   page category nav, but the yarn keeps sliding while shown (毛线滑动). */
.ct-header .ct-menu-link { position: relative; }
.ct-header .menu-item > .ct-menu-link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 1px;
	height: 8px;
	display: block !important;
	border: 0 !important;
	background-color: transparent;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='8' viewBox='0 0 30 8'%3E%3Cpath d='M0 5 Q7.5 1 15 5 T30 5' fill='none' stroke='%236b7a5e' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: repeat-x;
	background-position: 0 center;
	background-size: 30px 8px;
	opacity: 0;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .45s cubic-bezier(.16,.84,.44,1), opacity .3s ease;
	pointer-events: none;
}
.ct-header .menu-item:hover > .ct-menu-link::after,
.ct-header .ct-menu-link:hover::after,
.ct-header .ct-menu-link:focus-visible::after,
.ct-header .menu-item.current-menu-item > .ct-menu-link::after,
.ct-header .menu-item.current_page_item > .ct-menu-link::after {
	opacity: 1;
	transform: scaleX(1);
	animation: lpkYarnSlide 1.1s linear infinite;
}
@keyframes lpkYarnSlide {
	from { background-position-x: 0; }
	to   { background-position-x: 30px; }
}

body.home.is-scrolled #header.ct-header,
body.home.is-scrolled header.ct-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	background: #fff !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
	animation: lpknitSlideDown .25s ease;
}

@media (min-width: 1025px) {
	/* 非首页：桌面端下滑时菜单磁吸在顶部 */
	body:not(.home) #header.ct-header,
	body:not(.home) header.ct-header {
		position: sticky;
		top: 0;
		z-index: 200;
	}

	body.is-scrolled:not(.home) #header.ct-header,
	body.is-scrolled:not(.home) header.ct-header {
		box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
	}

	/* 磁吸后增加顶部内边距，避免菜单贴顶（首页 + 全站桌面端） */
	body.is-scrolled .ct-header [data-row*="middle"] > div {
		padding-top: 16px !important;
		padding-bottom: 12px !important;
	}

	body.is-scrolled .ct-header [data-row*="middle"] {
		min-height: 72px;
	}
}

@keyframes lpknitSlideDown {
	from { transform: translateY(-100%); opacity: 0; }
	to   { transform: translateY(0);     opacity: 1; }
}

@media (max-width: 1024px) {
	body.home #header.ct-header,
	body.home header.ct-header {
		position: sticky;
		top: 0;
		background: #fff !important;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
	}

	/* 手机端 Logo 放大（Blocksy 默认 28px 偏小） */
	[data-header*="type-1"] .ct-header [data-id="logo"] .site-logo-container {
		--logo-max-height: 42px !important;
	}

	[data-header*="type-1"] .ct-header [data-row*="middle"] {
		--height: 62px !important;
	}
}

@media (max-width: 689.98px) {
	[data-header*="type-1"] .ct-header [data-id="logo"] .site-logo-container {
		--logo-max-height: 38px !important;
	}

	[data-header*="type-1"] .ct-header [data-row*="middle"] {
		--height: 56px !important;
	}
}

/* ===================================================================
 * 桌面端：回到顶部 + 滚动进度环
 * =================================================================== */
.lpknit-scroll-top {
	position: fixed;
	right: 28px;
	bottom: 32px;
	z-index: 9999;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity .25s ease, visibility .25s ease, transform .25s ease, box-shadow .2s ease;
}

.lpknit-scroll-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.lpknit-scroll-top:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}

.lpknit-scroll-top:focus-visible {
	outline: 2px solid #333;
	outline-offset: 2px;
}

.lpknit-scroll-top__ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
	pointer-events: none;
}

.lpknit-scroll-top__track,
.lpknit-scroll-top__progress {
	fill: none;
	stroke-width: 2.5;
}

.lpknit-scroll-top__track {
	stroke: rgba(0, 0, 0, 0.1);
}

.lpknit-scroll-top__progress {
	stroke: #333;
	stroke-linecap: round;
	transition: stroke-dashoffset .08s linear;
}

.lpknit-scroll-top__icon {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #333;
	font-size: 18px;
	line-height: 1;
}

@media (max-width: 1024px) {
	.lpknit-scroll-top {
		display: none !important;
	}
}

/* ===================================================================
 * Contact CTA band ([lpk_contact_cta] / auto-appended to About page)
 * =================================================================== */
.lpk-cta-band {
	background: #1c1a18;
	color: #fff;
	padding: 84px 24px;
	text-align: center;
}
.lpk-cta-inner { max-width: 760px; margin: 0 auto; }
.lpk-cta-kicker {
	margin: 0 0 14px;
	font-size: 12px;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #c9c2b8;
}
.lpk-cta-title {
	margin: 0 0 14px;
	font-size: 34px;
	line-height: 1.15;
	font-weight: 500;
	color: #fff;
}
.lpk-cta-text {
	margin: 0 auto 30px;
	max-width: 620px;
	font-size: 16px;
	line-height: 1.7;
	color: #d8d2c8;
}
.lpk-cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
/* auto-linked images (buttons/images with no link of their own → contact) */
.lpk-img-autolink { display: block; cursor: pointer; }
.lpk-cta-btn {
	display: inline-block;
	padding: 14px 30px;
	border: 1px solid #fff;
	color: #fff;
	text-decoration: none;
	font-size: 13px;
	letter-spacing: 1px;
	text-transform: uppercase;
	transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.lpk-cta-btn:hover { background: #fff; color: #1c1a18; }
.lpk-cta-btn.is-primary { background: #fff; color: #1c1a18; }
.lpk-cta-btn.is-primary:hover { background: transparent; color: #fff; }
@media (max-width: 600px) {
	.lpk-cta-band { padding: 60px 18px; }
	.lpk-cta-title { font-size: 27px; }
}

/* ===================================================================
 * GTranslate — header menu language switcher
 * Match nav typography (lowercase, #333, 13px).
 * =================================================================== */
.ct-header .menu-item-gtranslate {
	position: relative !important;
	display: flex;
	align-items: center;
}

.ct-header .menu-item-gtranslate > [id^="gtranslate_menu_wrapper"] {
	position: static !important;
	white-space: nowrap;
}

.ct-header .menu-item-gtranslate .gt_switcher {
	width: auto !important;
	line-height: 1.4 !important;
	font-family: inherit !important;
	overflow: visible !important;
	position: relative !important;
}

.ct-header .menu-item-gtranslate .gt_switcher .gt_selected {
	background: none !important;
	position: relative !important;
	z-index: auto !important;
}

.ct-header .menu-item-gtranslate .gt_switcher .gt_selected a {
	display: inline-flex !important;
	align-items: center;
	gap: 5px;
	width: auto !important;
	min-width: 0 !important;
	padding: 5px 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: #333 !important;
	font-size: 13px !important;
	font-weight: 400 !important;
	font-family: inherit !important;
	text-transform: lowercase !important;
	letter-spacing: 0 !important;
	line-height: 1.4 !important;
	box-sizing: border-box !important;
	position: relative !important;
}

.ct-header .menu-item-gtranslate .gt_switcher .gt_selected a:hover {
	background: transparent !important;
	color: #333 !important;
}

.ct-header .menu-item-gtranslate .gt_switcher .gt_selected a img {
	width: 14px !important;
	height: 14px !important;
	margin: 0 !important;
	opacity: 1 !important;
	flex-shrink: 0;
	border-radius: 1px;
	vertical-align: middle !important;
}

/* Custom chevron — replace GTranslate default arrow */
.ct-header .menu-item-gtranslate .gt_switcher .gt_selected a:after {
	content: "" !important;
	position: static !important;
	display: inline-block !important;
	width: 10px !important;
	height: 10px !important;
	margin-left: 1px !important;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23333' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 50% 50% / 10px 6px no-repeat !important;
	transition: transform .2s ease !important;
}

.ct-header .menu-item-gtranslate .gt_switcher .gt_selected a.open:after {
	transform: rotate(180deg) !important;
}

/* Open downward in header — upward gets clipped at page top */
.ct-header .menu-item-gtranslate .gt_switcher .gt_option {
	position: absolute !important;
	right: 0 !important;
	top: calc(100% + 8px) !important;
	bottom: auto !important;
	left: auto !important;
	width: auto !important;
	min-width: 120px !important;
	max-width: 180px !important;
	max-height: 280px !important;
	padding: 6px 0 !important;
	border: 0 !important;
	background: #fff !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
	overflow-y: auto !important;
	overflow-x: hidden !important;
	z-index: 10001 !important;
	transition: height .25s ease, opacity .2s ease !important;
}

.ct-header .menu-item-gtranslate .gt_switcher .gt_option a {
	display: flex !important;
	align-items: center;
	gap: 8px;
	padding: 7px 14px !important;
	color: #333 !important;
	font-size: 13px !important;
	font-weight: 400 !important;
	font-family: inherit !important;
	text-transform: lowercase !important;
	line-height: 1.4 !important;
	white-space: nowrap;
	box-sizing: border-box !important;
	transition: background-color .2s ease;
}

.ct-header .menu-item-gtranslate .gt_switcher .gt_option a:hover {
	background: #f5f4f1 !important;
	color: #333 !important;
}

.ct-header .menu-item-gtranslate .gt_switcher .gt_option a img {
	width: 14px !important;
	height: 14px !important;
	margin: 0 !important;
	opacity: 1 !important;
	flex-shrink: 0;
	vertical-align: middle !important;
}

.ct-header .menu-item-gtranslate .gt_switcher .gt_option::-webkit-scrollbar {
	width: 4px;
}

.ct-header .menu-item-gtranslate .gt_switcher .gt_option::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.15);
	border-radius: 2px;
}

.ct-header .menu-item-gtranslate .gt_switcher .gt_option::-webkit-scrollbar-track {
	background: transparent;
}

/* Mobile header bar: show language switcher beside hamburger */
@media (max-width: 1024px) {
	.ct-header [data-device="mobile"] [data-column="end"] [data-items="primary"] {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		gap: 10px;
	}

	.ct-header .menu-item-gtranslate.lpk-gtranslate-mobile-bar {
		display: flex !important;
		align-items: center;
		list-style: none;
		margin: 0;
		padding: 0;
		width: auto;
		height: auto;
	}

	.ct-header .menu-item-gtranslate.lpk-gtranslate-mobile-bar > [id^="gtranslate_menu_wrapper"] {
		position: static !important;
	}

	.ct-header .menu-item-gtranslate.lpk-gtranslate-mobile-bar .gt_switcher {
		width: auto !important;
	}

	.ct-header .menu-item-gtranslate.lpk-gtranslate-mobile-bar .gt_switcher .gt_option {
		right: 0 !important;
		left: auto !important;
	}

	/* Offcanvas drawer: language item as a normal menu row */
	.ct-panel .mobile-menu .menu-item-gtranslate.lpk-gtranslate-drawer {
		display: block !important;
		width: 100%;
		margin-top: 4px;
		padding-top: 8px;
		border-top: 1px solid rgba(0, 0, 0, 0.06);
	}

	.ct-panel .mobile-menu .menu-item-gtranslate.lpk-gtranslate-drawer > [id^="gtranslate_menu_wrapper"] {
		position: static !important;
		white-space: normal;
	}

	.ct-panel .mobile-menu .menu-item-gtranslate.lpk-gtranslate-drawer .gt_switcher {
		width: 100% !important;
	}

	.ct-panel .mobile-menu .menu-item-gtranslate.lpk-gtranslate-drawer .gt_switcher .gt_selected a {
		padding: 10px 0 !important;
		font-size: 14px !important;
	}

	.ct-panel .mobile-menu .menu-item-gtranslate.lpk-gtranslate-drawer .gt_switcher .gt_option {
		position: absolute !important;
		left: 0 !important;
		right: 0 !important;
		min-width: 0 !important;
		max-width: none !important;
		width: 100% !important;
	}
}

/* ===================================================================
 * SEO pillar internal links (mu-plugin lpknit-seo-p1.php)
 * =================================================================== */
.lpk-seo-pillar-links {
	margin: 3rem auto 1.5rem;
	max-width: 680px;
	padding: 1.5rem 1.25rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.lpk-seo-pillar-kicker {
	margin: 0 0 0.35rem;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #8a8178;
}

.lpk-seo-pillar-title {
	margin: 0 0 0.85rem;
	font-size: 1.05rem;
	font-weight: 500;
	color: #2b2622;
}

.lpk-seo-pillar-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem 1.25rem;
}

.lpk-seo-pillar-list a {
	font-size: 14px;
	color: #5c534c;
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.lpk-seo-pillar-list a:hover {
	color: #2b2622;
}

.lpk-seo-pillar-footer {
	max-width: min(680px, calc(100% - 2.5rem));
	margin: 0 auto 2rem;
	padding: 0 1.25rem;
}

.single-post .lpk-seo-pillar-links,
.lpk-prose + .lpk-seo-pillar-links {
	max-width: 720px;
}
.lpk-seo-home-subline {
	margin: 0.65rem 0 0;
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.82);
	text-align: center;
}

.lpk-seo-product-intro {
	max-width: 680px;
	margin: 0 auto 1.25rem;
	padding: 0 1rem;
	font-size: 15px;
	line-height: 1.55;
	color: #5c534c;
	text-align: center;
}
