.yy-product-wrap {
	margin-bottom: 8px;
	position: relative;
	container-type: inline-size;
}

.yy-product-wrap.is-switching {
	pointer-events: none;
}

.yy-product-wrap.is-switching .yy-product-grid,
.yy-product-wrap.is-switching .yy-product-empty,
.yy-product-wrap.is-switching .yy-cart-heading,
.yy-product-wrap.is-switching .yy-filter-intro,
.yy-product-wrap.is-switching .yy-cart-tip {
	opacity: 0.45;
	transition: opacity 0.15s ease;
}

.yy-product-wrap.is-switching::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	z-index: 3;
	height: 2px;
	width: 36%;
	border-radius: 1px;
	background: #1677ff;
	animation: yy-progress 1s ease-in-out infinite;
}

.yy-cart-tip {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	padding: 12px 16px;
	background: #eef6ff;
	border: 1px solid #d6e8ff;
	border-radius: 8px;
	color: #1f1f1f;
	font-size: 13px;
}

.yy-cart-tip-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #1677ff;
	color: #fff;
	font-size: 11px;
	font-style: italic;
	font-weight: 700;
	line-height: 1;
	flex-shrink: 0;
}

.yy-cart-tip a {
	color: #1677ff;
	font-weight: 600;
	text-decoration: none;
}

.yy-cart-tip a:hover {
	text-decoration: underline;
}

.yy-product-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.yy-product-col {
	min-width: 0;
	display: flex;
}

.yy-product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 0;
	background: #fff;
	border: 1px solid #e6ebf2;
	border-radius: 12px;
	box-shadow: 0 4px 16px rgba(31, 35, 41, 0.05);
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.yy-product-card:hover {
	border-color: #91caff;
	box-shadow: 0 10px 28px rgba(22, 119, 255, 0.12);
	transform: translateY(-3px);
}

.yy-product-card.is-soldout {
	opacity: 0.88;
}

.yy-product-soldout {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 52px;
	z-index: 2;
	pointer-events: none;
}

.yy-product-main {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 18px 18px 0;
}

.yy-product-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid #f0f3f7;
	min-width: 0;
}

.yy-product-title {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	color: #1f1f1f;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.yy-product-stock {
	flex: 0 0 auto;
	margin: 0;
	padding: 2px 8px;
	font-size: 12px;
	line-height: 20px;
	color: #1677ff;
	background: #eef6ff;
	border-radius: 999px;
	white-space: nowrap;
}

.yy-product-stock.is-empty {
	color: #ff4d4f;
	background: #fff1f0;
}

.yy-product-specs {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-height: 120px;
	margin-bottom: 12px;
	padding: 12px 12px;
	background: #f7f9fc;
	border-radius: 8px;
}

.yy-spec-line {
	display: flex;
	align-items: flex-start;
	gap: 2px;
	font-size: 13px;
	line-height: 1.55;
	color: #434343;
	word-break: break-word;
}

.yy-spec-label {
	flex: 0 0 auto;
	color: #8c8c8c;
}

.yy-spec-value {
	flex: 1 1 auto;
	min-width: 0;
	color: #262626;
}

.yy-spec-value-line {
	display: block;
}

.yy-spec-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 0 6px;
	height: 18px;
	line-height: 18px;
	font-size: 11px;
	color: #1677ff;
	background: #e8f3ff;
	border-radius: 3px;
	vertical-align: middle;
}

.yy-product-desc-raw {
	color: #595959;
	font-size: 13px;
	line-height: 1.7;
	word-break: break-word;
}

.yy-product-desc-raw ul,
.yy-product-desc-raw ol {
	margin: 0;
	padding-left: 1.1em;
}

.yy-product-desc-raw p {
	margin: 0 0 4px;
}

.yy-product-note {
	margin-bottom: 10px;
	padding-top: 2px;
}

.yy-product-note p {
	margin: 0 0 4px;
	font-size: 12px;
	line-height: 1.6;
	color: #8c8c8c;
}

.yy-product-note p:last-child {
	margin-bottom: 0;
}

.yy-product-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 12px;
}

.yy-product-tag {
	display: inline-block;
	padding: 3px 10px;
	font-size: 12px;
	line-height: 18px;
	color: #1677ff;
	background: #eef6ff;
	border: 1px solid #d6e8ff;
	border-radius: 999px;
	white-space: nowrap;
}

.yy-product-price-box {
	margin-top: auto;
	padding: 14px 0 16px;
	border-top: 1px dashed #eef0f4;
}

.yy-product-price {
	color: #1677ff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.2px;
}

.yy-product-price span {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	font-variant-numeric: tabular-nums;
	font-size: 28px;
}

.yy-product-price em {
	margin-left: 2px;
	font-style: normal;
	font-size: 13px;
	font-weight: 400;
	color: #8c8c8c;
}

.yy-product-origin {
	margin-top: 4px;
	font-size: 12px;
	color: #bfbfbf;
}

.yy-product-trial {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
	font-size: 13px;
	line-height: 1.4;
	color: #e64a19;
}

.yy-trial-label {
	display: inline-block;
	padding: 0 6px;
	height: 20px;
	line-height: 20px;
	border-radius: 3px;
	background: #fff2e8;
	color: #e64a19;
	font-size: 12px;
	font-weight: 600;
}

.yy-trial-desc {
	color: #e64a19;
	font-size: 13px;
	font-weight: 600;
}

.yy-product-buy {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: calc(100% - 36px);
	height: 40px;
	margin: 0 18px 18px;
	color: #fff !important;
	background: #1677ff;
	border: 1px solid #1677ff;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background 0.2s ease, box-shadow 0.2s ease;
}

.yy-product-buy:hover {
	color: #fff !important;
	background: #4096ff;
	border-color: #4096ff;
	box-shadow: 0 6px 16px rgba(22, 119, 255, 0.28);
}

.yy-buy-arrow {
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-left: 2px;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	transform: rotate(45deg);
	vertical-align: middle;
}

.yy-product-buy.is-disabled,
.yy-product-buy.is-disabled:hover {
	color: #bfbfbf !important;
	background: #f5f5f5;
	border-color: #e8e8e8;
	box-shadow: none;
	cursor: not-allowed;
}

.yy-product-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 280px;
	background: #fff;
	border-radius: 12px;
	border: 1px solid #e6ebf2;
	color: #8c8c8c;
}

.yy-product-card.is-skeleton {
	min-height: 300px;
	pointer-events: none;
	box-shadow: none;
}

.yy-skel {
	display: block;
	height: 14px;
	margin-bottom: 10px;
	border-radius: 4px;
	background: linear-gradient(90deg, #f2f3f5 25%, #ececec 37%, #f2f3f5 63%);
	background-size: 400% 100%;
	animation: yy-skel 1.2s ease infinite;
}

.yy-skel.lg {
	height: 20px;
	width: 72%;
}

.yy-skel.md {
	width: 90%;
}

.yy-skel.sm {
	width: 56%;
}

.yy-skel.btn {
	height: 40px;
	margin-top: auto;
	margin-bottom: 0;
	width: 100%;
}

@keyframes yy-skel {
	0% { background-position: 100% 0; }
	100% { background-position: 0 0; }
}

@keyframes yy-progress {
	0% { left: 0; width: 18%; }
	50% { left: 42%; width: 40%; }
	100% { left: 82%; width: 18%; }
}

@media (max-width: 1199.98px) {
	.yy-product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 575.98px) {
	.yy-product-grid {
		grid-template-columns: 1fr;
	}

	.yy-product-main {
		padding: 16px 16px 0;
	}

	.yy-product-buy {
		width: calc(100% - 32px);
		margin: 0 16px 16px;
	}

	.yy-product-specs {
		min-height: 0;
	}

	.yy-product-head {
		flex-wrap: wrap;
		gap: 4px 12px;
	}
}

@container (max-width: 1099.98px) {
	.yy-product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@container (max-width: 719.98px) {
	.yy-product-grid {
		grid-template-columns: 1fr;
	}
}
