/**
 * 产品规格表：前端样式
 * 目标风格：参考 MetalsDepot 铝材规格表的简洁表格。
 */

.pst-wrap {
	margin: 16px 0;
}

/* 属性筛选 */
.pst-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
}

.pst-filter-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.pst-filter-label {
	font-size: 13px;
	color: #555;
}

.pst-filter {
	padding: 6px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	font-size: 14px;
}

/* 表格 */
.pst-table-scroll {
	overflow-x: auto;
}

.pst-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	background: #fff;
	border: 1px solid #e0e0e0;
}

.pst-table th {
	text-align: left;
	padding: 8px 10px;
	background: #f5f5f5;
	border-bottom: 2px solid #ddd;
	font-weight: 600;
	white-space: nowrap;
}

.pst-table td {
	padding: 8px 10px;
	border-bottom: 1px solid #eee;
	vertical-align: middle;
}

.pst-table tbody tr:hover {
	background: #f9f9f9;
}

.pst-variation .pst-name-text {
	font-weight: 700;
}

.pst-desc {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	color: #777;
}

.pst-sku {
	white-space: nowrap;
	color: #444;
}

/* 属性值列：紧凑、居中（参考 MetalsDepot 风格） */
.pst-attr {
	white-space: nowrap;
	text-align: center;
	color: #333;
}

.pst-weight,
.pst-price {
	white-space: nowrap;
}

/* 不可购买行 */
.pst-unavailable td {
	background: #fafafa;
	color: #999;
}

.pst-unavailable .pst-price {
	color: #999;
}

/* 交叉选择模式 */
.pst-cross .pst-col-sel {
	white-space: nowrap;
	text-align: center;
}

.pst-cross .pst-col-select {
	padding: 5px 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	font-size: 13px;
	max-width: 110px;
}

.pst-cross .pst-row-val {
	font-weight: 700;
}

.pst-sku-line {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #888;
	white-space: nowrap;
}

.pst-cell-out {
	color: #b33;
	font-weight: 600;
	white-space: nowrap;
}

.pst-out {
	color: #b33;
	font-weight: 600;
	white-space: nowrap;
}

/* 每行加购表单 */
.pst-form {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 !important;
	padding: 0 !important;
}

.pst-form .quantity {
	margin: 0 !important;
}

.pst-form .qty {
	width: 56px !important;
	padding: 6px 6px !important;
}

.pst-atc {
	padding: 7px 12px !important;
	white-space: nowrap;
}

.pst-atc.loading {
	opacity: 0.6;
	pointer-events: none;
}

.pst-added {
	color: #1e8449;
	font-size: 13px;
	margin-left: 6px;
	white-space: nowrap;
}

.pst-added.pst-error {
	color: #b33;
}

.pst-empty {
	color: #888;
}

/* 工具栏：导出 CSV + 单位切换 */
.pst-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.pst-export {
	padding: 6px 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	font-size: 13px;
	cursor: pointer;
}

.pst-export:hover {
	background: #f5f5f5;
}

.pst-unit-switch {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #555;
}

.pst-unit-select {
	padding: 5px 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	font-size: 13px;
}

/* SKU 复制按钮 */
.pst-copy {
	margin-left: 6px;
	padding: 2px 8px;
	border: 1px solid #bbb;
	border-radius: 3px;
	background: #f5f5f5;
	font-size: 12px;
	line-height: 1.5;
	cursor: pointer;
	white-space: nowrap;
}

.pst-copy:hover {
	background: #e8e8e8;
}

/* 行小计 */
.pst-subtotal {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	color: #555;
	white-space: nowrap;
}

/* 访客询价 */
.pst-inquiry {
	color: #b8860b;
	font-weight: 600;
	white-space: nowrap;
}

/* ---------- 配色主题（后台“表格配色样式”选择） ---------- */

/* 蓝色 */
.pst-style-blue .pst-table {
	border-color: #9db8dd;
}
.pst-style-blue .pst-table th {
	background: #1d5fa8;
	color: #fff;
	border-bottom-color: #164a82;
}
.pst-style-blue .pst-table td {
	border-bottom-color: #dfe9f5;
}
.pst-style-blue .pst-table tbody tr:hover {
	background: #eef4fb;
}
.pst-style-blue .pst-filter,
.pst-style-blue .pst-col-select,
.pst-style-blue .pst-unit-select {
	border-color: #9db8dd;
}
.pst-style-blue .pst-price,
.pst-style-blue .pst-row-val {
	color: #1d5fa8;
}

/* 绿色 */
.pst-style-green .pst-table {
	border-color: #a9cfae;
}
.pst-style-green .pst-table th {
	background: #2e7d32;
	color: #fff;
	border-bottom-color: #236627;
}
.pst-style-green .pst-table td {
	border-bottom-color: #e0efe1;
}
.pst-style-green .pst-table tbody tr:hover {
	background: #eef7ef;
}
.pst-style-green .pst-filter,
.pst-style-green .pst-col-select,
.pst-style-green .pst-unit-select {
	border-color: #a9cfae;
}
.pst-style-green .pst-price,
.pst-style-green .pst-row-val {
	color: #2e7d32;
}

/* 橙色（暖色） */
.pst-style-orange .pst-table {
	border-color: #e8c39a;
}
.pst-style-orange .pst-table th {
	background: #c2600a;
	color: #fff;
	border-bottom-color: #9c4d08;
}
.pst-style-orange .pst-table td {
	border-bottom-color: #f6e6d2;
}
.pst-style-orange .pst-table tbody tr:hover {
	background: #fdf3e7;
}
.pst-style-orange .pst-filter,
.pst-style-orange .pst-col-select,
.pst-style-orange .pst-unit-select {
	border-color: #e8c39a;
}
.pst-style-orange .pst-price,
.pst-style-orange .pst-row-val {
	color: #b2560a;
}

/* 深色 */
.pst-style-dark .pst-table {
	border-color: #4b5a68;
}
.pst-style-dark .pst-table th {
	background: #2f3a45;
	color: #fff;
	border-bottom-color: #232c35;
}
.pst-style-dark .pst-table td {
	border-bottom-color: #e2e7ea;
}
.pst-style-dark .pst-table tbody tr:hover {
	background: #f0f3f5;
}
.pst-style-dark .pst-filter,
.pst-style-dark .pst-col-select,
.pst-style-dark .pst-unit-select {
	border-color: #4b5a68;
}
.pst-style-dark .pst-price,
.pst-style-dark .pst-row-val {
	color: #2f3a45;
	font-weight: 600;
}

/* 小屏 */
@media (max-width: 768px) {
	.pst-table th,
	.pst-table td {
		padding: 8px;
	}
}
