/* 修正表格样式 - 修复表头选择器错误并统一单元格样式 */
.product-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    table-layout: fixed;
    /* 固定表格布局，确保列宽一致 */
}

/* 修复此处的选择器错误（缺少.）并统一th和td样式 */
.product-table th,
.product-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    white-space: normal;
    /* 允许自动换行 */
    vertical-align: top;
    /* 顶部对齐 */
    word-wrap: break-word;
    /* 长文本换行 */
}

/* 为每列设置固定宽度比例，根据内容调整 */
.product-table th:nth-child(1),
.product-table td:nth-child(1) {
    width: 10%;
    /* 序号列 */
}

.product-table th:nth-child(2),
.product-table td:nth-child(2) {
    width: 20%;
    /* 名称列 */
}

.product-table th:nth-child(3),
.product-table td:nth-child(3) {
    width: 40%;
    /* PN列（内容较长） */
}

.product-table th:nth-child(4),
.product-table td:nth-child(4) {
    width: 30%;
    /* 备注列 */
}

.product-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.product-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s;
}

.product-table tbody tr:hover {
    background-color: #f1f7ff;
}

.modal-content {
    border-radius: 10px;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #215a98 0%, #2194d4 100%);
    color: white;
    border-bottom: none;
}

.modal-body {
    padding: 25px;
}

.product-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

.product-detail-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.product-detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #2c3e50;
    margin-right: 10px;
}

.product-description {
    line-height: 1.6;
    color: #555;
}

.btn-close {
    filter: invert(1);
}

/* 三级菜单样式 */
.submenu .submenu {
    left: 100%;
    top: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.submenu li:hover>.submenu {
    opacity: 1;
    visibility: visible;
}

.submenu li {
    position: relative;
}

.submenu .submenu li {
    width: 180px;
}

/* 分页控件样式优化：页码显示与输入框对齐 */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.page-info {
    color: #2c3e50;
    font-weight: 500;
}

.page-jump {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-jump input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-align: center;
    transition: border-color 0.2s;
}

.page-jump input:focus {
    outline: none;
    border-color: #2575fc;
    box-shadow: 0 0 0 2px rgba(37, 117, 252, 0.25);
}

.page-jump button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background-color: #214a7b;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.page-jump button:hover {
    background-color: #1a68e0;
}

/* 响应式适配：小屏幕下分页控件换行显示 */
@media (max-width: 576px) {
    .pagination-container {
        flex-direction: column;
        gap: 10px;
    }

    .page-jump {
        width: 100%;
        justify-content: center;
    }
}