/* Product Library - 前端样式 */

.pl-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ---------- 产品库网格 / 表格 ---------- */
.pl-product-library {
	margin: 20px 0;
}

.pl-filter-bar {
	margin-bottom: 14px;
}
.pl-filter-bar.pl-filter-bar-cat {
	display: inline-block;
	margin-right: 12px;
	vertical-align: middle;
}
.pl-product-search-input,
.pl-filter-select {
	padding: 9px 12px;
	border: 1px solid #d8dee6;
	border-radius: 6px;
	font-size: 14px;
	min-width: 220px;
}
.pl-product-search-input:focus,
.pl-filter-select:focus {
	outline: none;
	border-color: var(--pl-accent, #0b5fa5);
}

/* 表格布局（仿官网） */
.pl-product-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid #e6eaef;
	border-radius: 8px;
	overflow: hidden;
	font-size: 14px;
}
.pl-product-table thead th {
	background: var(--pl-accent, #0b5fa5);
	color: #fff;
	text-align: left;
	padding: 12px 14px;
	font-weight: 600;
	white-space: nowrap;
}
.pl-product-table tbody td {
	padding: 11px 14px;
	border-top: 1px solid #eef1f5;
	vertical-align: middle;
}
.pl-product-table tbody tr:nth-child(even) {
	background: #fafbfc;
}
.pl-product-table tbody tr:hover {
	background: #eef5fb;
}
.pl-product-table .pl-col-index {
	color: #95a0ad;
	width: 48px;
}
.pl-product-table .pl-col-name a {
	font-weight: 600;
	color: #1c2530;
	text-decoration: none;
}
.pl-product-table .pl-col-name a:hover {
	color: var(--pl-accent, #0b5fa5);
}
.pl-product-table .pl-cas {
	font-family: "Courier New", monospace;
	color: #5a6573;
}

/* 网格卡片布局 */
.pl-product-grid {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(3, 1fr);
}
.pl-product-grid.pl-cols-2 { grid-template-columns: repeat(2, 1fr); }
.pl-product-grid.pl-cols-4 { grid-template-columns: repeat(4, 1fr); }
.pl-product-card {
	border: 1px solid #e6eaef;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow .2s, transform .2s;
}
.pl-product-card:hover {
	box-shadow: 0 8px 24px rgba(20,30,50,.10);
	transform: translateY(-2px);
}
.pl-card-thumb {
	display: block;
	background: #f4f6f9;
	aspect-ratio: 4/3;
	overflow: hidden;
}
.pl-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.pl-card-body { padding: 14px 16px; }
.pl-card-title { font-size: 16px; margin: 0 0 8px; }
.pl-card-title a { color: #1c2530; text-decoration: none; }
.pl-card-title a:hover { color: var(--pl-accent, #0b5fa5); }
.pl-card-meta { font-size: 13px; color: #5a6573; margin: 3px 0; }
.pl-meta-label { display: inline-block; min-width: 64px; color: #95a0ad; }

.pl-no-products { padding: 30px; text-align: center; color: #95a0ad; }

/* 分页 */
.pl-pagination { margin-top: 22px; text-align: center; }
.pl-pagination ul { list-style: none; padding: 0; margin: 0; display: inline-flex; gap: 6px; }
.pl-pagination li a,
.pl-pagination li span {
	display: inline-block;
	min-width: 36px;
	padding: 8px 10px;
	border: 1px solid #e0e5ec;
	border-radius: 6px;
	color: #1c2530;
	text-decoration: none;
}
.pl-pagination li .current,
.pl-pagination li a:hover { background: var(--pl-accent, #0b5fa5); color: #fff; border-color: var(--pl-accent, #0b5fa5); }

/* ---------- 产品单页 ---------- */
.pl-single-product { padding: 28px 0 48px; }
.pl-breadcrumb { font-size: 13px; color: #95a0ad; margin-bottom: 18px; }
.pl-breadcrumb a { color: #5a6573; text-decoration: none; }
.pl-breadcrumb .sep { margin: 0 8px; }
.pl-breadcrumb .current { color: #1c2530; }

.pl-product-top {
	display: grid;
	grid-template-columns: 360px 1fr;
	gap: 32px;
	align-items: start;
}
.pl-product-media img { max-width: 100%; height: auto; border: 1px solid #e6eaef; border-radius: 10px; display: block; }
.pl-product-media .pl-structure-img { margin-top: 14px; }
.pl-product-title { font-size: 28px; margin: 0 0 16px; color: #1c2530; }

.pl-meta-table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid #e6eaef;
	border-radius: 8px;
	overflow: hidden;
}
.pl-meta-table th,
.pl-meta-table td {
	padding: 11px 14px;
	border-top: 1px solid #eef1f5;
	font-size: 14px;
	vertical-align: top;
}
.pl-meta-table tr:first-child th,
.pl-meta-table tr:first-child td { border-top: none; }
.pl-meta-table th {
	width: 130px;
	background: #f7f9fb;
	color: #5a6573;
	font-weight: 600;
	text-align: left;
}
.pl-meta-table td { color: #1c2530; }
.pl-meta-table .pl-row-long th,
.pl-meta-table .pl-row-long td { vertical-align: top; }

.pl-download-list { margin: 18px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pl-download-btn {
	display: inline-block;
	padding: 9px 16px;
	background: #fff;
	border: 1px solid var(--pl-accent, #0b5fa5);
	color: var(--pl-accent, #0b5fa5);
	border-radius: 6px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
}
.pl-download-btn:hover { background: var(--pl-accent, #0b5fa5); color: #fff; }

.pl-inquiry-button {
	display: inline-block;
	margin-top: 16px;
	padding: 12px 28px;
	background: var(--pl-accent, #0b5fa5);
	color: #fff;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
}
.pl-inquiry-button:hover { opacity: .92; }

.pl-product-content { margin-top: 28px; line-height: 1.8; }
.pl-content-title { font-size: 20px; margin: 0 0 14px; padding-left: 12px; border-left: 4px solid var(--pl-accent, #0b5fa5); }

/* 详情页 meta 行（访问量/价格/系列/更新日期） */
.pl-product-short { color: #5a6573; font-size: 14px; margin: 0 0 14px; }
.pl-meta-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1px;
	background: #e6eaef;
	border: 1px solid #e6eaef;
	border-radius: 8px;
	overflow: hidden;
	margin: 0 0 18px;
}
.pl-meta-cell { background: #f7f9fb; padding: 10px 12px; }
.pl-meta-cell-label { display: block; font-size: 12px; color: #95a0ad; }
.pl-meta-cell-value { display: block; font-size: 14px; color: #1c2530; font-weight: 600; margin-top: 2px; }
.pl-meta-cell-value a { color: var(--pl-accent, #0b5fa5); text-decoration: none; }

/* 上一篇 / 下一篇 */
.pl-prev-next {
	display: flex; flex-wrap: wrap; gap: 10px 30px;
	margin-top: 26px; padding: 14px 18px;
	background: #f7f9fb; border: 1px solid #e6eaef; border-radius: 8px;
	font-size: 14px;
}
.pl-pn-item { color: #5a6573; }
.pl-pn-item a { color: #1c2530; text-decoration: none; margin-left: 8px; font-weight: 600; }
.pl-pn-item a:hover { color: var(--pl-accent, #0b5fa5); }
.pl-pn-item em { color: #95a0ad; font-style: normal; margin-left: 8px; }

/* 相关推荐 */
.pl-related { margin-top: 32px; }
.pl-related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pl-related-card {
	border: 1px solid #e6eaef; border-radius: 10px; overflow: hidden;
	background: #fff; text-align: center; transition: box-shadow .2s, transform .2s;
}
.pl-related-card:hover { box-shadow: 0 8px 24px rgba(20,30,50,.10); transform: translateY(-2px); }
.pl-related-img { display: block; aspect-ratio: 4/3; background: #f4f6f9; overflow: hidden; }
.pl-related-img img { width: 100%; height: 100%; object-fit: cover; }
.pl-related-title { font-size: 15px; margin: 12px 12px 4px; }
.pl-related-title a { color: #1c2530; text-decoration: none; }
.pl-related-title a:hover { color: var(--pl-accent, #0b5fa5); }
.pl-related-btn {
	display: inline-block; margin: 8px 0 14px; font-size: 13px;
	color: var(--pl-accent, #0b5fa5); text-decoration: none;
}
.pl-related-btn:hover { text-decoration: underline; }
@media (max-width: 900px) {
	.pl-meta-row { grid-template-columns: repeat(2, 1fr); }
	.pl-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.pl-related-grid { grid-template-columns: 1fr; }
}

/* 图册 */
.pl-product-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}
.pl-product-gallery figure { margin: 0; max-width: 320px; }
.pl-product-gallery img { max-width: 100%; border: 1px solid #e6eaef; border-radius: 8px; }
.pl-product-gallery figcaption { font-size: 13px; color: #95a0ad; margin-top: 6px; text-align: center; }
.pl-structure-figure { margin: 0 0 20px; max-width: 320px; }
.pl-structure-figure img { max-width: 100%; border: 1px solid #e6eaef; border-radius: 8px; }
.pl-structure-figure figcaption { font-size: 13px; color: #95a0ad; margin-top: 6px; }

/* 询盘表单 */
.pl-inquiry-area { margin-top: 36px; }
.pl-inquiry-form-wrap { background: #f7f9fb; border: 1px solid #e6eaef; border-radius: 12px; padding: 26px; }
.pl-inquiry-title { margin: 0 0 18px; font-size: 20px; }
.pl-form-row { margin-bottom: 14px; }
.pl-form-row label { display: block; font-size: 13px; color: #5a6573; margin-bottom: 6px; }
.pl-form-row input,
.pl-form-row textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d8dee6;
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
}
.pl-form-row input:focus,
.pl-form-row textarea:focus { outline: none; border-color: var(--pl-accent, #0b5fa5); }
.pl-inquiry-submit {
	padding: 12px 28px;
	background: var(--pl-accent, #0b5fa5);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.pl-inquiry-submit:hover { opacity: .92; }
.pl-inquiry-success { background: #e7f7ec; color: #1c7c3f; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.pl-inquiry-error { background: #fdeaea; color: #c0392b; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.pl-honeypot { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* 分类列表 / 归档 */
.pl-archive-product { padding: 28px 0 48px; }
.pl-archive-header { margin-bottom: 24px; }
.pl-archive-header h1 { font-size: 28px; margin: 0 0 8px; }
.pl-archive-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.pl-archive-sidebar { border: 1px solid #e6eaef; border-radius: 10px; padding: 18px; background: #fff; }
.pl-cat-list { list-style: none; padding: 0; margin: 0; }
.pl-cat-list li { margin: 0; }
.pl-cat-list a { display: block; padding: 9px 10px; color: #1c2530; text-decoration: none; border-radius: 6px; }
.pl-cat-list a:hover { background: #eef5fb; color: var(--pl-accent, #0b5fa5); }
.pl-cat-count { color: #95a0ad; font-size: 12px; }
.pl-widget-title { font-size: 16px; margin: 0 0 12px; }

/* 编辑器中提示 */
.pl-editor-hint {
	padding: 14px 16px;
	background: #fff8e6;
	border: 1px dashed #e0c068;
	border-radius: 8px;
	color: #8a6d1a;
	font-size: 13px;
}

/* 后台 meta box */
.pl-meta-box .pl-meta-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px 20px;
	margin-bottom: 18px;
}
.pl-meta-row { display: flex; flex-direction: column; }
.pl-meta-row span { font-size: 12px; color: #5a6573; margin-bottom: 4px; }
.pl-meta-row input { padding: 7px 9px; border: 1px solid #d8dee6; border-radius: 5px; }
.pl-meta-box h4 { margin: 14px 0 8px; font-size: 13px; color: #1c2530; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
	.pl-product-top { grid-template-columns: 1fr; }
	.pl-archive-layout { grid-template-columns: 1fr; }
	.pl-product-grid,
	.pl-product-grid.pl-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
	.pl-product-grid,
	.pl-product-grid.pl-cols-2,
	.pl-product-grid.pl-cols-3,
	.pl-product-grid.pl-cols-4 { grid-template-columns: 1fr; }
	.pl-meta-box .pl-meta-grid { grid-template-columns: 1fr; }
	.pl-product-table { font-size: 12px; }
	.pl-product-table thead th,
	.pl-product-table tbody td { padding: 8px 9px; }
}

/* 产品展示：按原图比例完整显示（不裁剪） */
.pl-product-table td { line-height: 1.5; }
.pl-product-table td img { max-width: 160px; max-height: 160px; width: auto; height: auto; object-fit: contain; display: block; margin: 0 auto; }
.pl-product-top .pl-product-media {
    height: 420px;
    background: #f4f6f9;
    display: flex; align-items: center; justify-content: center;
    padding: 16px; border-radius: var(--daping-radius);
    overflow: hidden;
}
.pl-product-top .pl-product-media img,
.pl-product-top .pl-structure-img {
    max-width: 100%; max-height: 100%; width: auto; height: auto;
    object-fit: contain; display: block;
}
.pl-related-img {
    height: 200px; background: #f4f6f9;
    display: flex; align-items: center; justify-content: center;
    padding: 10px; overflow: hidden;
}
.pl-related-img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.pl-product-gallery img { max-width: 100%; height: auto; object-fit: contain; }
