/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #303133;
    line-height: 1.6;
}

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

/* 头部 */
.header {
    background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(64, 158, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 1px;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    margin: 0 5px;
    border-radius: 20px;
    transition: all 0.3s;
    opacity: 0.9;
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

/* 主内容 */
.main {
    min-height: calc(100vh - 140px);
    padding: 40px 0;
}

/* 查询区域 */
.search-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.search-box .title {
    text-align: center;
    font-size: 28px;
    color: #303133;
    margin-bottom: 30px;
    font-weight: 600;
}

.search-form {
    max-width: 900px;
    margin: 0 auto;
}

.search-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .search-row {
        grid-template-columns: 1fr;
    }
}

.search-item {
    display: flex;
    flex-direction: column;
}

.search-item label {
    font-size: 14px;
    color: #606266;
    margin-bottom: 8px;
}

.search-actions {
    text-align: center;
    margin-top: 30px;
}

.search-actions .el-button {
    width: 200px;
    height: 48px;
    font-size: 16px;
}

.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #dcdfe6;
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.divider span {
    background: white;
    padding: 0 20px;
    color: #909399;
    font-size: 14px;
}

.number-search {
    max-width: 500px;
    margin: 0 auto;
}

.number-search .el-input {
    --el-input-focus-border-color: #409EFF;
}

/* 结果区域 */
.result-box {
    margin-top: 30px;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.result-header {
    padding-bottom: 20px;
    border-bottom: 1px solid #ebeef5;
    margin-bottom: 20px;
    font-size: 16px;
    color: #606266;
}

.result-header strong {
    color: #409EFF;
    font-size: 20px;
}

.part-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    min-height: 200px;
}

.part-card {
    border: 1px solid #ebeef5;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.part-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #409EFF;
}

.part-image {
    height: 180px;
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.part-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.no-image {
    color: #c0c4cc;
    font-size: 14px;
}

.part-info {
    padding: 15px;
}

.part-name {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.part-number,
.part-position {
    font-size: 13px;
    color: #909399;
    margin-top: 4px;
}

.empty-result {
    padding: 60px 0;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

/* 详情弹窗 */
.part-detail {
    padding: 10px 0;
}

.detail-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .detail-main {
        grid-template-columns: 1fr;
    }
}

.detail-images .main-image {
    background: #f5f7fa;
    border-radius: 8px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 15px;
}

.detail-images .main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.detail-images .thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-images .thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.detail-images .thumbnails img:hover,
.detail-images .thumbnails img.active {
    border-color: #409EFF;
}

.detail-info h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #303133;
}

.detail-info .info-row {
    margin-bottom: 15px;
    font-size: 15px;
}

.detail-info .info-row label {
    color: #909399;
    display: inline-block;
    width: 80px;
}

.detail-info .info-row span {
    color: #303133;
}

/* 底部 */
.footer {
    background: #303133;
    color: #909399;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
}