/* ========== 产品描述区：与后台编辑一致，按「文档」展示 ========== */
.single-product .woocommerce-product-details__description-body,
.single-product .woocommerce-Tabs-panel--description .entry-content {
	display: block !important;
	overflow: visible;
	max-width: 100%;
	line-height: 1.6;
	word-wrap: break-word;
}

/* 描述区段落、列表等与常规文档一致 */
.single-product .woocommerce-product-details__description-body p,
.single-product .woocommerce-Tabs-panel--description .entry-content p {
	margin: 0 0 1em 0;
}
.single-product .woocommerce-product-details__description-body p:last-child,
.single-product .woocommerce-Tabs-panel--description .entry-content p:last-child {
	margin-bottom: 0;
}
.single-product .woocommerce-product-details__description-body h1,
.single-product .woocommerce-product-details__description-body h2,
.single-product .woocommerce-product-details__description-body h3,
.single-product .woocommerce-Tabs-panel--description .entry-content h1,
.single-product .woocommerce-Tabs-panel--description .entry-content h2,
.single-product .woocommerce-Tabs-panel--description .entry-content h3 {
	margin: 1em 0 0.5em 0;
	font-weight: 600;
}
.single-product .woocommerce-product-details__description-body ul,
.single-product .woocommerce-product-details__description-body ol,
.single-product .woocommerce-Tabs-panel--description .entry-content ul,
.single-product .woocommerce-Tabs-panel--description .entry-content ol {
	margin: 0 0 1em 0;
	padding-left: 1.5em;
}

/* 描述区图片：严格按后台/HTML 尺寸，不按容器放宽、不放大高度 */
.single-product .woocommerce-Tabs-panel--description img,
.single-product .woocommerce-product-details__description-body img,
.single-product .woocommerce-Tabs-panel--description .entry-content img,
body.single-product .woocommerce .woocommerce-product-details__description-body img,
body.single-product .woocommerce .woocommerce-Tabs-panel--description img {
	width: fit-content !important;
	max-width: 100% !important;
	height: fit-content !important;
	max-height: min(80vh, 1200px) !important;
	display: inline-block !important;
	vertical-align: middle !important;
	object-fit: contain !important;
	aspect-ratio: unset !important;
}

/* 描述区图片对齐：与后台「左/中/右/无」一致 */
.single-product .woocommerce-product-details__description-body img.alignleft,
.single-product .woocommerce-Tabs-panel--description .entry-content img.alignleft {
	float: left;
	margin: 0 1em 0.5em 0;
	display: block !important;
}
.single-product .woocommerce-product-details__description-body img.alignright,
.single-product .woocommerce-Tabs-panel--description .entry-content img.alignright {
	float: right;
	margin: 0 0 0.5em 1em;
	display: block !important;
}
.single-product .woocommerce-product-details__description-body img.aligncenter,
.single-product .woocommerce-Tabs-panel--description .entry-content img.aligncenter {
	display: block !important;
	margin-left: auto !important;
	margin-right: auto !important;
	float: none;
}
.single-product .woocommerce-product-details__description-body img.size-thumbnail,
.single-product .woocommerce-Tabs-panel--description .entry-content img.size-thumbnail {
	max-width: 150px !important;
	max-height: 150px !important;
	width: auto !important;
	height: auto !important;
}
.single-product .woocommerce-product-details__description-body img.size-medium,
.single-product .woocommerce-Tabs-panel--description .entry-content img.size-medium {
	max-width: 300px !important;
	max-height: 300px !important;
	width: auto !important;
	height: auto !important;
}
.single-product .woocommerce-product-details__description-body img.size-large,
.single-product .woocommerce-Tabs-panel--description .entry-content img.size-large {
	max-width: 1024px !important;
	max-height: 1024px !important;
	width: auto !important;
	height: auto !important;
}
/* 描述区图片后清除浮动，避免布局塌陷 */
.single-product .woocommerce-product-details__description-body .wp-caption,
.single-product .woocommerce-Tabs-panel--description .entry-content .wp-caption {
	clear: both;
}
.single-product .woocommerce-product-details__description-body::after,
.single-product .woocommerce-Tabs-panel--description .entry-content::after {
	content: "";
	display: table;
	clear: both;
}

/* 详情页：分类/品牌等 meta 区块竖排紧凑 */
.single-product .product_meta.usnake-product-meta-stack,
.woocommerce .product_meta.usnake-product-meta-stack,
.single-product .product_meta,
.woocommerce .product_meta {
	display: flex !important;
	flex-direction: column !important;
	gap: 4px !important;
	margin: 6px 0 10px 0 !important;
	font-size: 13px !important;
	line-height: 1.4 !important;
}
.single-product .product_meta .usnake-product-meta-row,
.woocommerce .product_meta .usnake-product-meta-row,
.single-product .product_meta > *,
.woocommerce .product_meta > * {
	display: block !important;
}
.single-product .product_meta .usnake-product-meta-row span,
.woocommerce .product_meta .usnake-product-meta-row span {
	display: inline !important;
}

/* 详情页评论区块 - 现代简约，移动端优先 */
#reviews.woocommerce-Reviews {
	max-width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	overflow-x: hidden;
	overflow-wrap: break-word;
	word-wrap: break-word;
}
#reviews #comments {
	margin-bottom: 24px;
}
#reviews .woocommerce-Reviews-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1f2937;
	margin: 0 0 8px 0;
	line-height: 1.3;
}
#reviews .woocommerce-noreviews {
	font-size: 0.9375rem;
	color: #6b7280;
	margin: 0 0 16px 0;
	line-height: 1.5;
}
#reviews #review_form_wrapper,
#reviews #respond,
#reviews .comment-respond {
	margin-top: 24px;
	padding: 20px 0 0;
	border-top: 1px solid #e5e7eb;
	max-width: 100% !important;
	box-sizing: border-box !important;
	overflow-x: hidden !important;
	overflow-wrap: break-word !important;
	word-wrap: break-word !important;
}
#reviews #review_form,
#reviews #commentform,
#reviews .comment-form {
	max-width: 100% !important;
	box-sizing: border-box !important;
	overflow-x: hidden !important;
	overflow-wrap: break-word !important;
	word-wrap: break-word !important;
}
#reviews #reply-title,
#reviews .comment-reply-title,
#review_form_wrapper #reply-title,
#review_form_wrapper .comment-reply-title,
.woocommerce-Reviews #reply-title,
.woocommerce-Reviews .comment-reply-title,
#respond .comment-reply-title,
.comment-respond .comment-reply-title {
	display: block !important;
	font-size: 1.125rem;
	font-weight: 600;
	color: #1f2937;
	margin: 0 0 16px 0;
	/* 防止长标题溢出 */
	word-wrap: break-word !important;
	overflow-wrap: break-word !important;
	word-break: break-word !important;
	max-width: 100% !important;
	hyphens: auto !important;
	white-space: normal !important;
}
#reviews .comment-notes {
	font-size: 0.8125rem;
	color: #6b7280;
	margin: 0 0 20px 0;
	line-height: 1.5;
}
/* 评级 */
#reviews .comment-form-rating {
	margin-bottom: 20px;
}
#reviews .comment-form-rating label {
	display: block;
	font-size: 0.9375rem;
	font-weight: 500;
	color: #374151;
	margin-bottom: 10px;
}
#reviews .comment-form-rating #rating {
	display: block;
	width: 100%;
	max-width: 120px;
	padding: 10px 12px;
	font-size: 0.9375rem;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	color: #1f2937;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
}
/* 评价内容 */
#reviews .comment-form-comment {
	margin-bottom: 20px;
}
#reviews .comment-form-comment label {
	display: block;
	font-size: 0.9375rem;
	font-weight: 500;
	color: #374151;
	margin-bottom: 8px;
}
#reviews .comment-form-comment textarea {
	display: block;
	width: 100%;
	min-height: 120px;
	padding: 12px 14px;
	font-size: 0.9375rem;
	line-height: 1.5;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	color: #1f2937;
	box-sizing: border-box;
	resize: vertical;
}
#reviews .comment-form-comment textarea:focus {
	outline: none;
	border-color: #8B7FA8;
	box-shadow: 0 0 0 3px rgba(139, 127, 168, 0.12);
}
/* 名称、邮箱 */
#reviews .comment-form-author,
#reviews .comment-form-email {
	margin-bottom: 20px;
}
#reviews .comment-form-author label,
#reviews .comment-form-email label {
	display: block;
	font-size: 0.9375rem;
	font-weight: 500;
	color: #374151;
	margin-bottom: 8px;
}
#reviews .comment-form-author input,
#reviews .comment-form-email input {
	display: block;
	width: 100%;
	padding: 10px 14px;
	font-size: 0.9375rem;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	color: #1f2937;
	box-sizing: border-box;
}
#reviews .comment-form-author input:focus,
#reviews .comment-form-email input:focus {
	outline: none;
	border-color: #8B7FA8;
	box-shadow: 0 0 0 3px rgba(139, 127, 168, 0.12);
}
#reviews .comment-form .required {
	color: #dc2626;
}
/* 保存信息勾选 */
#reviews .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 24px;
}
#reviews .comment-form-cookies-consent input {
	margin: 3px 0 0 0;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
}
#reviews .comment-form-cookies-consent label {
	font-size: 0.8125rem;
	color: #6b7280;
	line-height: 1.5;
	margin: 0;
}
/* 提交按钮 */
#reviews .form-submit {
	margin: 0 0 8px 0;
}
#reviews .form-submit input[type="submit"] {
	display: inline-block;
	padding: 12px 24px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #fff;
	background: #8B7FA8;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: opacity 0.2s, background 0.2s;
}
#reviews .form-submit input[type="submit"]:hover {
	opacity: 0.92;
	background: #7a6e96;
}
#reviews .form-submit input[type="submit"]:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(139, 127, 168, 0.3);
}
/* 评论列表 */
#reviews .commentlist {
	list-style: none;
	margin: 0 0 24px 0;
	padding: 0;
}
#reviews .commentlist > li {
	padding: 16px 0;
	border-bottom: 1px solid #f3f4f6;
}
#reviews .commentlist > li:last-child {
	border-bottom: none;
}
#reviews .commentlist .meta {
	font-size: 0.8125rem;
	color: #6b7280;
	margin-bottom: 6px;
}
#reviews .commentlist .description p {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: #374151;
}

@media (max-width: 768px) {
	#reviews.woocommerce-Reviews {
		padding: 0 2px;
	}
	#reviews #review_form_wrapper {
		padding: 20px 16px 24px;
		margin-top: 20px;
		background: #f9fafb;
		border-radius: 12px;
		border: 1px solid #f3f4f6;
	}
	#reviews #review_form {
		margin: 0;
	}
	#reviews .woocommerce-Reviews-title {
		font-size: 1.125rem;
		margin-bottom: 12px;
	}
	#reviews .comment-form-rating,
	#reviews .comment-form-comment,
	#reviews .comment-form-author,
	#reviews .comment-form-email {
		margin-bottom: 18px;
	}
	#reviews .comment-form-comment textarea {
		min-height: 100px;
		padding: 12px;
	}
	#reviews .comment-form-cookies-consent {
		margin-bottom: 20px;
	}
	#reviews .form-submit input[type="submit"] {
		width: 100%;
		padding: 14px 20px;
	}
}
