/**
 * Products 分类页：顶图轮播与文案 (.ny-banner-products)
 * 由 category-products.php 引入
 */
 @media (min-width: 1200px) {
	.ny-banner-products { max-height: 600px; }
}
.ny-banner-products { position: relative; min-height: 200px; }
.ny-banner-products .category-products-banner-swiper {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
}
.ny-banner-products .category-products-banner-swiper .swiper-slide {
	height: 100%;
	position: relative;
}
.ny-banner-products .slide-inner {
	z-index: 1;
	pointer-events: none;
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
}
.ny-banner-products .slide-inner .banner-text,
.ny-banner-products .slide-inner a {
	pointer-events: auto;
}
.ny-banner-products .category-products-banner-swiper .swiper-slide picture,
.ny-banner-products .category-products-banner-swiper .swiper-slide .img {
	width: 100%;
	height: 100%;
	display: block;
}
.ny-banner-products .category-products-banner-swiper .swiper-slide .img {
	object-fit: cover;
	object-position: center;
	transform: none !important;
	animation: none !important;
}
.ny-banner-products .category-products-banner-pagination {
	bottom: 0.75rem !important;
	z-index: 3;
}
.ny-banner-products .category-products-banner-next,
.ny-banner-products .category-products-banner-prev {
	z-index: 3;
}
/* 全屏宽文案；大边距仅 PC(≥1200)，手机/平板用较小留白 */
.ny-banner-products .slide-inner .banner-text.products-banner-stack {
	width: 100%;
	max-width: 100%;
	text-align: left;
	margin: 0;
	box-sizing: border-box;
	padding: 0 max(1.5rem, env(safe-area-inset-right, 0px)) 0 max(1.5rem, env(safe-area-inset-left, 0px));
}
@media (min-width: 768px) and (max-width: 1199px) {
	.ny-banner-products .slide-inner .banner-text.products-banner-stack {
		padding-left: max(2.75rem, env(safe-area-inset-left, 0px));
		padding-right: max(2rem, env(safe-area-inset-right, 0px));
	}
}
@media (min-width: 1200px) {
	.ny-banner-products .slide-inner .banner-text.products-banner-stack {
		padding-left: max(18.75rem, env(safe-area-inset-left, 0px));
		padding-right: max(12.5rem, env(safe-area-inset-right, 0px));
	}
}
.ny-banner-products .products-banner-subtitle {
	font-size: clamp(1.12rem, 2.55vw, 1.38rem);
	line-height: 1.58;
	margin: 0.95rem 0 0 0;
	font-weight: 400;
	opacity: 0.95;
	max-width: 100%;
}
.ny-banner-products .products-banner-points {
	list-style: none;
	padding: 0;
	margin: 1.35rem 0 0 0;
}
.ny-banner-products .products-banner-points li {
	position: relative;
	padding-left: 1.5rem;
	margin: 0;
	font-size: clamp(0.98rem, 2.05vw, 1.12rem);
	line-height: 1.2;
}
.ny-banner-products .products-banner-points li + li {
	margin-top: 0.7rem;
}
/* 小方框 + 对勾（SVG） */
.ny-banner-products .products-banner-points li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.12em;
	width: 1em;
	height: 1em;
	min-width: 16px;
	min-height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Crect x='1.25' y='1.25' width='13.5' height='13.5' rx='2' stroke='%23ffffff' stroke-width='1.25' fill='rgba(38,146,67,0.12)'/%3E%3Cpath d='M4.5 8.2 7 10.7 11.5 5.2' stroke='%23ffffff' stroke-width='1.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
		center / contain no-repeat;
}
/* 平板 & PC：要点横排，空间不足时自动换行 */
@media (min-width: 768px) {
	.ny-banner-products .products-banner-points {
		display: flex;
		flex-direction: column;
		flex-wrap: wrap;
		align-items: flex-start;
		justify-content: flex-start;
		gap: 0.65rem 1.75rem;
	}
	.ny-banner-products .products-banner-points li {
		flex: 0 1 auto;
		max-width: 100%;
	}
	.ny-banner-products .products-banner-points li + li {
		margin-top: 0;
	}
}
.ny-banner-products .products-banner-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem 1rem;
	align-items: center;
	margin: 1.85rem 0 0 0;
}
.ny-banner-products .products-banner-actions .green-botton {
	margin-bottom: 0;
	font-size: clamp(0.95rem, 1.2vw, 1.1rem);
	padding: 0.78rem 1.55rem;
}
.ny-banner-products .products-banner-btn-secondary {
	display: inline-block;
	padding: 0.78rem 1.5rem;
	border-radius: 1.2rem;
	font-size: clamp(0.88rem, 1.1vw, 1rem);
	color: #fff !important;
	border: 1px solid rgba(255, 255, 255, 0.85);
	background: transparent;
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease;
}
.ny-banner-products .products-banner-btn-secondary:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: #fff;
}
.ny-banner-products .banner-text.products-banner-stack h2 {
	font-size: clamp(1.55rem, 3.85vw, 2.7rem);
	margin: 0;
	line-height: 1.24;
	text-transform: none;
}

/* —— 平板/手机：banner 高度随图片比例（宽 100%），Swiper 需开 autoHeight —— */
@media (max-width: 1199px) {
	.ny-banner.ny-banner-products {
		display: block;
		min-height: 0;
		max-height: none;
		height: auto;
	}
	.ny-banner-products .category-products-banner-swiper {
		position: relative;
		left: auto;
		top: auto;
		right: auto;
		bottom: auto;
		width: 100%;
		height: auto;
	}
	.ny-banner-products .category-products-banner-swiper .swiper-wrapper {
		height: auto;
		align-items: stretch;
	}
	.ny-banner-products .category-products-banner-swiper .swiper-slide {
		height: auto;
		background: #072032;
	}
	.ny-banner-products .category-products-banner-swiper .swiper-slide picture,
	.ny-banner-products .category-products-banner-swiper .swiper-slide .img {
		width: 100%;
		height: auto;
		max-height: none;
		display: block;
		object-fit: fill;
		transform: none !important;
		animation: none !important;
	}
	/* 与全局 .slide-inner（style.css）一致：左→右压暗，避免与 PC 端「自下而上」渐变不一致 */
	.ny-banner-products .slide-inner {
		align-items: stretch;
		justify-content: flex-end;
		padding: 1rem 0 calc(3.4rem + env(safe-area-inset-bottom, 0px));
		box-sizing: border-box;
		background: linear-gradient(to right, rgb(0 37 11), rgba(0, 0, 0, 0)) !important;
		background: linear-gradient(to right, #072032, rgba(0, 0, 0, 0)) !important;
	}
	.ny-banner-products .slide-inner .banner-text.products-banner-stack {
		padding-bottom: 0;
		/* 左右 padding 由上方全屏规则 + min-width 768/1200 控制，此处勿覆盖 */
	}
	.ny-banner-products .category-products-banner-pagination {
		bottom: calc(0.45rem + env(safe-area-inset-bottom, 0px)) !important;
	}
	.ny-banner-products .category-products-banner-pagination .swiper-pagination-bullet {
		width: 8px;
		height: 8px;
		margin: 0 4px !important;
		opacity: 0.55;
	}
	.ny-banner-products .category-products-banner-pagination .swiper-pagination-bullet-active {
		opacity: 1;
		background: #fff;
	}
	.ny-banner-products .category-products-banner-next,
	.ny-banner-products .category-products-banner-prev {
		width: 2.25rem;
		height: 2.25rem;
		margin-top: 0;
		top: 42%;
	}
	.ny-banner-products .category-products-banner-next:after,
	.ny-banner-products .category-products-banner-prev:after {
		font-size: 0.9rem;
	}
}

@media (max-width: 767px) {
	.ny-banner-products .slide-inner {
		/* 覆盖 ≤1199px 的 flex-end，避免手机端整段文案贴底 */
		justify-content: center;
		padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
		padding-bottom: calc(3.65rem + env(safe-area-inset-bottom, 0px));
	}
	.ny-banner-products .slide-inner .banner-text.products-banner-stack {
		margin-top: 4rem;
	}
	.ny-banner-products .banner-text.products-banner-stack h2 {
		font-size: clamp(1.28rem, 5.4vw, 1.85rem);
		line-height: 1.32;
		margin: 0;
	}
	.ny-banner-products .products-banner-subtitle {
		font-size: clamp(1.05rem, 4.1vw, 1.28rem);
		line-height: 1.56;
		margin: 0.8rem 0 0 0;
	}
	/* 移动端不展示要点列表 */
	.ny-banner-products .products-banner-points {
		display: none !important;
	}
	.ny-banner-products .products-banner-actions {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: flex-start;
		gap: 0.55rem 0.75rem;
		margin: 1rem 0 0 0;
	}
	.ny-banner-products .products-banner-actions .green-botton,
	.ny-banner-products .products-banner-actions .products-banner-btn-secondary {
		width: auto;
		max-width: 100%;
		box-sizing: border-box;
		min-height: 46px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		text-align: center;
		padding-left: 1.1rem;
		padding-right: 1.1rem;
		flex: 0 1 auto;
		font-size: clamp(0.88rem, 3.1vw, 1rem);
	}
	.ny-banner-products .products-banner-actions .green-botton {
		padding-top: 0.72rem;
		padding-bottom: 0.72rem;
	}
	.ny-banner-products .products-banner-btn-secondary {
		padding-top: 0.72rem;
		padding-bottom: 0.72rem;
	}
}

/* 极窄屏：隐藏左右箭头，避免挡字；依赖滑动与分页点 */
@media (max-width: 576px) {
	.ny-banner-products .category-products-banner-next,
	.ny-banner-products .category-products-banner-prev {
		display: none;
	}
}

/* Products 列表卡片：桌面 4 列，避免因全局 33.333% 规则导致换行 */
.product-list-box .product-list-right-box > ul.flex-wrap {
	justify-content: flex-start;
	gap: 1.25rem;
}
.product-list-box .product-list-right-box > ul.flex-wrap > li.wrap-card {
	width: calc((100% - 3.75rem) / 4);
	box-sizing: border-box;
	margin-right: 0 !important;
}
.product-list-box .product-list-right-box > ul.flex-wrap > li.wrap-card:last-child,
.product-list-box .product-list-right-box > ul.flex-wrap > li.wrap-card:last-child:nth-child(3n - 1),
.product-list-box .product-list-right-box > ul.flex-wrap > li.wrap-card:last-child:nth-child(3n - 2) {
	margin-right: 0 !important;
}

@media (max-width: 1199px) and (min-width: 768px) {
	.product-list-box .product-list-right-box > ul.flex-wrap > li.wrap-card {
		width: calc((100% - 1.25rem) / 2);
	}
}

@media (max-width: 767px) {
	.product-list-box .product-list-right-box > ul.flex-wrap > li.wrap-card {
		width: 100%;
	}
}

/* 覆盖旧全局规则，避免桌面端第 4 个产品被隐藏 */
@media (min-width: 1200px) {
	.product-list-all li:nth-child(4) {
		display: block !important;
	}
}

/* All Products: 分类标题居中加大 */
.category-section-title-box {
	text-align: center;
	background: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
}
.category-section-title-box .category-section-title {
	font-size: clamp(1.5rem, 2.2vw, 2.1rem) !important;
	line-height: 1.3;
	margin: 0 0 0.6rem 0;
	text-align: center;
}
.category-section-title-link {
	color: inherit;
	text-decoration: none;
}
.category-section-title-link:hover {
	color: var(--gen);
}
.category-section-title-box .category-info {
	text-align: center;
	max-width: 980px;
	margin: 0 auto;
	font-size: clamp(1rem, 1.15vw, 1.18rem);
	line-height: 1.8;
}
@media (max-width: 767px) {
	.category-section-title-box .category-info {
		display: none;
	}
}

/* All Products: ul 后 MORE 按钮居中 */
.category-more-wrap {
	display: flex;
	justify-content: center;
	margin: 0.35rem 0 0.8rem;
}
.category-more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.45rem 1.2rem;
	border-radius: 999px;
	background: var(--gen);
	color: #fff !important;
	font-size: 0.95rem;
	text-decoration: none;
}
.category-more-btn:hover {
	opacity: 0.92;
}

/* 顶部分类导航：移动端左文案 + 右按钮 + 弹层列表 */
.category-products-mobile-bar {
	display: none;
}
.category-products-topbar-backdrop {
	display: none;
}
.category-products-topbar-panel-head,
.category-products-topbar-close {
	display: none;
}
@media (max-width: 767px) {
	.category-products-mobile-bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0.65rem 0.45rem 0.85rem;
		border-bottom: 1px solid #efefef;
	}
	.category-products-mobile-all {
		font-size: 1.02rem;
		font-weight: 600;
		color: #222;
		text-decoration: none;
	}
	.category-products-topbar-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		border: 1px solid var(--gen);
		border-radius: 999px;
		background: var(--gen);
		color: #fff;
		font-size: 1.02rem;
		font-weight: 700;
		letter-spacing: 0.02em;
		padding: 0.34rem 0.7rem;
		line-height: 1;
	}
	.category-products-topbar-toggle:hover,
	.category-products-topbar-toggle:focus {
		background: #1f7f39;
	}
	.category-products-topbar .category-products-topbar-nav {
		display: none;
		position: fixed;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%);
		width: min(92vw, 360px);
		max-height: 78vh;
		z-index: 1002;
	}
	.category-products-topbar.is-open .category-products-topbar-nav {
		display: block;
	}
	.category-products-topbar-backdrop {
		position: fixed;
		inset: 0;
		border: 0;
		background: rgba(0, 0, 0, 0.35);
		z-index: 1001;
	}
	.category-products-topbar.is-open .category-products-topbar-backdrop {
		display: block;
	}
	.category-products-topbar .category-products-topbar-panel {
		background: #fff;
		border-radius: 14px;
		overflow: hidden;
		border: 1px solid #ececec;
		box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
		padding: 0.95rem 0.65rem 1.05rem;
	}
	.category-products-topbar .category-products-topbar-panel-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 1.15rem 1.1rem 1.05rem;
		border-bottom: 1px solid #f1f1f1;
		font-size: 1.12rem;
		font-weight: 700;
		color: #202020;
	}
	.category-products-topbar .category-products-topbar-close {
		display: inline-block;
		border: 0;
		background: transparent;
		font-size: 1.35rem;
		line-height: 1;
		color: #7a7a7a;
		padding: 0;
	}
	.category-products-topbar .category-products-topbar-menu {
		display: block;
		padding: 0.35rem 0 0.5rem;
		margin: 0;
		max-height: min(62vh, 520px);
		overflow: auto;
		background: #fff;
	}
	.category-products-topbar .category-products-topbar-menu li {
		display: block;
		margin: 0;
	}
	.category-products-topbar .category-products-topbar-menu li + li {
		border-top: 1px solid #f4f4f4;
	}
	.category-products-topbar .category-products-topbar-menu li a {
		display: block;
		padding: 1.2rem 1.1rem;
		text-align: left;
		font-size: 0.94rem;
		line-height: 1.4;
		color: #2b2b2b;
		text-decoration: none;
		transition: background 0.18s ease;
	}
	.category-products-topbar .category-products-topbar-menu li a:hover {
		background: #fafafa;
	}
	.category-products-topbar .category-products-topbar-menu li.current-menu-item a {
		background: #f2faf5;
		color: var(--gen);
		font-weight: 600;
		border-left: 3px solid var(--gen);
		padding-left: calc(1.1rem - 3px);
	}
}


